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

html, body {
    height: 100%;
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: #f4f6f8;
}

/* ── App bar (light) ─────────────────────────────────────────────────────── */
.app-bar-light {
    background: #ffffff !important;
    border-bottom: 1px solid #e8eaed !important;
    color: #1a1a1a !important;
}

.app-bar-light .mud-appbar {
    background: #ffffff !important;
}

.app-logo-dark {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    border-radius: 8px;
    background: #1d4d4f;
    padding: 3px;
}

.app-title-dark {
    color: #1a1a1a;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.user-chip-dark {
    background: #f0f2f5 !important;
    color: #1a1a1a !important;
    font-size: 0.8rem;
    margin-right: 4px;
    border: 1px solid #e0e0e0 !important;
}

/* Legacy app bar (keep for fallback) */
.app-logo {
    width: 36px;
    height: 36px;
    margin-right: 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.15);
    padding: 3px;
}

.app-title {
    color: #f7f2ea;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.user-chip {
    background: rgba(255,255,255,0.15) !important;
    color: #f7f2ea !important;
    font-size: 0.8rem;
    margin-right: 4px;
}

/* ── Drawer (dark) ───────────────────────────────────────────────────────── */
.app-drawer-dark {
    background: #1d4d4f !important;
    border-right: none !important;
}

.drawer-nav-dark {
    padding: 12px 0;
}

.drawer-nav-item,
.app-drawer-dark .mud-nav-link {
    color: rgba(255,255,255,0.75) !important;
    border-radius: 10px !important;
    margin: 2px 10px !important;
    padding: 8px 14px !important;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.app-drawer-dark .mud-nav-link:hover {
    background: rgba(255,255,255,0.12) !important;
    color: #ffffff !important;
}

.app-drawer-dark .mud-nav-link.active,
.app-drawer-dark .mud-nav-link[aria-current="page"] {
    background: rgba(255,255,255,0.18) !important;
    color: #ffffff !important;
    font-weight: 600;
}

.app-drawer-dark .mud-nav-link .mud-nav-link-icon {
    color: inherit !important;
}

/* Legacy drawer */
.app-drawer {
    background: #fffaf4 !important;
    border-right: 1px solid #ede5d8 !important;
}

.drawer-header {
    padding: 16px 16px 4px 16px;
}

.drawer-section-label {
    color: #9aaba1;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1.2px;
}

.nav-group-label {
    padding: 8px 16px 2px 16px;
    color: #9aaba1;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 1.2px;
    display: block;
}

/* ── Main content ────────────────────────────────────────────────────────── */
.app-main-light {
    padding: 32px 36px;
    background: #f4f6f8;
    min-height: 100vh;
}

.app-main {
    padding: 28px 32px;
    background: #f7f2ea;
    min-height: 100vh;
}

/* ── Page titles ─────────────────────────────────────────────────────────── */
.section-title {
    margin-bottom: 20px;
    color: #1d4d4f;
    font-weight: 600;
}

/* ── Dashboard header ────────────────────────────────────────────────────── */
.dashboard-header {
    margin-bottom: 28px;
}

.dashboard-title {
    color: #1a1a1a;
    font-weight: 700;
    margin-bottom: 4px;
}

.dashboard-subtitle {
    color: #6b7280;
    font-size: 0.9rem;
}

/* ── KPI Cards ───────────────────────────────────────────────────────────── */
.kpi-card {
    border-radius: 16px;
    padding: 24px;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
    cursor: default;
}

.kpi-card:hover {
    transform: translateY(-2px);
}

/* Dark variant (highlighted) */
.kpi-card--dark {
    background: #1d4d4f;
    box-shadow: 0 4px 24px rgba(29, 77, 79, 0.30);
}

.kpi-card--dark:hover {
    box-shadow: 0 8px 32px rgba(29, 77, 79, 0.40);
}

/* Light variant */
.kpi-card--light {
    background: #ffffff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
}

.kpi-card--light:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.10);
}

.kpi-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.kpi-card__label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.65);
}

.kpi-card__label--dark {
    color: #6b7280;
}

.kpi-card__icon-dark {
    color: rgba(255,255,255,0.55) !important;
}

.kpi-card__value {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    color: #ffffff;
    margin-bottom: 12px;
    letter-spacing: -1px;
}

.kpi-card__value--dark {
    color: #1a1a1a;
}

