/* ===== ADMIN PANEL CSS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #8B7355;
    --primary-dark: #6B5344;
    --primary-light: #A89078;
    --secondary: #C4A77D;
    --accent: #D4A574;
    --cream-100: #FFFDF8;
    --cream-200: #FDF8F0;
    --cream-300: #F5EDE0;
    --white: #FFFFFF;
    --black: #2C2416;
    --gray-100: #F7F5F2;
    --gray-200: #E8E4DE;
    --gray-300: #D1CBC2;
    --gray-400: #9E9589;
    --gray-500: #6B6355;
    --gray-600: #4A4339;
    --danger: #dc3545;
    --success: #28a745;
    --warning: #ffc107;
    --info: #17a2b8;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: 0.3s ease;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--cream-100);
    color: var(--gray-600);
    line-height: 1.6;
}

/* ===== LOGIN PAGE ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--cream-100) 0%, var(--cream-300) 100%);
    padding: 20px;
}

.login-container {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 10px;
}

.login-header h1 {
    font-size: 28px;
    color: var(--black);
    margin-bottom: 5px;
}

.login-header h1 span {
    color: var(--primary);
}

.login-header p {
    color: var(--gray-400);
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray-600);
}

.login-form input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: var(--transition);
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.login-hint {
    text-align: center;
    margin-top: 15px;
    font-size: 12px;
    color: var(--gray-400);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 115, 85, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #c82333;
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-warning {
    background: var(--warning);
    color: var(--black);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn-xs {
    padding: 6px 12px;
    font-size: 12px;
}

/* ===== ADMIN DASHBOARD LAYOUT ===== */
.admin-dashboard {
    display: flex;
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 260px;
    background: var(--white);
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-header i {
    font-size: 28px;
    color: var(--primary);
}

.sidebar-header h2 {
    font-size: 20px;
    color: var(--black);
}

.sidebar-header h2 span {
    color: var(--primary);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 25px;
    color: var(--gray-500);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--cream-200);
    color: var(--primary);
}

.nav-item.active {
    background: var(--cream-200);
    color: var(--primary);
    border-left-color: var(--primary);
}

.nav-item i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    margin-left: 260px;
    background: var(--cream-100);
    min-height: 100vh;
}

.top-bar {
    background: var(--white);
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-bar h1 {
    font-size: 24px;
    color: var(--black);
    font-weight: 600;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--gray-600);
    cursor: pointer;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--gray-500);
}

.user-info i {
    font-size: 32px;
    color: var(--primary);
}

.content-wrapper {
    padding: 30px;
}

/* ===== SECTIONS ===== */
.section {
    display: none;
}

.section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-header {
    margin-bottom: 25px;
}

.section-header h2 {
    font-size: 28px;
    color: var(--black);
    margin-bottom: 5px;
}

.section-header p {
    color: var(--gray-400);
}

/* ===== DASHBOARD CARDS ===== */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dash-card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 20px;
}

.dash-card-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dash-card-icon i {
    font-size: 24px;
}

.dash-card-info h3 {
    font-size: 28px;
    color: var(--black);
    margin-bottom: 5px;
}

.dash-card-info p {
    color: var(--gray-400);
    font-size: 14px;
}

.quick-actions {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.quick-actions h3 {
    font-size: 18px;
    color: var(--black);
    margin-bottom: 20px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--cream-200);
    color: var(--primary);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.action-btn:hover {
    background: var(--primary);
    color: var(--white);
}

/* ===== FORM CARD ===== */
.form-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 25px;
}

.form-card h3 {
    font-size: 18px;
    color: var(--black);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-card h3 i {
    color: var(--primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray-600);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--gray-400);
    font-size: 12px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-row.three-col {
    grid-template-columns: repeat(2, 1fr);
}

/* ===== FEATURES LIST ===== */
.features-list {
    margin-bottom: 15px;
}

.feature-item {
    background: var(--cream-100);
    padding: 15px;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
}

.feature-item .form-row {
    margin-bottom: 10px;
}

.feature-item .btn-danger {
    padding: 6px 12px;
    font-size: 12px;
}

/* ===== PRODUCTS LIST ===== */
.products-list,
.gallery-list,
.testimonials-list {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.products-list h3,
.gallery-list h3,
.testimonials-list h3 {
    font-size: 18px;
    color: var(--black);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.item-card {
    background: var(--cream-100);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.item-card-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.item-card-body {
    padding: 15px;
}

.item-card-body h4 {
    font-size: 16px;
    color: var(--black);
    margin-bottom: 5px;
}

.item-card-body p {
    font-size: 13px;
    color: var(--gray-400);
    margin-bottom: 10px;
}

.item-card-body .badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--primary);
    color: var(--white);
    font-size: 11px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.item-card-body .price {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
}

.item-card-actions {
    padding: 10px 15px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 10px;
}

/* ===== GALLERY GRID ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.gallery-item-admin {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 1;
}

.gallery-item-admin img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item-admin.large {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item-admin:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-overlay .btn {
    padding: 8px 16px;
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--success);
    color: var(--white);
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-lg);
    transform: translateY(100px);
    opacity: 0;
    transition: var(--transition);
    z-index: 1000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.error {
    background: var(--danger);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        padding: 20px;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .items-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-item-admin.large {
        grid-column: span 1;
        grid-row: span 1;
    }
    
    .top-bar {
        padding: 15px 20px;
    }
    
    .top-bar h1 {
        font-size: 18px;
    }
    
    .user-info span {
        display: none;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 30px 20px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== OVERLAY ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 90;
}

.sidebar-overlay.active {
    display: block;
}
/* ===== LOADING OVERLAY ===== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    gap: 15px;
}

.loading-overlay.hidden {
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-overlay p {
    color: var(--gray-500);
    font-size: 14px;
}

/* ===== TOAST NOTIFICATION ===== */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--success);
    color: var(--white);
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-lg);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    z-index: 10000;
}

.toast.show {
    transform: translateX(0);
}

.toast.error {
    background: var(--danger);
}

.toast i {
    font-size: 20px;
}

/* ===== FEATURE ITEMS ===== */
.feature-item {
    background: var(--cream-200);
    padding: 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 15px;
    border: 1px solid var(--gray-200);
}

.feature-item .form-group {
    margin-bottom: 10px;
}

.feature-item input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 14px;
    background: var(--white);
}

.feature-item input:focus {
    outline: none;
    border-color: var(--primary);
}

/* ===== BADGE IN CARDS ===== */
.item-card .badge {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
}

.price {
    font-weight: 600;
    color: var(--primary);
    font-size: 16px;
    margin-top: 8px;
}

/* ===== GALLERY OVERLAY ===== */
.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item-admin:hover .gallery-item-overlay {
    opacity: 1;
}