@import url('https://fonts.googleapis.com/css2?family=Stretch+Pro&display=swap');

:root {
    --bg: #f7f5f2;
    --card: #ffffff;
    --border: #e9e5e1;
    --ink: #2f2e2e;
    --muted: #706d6d;
    --orange: #ef7b41;
    --orange-dark: #c9611f;
    --orange-soft: #fdeee2;
    --burnt: #aa3000;
    --burnt-soft: #f7e4dc;
    --radius: 12px;
    --radius-sm: 8px;
    --display-font: Helvetica;
}

* { box-sizing: border-box; }

html, body {
    overflow-x: hidden;
}

body {
    font-family: Helvetica;
    margin: 0;
    padding: 0;
    background-color: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

@keyframes popIn {
    0% { opacity: 0; transform: scale(0.85); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3) rotate(-10deg); }
    60% { opacity: 1; transform: scale(1.1) rotate(4deg); }
    100% { transform: scale(1) rotate(0); }
}

.animate-in { animation: fadeSlideUp 0.35s ease both; }

@keyframes mascotWave {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    50% { transform: rotate(-2deg) translateY(-4px); }
}

@keyframes celebrationHop {
    0% { opacity: 0; transform: scale(0.4) translateY(30px) rotate(-8deg); }
    45% { opacity: 1; transform: scale(1.15) translateY(-18px) rotate(4deg); }
    65% { transform: scale(0.96) translateY(2px) rotate(-2deg); }
    80% { transform: scale(1.04) translateY(-6px) rotate(1deg); }
    100% { transform: scale(1) translateY(0) rotate(0); }
}

@keyframes thumbsPop {
    0% { opacity: 0; transform: scale(0) rotate(-30deg); }
    50% { opacity: 1; transform: scale(1.3) rotate(12deg); }
    70% { transform: scale(0.9) rotate(-6deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes confettiFall {
    0% { opacity: 1; transform: translate(0, 0) rotate(0deg); }
    100% { opacity: 0; transform: translate(var(--drift, 0px), 160px) rotate(360deg); }
}

.mascot {
    display: block;
    margin: 0 auto 14px;
    animation: mascotWave 2.6s ease-in-out infinite;
    filter: drop-shadow(0 10px 18px rgba(239,123,65,0.35));
}

.mascot-small { max-height: 60px; }

.mascot-stage {
    position: relative;
    width: fit-content;
    margin: 0 auto 14px;
}

.mascot-large {
    max-height: 130px;
    margin: 0;
    animation: celebrationHop 0.9s cubic-bezier(.36,.07,.19,.97) both;
}

.mascot.mood-good { filter: drop-shadow(0 10px 20px rgba(22,163,74,0.45)); }
.mascot.mood-neutral { filter: drop-shadow(0 10px 20px rgba(239,123,65,0.4)); }
.mascot.mood-improve { filter: drop-shadow(0 10px 20px rgba(170,48,0,0.4)); }

.thumbs-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    font-size: 2rem;
    background: white;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(47,46,46,0.25);
    animation: thumbsPop 0.6s ease 0.7s both;
}

.confetti-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 0;
    pointer-events: none;
}

.confetti-piece {
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    animation: confettiFall 1.1s ease-in both;
}

/* Header */

.app-header {
    background-color: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.app-header .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1 1 auto;
}

.app-header .brand > div:last-child {
    min-width: 0;
}

.logo-badge {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.logo-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-badge:hover { transform: rotate(-6deg) scale(1.05); }

.app-header h1 {
    margin: 0;
    line-height: 0;
}

.brand-wordmark {
    display: block;
    height: 20px;
    width: auto;
}

@media (max-width: 480px) {
    .brand-wordmark { height: 16px; }
}

.app-header .subtitle {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

.container.narrow { max-width: 480px; }

/* Toolbar */

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.toolbar .actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.toggle-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
}

.toggle-inline input { width: auto; }

/* Cards */

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.card h3 {
    margin: 0 0 14px 0;
    font-size: 1.05rem;
    font-weight: 400;
    font-family: var(--display-font);
    letter-spacing: normal;
}

.card > p.muted:only-child {
    text-align: center;
    padding: 16px 0;
}

/* Stat tiles */

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

.stat-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(47,46,46,0.08);
}

.stat-item .stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: black;
    font-size: 0.85rem;
    margin-bottom: 10px;
    font-family: Helvetica;
    font-weight: bold;
}