.kpi-card__action {
    color: rgba(255,255,255,0.70) !important;
    font-size: 0.78rem !important;
    font-weight: 500 !important;
    padding: 0 !important;
    min-width: 0 !important;
    text-transform: none !important;
    margin-top: auto;
}

.kpi-card__action:hover {
    color: #ffffff !important;
    background: transparent !important;
}

.kpi-card__action--dark {
    color: #6b7280 !important;
    font-size: 0.78rem !important;
    font-weight: 500 !important;
    padding: 0 !important;
    min-width: 0 !important;
    text-transform: none !important;
    margin-top: auto;
    background: transparent;
    border: none;
    cursor: pointer;
    display: inline-block;
    transition: color 0.15s;
}

.kpi-card__action--dark:hover {
    color: #1d4d4f !important;
}

/* Icon wrappers on light cards */
.kpi-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kpi-icon-wrap--orange { background: rgba(212, 138, 70, 0.15); }
.kpi-icon-wrap--teal   { background: rgba(0, 150, 136, 0.12); }
.kpi-icon-wrap--red    { background: rgba(211, 47, 47, 0.10); }
.kpi-icon-wrap--blue   { background: rgba(25, 118, 210, 0.10); }

/* ── Quick actions card ───────────────────────────────────────────────────── */
.quick-actions-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    height: 100%;
    box-sizing: border-box;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
}

.quick-actions-title {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 0.95rem;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 12px;
    border-radius: 12px;
    background: #f4f6f8;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
    text-align: center;
    border: 1.5px solid transparent;
}

.quick-action-btn:hover {
    background: #eef0f3;
    border-color: #d0d5dd;
    transform: translateY(-1px);
}

.quick-action-icon {
    color: #1d4d4f !important;
}

.quick-action-icon--orange {
    color: #d48a46 !important;
}

.quick-action-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #374151;
}

/* ── Legacy stat cards (other pages) ─────────────────────────────────────── */
.stat-card {
    border-radius: 16px !important;
    background: #ffffff !important;
    box-shadow: 0 4px 20px rgba(29, 77, 79, 0.10) !important;
    transition: box-shadow 0.2s ease;
}

.stat-card:hover {
    box-shadow: 0 8px 32px rgba(29, 77, 79, 0.16) !important;
}

.stat-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.stat-icon-wrap.green  { background: rgba(29, 77, 79, 0.12); }
.stat-icon-wrap.orange { background: rgba(212, 138, 70, 0.15); }
.stat-icon-wrap.teal   { background: rgba(0, 150, 136, 0.12); }
.stat-icon-wrap.red    { background: rgba(211, 47, 47, 0.10); }
.stat-icon-wrap.blue   { background: rgba(25, 118, 210, 0.10); }

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #1d4d4f;
    line-height: 1;
}

.stat-label {
    font-size: 0.82rem;
    color: #5a6a6b;
    margin-top: 4px;
}

/* ── Form panels ─────────────────────────────────────────────────────────── */
.form-panel {
    border-radius: 16px !important;
    background: #ffffff !important;
    box-shadow: 0 2px 12px rgba(29, 77, 79, 0.08) !important;
    padding: 24px !important;
    margin-bottom: 24px !important;
}

/* ── Data tables ─────────────────────────────────────────────────────────── */
.data-table {
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(29, 77, 79, 0.08) !important;
}

/* ── Auth page ───────────────────────────────────────────────────────────── */
.auth-panel {
    max-width: 480px;
    margin: 80px auto;
    padding: 40px;
    border-radius: 24px;
    background: white;
    box-shadow: 0 24px 60px rgba(29, 77, 79, 0.18);
}

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

/* ── Allergen chips ──────────────────────────────────────────────────────── */
.allergen-chip {
    background: #fff3e0 !important;
    color: #e65100 !important;
    border: 1px solid #ffcc80 !important;
    font-size: 0.75rem !important;
    height: 24px !important;
}

/* ── Print sheet ─────────────────────────────────────────────────────────── */
@media print {
    .mud-appbar, .app-drawer, .app-drawer-dark, .mud-drawer, .no-print { display: none !important; }
    .app-main, .app-main-light { padding: 0 !important; }
    body { background: white !important; }
    .print-section { page-break-inside: avoid; }
}

.print-header {
    border-bottom: 2px solid #1d4d4f;
    margin-bottom: 20px;
    padding-bottom: 12px;
}

.cost-positive { color: #1d4d4f; font-weight: 600; }
.cost-total    { color: #d48a46; font-weight: 700; font-size: 1.1em; }
