@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@300;400;600;700;800;900&family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #B8860B;
    --primary-soft: rgba(184, 134, 11, 0.1);
    --primary-light: #D4A929;
    --secondary: #1E3A5F;
    --secondary-soft: rgba(30, 58, 95, 0.1);
    --accent: #8B4513;
    
    --bg: #F1F5F9;
    --bg-dark: #0F172A;
    --bg-card: #FFFFFF;
    --bg-sidebar: #0F172A;
    --white: #FFFFFF;
    
    --text: #334155;
    --text-muted: #64748B;
    --text-dark: #0F172A;
    --text-light: #F1F5F9;
    --border: #E2E8F0;
    
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    
    --transition: all 0.3s ease;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    overflow-x: hidden;
    width: 100%;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100svh;
    background: var(--bg-sidebar);
    color: var(--white);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo span {
    color: var(--primary);
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
}

.menu-item:hover {
    background: rgba(255,255,255,0.08);
    color: var(--white);
}

.menu-item.active {
    background: var(--primary);
    color: var(--white);
}

.menu-item i {
    width: 20px;
    height: 20px;
}

.sidebar-footer {
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-footer .menu-item {
    color: rgba(255,255,255,0.5);
}

.sidebar-footer .menu-item:hover {
    color: var(--white);
    background: rgba(255,255,255,0.08);
}

.main-content {
    margin-left: 260px;
    padding: 1.5rem 2rem;
    min-height: 100svh;
    background: var(--bg);
}

.mobile-topbar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-sidebar);
    color: var(--white);
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    z-index: 1001;
}

.mobile-topbar .logo {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
}

.mobile-topbar span {
    color: var(--primary);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding-top: calc(60px + 1rem);
    }
    .mobile-topbar {
        display: flex;
    }
    .admin-burger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        padding: 8px;
    }
    .admin-burger span {
        width: 22px;
        height: 2px;
        background: var(--white);
        border-radius: 2px;
        transition: var(--transition);
    }
    .admin-burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .admin-burger.active span:nth-child(2) { opacity: 0; }
    .admin-burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--text-dark);
}

.page-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: var(--font-body);
    font-size: 0.85rem;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--accent);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--white);
}

.btn-outline {
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text);
}
.btn-outline:hover {
    background: var(--bg);
}

.btn-danger {
    background: #DC2626;
    color: var(--white);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.stat-icon.primary { background: var(--primary-soft); color: var(--primary); }
.stat-icon.secondary { background: var(--secondary-soft); color: var(--secondary); }
.stat-icon.green { background: rgba(34, 197, 94, 0.1); color: #22C55E; }
.stat-icon.red { background: rgba(239, 68, 68, 0.1); color: #EF4444; }

.stat-info h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
}

.stat-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.stat-change {
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 4px;
}
.stat-change.positive { color: #22C55E; }
.stat-change.negative { color: #EF4444; }

.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--text-dark);
}

.card-body {
    padding: 1.25rem;
}

.data-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
}

thead {
    background: var(--bg);
}

th {
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

td {
    padding: 14px 16px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: var(--bg);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: rgba(34, 197, 94, 0.1); color: #22C55E; }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: #F59E0B; }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: #EF4444; }
.badge-info { background: rgba(59, 130, 246, 0.1); color: #3B82F6; }

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.status-dot.confirmed { background: #22C55E; }
.status-dot.pending { background: #F59E0B; }
.status-dot.cancelled { background: #EF4444; }

.action-btns {
    display: flex;
    gap: 6px;
}

.action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text-muted);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.action-btn:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.action-btn.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 14px;
}

.search-bar input {
    border: none;
    background: none;
    padding: 10px 0;
    font-size: 0.9rem;
    width: 200px;
    outline: none;
}

.search-bar i {
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}

.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    background: var(--white);
    cursor: pointer;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.quick-action {
    background: var(--bg-card);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    width: 100%;
    text-align: left;
}

.quick-action:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.quick-action i {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--primary-soft);
    color: var(--primary);
}

.quick-action span {
    font-weight: 600;
    color: var(--text-dark);
}

.progress-bar {
    height: 8px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--primary);
    transition: width 0.5s ease;
}

.progress-fill.warning { background: #F59E0B; }
.progress-fill.danger { background: #EF4444; }

.inventory-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.inventory-item:last-child {
    border-bottom: none;
}

.inventory-info {
    flex: 1;
}

.inventory-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.inventory-stock {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.inventory-stock.low {
    color: #EF4444;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.tab {
    padding: 12px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    margin-bottom: -1px;
}

.tab:hover {
    color: var(--text-dark);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    color: var(--border);
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .filters {
        flex-direction: column;
    }
    .filter-select, .search-bar input {
        width: 100%;
    }
}