.stat-item .stat-number {
    font-size: 1.05rem;
    font-weight: 700;
    font-family: var(--display-font);
    line-height: 1;
    color: var(--ink);
    animation: popIn 0.35s ease both;
}

.stat-breakdown {
    margin-top: 2px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.stat-breakdown .breakdown-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: var(--ink);
}

.stat-breakdown .breakdown-row strong {
    font-weight: 700;
}

.stat-total-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
}

.stat-total-label {
    font-size: 0.72rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Form elements */

label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    margin-top: 14px;
    font-size: 0.9rem;
}

input[type="text"], input[type="number"], input[type="date"],
input[type="email"], input[type="password"], select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    background: var(--card);
    color: var(--ink);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px var(--orange-soft);
}

/* iOS Safari's native date input reserves extra width for its own control
   outside the normal CSS box, so a 100%-wide date input can render a few
   pixels wider than its parent card even with box-sizing: border-box set
   globally (see the "Date" field overflowing its card on iPhone). Removing
   the native appearance forces it to size strictly to the CSS box instead -
   it's still fully tappable and opens the same native date picker. */
input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

.item-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    animation: fadeSlideUp 0.3s ease both;
}

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

.item-row h4 {
    grid-column: 1 / -1;
    margin: 0 0 4px 0;
    font-size: 0.95rem;
}

.stock-check {
    grid-column: 1 / -1;
    margin-top: 4px;
}

.yes-no-toggle {
    display: flex;
    gap: 8px;
}

.toggle-btn {
    flex: 1;
    padding: 9px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--ink);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.toggle-btn.active.yes { background: var(--orange); border-color: var(--orange); color: white; }
.toggle-btn.active.no { background: var(--burnt); border-color: var(--burnt); color: white; }

.ran-out-time { margin-top: 10px; animation: fadeSlideUp 0.25s ease both; }

.unit-hint {
    font-weight: normal;
    color: var(--muted);
    font-size: 0.85rem;
}

/* Buttons */

button {
    font-family: inherit;
    cursor: pointer;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--ink);
    text-decoration: none;
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.btn:hover { background: #f7f2ee; }
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: var(--orange);
    border-color: var(--orange);
    color: white;
    font-family: var(--display-font);
    font-weight: 400;
    letter-spacing: normal;
}

