/* ============================================================
   CalorieTracker - Mobile-First Stylesheet
   ============================================================ */

/* ─── CSS Variables ────────────────────────────────────────── */
:root {
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-light: #d1fae5;
    --secondary: #3b82f6;
    --secondary-light: #dbeafe;
    --accent: #f59e0b;
    --accent-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --success: #22c55e;

    --bg: #f1f5f9;
    --surface: #ffffff;
    --surface-hover: #f8fafc;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;

    --nav-height: 64px;
    --header-height: 56px;

    /* Macro colors */
    --protein-color: #8b5cf6;
    --carbs-color: #22c55e;
    --fat-color: #3b82f6;
    --fiber-color: #14b8a6;
    --sugar-color: #f9a8d4;
    --sodium-color: #eab308;
    --water-color: #3b82f6;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ─── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.5;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; display: block; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

/* ─── Utility Classes ──────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* ─── Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 20px; border: none; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 0.9rem; cursor: pointer;
    transition: all 0.2s ease;
    touch-action: manipulation;
    min-height: 44px;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }

.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }

.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }

.btn-water { background: var(--secondary-light); color: var(--secondary); border: 1px solid var(--secondary); }
.btn-water:hover { background: var(--secondary); color: #fff; }

.btn-sm { padding: 6px 14px; font-size: 0.8rem; min-height: 36px; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-full { width: 100%; }

.btn-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border: none; background: transparent;
    border-radius: 50%; cursor: pointer; color: var(--text);
    transition: background 0.2s;
}
.btn-icon:hover { background: var(--bg); }

.header-btn-group { display: flex; gap: 6px; }

/* ─── Form Elements ────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block; margin-bottom: 4px;
    font-size: 0.85rem; font-weight: 500; color: var(--text-secondary);
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 10px 14px; border: 2px solid var(--border);
    border-radius: var(--radius-sm); background: var(--surface);
    font-size: 1rem; color: var(--text);
    transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--primary);
}
.form-group input::placeholder { color: var(--text-muted); }

.form-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 0 12px;
}

.form-row {
    display: flex; gap: 8px; align-items: end;
}
.form-row .form-group { flex: 1; }

/* ─── Alert ────────────────────────────────────────────────── */
.alert {
    padding: 10px 14px; border-radius: var(--radius-sm);
    font-size: 0.9rem; margin-bottom: 1rem;
}
.alert-error { background: var(--danger-light); color: var(--danger); border: 1px solid var(--danger); }
.alert-success { background: #dcfce7; color: #16a34a; border: 1px solid #22c55e; }

/* ─── Cards ────────────────────────────────────────────────── */
.card {
    background: var(--surface); border-radius: var(--radius);
    padding: 16px; margin-bottom: 12px;
    box-shadow: var(--shadow);
}
.card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px;
}
.card-header h3 {
    font-size: 1rem; font-weight: 600;
    display: flex; align-items: center; gap: 6px;
}

/* ─── Auth Pages ───────────────────────────────────────────── */
.auth-body {
    display: flex; align-items: center; justify-content: center;
    min-height: 100dvh; padding: 20px;
    background: linear-gradient(135deg, #ecfdf5 0%, #dbeafe 100%);
}
.auth-container { width: 100%; max-width: 400px; }
.auth-logo {
    text-align: center; margin-bottom: 2rem;
}
.auth-icon {
    width: 64px; height: 64px; margin: 0 auto 12px;
    background: var(--primary); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
}
.auth-icon svg { width: 32px; height: 32px; }
.auth-logo h1 { font-size: 1.75rem; color: var(--text); }
.auth-logo p { color: var(--text-secondary); font-size: 0.95rem; }

.auth-card {
    background: var(--surface); padding: 24px;
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}
.auth-card h2 { margin-bottom: 1.25rem; font-size: 1.25rem; }
.auth-switch {
    text-align: center; margin-top: 1rem;
    font-size: 0.9rem; color: var(--text-secondary);
}

/* ─── App Layout ───────────────────────────────────────────── */
.app-container {
    max-width: 480px; margin: 0 auto;
    min-height: 100dvh;
    display: flex; flex-direction: column;
    background: var(--bg);
}

.app-header {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    height: var(--header-height); padding: 0 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.app-header h1 { font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 4px; }
.header-date { font-size: 0.8rem; color: var(--text-muted); }

.app-main {
    flex: 1; padding: 12px 16px;
    padding-bottom: calc(var(--nav-height) + 16px);
    overflow-y: auto;
}

/* ─── Page Management ──────────────────────────────────────── */
.page { display: none; }
.page.active { display: block; animation: fadeIn 0.2s ease; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-header-bar {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px;
}
.page-header-bar h2 { font-size: 1.2rem; font-weight: 700; }

/* ─── Bottom Navigation ────────────────────────────────────── */
.bottom-nav {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 480px;
    height: var(--nav-height);
    display: flex; align-items: center; justify-content: space-around;
    background: var(--surface);
    border-top: 1px solid var(--border);
    box-shadow: 0 -2px 10px rgba(0,0,0,.05);
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.nav-item {
    display: flex; flex-direction: column; align-items: center;
    gap: 2px; padding: 6px 0; border: none; background: none;
    color: var(--text-muted); font-size: 0.65rem; font-weight: 500;
    cursor: pointer; transition: color 0.2s;
    min-width: 52px;
}
.nav-item svg { transition: transform 0.2s; }
.nav-item.active { color: var(--primary); }
.nav-item.active svg { transform: scale(1.1); }

.nav-scan {
    position: relative; margin-top: -16px;
}
.nav-scan svg {
    background: var(--primary); color: #fff;
    border-radius: 50%; padding: 10px;
    width: 50px; height: 50px;
    box-shadow: var(--shadow-md);
}
.nav-scan.active svg { background: var(--primary-dark); }

/* ─── Dashboard ────────────────────────────────────────────── */
.date-nav {
    display: flex; align-items: center; justify-content: center;
    gap: 12px; margin-bottom: 16px;
}
.date-display { font-weight: 600; font-size: 0.95rem; }

/* Calorie Ring */
.calorie-ring-container {
    display: flex; justify-content: center; margin-bottom: 16px;
}
.calorie-ring {
    position: relative; width: 160px; height: 160px;
    display: flex; align-items: center; justify-content: center;
}
.calorie-ring svg { width: 160px; height: 160px; }
.calorie-ring-text {
    position: absolute; text-align: center;
    display: flex; flex-direction: column; line-height: 1.2;
}
.ring-value { font-size: 1.75rem; font-weight: 700; color: var(--text); }
.ring-label { font-size: 0.75rem; color: var(--text-muted); }
.ring-unit { font-size: 0.7rem; color: var(--text-muted); }

/* Macro Pills */
.macro-pills {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
}
.macro-pill {
    flex: 1 1 calc(33.333% - 6px); min-width: 90px;
    background: var(--surface); border-radius: var(--radius-sm);
    padding: 10px; text-align: center; box-shadow: var(--shadow);
}
.macro-label { display: block; font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.macro-value { display: block; font-size: 1.05rem; font-weight: 700; margin: 2px 0 6px; }
.macro-bar { height: 4px; border-radius: 2px; background: var(--bg); overflow: hidden; display: flex; }
.macro-fill { height: 100%; border-radius: 2px 0 0 2px; transition: width 0.5s ease; width: 0%; }
.macro-over { height: 100%; background: #ef4444; transition: width 0.5s ease; width: 0%; border-radius: 0 2px 2px 0; }
.macro-value.over-goal { color: #ef4444 !important; }
.macro-pill.protein .macro-value { color: var(--protein-color); }
.macro-pill.protein .macro-fill { background: var(--protein-color); }
.macro-pill.carbs .macro-value { color: var(--carbs-color); }
.macro-pill.carbs .macro-fill { background: var(--carbs-color); }
.macro-pill.fat .macro-value { color: var(--fat-color); }
.macro-pill.fat .macro-fill { background: var(--fat-color); }
.macro-pill.sugar .macro-value { color: var(--sugar-color); }
.macro-pill.sugar .macro-fill { background: var(--sugar-color); }
.macro-pill.sodium .macro-value { color: var(--sodium-color); }
.macro-pill.sodium .macro-fill { background: var(--sodium-color); }

/* Water Card */
.water-card .card-header h3 { color: var(--water-color); }
.water-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.water-bar { flex: 1; height: 10px; border-radius: 5px; background: #e0f2fe; overflow: hidden; }
.water-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, #60a5fa, #3b82f6); transition: width 0.5s ease; width: 0; }
#waterPercent { font-size: 0.85rem; font-weight: 600; color: var(--water-color); min-width: 35px; }
.water-quick-add { display: flex; gap: 6px; flex-wrap: wrap; }
.water-quick-add .btn { flex: 1; min-width: 70px; }

/* Meal Summary */
.meal-summary { }
.meal-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid var(--border);
}
.meal-row:last-child { border-bottom: none; }
.meal-row-left { display: flex; align-items: center; gap: 10px; }
.meal-icon {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
}
.meal-icon.breakfast { background: #fef3c7; }
.meal-icon.lunch { background: #d1fae5; }
.meal-icon.dinner { background: #dbeafe; }
.meal-icon.snack { background: #fce7f3; }
.meal-name { font-weight: 500; font-size: 0.95rem; }
.meal-count { font-size: 0.75rem; color: var(--text-muted); }
.meal-cals { font-weight: 600; color: var(--text); }

/* ─── Food Log Page ────────────────────────────────────────── */
.meal-tabs {
    display: flex; gap: 4px; margin-bottom: 12px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.meal-tab {
    flex: 1; padding: 8px 12px; border: none;
    border-radius: var(--radius-sm); background: var(--surface);
    font-size: 0.8rem; font-weight: 600; color: var(--text-secondary);
    cursor: pointer; white-space: nowrap;
    transition: all 0.2s;
}
.meal-tab.active { background: var(--primary); color: #fff; }

.food-log-list { }
.log-entry {
    background: var(--surface); border-radius: var(--radius-sm);
    padding: 12px; margin-bottom: 8px; box-shadow: var(--shadow);
    display: flex; align-items: center; justify-content: space-between;
}
.log-entry-info { flex: 1; }
.log-entry-name { font-weight: 600; font-size: 0.95rem; }
.log-entry-detail { font-size: 0.8rem; color: var(--text-muted); }
.log-entry-cals { font-weight: 700; font-size: 1.05rem; color: var(--primary); margin-right: 8px; }
.log-entry-delete {
    width: 32px; height: 32px; border: none; background: none;
    color: var(--text-muted); cursor: pointer; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.log-entry-delete:hover { background: var(--danger-light); color: var(--danger); }

/* ─── Scanner Page ─────────────────────────────────────────── */
.scan-mode-tabs {
    display: flex; gap: 4px; margin-bottom: 12px;
}
.scan-mode-tab {
    flex: 1; padding: 10px 12px; border: none;
    border-radius: var(--radius-sm); background: var(--surface);
    font-size: 0.8rem; font-weight: 600; color: var(--text-secondary);
    cursor: pointer; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.scan-mode-tab.active { background: var(--primary); color: #fff; }

.scan-container { text-align: center; }
.scan-preview {
    width: 100%; max-width: 360px; margin: 0 auto 16px;
    aspect-ratio: 4/3; border-radius: var(--radius);
    overflow: hidden; background: #f1f5f9;
    position: relative; display: flex; align-items: center; justify-content: center;
    border: 2px dashed var(--border);
}
.scan-preview img {
    width: 100%; height: 100%; object-fit: cover;
}
.scan-placeholder {
    text-align: center; color: var(--text-muted); padding: 20px;
}
.scan-placeholder svg { margin: 0 auto 8px; opacity: 0.5; }
.scan-placeholder p { font-size: 0.85rem; }

.scan-controls { display: flex; gap: 10px; justify-content: center; margin-bottom: 16px; }
.scan-controls .btn, .scan-controls label.btn { flex: 1; max-width: 180px; cursor: pointer; }
.scan-capture-btn { position: relative; }

.scan-result {
    background: var(--surface); border-radius: var(--radius);
    padding: 16px; box-shadow: var(--shadow); text-align: left;
}
.scan-result h3 { margin-bottom: 12px; }
.scan-data { margin-bottom: 16px; }
.scan-row {
    display: flex; justify-content: space-between;
    padding: 6px 0; border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.scan-row:last-child { border-bottom: none; }
.scan-row-label { color: var(--text-secondary); }
.scan-row-value { font-weight: 600; }
.scan-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.scan-actions .btn { flex: 1; min-width: 100px; }

.scan-loading {
    padding: 40px 20px; text-align: center;
}
.spinner {
    width: 40px; height: 40px; margin: 0 auto 12px;
    border: 4px solid var(--border); border-top-color: var(--primary);
    border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Barcode Scanner */
.barcode-reader {
    width: 100%; max-width: 360px; margin: 0 auto 16px;
    border-radius: var(--radius); overflow: hidden;
}
.barcode-reader video { border-radius: var(--radius); }
.barcode-manual { max-width: 360px; margin: 0 auto 16px; }
#barcodeResult {
    max-width: 400px; margin: 0 auto;
}

/* Turnstile */
.cf-turnstile { margin-bottom: 12px; display: flex; justify-content: center; }
.math-captcha label { display: flex; align-items: center; gap: 6px; }
.math-captcha strong {
    display: inline-block;
    background: var(--surface-alt, #f1f5f9);
    padding: 2px 10px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 1.1em;
    letter-spacing: 1px;
}
.math-captcha input { max-width: 120px; }

/* ─── Recipes Page ─────────────────────────────────────────── */
.recipe-tabs {
    display: flex; gap: 4px; margin-bottom: 12px;
}
.recipe-tab {
    flex: 1; padding: 8px 12px; border: none;
    border-radius: var(--radius-sm); background: var(--surface);
    font-size: 0.8rem; font-weight: 600; color: var(--text-secondary);
    cursor: pointer; transition: all 0.2s;
}
.recipe-tab.active { background: var(--primary); color: #fff; }

.search-bar {
    display: flex; align-items: center; gap: 8px;
    background: var(--surface); border-radius: var(--radius-sm);
    padding: 8px 14px; margin-bottom: 12px;
    border: 2px solid var(--border);
}
.search-bar:focus-within { border-color: var(--primary); }
.search-bar svg { flex-shrink: 0; color: var(--text-muted); }
.search-bar input { border: none; outline: none; width: 100%; background: none; }

.recipes-list { }
.recipe-card {
    background: var(--surface); border-radius: var(--radius-sm);
    padding: 12px; margin-bottom: 8px; box-shadow: var(--shadow);
    cursor: pointer; transition: box-shadow 0.2s;
}
.recipe-card:hover { box-shadow: var(--shadow-md); }
.recipe-card-top { display: flex; justify-content: space-between; align-items: start; margin-bottom: 4px; }
.recipe-card-name { font-weight: 600; font-size: 0.95rem; }
.recipe-card-badge {
    font-size: 0.65rem; font-weight: 600; padding: 2px 8px;
    border-radius: 10px; text-transform: uppercase;
}
.badge-common { background: var(--accent-light); color: var(--accent); }
.badge-recipe { background: var(--primary-light); color: var(--primary); }
.recipe-card-meta { font-size: 0.8rem; color: var(--text-muted); }
.recipe-card-macros {
    display: flex; gap: 10px; margin-top: 6px; font-size: 0.75rem;
}
.recipe-card-macros span { display: flex; align-items: center; gap: 3px; }
.recipe-card-macros .dot {
    width: 6px; height: 6px; border-radius: 50%; display: inline-block;
}

/* ─── Profile Page ─────────────────────────────────────────── */
.profile-info p { padding: 8px 0; border-bottom: 1px solid var(--border); }
.profile-info p:last-child { border-bottom: none; }

.chart-container { width: 100%; position: relative; height: 220px; }
.chart-container-sm { height: 200px; }
.metric-select {
    font-size: 0.8rem;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    outline: none;
}
.metric-select:focus { border-color: var(--primary); }

/* ─── Modal ────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(2px);
    display: none; align-items: flex-end; justify-content: center;
    padding: 0;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--surface); width: 100%; max-width: 480px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 85vh; overflow-y: auto;
    animation: slideUp 0.3s ease;
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    position: sticky; top: 0; background: var(--surface);
    z-index: 1;
}
.modal-header h3 { font-size: 1.1rem; }
.modal-body { padding: 20px; }

/* ─── Toast ────────────────────────────────────────────────── */
.toast-container {
    position: fixed; top: 20px; left: 50%; transform: translateX(-50%);
    z-index: 300; width: 100%; max-width: 400px; padding: 0 16px;
    pointer-events: none;
}
.toast {
    background: var(--text); color: #fff; padding: 12px 16px;
    border-radius: var(--radius-sm); margin-bottom: 8px;
    font-size: 0.9rem; font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.3s ease;
    pointer-events: auto;
}
.toast.success { background: #16a34a; }
.toast.error { background: var(--danger); }
.toast.fade-out { animation: toastOut 0.3s ease forwards; }

@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateY(-10px); } }

/* ─── Admin Page ───────────────────────────────────────────── */
.admin-container {
    max-width: 800px; margin: 0 auto; padding: 0 16px 24px;
    min-height: 100dvh;
}
.admin-header {
    display: flex; align-items: center; justify-content: space-between;
    height: var(--header-height); position: sticky; top: 0;
    background: var(--bg); z-index: 50;
}
.admin-header-left { display: flex; align-items: center; gap: 8px; }
.admin-header h1 { font-size: 1.2rem; }

.admin-stats {
    display: flex; gap: 10px; margin-bottom: 16px;
}
.stat-card {
    flex: 1; background: var(--surface); border-radius: var(--radius-sm);
    padding: 14px; text-align: center; box-shadow: var(--shadow);
}
.stat-value { display: block; font-size: 1.5rem; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; }

.admin-search {
    display: flex; align-items: center; gap: 8px;
    background: var(--surface); border-radius: var(--radius-sm);
    padding: 8px 14px; margin-bottom: 12px;
    border: 2px solid var(--border);
}
.admin-search:focus-within { border-color: var(--primary); }
.admin-search svg { flex-shrink: 0; color: var(--text-muted); }
.admin-search input { border: none; outline: none; width: 100%; background: none; }

.admin-table-container {
    background: var(--surface); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow);
}
.admin-table {
    width: 100%; border-collapse: collapse; font-size: 0.85rem;
}
.admin-table th {
    text-align: left; padding: 10px 12px;
    background: var(--bg); color: var(--text-secondary);
    font-weight: 600; font-size: 0.75rem;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.admin-table td { padding: 10px 12px; border-top: 1px solid var(--border); }
.admin-table tr:hover td { background: var(--surface-hover); }

.user-cell { display: flex; flex-direction: column; }
.user-cell-name { font-weight: 600; }
.user-cell-email { font-size: 0.75rem; color: var(--text-muted); }

.status-badge {
    display: inline-block; padding: 2px 8px; border-radius: 10px;
    font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
}
.status-active { background: #dcfce7; color: #16a34a; }
.status-disabled { background: var(--danger-light); color: var(--danger); }

.action-btns { display: flex; gap: 4px; }
.action-btns .btn-sm { padding: 4px 10px; font-size: 0.7rem; min-height: 28px; }

/* ─── Responsive Desktop ───────────────────────────────────── */
@media (min-width: 481px) {
    .app-container {
        border-left: 1px solid var(--border);
        border-right: 1px solid var(--border);
    }
    .bottom-nav {
        border-radius: 0;
    }
    .modal {
        border-radius: var(--radius-lg);
        margin-bottom: 20px;
        max-height: 80vh;
    }
    .modal-overlay {
        align-items: center;
    }
    @keyframes slideUp {
        from { opacity: 0; transform: scale(0.95); }
        to { opacity: 1; transform: scale(1); }
    }
}

@media (min-width: 768px) {
    .admin-table { font-size: 0.9rem; }
}
