:root {
    --bg-dark: #F4F4F5;
    --sidebar-bg: #FFFFFF;
    --card-bg: #FFFFFF;
    --text-main: #111111;
    --text-muted: #777777;
    --gold: #E5C058;
    --gold-hover: #D4AF37;
    --border: #E4E4E7;
    --radius: 16px;
}

body.dark {
    --bg-dark: #0A0A0A;
    --sidebar-bg: #111111;
    --card-bg: #1A1A1A;
    --text-main: #FFFFFF;
    --text-muted: #888888;
    --border: #2A2A2A;
}

.theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.theme-toggle:hover {
    border-color: var(--gold);
    color: var(--gold);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.logo-box {
    width: 40px;
    height: 40px;
    background: var(--gold);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 20px;
}

.brand h2 {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.badge {
    background: rgba(229, 192, 88, 0.2);
    color: var(--gold);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.nav-links li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-links li:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-main);
}

body.dark .nav-links li:hover {
    background: rgba(255, 255, 255, 0.05);
}

.nav-links li.active {
    background: var(--gold);
    color: #000;
}

.nav-links li ion-icon {
    font-size: 20px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.user-profile .info h4 {
    font-size: 14px;
}

.user-profile .info p {
    font-size: 12px;
    color: var(--text-muted);
}

.logout {
    margin-left: auto;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
}

.logout:hover {
    color: #EF4444;
}

/* Main Content */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 40px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

header h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 8px;
}

header p {
    color: var(--text-muted);
}

.btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--gold);
    color: #000;
}

.btn-primary:hover {
    background: var(--gold-hover);
}

.btn-text {
    background: transparent;
    color: var(--gold);
    padding: 8px 16px;
}

.btn-text:hover {
    background: rgba(229,192,88,0.1);
}

.w-100 {
    width: 100%;
    justify-content: center;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-info {
    overflow: hidden;
}

.stat-info h3 {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.stat-info h2 {
    font-size: 24px;
    font-weight: 800;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #22C55E;
    border-radius: 50%;
    box-shadow: 0 0 10px #22C55E;
}

/* Tables */
.table-container {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

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

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

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

.badge-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-pending { background: rgba(229,192,88,0.15); color: #E5C058; }
.status-approved { background: rgba(59,130,246,0.15); color: #3B82F6; }
.status-ready { background: rgba(34,197,94,0.15); color: #22C55E; }
.status-declined { background: rgba(239,68,68,0.15); color: #EF4444; }

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 24px;
    width: 100%;
    max-width: 400px;
    padding: 32px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header ion-icon {
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.input-group input, .input-group select {
    width: 100%;
    background: var(--sidebar-bg);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 14px;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
}

.input-group input:focus, .input-group select:focus {
    border-color: var(--gold);
}

.filter-chip {
    padding: 7px 16px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.15s;
    white-space: nowrap;
}

.filter-chip:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.filter-chip.active {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
}

.allergen-tag {
    display: inline-block;
    background: rgba(239,68,68,0.1);
    color: #EF4444;
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 600;
    margin: 2px 2px 2px 0;
}

textarea:focus {
    border-color: var(--gold) !important;
    outline: none;
}