.btn-primary:hover { background: var(--orange-dark); box-shadow: 0 4px 12px rgba(239,123,65,0.35); }

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-danger {
    background: var(--burnt);
    border-color: var(--burnt);
    color: white;
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-danger:hover { background: #8a2600; }

.btn-icon-danger {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 5px 9px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn-icon-danger:hover { background: var(--burnt); border-color: var(--burnt); }
.btn-icon-danger:active { transform: scale(0.92); }

tr.submission-header td {
    background: var(--bg);
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--ink);
    padding-top: 14px;
    border-bottom: 1px solid var(--border);
}

.btn-block { width: 100%; justify-content: center; margin-top: 20px; padding: 12px; }

.btn-icon {
    padding: 8px 10px;
}

.week-nav {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.week-pill {
    display: inline-block;
    padding: 9px 18px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card);
    font-weight: 400;
    font-family: var(--display-font);
    font-size: 0.95rem;
    white-space: nowrap;
    color: var(--ink);
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.week-pill:hover { border-color: var(--orange); }

.week-pill.active-filter {
    border-color: var(--orange);
    color: var(--orange-dark);
    font-weight: 600;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.date-range-popover {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 20;
    display: none;
    flex-direction: column;
    gap: 12px;
    min-width: 220px;
    padding: 16px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(47,46,46,0.18);
}

.date-range-popover[data-open="true"] {
    display: flex;
}

.date-range-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.date-range-field label {
    margin: 0;
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.date-range-field input[type="date"] {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--ink);
}

.date-range-hint {
    font-size: 0.72rem;
    color: var(--muted);
}

.date-range-actions {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin-top: 4px;
}

.date-range-actions .btn {
    flex: 1;
    justify-content: center;
    padding: 8px 8px;
    font-size: 0.8rem;
    text-align: center;
    line-height: 1.2;
}

.date-range-actions .btn-icon {
    flex: 0 0 auto;
    width: 40px;
    padding: 8px;
    font-size: 1rem;
    font-weight: 700;
}

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

.grid-2 .card { margin-bottom: 0; }

/* Toast */

.toast {
    display: none;
    background-color: var(--orange);
    color: white;
    padding: 12px;
    border-radius: var(--radius-sm);
    text-align: center;
    margin-bottom: 16px;
    font-weight: 600;
}

.toast.show { display: block; animation: fadeSlideUp 0.25s ease both; }
.toast.error { background-color: var(--burnt); }

/* Table */

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -20px;
    padding: 0 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 480px;
}

th, td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    color: var(--muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

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

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

.filters > div { min-width: 150px; }

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

.coming-soon-note {
    background: var(--orange-soft);
    color: var(--orange-dark);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 14px;
}

.coming-soon-card {
    text-align: center;
    padding: 40px 20px;
}

.coming-soon-card .icon { font-size: 2.5rem; margin-bottom: 10px; }

.coming-soon-badge {
    display: inline-block;
    background: var(--orange-soft);
    color: var(--orange-dark);
    border-radius: 999px;
    padding: 4px 14px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 10px;
}

/* Tabs (manager dashboard: Dashboard / Orders) */

nav.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

nav.tabs a {
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--ink);
    background: var(--card);
    border: 1px solid var(--border);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: Helvetica;
}

nav.tabs a.active {
    background: var(--orange);
    color: white;
    border-color: var(--orange);
}

/* Native <dialog> modal, styled to match the reference design */

dialog.modal {
    border: none;
    border-radius: var(--radius);
    padding: 24px;
    width: 90%;
    max-width: 460px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    animation: popIn 0.2s ease both;
}

dialog.modal::backdrop {
    background: rgba(47,46,46,0.55);
}

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

.modal-header h3 { margin: 0; font-size: 1.15rem; }

.modal-close {
    border: none;
    background: none;
    color: var(--muted);
    font-size: 1.2rem;
    line-height: 1;
    padding: 4px;
}

.modal-desc {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 4px 0 16px 0;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* Confirm popup - a small centered dialog.modal variant used in place of
   the browser's native confirm(), so destructive actions (delete item,
   delete entry) get a popup that matches the app's own look instead of an
   unstyled "site says" browser prompt. Same backdrop/pop-in as dialog.modal
   above, just narrower and centered text instead of the header layout. */

dialog.confirm-modal {
    max-width: 340px;
    padding: 28px 24px 24px;
    text-align: center;
}

.confirm-modal-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--burnt-soft);
    font-size: 1.6rem;
}

.confirm-modal-title {
    margin: 0 0 8px;
    font-family: var(--display-font);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
}

.confirm-modal-message {
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.5;
}

.confirm-modal-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}

.confirm-modal-actions .btn {
    flex: 1;
    justify-content: center;
    border-radius: 999px;
    padding: 11px 20px;
}

/* Closing checklist popup - shown after "Submit end-of-day totals" on the
   staff entry form, before the thank-you screen. Reuses dialog.modal for the
   same backdrop/pop-in as the rest of the app. Each task is a full-width
   toggle button; tapping it fills in the check circle and tints the row
   orange, the same "confirmed" treatment the Yes/No stock toggle uses. */

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 4px 0 20px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--card);
    color: var(--ink);
    text-align: left;
    font-size: 0.92rem;
    font-weight: 600;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.checklist-icon { font-size: 1.2rem; }

.checklist-label { flex: 1; }

.checklist-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: transparent;
    flex-shrink: 0;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.checklist-item.done {
    background: var(--orange-soft);
    border-color: var(--orange);
}

.checklist-item.done .checklist-check {
    background: var(--orange);
    border-color: var(--orange);
    color: white;
}

.add-item-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    margin-top: 10px;
}

