/* iRest /app — SPA do colaborador. Mobile-first com breakpoints para tablet/desktop.
 * Paleta ordenada (gradients podem usar 2 cores adjacentes):
 *   #FFC107 → #FF5722 → #D81B60 → #7B1FA2 → #491D8B → #001D6C
 * Fontes self-hosted: Lato (principal), Roboto Slab (secundária).
 */

:root {
    /* Paleta ordenada */
    --p1: #FFC107;   /* amber */
    --p2: #FF5722;   /* deep orange */
    --p3: #D81B60;   /* pink */
    --p4: #7B1FA2;   /* purple */
    --p5: #491D8B;   /* deep purple */
    --p6: #001D6C;   /* deep blue */

    /* Roles semânticos */
    --irest-primary:        var(--p4);  /* purple */
    --irest-primary-dark:   var(--p5);
    --irest-primary-deep:   var(--p6);
    --irest-primary-soft:   #F3E8FF;    /* tonalidade clara, derivada de #7B1FA2 */
    --irest-accent:         var(--p3);  /* pink */
    --irest-accent-warm:    var(--p2);  /* orange */
    --irest-warn:           var(--p1);  /* amber */
    --irest-success:        var(--p2);  /* deep orange como "done" — palette only */
    --irest-danger:         var(--p3);  /* pink */

    --irest-gradient-primary: linear-gradient(135deg, var(--p4), var(--p5));
    --irest-gradient-deep:    linear-gradient(135deg, var(--p5), var(--p6));
    --irest-gradient-warm:    linear-gradient(135deg, var(--p1), var(--p2));
    --irest-gradient-energy:  linear-gradient(135deg, var(--p2), var(--p3));
    --irest-gradient-bold:    linear-gradient(135deg, var(--p3), var(--p4));

    /* Neutrais */
    --irest-bg: #F7F4FB;            /* fundo geral com tom muito ligeiro de roxo */
    --irest-card-bg: #ffffff;
    --irest-text: #1A1330;          /* texto base — quase preto com tinta roxa */
    --irest-text-muted: #6E6885;
    --irest-border: #E6E1EE;

    /* Tokens explícitos pedidos */
    --radius-card: 20px;
    --radius-pill: 999px;
    --radius-input: 14px;

    --tabbar-height: 68px;
    --content-max: 1100px;
    --content-narrow: 720px;
    --content-auth: 460px;
}

* { -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }
body.app-body {
    background: var(--irest-bg);
    color: var(--irest-text);
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-feature-settings: 'kern' 1;
    overscroll-behavior-y: none;
}

h1, h2, h3, h4, h5, h6 { font-family: 'Lato', sans-serif; font-weight: 700; }
.font-display { font-family: 'Roboto Slab', Georgia, serif; }

/* Sem sublinhado em links da app (Bootstrap default é underline). */
.app-body a, .app-body a:hover, .app-body a:focus { text-decoration: none; color: inherit; }
.app-body .btn { text-decoration: none; }

/* ════════════════════════════════════════════════════════════════════
   HEADER
   ════════════════════════════════════════════════════════════════════ */
.app-header {
    background: var(--irest-gradient-deep);  /* p5→p6: deep purple → deep blue */
    color: #fff;
    /* env(safe-area-inset-top) é 0 em browsers sem notch — o fallback do env()
       só dispara se a variável for desconhecida. Usar max() garante 14px mínimo
       no desktop e cresce automaticamente em iPhone PWA. */
    padding-top: max(14px, env(safe-area-inset-top));
    padding-right: 16px;
    padding-bottom: 14px;
    padding-left: 16px;
    box-shadow: 0 4px 16px rgba(73, 29, 139, 0.18);
    position: sticky; top: 0; z-index: 30;
}
.app-header-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
    max-width: var(--content-max); margin: 0 auto;
}
.app-brand {
    display: none; align-items: center; gap: 10px;
    color: #fff; text-decoration: none;
    font-family: 'Roboto Slab', Georgia, serif;
    font-weight: 700; letter-spacing: -0.01em;
}
.app-brand .brand-mark-sm {
    width: 38px; height: 38px; border-radius: 12px;
    background: var(--irest-gradient-warm);   /* p1→p2: amber → orange */
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(255, 87, 34, 0.4);
}
.app-brand .brand-name { font-size: 1.2rem; }

.app-header-nav { display: none; gap: 4px; }
.app-header-nav .app-tab {
    display: inline-flex; align-items: center; gap: 6px;
    color: rgba(255,255,255,0.72);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.92rem; font-weight: 600;
    transition: background-color .15s ease, color .15s ease;
}
.app-header-nav .app-tab:hover { color: #fff; background: rgba(255,255,255,0.08); }
.app-header-nav .app-tab.active { color: #fff; background: rgba(255,255,255,0.20); }
.app-header-nav .app-tab i { font-size: 1.05rem; }

.app-header-right {
    display: flex; align-items: center; gap: 14px;
    flex: 1; justify-content: space-between;
}
.app-header-greeting-block { text-align: left; }
.app-header-greeting { font-size: 1.05rem; font-weight: 700; line-height: 1.1; }
.app-header-sub      { font-size: 0.82rem; opacity: 0.82; margin-top: 2px; font-weight: 400; }

/* ════════════════════════════════════════════════════════════════════
   MAIN
   ════════════════════════════════════════════════════════════════════ */
.app-main {
    padding: 16px 16px calc(var(--tabbar-height) + 24px + env(safe-area-inset-bottom, 0px)) 16px;
    max-width: var(--content-narrow);
    margin: 0 auto;
    min-height: calc(100dvh - 76px);
}
.app-main[data-route="login"], .app-main[data-route="otp"] {
    padding-bottom: 24px;
    min-height: 100dvh;
    max-width: var(--content-auth);
    display: flex; flex-direction: column; justify-content: center;
}

/* ════════════════════════════════════════════════════════════════════
   TAB BAR
   ════════════════════════════════════════════════════════════════════ */
.app-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0;
    height: calc(var(--tabbar-height) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #fff;
    border-top: 1px solid var(--irest-border);
    display: flex; justify-content: space-around; align-items: stretch;
    z-index: 20;
}
.app-tabbar .app-tab {
    flex: 1;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    color: var(--irest-text-muted); text-decoration: none;
    font-size: 0.72rem; font-weight: 600;
}
.app-tabbar .app-tab i { font-size: 1.5rem; }
.app-tabbar .app-tab.active { color: var(--irest-primary); }

/* ════════════════════════════════════════════════════════════════════
   Cards (pratos) — com média visual no topo
   ════════════════════════════════════════════════════════════════════ */
.dish-card {
    background: var(--irest-card-bg);
    border: 1px solid var(--irest-border);
    border-radius: var(--radius-card);
    margin-bottom: 12px;
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
    position: relative;
}
.dish-card:hover { box-shadow: 0 12px 28px rgba(73, 29, 139, 0.10); transform: translateY(-1px); }
.dish-card.reserved { border-color: var(--p4); }
.dish-card.reserved .dish-body { background: linear-gradient(180deg, #fff 30%, var(--irest-primary-soft)); }

/* Média (foto ou placeholder com ícone). Gradient depende do tipo. */
.dish-media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--irest-gradient-bold);          /* fallback p3→p4 */
    color: rgba(255,255,255,0.85);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.dish-media i { font-size: 3.2rem; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.18)); }
.dish-media[data-photo="true"] i { display: none; }
.dish-media .dish-photo {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
}
/* Gradientes por tipo — sempre 2 cores adjacentes da paleta */
.dish-media[data-type="soup"]    { background: linear-gradient(135deg, var(--p1), var(--p2)); }
.dish-media[data-type="pasta"]   { background: linear-gradient(135deg, var(--p1), var(--p2)); }
.dish-media[data-type="meat"]    { background: linear-gradient(135deg, var(--p2), var(--p3)); }
.dish-media[data-type="fish"]    { background: linear-gradient(135deg, var(--p3), var(--p4)); }
.dish-media[data-type="dessert"] { background: linear-gradient(135deg, var(--p3), var(--p4)); }
.dish-media[data-type="veg"]     { background: linear-gradient(135deg, var(--p4), var(--p5)); }

.dish-reserved-badge {
    position: absolute; top: 10px; right: 10px;
    background: #fff; color: var(--p4);
    border-radius: var(--radius-pill);
    padding: 4px 10px;
    font-size: 0.72rem; font-weight: 700;
    display: inline-flex; align-items: center; gap: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.dish-reserved-badge i { font-size: 0.9rem; }

/* Corpo do card */
.dish-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.dish-meta-top {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.dish-card .dish-type {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--irest-primary);
}
.dish-card .dish-title {
    font-size: 1.1rem; font-weight: 700; line-height: 1.25;
    font-family: 'Roboto Slab', Georgia, serif;
    margin: 0;
}
.dish-card .dish-desc {
    font-size: 0.88rem; color: var(--irest-text-muted); line-height: 1.45;
    margin: 0;
}
.dish-card .dish-actions {
    margin-top: auto; padding-top: 8px;
    display: flex; justify-content: flex-end; align-items: center; gap: 8px;
}

/* Container que vira grid em ecrãs largos */
.menu-grid { display: block; }

/* ════════════════════════════════════════════════════════════════════
   Course sections — agrupamento Entrada/Principal/Sobremesa
   ════════════════════════════════════════════════════════════════════ */
.course-section { margin-bottom: 28px; }
.course-section:last-child { margin-bottom: 12px; }
.course-section .course-head {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 12px; padding-bottom: 8px;
    border-bottom: 2px solid var(--irest-primary-soft);
}
.course-section .course-name {
    font-family: 'Roboto Slab', Georgia, serif;
    font-size: 1.2rem; font-weight: 700;
    color: var(--irest-primary-dark);
    margin: 0;
    letter-spacing: -0.01em;
}
.course-section .course-status {
    font-size: 0.78rem; font-weight: 700;
    color: var(--irest-text-muted);
    text-transform: uppercase; letter-spacing: 0.06em;
}
.course-section .course-status.done {
    color: var(--p2);
    display: inline-flex; align-items: center; gap: 5px;
}
.course-section .course-status.done i { font-size: 0.95rem; }

/* ════════════════════════════════════════════════════════════════════
   Day card — para vista "Próximos dias"
   ════════════════════════════════════════════════════════════════════ */
.day-card {
    background: #fff;
    border: 1px solid var(--irest-border);
    border-radius: var(--radius-card);
    padding: 16px 18px;
    margin-bottom: 12px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}
.day-card:hover { box-shadow: 0 10px 22px rgba(73,29,139,0.08); transform: translateY(-1px); }
.day-card.has-mine { border-color: var(--p4); }

.day-card-date {
    text-align: center; min-width: 56px;
    background: var(--irest-primary-soft);
    border-radius: 14px;
    padding: 8px 10px;
}
.day-card-date .dow {
    font-size: .7rem; text-transform: uppercase; font-weight: 700;
    color: var(--irest-primary); letter-spacing: 0.06em;
}
.day-card-date .dom {
    font-family: 'Roboto Slab', serif; font-weight: 700; font-size: 1.5rem;
    color: var(--irest-primary-dark); line-height: 1; margin-top: 2px;
}
.day-card-text .title { font-weight: 600; font-size: 1rem; line-height: 1.2; }
.day-card-text .sub  { color: var(--irest-text-muted); font-size: .85rem; margin-top: 4px; }
.day-card-right {
    color: var(--irest-text-muted); font-size: 1.2rem; display: flex; align-items: center;
}
.day-card-mine-badge {
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--irest-primary-soft); color: var(--irest-primary-dark);
    padding: 4px 10px; border-radius: var(--radius-pill);
    font-size: 0.74rem; font-weight: 700;
    border: 1px solid #DCC4F4;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.day-card-mine-badge i { font-size: 0.85rem; }

/* ════════════════════════════════════════════════════════════════════
   Hero status — banner principal no topo de today/day
   ════════════════════════════════════════════════════════════════════ */
.hero-status {
    background: var(--irest-gradient-primary);  /* p4→p5 */
    color: #fff;
    border-radius: var(--radius-card);
    padding: 20px 22px;
    margin-bottom: 16px;
    display: flex; flex-direction: column; gap: 10px;
    position: relative; overflow: hidden;
    box-shadow: 0 14px 28px rgba(73, 29, 139, 0.18);
}
.hero-status::after {
    content: ""; position: absolute; right: -40px; top: -40px;
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(255,193,7,0.25), transparent 60%);
    pointer-events: none;
}
.hero-status.done {
    background: var(--irest-gradient-energy); /* p2→p3 — celebra */
}
.hero-status.done::after {
    background: radial-gradient(circle, rgba(255,255,255,0.30), transparent 60%);
}
.hero-status .h-title {
    font-family: 'Roboto Slab', Georgia, serif;
    font-size: 1.3rem; font-weight: 700; line-height: 1.15;
    letter-spacing: -0.01em;
    margin: 0;
}
.hero-status .h-sub  { font-size: 0.95rem; opacity: 0.92; font-weight: 500; line-height: 1.4; }
.hero-status .h-sub strong { font-weight: 700; }
.hero-status .h-progress { display: flex; gap: 8px; }
.hero-status .h-dot {
    width: 36px; height: 6px; border-radius: var(--radius-pill);
    background: rgba(255,255,255,0.25);
}
.hero-status .h-dot.done { background: #fff; }
.hero-status .h-dot.warn { background: var(--p1); }
.hero-status .h-cta {
    align-self: flex-start;
    background: rgba(255,255,255,0.18);
    color: #fff; border: 1px solid rgba(255,255,255,0.30);
    padding: 7px 16px; border-radius: var(--radius-pill);
    font-size: 0.85rem; font-weight: 700;
    text-decoration: none;
    display: inline-flex; align-items: center; gap: 6px;
    backdrop-filter: blur(8px);
}
.hero-status .h-cta:hover { background: rgba(255,255,255,0.28); color: #fff; }

/* ════════════════════════════════════════════════════════════════════
   Skeletons (loading shimmer)
   ════════════════════════════════════════════════════════════════════ */
.skeleton {
    background: linear-gradient(90deg, #EFE9F7 0%, #F8F5FC 50%, #EFE9F7 100%);
    background-size: 200% 100%;
    animation: shimmer 1.4s ease-in-out infinite;
    border-radius: 8px;
}
@keyframes shimmer {
    0%   { background-position: -150% 0; }
    100% { background-position: 150% 0; }
}
.skeleton-card {
    background: #fff;
    border: 1px solid var(--irest-border);
    border-radius: var(--radius-card);
    overflow: hidden;
    margin-bottom: 12px;
}
.skeleton-card .skeleton-media { aspect-ratio: 16 / 9; border-radius: 0; }
.skeleton-card .skeleton-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.skeleton-line { height: 12px; border-radius: 8px; }
.skeleton-line.w-30 { width: 30%; }
.skeleton-line.w-50 { width: 50%; }
.skeleton-line.w-70 { width: 70%; }
.skeleton-line.w-80 { width: 80%; }
.skeleton-line.tall { height: 20px; }

/* ════════════════════════════════════════════════════════════════════
   Loading state em botões inline
   ════════════════════════════════════════════════════════════════════ */
.btn.is-loading {
    pointer-events: none;
    position: relative;
    color: transparent !important;
}
.btn.is-loading::after {
    content: "";
    position: absolute; top: 50%; left: 50%;
    width: 16px; height: 16px;
    margin-top: -8px; margin-left: -8px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
.btn-outline-secondary.is-loading::after,
.btn-outline-primary.is-loading::after,
.btn-soft.is-loading::after {
    border: 2px solid rgba(123,31,162,0.25);
    border-top-color: var(--p4);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ════════════════════════════════════════════════════════════════════
   Route transition
   ════════════════════════════════════════════════════════════════════ */
.app-main { transition: opacity .15s ease; }
.app-main.fade-in {
    animation: fadeInUp .28s ease both;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Banner de entitlement por curso */
.course-bar {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-bottom: 14px;
}
.course-pill {
    display: inline-flex; align-items: center; gap: 6px;
    background: #fff; border: 1px solid var(--irest-border);
    border-radius: var(--radius-pill); padding: 7px 14px;
    font-size: 0.85rem; font-weight: 600;
}
.course-pill i { font-size: 1rem; color: var(--irest-text-muted); }
.course-pill .name { font-weight: 600; }
.course-pill .count { color: var(--irest-text-muted); font-variant-numeric: tabular-nums; margin-left: 2px; }
.course-pill.partial { border-color: var(--p1); background: #FFF8E1; color: #6E4500; }
.course-pill.partial i { color: var(--p2); }
.course-pill.done {
    background: var(--irest-gradient-energy); /* p2→p3 */
    color: #fff; border-color: transparent;
}
.course-pill.done i, .course-pill.done .count { color: #fff; }

/* Botões */
.btn { font-family: inherit; font-weight: 700; border-radius: var(--radius-pill); }
.btn-primary {
    --bs-btn-bg: var(--p4);
    --bs-btn-border-color: var(--p4);
    --bs-btn-hover-bg: var(--p5);
    --bs-btn-hover-border-color: var(--p5);
    --bs-btn-active-bg: var(--p5);
    --bs-btn-active-border-color: var(--p5);
}
/* Botão "primário forte" com gradient — usado para reservar */
.btn-primary-grad {
    background: var(--irest-gradient-bold); /* p3→p4 */
    color: #fff; border: 0; padding: 8px 18px;
    border-radius: var(--radius-pill); font-weight: 700;
    box-shadow: 0 4px 14px rgba(123, 31, 162, 0.25);
}
.btn-primary-grad:hover { filter: brightness(1.05); color: #fff; }
.btn-soft {
    background: var(--irest-primary-soft);
    color: var(--irest-primary-dark);
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
}
.btn-soft:hover, .btn-soft:focus { background: #E9D5FF; color: var(--irest-primary-dark); }

/* Chips */
.chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    background: #F4F1F8; color: var(--irest-text);
    font-size: 0.75rem; font-weight: 600;
    border: 1px solid var(--irest-border);
}
.chip.full     { background: #FDE7EE; color: var(--p3); border-color: #FBC2D4; }
.chip.left-low { background: #FFF3E0; color: #B25400; border-color: #FFD4A8; }
.chip.ok       { background: var(--irest-primary-soft); color: var(--irest-primary-dark); border-color: #DCC4F4; }

/* ════════════════════════════════════════════════════════════════════
   Login / OTP
   ════════════════════════════════════════════════════════════════════ */
.brand-block { text-align: center; margin-bottom: 32px; }
.brand-block .brand-mark {
    width: 80px; height: 80px;
    border-radius: var(--radius-card);
    background: var(--irest-gradient-warm); /* fallback p1→p2 quando não há logo */
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 2.2rem;
    box-shadow: 0 12px 32px rgba(255, 87, 34, 0.30);
    margin-bottom: 18px;
    overflow: hidden;
}
.brand-block .brand-mark-logo {
    background: #fff;
    padding: 10px;
    box-shadow: 0 12px 28px rgba(73, 29, 139, 0.15);
    border: 1px solid var(--irest-border);
}
.brand-block .brand-mark-logo img {
    width: 100%; height: 100%; object-fit: contain;
}
.brand-block .brand-title {
    font-family: 'Roboto Slab', Georgia, serif;
    font-size: 1.7rem; font-weight: 700; margin-bottom: 4px;
    letter-spacing: -0.01em;
}
.brand-block .brand-sub { color: var(--irest-text-muted); font-size: 0.95rem; }

.auth-card {
    background: #fff;
    border: 1px solid var(--irest-border);
    border-radius: var(--radius-card);
    padding: 28px;
    box-shadow: 0 16px 40px rgba(73, 29, 139, 0.08);
}
.auth-card label { font-size: 0.85rem; font-weight: 600; color: var(--irest-text); }
.auth-card .form-control {
    font-size: 1.05rem;
    padding: 12px 14px;
    border-radius: var(--radius-input);
    border-color: var(--irest-border);
}
.auth-card .form-control:focus {
    border-color: var(--p4);
    box-shadow: 0 0 0 0.25rem rgba(123, 31, 162, 0.15);
}
.otp-input {
    font-size: 1.7rem; font-weight: 700; letter-spacing: 0.5em; text-align: center;
    padding-left: 1em !important;
}

/* ════════════════════════════════════════════════════════════════════
   Empty / loading
   ════════════════════════════════════════════════════════════════════ */
.empty-state {
    text-align: center; color: var(--irest-text-muted); padding: 56px 16px;
    display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.empty-state .empty-icon {
    width: 88px; height: 88px; border-radius: 50%;
    background: var(--irest-primary-soft);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--p4); font-size: 2.2rem;
}
.empty-state h3 {
    font-family: 'Roboto Slab', Georgia, serif;
    font-size: 1.15rem; font-weight: 700; color: var(--irest-text); margin: 4px 0 0;
}
.empty-state p { margin: 0; max-width: 320px; line-height: 1.5; }
.empty-state .btn { margin-top: 6px; }

/* Cutoff passed (reservas fechadas hoje) */
.cutoff-passed {
    text-align: center; padding: 56px 20px 40px;
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    color: var(--irest-text);
}
.cutoff-passed .cutoff-icon {
    width: 96px; height: 96px; border-radius: 50%;
    background: linear-gradient(135deg, var(--bc1, #FFC107), var(--bc2, #FF5722));
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 2.4rem;
    box-shadow: 0 12px 28px rgba(255, 87, 34, 0.25);
}
.cutoff-passed h3 {
    font-family: 'Roboto Slab', Georgia, serif;
    font-size: 1.4rem; font-weight: 700; margin: 4px 0 0;
}
.cutoff-passed p { margin: 0; max-width: 340px; line-height: 1.5; }
.cutoff-passed p strong { font-weight: 700; }
.cutoff-passed .cutoff-actions {
    display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; justify-content: center;
}
.cutoff-passed .btn-primary-pill,
.cutoff-passed .btn-secondary-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 18px; border-radius: 999px;
    font-weight: 600; font-size: 0.92rem; text-decoration: none;
    transition: transform .15s, box-shadow .15s;
}
.cutoff-passed .btn-primary-pill {
    background: linear-gradient(135deg, var(--bc4, #7B1FA2), var(--bc5, #491D8B));
    color: #fff;
    box-shadow: 0 6px 16px rgba(73, 29, 139, 0.25);
}
.cutoff-passed .btn-primary-pill:hover { transform: translateY(-1px); }
.cutoff-passed .btn-secondary-pill {
    background: var(--irest-primary-soft, #F1E7FA);
    color: var(--p5, #491D8B);
}
.cutoff-passed .btn-secondary-pill:hover { background: #E6D6F4; }

.spinner-overlay {
    position: fixed; inset: 0;
    background: rgba(247, 244, 251, 0.7);
    backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center;
    z-index: 50;
}
.spinner-overlay .spinner-border { color: var(--p4) !important; }

/* ════════════════════════════════════════════════════════════════════
   Toast
   ════════════════════════════════════════════════════════════════════ */
.toast-area {
    position: fixed; left: 16px; right: 16px;
    bottom: calc(var(--tabbar-height) + 16px + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast-area .toast-msg {
    background: var(--irest-text); color: #fff;
    border-radius: var(--radius-input); padding: 12px 16px;
    box-shadow: 0 12px 28px rgba(0, 29, 108, 0.18);
    font-size: 0.9rem; font-weight: 600;
    opacity: 0; transform: translateY(8px);
    transition: opacity .18s ease, transform .18s ease;
}
.toast-area .toast-msg.show { opacity: 1; transform: translateY(0); }
.toast-area .toast-msg.error   { background: var(--p3); }
.toast-area .toast-msg.success { background: var(--p2); }
.toast-area .toast-msg.warn    { background: var(--p1); color: #5B3500; }

/* ════════════════════════════════════════════════════════════════════
   Day strip
   ════════════════════════════════════════════════════════════════════ */
.day-strip {
    display: flex; overflow-x: auto; gap: 8px;
    padding: 6px 2px 10px 2px;
    margin: -4px -4px 12px -4px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.day-strip::-webkit-scrollbar { display: none; }
.day-strip .day-chip {
    flex: 0 0 auto; min-width: 66px; text-align: center;
    background: #fff; border: 1px solid var(--irest-border);
    border-radius: var(--radius-card); padding: 10px 8px;
    font-size: 0.8rem; color: var(--irest-text); text-decoration: none;
    scroll-snap-align: start;
}
.day-strip .day-chip .dow { color: var(--irest-text-muted); font-size: 0.7rem; text-transform: uppercase; font-weight: 600; }
.day-strip .day-chip .dom { font-weight: 700; font-size: 1.2rem; line-height: 1; font-family: 'Roboto Slab', serif; }
.day-strip .day-chip.active {
    background: var(--irest-gradient-primary);
    border-color: transparent; color: #fff;
    box-shadow: 0 6px 18px rgba(123, 31, 162, 0.28);
}
.day-strip .day-chip.active .dow { color: rgba(255,255,255,0.88); }
.day-strip .day-chip.hasMine::after {
    content: ""; display: block; width: 6px; height: 6px;
    background: var(--p1); border-radius: 50%;
    margin: 4px auto 0;
}
.day-strip .day-chip.active.hasMine::after { background: #fff; }

/* ════════════════════════════════════════════════════════════════════
   Account
   ════════════════════════════════════════════════════════════════════ */
.account-card {
    background: #fff; border-radius: var(--radius-card); border: 1px solid var(--irest-border);
    padding: 20px; margin-bottom: 14px;
}
.account-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.95rem; gap: 12px; }
.account-row .label { color: var(--irest-text-muted); flex: 0 0 auto; font-weight: 500; }
.account-row .value { text-align: right; word-break: break-word; font-weight: 600; }
.account-avatar {
    width: 96px; height: 96px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-family: 'Roboto Slab', Georgia, serif;
    font-size: 2.2rem; font-weight: 700; color: #fff;
    background: var(--irest-gradient-bold);  /* p3→p4 */
    box-shadow: 0 14px 28px rgba(216, 27, 96, 0.22);
    margin-bottom: 14px;
}
.account-name {
    font-family: 'Roboto Slab', Georgia, serif;
    font-size: 1.3rem; font-weight: 700;
    margin: 0;
}
.account-section-title {
    font-family: 'Roboto Slab', Georgia, serif;
    font-weight: 700; font-size: 1rem;
}
.account-stats {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center;
}
.account-stat .stat-num {
    font-family: 'Roboto Slab', Georgia, serif;
    font-size: 1.5rem; font-weight: 700;
    background: var(--irest-gradient-bold);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
}
.account-stat .stat-label {
    font-size: 0.75rem; color: var(--irest-text-muted);
    text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600;
}

/* ════════════════════════════════════════════════════════════════════
   Section heads
   ════════════════════════════════════════════════════════════════════ */
.section-head {
    display: flex; align-items: center; justify-content: space-between;
    margin: 0 0 10px 0;
}
.section-head h6 {
    margin: 0; font-weight: 700; font-size: 1rem;
    font-family: 'Roboto Slab', Georgia, serif;
}

/* ════════════════════════════════════════════════════════════════════
   Responsivo
   ════════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) {
    .app-header { padding: 14px 24px; }
    .app-header-inner { gap: 24px; }
    .app-brand { display: inline-flex; }
    .app-header-nav { display: inline-flex; flex: 1; justify-content: center; }
    .app-header-right { flex: 0 0 auto; justify-content: flex-end; }
    .app-header-greeting-block { display: none; text-align: right; }
    .app-tabbar { display: none !important; }

    .app-main {
        padding: 24px 24px 32px 24px;
        max-width: var(--content-narrow);
        min-height: calc(100dvh - 76px);
    }
    .app-main[data-route="login"], .app-main[data-route="otp"] {
        max-width: var(--content-auth);
        padding: 32px 24px;
    }
    .toast-area { left: auto; right: 24px; bottom: 24px; max-width: 380px; }
}

@media (min-width: 1024px) {
    .app-header-greeting-block { display: block; }
    .app-main { max-width: var(--content-max); }
    .menu-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 14px;
    }
    .menu-grid .dish-card { margin-bottom: 0; }
    .dish-card { padding: 18px; }
}

@media (min-width: 1280px) {
    .menu-grid { grid-template-columns: repeat(3, 1fr); }
}