.add-item-row > div:first-child { flex: 1; }
.add-item-row select { width: auto; }

/* Weekly report */

.report-card {
    background: var(--card);
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    padding: 0 0 20px;
    overflow: hidden;
}

.report-title {
    margin: 0;
    background: var(--orange);
    color: white;
    font-family: var(--display-font);
    font-weight: 400;
    font-size: 1.3rem;
    text-align: center;
    padding: 16px 20px;
    letter-spacing: normal;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-top: 0;
}

.report-table th, .report-table td {
    border: 1px solid var(--ink);
    padding: 10px 12px;
    text-align: center;
}

.report-table th:first-child, .report-table td:first-child {
    text-align: left;
}

.report-table thead th {
    background: var(--orange-soft);
    color: var(--ink);
    font-weight: 700;
    text-transform: none;
}

.report-table tr.report-total-row td {
    background: var(--orange-soft);
    font-weight: 700;
}

.report-summary {
    padding: 18px 20px 4px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.report-summary .highlight-good { color: var(--orange-dark); font-weight: 700; }
.report-summary .highlight-bad { color: var(--burnt); font-weight: 700; }

.report-subheading {
    font-family: var(--display-font);
    font-weight: 400;
    font-size: 1.05rem;
    margin: 8px 20px 10px;
}

#reportShopComparisonWrap .table-scroll,
#reportShopComparisonWrap .report-table {
    margin: 0 20px;
    width: calc(100% - 40px);
}

.report-footer {
    text-align: center;
    color: var(--muted);
    font-size: 0.75rem;
    margin: 16px 0 0;
}

/* Clickable stat card (Total Bags Used -> weekly bag usage panel) */

.stat-item-clickable {
    cursor: pointer;
}

.stat-item-clickable:hover {
    border-color: var(--orange);
    box-shadow: 0 6px 16px rgba(239,123,65,0.18);
}

.stat-item-clickable:focus-visible {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px var(--orange-soft);
}

.stat-link-hint {
    margin-top: 10px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--orange-dark);
}

/* Weekly Bag Usage side panel - reuses the existing dialog.modal pattern
   (native <dialog>, same backdrop treatment) but anchored full-height to
   the right edge and slid in/out with a transform transition instead of
   the centered pop-in used by dialog.modal. */

dialog.side-panel {
    position: fixed;
    inset: 0 0 0 auto;
    margin: 0;
    height: 100%;
    max-height: 100%;
    width: 440px;
    max-width: 92vw;
    border: none;
    border-left: 1px solid var(--border);
    border-radius: 0;
    padding: 0;
    box-shadow: -12px 0 32px rgba(47,46,46,0.18);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.22s ease;
}

dialog.side-panel[data-state="open"] {
    transform: translateX(0);
}

dialog.side-panel::backdrop {
    background: rgba(47,46,46,0.45);
}

.side-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.side-panel-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 400;
    font-family: var(--display-font);
}

.side-panel-body {
    padding: 20px 24px 32px;
    overflow-y: auto;
    flex: 1 1 auto;
}

.side-panel-body .card:last-child {
    margin-bottom: 0;
}

.bag-total-hero {
    text-align: center;
    padding: 4px 0 24px;
}

.bag-total-number {
    font-size: 2.6rem;
    font-weight: 400;
    font-family: var(--display-font);
    color: var(--ink);
    line-height: 1;
    animation: popIn 0.35s ease both;
}

.bag-total-label {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.insights-grid {
    display: grid;
    gap: 4px;
}

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

.insight-item:last-child { border-bottom: none; padding-bottom: 0; }

.insight-label {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 600;
}

.insight-value {
    font-size: 0.92rem;
    font-weight: 700;
    text-align: right;
}

/* Previous-week comparison: intentionally no "good/bad" colour semantics
   here (unlike the report's waste highlight-good/highlight-bad) since more
   usage isn't inherently good or bad - the arrow glyph alone conveys
   direction. */

.comparison-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 14px;
}

.comparison-label {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 4px;
}

.comparison-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
}

@media (max-width: 560px) {
    dialog.side-panel {
        width: 100vw;
        max-width: 100vw;
        border-left: none;
    }
}
