/* ============================================================
   GrattisGreta — Centralized Stylesheet
   ============================================================ */

/* ── CSS Variables ── */
:root {
    /* Core palette — matching grattisgreta.se */
    --color-primary: #2D4A3E;
    --color-primary-hover: #3D6355;
    --color-accent: #C75B4A;
    --color-accent-hover: #E8927C;
    --color-body-bg: #FFF8F0;
    --color-body-text: #2A2A28;

    /* Surfaces & borders */
    --color-surface: #fff;
    --color-neutral-bg: #F0EBE4;
    --color-border: #E0D8CE;

    /* Text */
    --color-text-muted: #5A5A56;
    --color-text-faint: #8A8A86;

    /* Success (green) */
    --color-success-bg: #d4ead9;
    --color-success-border: #b5d4c0;
    --color-success-text: #1b7a3d;

    /* Error (red) */
    --color-error-bg: #fee;
    --color-error-border: #fca5a5;
    --color-error-text: #c00;

    /* Warning (amber) */
    --color-warning-bg: #fef3c7;
    --color-warning-text: #92400e;
    --color-warning-border: #f59e0b;

    /* Info (blue) */
    --color-info-bg: #dbeafe;
    --color-info-text: #1e40af;
    --color-info-border: #93c5fd;

    /* Nav — light cream like grattisgreta.se */
    --nav-bg: rgba(255, 248, 240, 0.92);
    --nav-link-color: var(--color-primary);
    --nav-link-hover-bg: rgba(45, 74, 62, 0.08);
    --nav-user-color: var(--color-text-muted);
    --nav-logout-bg: var(--color-primary);
    --nav-logout-border: var(--color-primary);
    --nav-logout-hover-bg: var(--color-primary-hover);
    --nav-close-bg: rgba(45, 74, 62, 0.1);
    --nav-close-hover-bg: rgba(45, 74, 62, 0.2);
    --nav-border-subtle: rgba(45, 74, 62, 0.1);
    --nav-mobile-dropdown-bg: rgba(45, 74, 62, 0.05);

    /* Overlays */
    --overlay-light: rgba(0,0,0,0.45);

    /* Shadows */
    --shadow-card: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-card-lg: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-card-hover: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-dropdown: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-nav: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-nav-dropdown: 0 4px 12px rgba(0,0,0,0.3);
    --shadow-nav-mobile: 0 4px 12px rgba(0,0,0,0.2);
    --shadow-modal: 0 8px 32px rgba(0,0,0,0.2);
    --shadow-popup: 0 4px 16px rgba(0,0,0,0.18);

    /* Gradient */
    --gradient-accent: linear-gradient(135deg, #E8927C 0%, #2D4A3E 100%);
}

/* ── Reset ── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

input, button, select, textarea {
    font: inherit;
}

html {
    font-size: 125%;
}

small { font-size: inherit; }

body {
    font-family: 'Crimson Pro', serif;
    line-height: 1.5;
    background: var(--color-body-bg);
    color: var(--color-body-text);
    min-height: 100vh;
}

/* ── Navigation ── */
nav {
    background: var(--nav-bg);
    color: var(--color-primary);
    box-shadow: var(--shadow-nav);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(45, 74, 62, 0.08);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
    text-decoration: none;
    padding: 1rem 0;
    letter-spacing: -0.02em;
}

.nav-brand span {
    color: var(--color-accent);
}


.nav-brand img {
    height: 36px;
    max-width: 160px;
    object-fit: contain;
    vertical-align: middle;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
}

.nav-menu a {
    color: var(--nav-link-color);
    text-decoration: none;
    padding: 1.25rem 1rem;
    display: block;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.nav-menu a:hover {
    background: var(--nav-link-hover-bg);
    color: var(--color-primary);
    border-bottom-color: var(--color-accent);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {

    color: var(--nav-user-color);
}

.user-info strong {
    color: var(--color-primary);
    font-weight: 600;
    display: block;
}

.btn-logout {
    background: var(--color-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
    border: none;
}

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

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-primary);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-logout {
    display: none;
}

/* ── Layout ── */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem;
}

h1 {
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

h2 {
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* ── Page Headers ── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-title {
    margin: 0;
}

.section-title {
    margin: 0 0 1rem 0;
    font-size: 1rem;
}

.section-title-lg {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
}

/* ── Cards & Containers ── */
.card {
    background: var(--color-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
}

.card-body {
    padding: 1.5rem;
}

.card-sm {
    background: var(--color-surface);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
}

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

.card-bordered {
    border-left: 4px solid;
}

.info-box {
    background: var(--color-body-bg);
    border-radius: 8px;
    padding: 0.75rem;
}

.info-box-bordered {
    background: var(--color-body-bg);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--color-border);
}

/* ── Buttons ── */
.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    display: inline-block;
    box-sizing: border-box;
    line-height: 1.4;
    font-size: inherit;
    font-family: inherit;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    border: none;
}

.btn-accent {
    background: var(--color-accent);
    color: white;
    border: none;
}

.btn-neutral {
    background: var(--color-neutral-bg);
    color: var(--color-body-text);
    border: none;
}

.btn-cancel {
    background: var(--color-error-bg);
    color: var(--color-error-text);
    border: 1px solid var(--color-error-text);
}

.btn-outline-primary {
    background: none;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

.btn-outline-error {
    background: none;
    color: var(--color-error-text);
    border: 1px solid var(--color-error-text);
}

.btn-outline {
    background: var(--color-surface);
    color: var(--color-body-text);
    border: 1px solid var(--color-border);
    text-decoration: none;

}

.btn-link {
    background: none;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    text-decoration: none;
}

.btn-back {
    background: var(--color-neutral-bg);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    color: var(--color-body-text);

    font-weight: 500;
}

/* ── Forms ── */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.form-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
}
.datepick { cursor: pointer; }

/* Flatpickr overrides — larger calendar */
/* ── Flatpickr size overrides (must beat CDN specificity) ── */
.flatpickr-calendar {
    font-size: 1.15rem !important;
    padding: 0.5rem !important;
    width: auto !important;
}
.flatpickr-day {
    height: 48px !important;
    line-height: 48px !important;
    max-width: 48px !important;
    flex-basis: 48px !important;
}
.flatpickr-months .flatpickr-month {
    height: 48px !important;
}
.flatpickr-current-month {
    font-size: 1.2rem !important;
}
span.flatpickr-weekday {
    font-size: 1rem !important;
}
.dayContainer {
    min-width: 336px !important;
    max-width: 336px !important;
    width: 336px !important;
}
.flatpickr-innerContainer {
    max-width: 336px !important;
}
.flatpickr-rContainer {
    max-width: 336px !important;
}
.flatpickr-days {
    width: 336px !important;
}

.form-select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
}

.form-textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    resize: vertical;
}

.form-hint {
    color: var(--color-text-muted);

}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.form-row-3-tight {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
}

.form-row-addr {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.form-group-sm {
    max-width: 300px;
}

.form-group-xs {
    max-width: 200px;
}

/* Password toggle */
.password-wrap {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-primary);

    font-weight: 600;
    cursor: pointer;
    padding: 0.25rem;
}

.form-input-password {
    width: 100%;
    padding: 0.5rem 3.5rem 0.5rem 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
}

/* ── Grids & Flex ── */
.grid-auto {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.grid-auto-lg {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.grid-auto-cake {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.grid-stack {
    display: grid;
    gap: 1rem;
}

.flex-row {
    display: flex;
    gap: 0.5rem;
}

.flex-row-lg {
    display: flex;
    gap: 1rem;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-center {
    display: flex;
    align-items: center;
}

.flex-center-gap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.flex-row-center {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-end {
    display: flex;
    align-items: flex-end;
}

/* ── Badges ── */
.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-sm {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-pill {
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
}

.badge-success {
    background: var(--color-success-bg);
    color: var(--color-success-text);
}

.badge-error {
    background: var(--color-error-bg);
    color: var(--color-error-text);
}

.badge-muted {
    background: #e8e8e8;
    color: #888;
}
.badge-warning {
    background: var(--color-warning-bg);
    color: var(--color-warning-text);
}

.badge-info {
    background: var(--color-info-bg);
    color: var(--color-info-text);
}
.badge-orange {
    background: #fed7aa;
    color: #9a3412;
}

/* ── Status badges ── */
.status-active { background: var(--color-success-bg); color: var(--color-success-text); }
.status-suspended { background: var(--color-error-bg); color: var(--color-error-text); }
.status-inactive { background: var(--color-error-bg); color: var(--color-error-text); }

.badge-base { padding: 0.25rem 0.5rem; border-radius: 4px; font-weight: 600; }

.birthday-status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 8.75rem;
    text-align: center;
}

/* ── Alerts ── */
.alert-success { padding: 1rem; background: var(--color-success-bg); color: var(--color-primary); border-radius: 8px; margin-bottom: 1rem; font-weight: 500; }
.alert-error { padding: 1rem; background: var(--color-error-bg); color: var(--color-error-text); border-radius: 8px; margin-bottom: 1rem; font-weight: 500; }
.alert-warning { padding: 0.75rem; background: var(--color-warning-bg); color: var(--color-warning-text); border-radius: 8px; margin-bottom: 1rem; font-weight: 500; }
.alert-warning a { color: inherit; font-weight: 600; }
.alert-info { padding: 0.75rem; background: var(--color-info-bg); color: var(--color-info-text); border-radius: 8px; margin-bottom: 1rem; font-weight: 500; }

/* ── Empty state ── */
.empty-state { padding: 2rem; background: var(--color-body-bg); border-radius: 8px; text-align: center; }

/* ── Images ── */
.img-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.img-card {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.img-product {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.img-product-sm {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.img-preview {
    max-width: 200px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

/* ── Modal ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.4);
    align-items: center;
    justify-content: center;
}

.modal-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-50%);
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    width: 90%;
    max-width: 520px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

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

.modal-close {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    text-decoration: none;
}

.modal-title {
    margin: 0 0 1rem 0;
    color: var(--color-primary);
}

.white-space-pre-line {
    white-space: pre-line;
}

.status-indicator-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    color: inherit;
    font: inherit;
}

.status-indicator-icon {
    display: inline-flex;
    align-items: center;
}

.status-indicator-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    white-space: nowrap;
}

/* ── Date/Month Navigation ── */
.date-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.date-nav-label {
    font-weight: 700;

    color: var(--color-body-text);
}

.date-nav-btn {
    text-decoration: none;
    color: var(--color-primary);
    font-weight: 700;
    padding: 0.25rem 0.5rem;
}

/* ── Stat Cards ── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-grid-wide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    padding: 1.25rem 1.5rem;
    background: var(--color-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    min-width: 200px;
}

.stat-card-link {
    text-decoration: none;
    color: var(--color-body-text);
}

.stat-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

.stat-card-label {
    font-weight: 600;
}

/* ── Order Summary ── */
.order-summary {
    background: var(--color-body-bg);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--color-border);
    margin-top: 1rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;

    margin-bottom: 0.25rem;
}

.summary-total {
    border-top: 1px solid var(--color-border);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    display: flex;
    justify-content: space-between;
    font-weight: 700;

}

/* ── Tables ── */
.table-card {
    background: var(--color-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    overflow: visible;
    margin-bottom: 1.5rem;
}

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

.data-table thead {
    background: var(--color-primary);
    color: white;
}

.data-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;

}

.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-neutral-bg);
    vertical-align: top;
}

.data-table tbody tr:hover {
    background: var(--color-surface);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.action-link {
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    text-decoration: none;

    font-weight: 600;
    white-space: nowrap;
}

/* ── Pagination ── */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.25rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.page-link {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-neutral-bg);
    border-radius: 4px;
    text-decoration: none;
    color: var(--color-primary);

    min-width: 2.25rem;
    text-align: center;
}

.page-link-active {
    padding: 0.5rem 0.75rem;
    background: var(--color-primary);
    color: white;
    border-radius: 4px;

    font-weight: 600;
    min-width: 2.25rem;
    text-align: center;
}

.page-ellipsis {
    padding: 0.5rem 0.25rem;
    color: var(--color-text-muted);
}

/* ── Search Box ── */
.search-box {
    display: flex;
    gap: 0.5rem;
    max-width: 400px;
    margin-bottom: 1.5rem;
}

.search-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;

}

/* ── Auth Card (Login/Register) ── */
.auth-card {
    max-width: 420px;
    margin: 80px auto;
    padding: 2rem;
    background: var(--color-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
}

.auth-card-wide {
    max-width: 480px;
    margin: 80px auto;
    padding: 2rem;
    background: var(--color-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
}

.page-title-primary { color: var(--color-primary); }

/* ── Preview Banner ── */
.preview-banner {
    background: var(--color-primary);
    color: white;
    text-align: center;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.9rem;
}

/* ── Two-column form row ── */
.form-row-half { display: flex; gap: 0.75rem; }
.form-row-half > * { flex: 1; }

/* ── Company subtitle ── */
.company-subtitle { margin-bottom: 0.5rem; font-size: 0.9rem; }

/* ── Allergy hint ── */
.allergy-hint { margin-bottom: 0.5rem; display: block; }

/* ── Pricing disclaimer ── */
.pricing-disclaimer { font-size: 0.8rem; margin-top: 0.75rem; }

/* ── Qty row (cake cards) ── */
.qty-row { display: flex; align-items: center; gap: 0.5rem; }
.qty-row.d-none { display: none; }

/* ── Cost status (JS-generated) ── */
.cost-success { color: var(--color-success-text); }
.cost-error { color: var(--color-error-text); }

.auth-card-register {
    max-width: 420px;
    margin: 60px auto;
    padding: 2rem;
    background: var(--color-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
}

/* ── Impersonate Bar ── */
.impersonate-bar {
    background: var(--color-accent);
    color: white;
    text-align: center;
    padding: 0.5rem;

    font-weight: 600;
}

.impersonate-bar a {
    color: white;
    margin-left: 0.5rem;
    text-decoration: underline;
}

/* ── Landing Page ── */
.landing-hero {
    text-align: center;
    padding: 4rem 1rem;
}

.landing-brand {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.landing-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.landing-locations {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 600px;
    margin: 0 auto 3rem auto;
}

.landing-location-card {
    flex: 1;
    min-width: 180px;
    max-width: 260px;
    padding: 1.25rem 1.5rem;
    background: var(--color-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    text-decoration: none;
    color: var(--color-body-text);
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.landing-location-card:hover {
    border-color: var(--color-primary);
}

.landing-location-name {

}

.landing-features {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 800px;
    margin: 0 auto;
}

.landing-feature-card {
    flex: 1;
    min-width: 200px;
    background: var(--color-surface);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
}

.feature-title {

    margin-bottom: 0.5rem;
}

/* ── Today's birthday hero ── */
.birthday-hero {
    background: var(--color-accent);
    color: white;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.birthday-hero-text {
}

.birthday-hero a {
    color: white;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

/* ── Upcoming birthday row ── */
.upcoming-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-neutral-bg);
}

/* ── Product card (Orders) ── */
.product-card {
    display: block;
    background: var(--color-body-bg);
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.product-card:has(input:checked) {
    border-color: var(--color-primary) !important;
    background: var(--color-neutral-bg) !important;
}

/* ── Cake card (Birthday cake picker) ── */
.cake-card {
    display: block;
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    padding: 0.75rem;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-shadow: var(--shadow-card);
}

.cake-card:hover {
    border-color: var(--color-primary);
}

.cake-card--selected {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary);
}

.cake-card .text-semibold,
.cake-card .text-primary,
.cake-card .text-bold {

}

.image-zoom-link {
    display: block;
    text-align: center;
    font-size: 0.75rem;
    color: var(--color-primary);
    margin-bottom: 0.35rem;
}
.image-zoom-link:hover {
    color: var(--color-accent);
}
.image-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}

.image-popup-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.image-popup-close {
    position: fixed;
    top: 1rem;
    right: 1.25rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    z-index: 1001;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.image-popup-close:hover {
    color: var(--color-accent-hover);
}
.image-popup-img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 8px;
    cursor: default;
}

.cake-placeholder {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-neutral-bg);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
}

.cake-placeholder-sm {
    font-size: 2rem;
}

.radio-hidden {
    display: none;
}

/* ── Spacing Utilities ── */
.mb-0 { margin-bottom: 0; }
.mb-05 { margin-bottom: 0.25rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-15 { margin-bottom: 0.75rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-05 { margin-top: 0.25rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-15 { margin-top: 0.75rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.ml-05 { margin-left: 0.25rem; }
.pl-05 { padding-left: 0.25rem; }
.ml-1 { margin-left: 0.5rem; }
.ml-auto { margin-left: auto; }
.mr-05 { margin-right: 0.25rem; }
.mr-1 { margin-right: 0.5rem; }
.py-2 { padding: 1rem 0; }
.p-3 { padding: 1.25rem; }
.p-4 { padding: 2rem; }

/* ── Text Utilities ── */
.text-muted { color: var(--color-text-muted); }
.text-faint { color: var(--color-text-faint); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-xxs { font-size: 0.65rem; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-nowrap { white-space: nowrap; }
.text-primary { color: var(--color-primary); }
.text-error { color: var(--color-error-text); }
.text-success { color: var(--color-success-text); }
.text-warning { color: var(--color-warning-text); }
.text-accent { color: var(--color-accent); }
.text-bold { font-weight: 700; }
.text-semibold { font-weight: 600; }
.text-italic { font-style: italic; }
.link-plain { text-decoration: none; }
.link-strong { color: inherit; font-weight: 600; }
.table-wrap { overflow-x: auto; }
.row-muted { opacity: 0.5; }
.d-inline { display: inline; }

/* ── Flex & Width Utilities ── */
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.w-full { width: 100%; }
.w-auto { width: auto; }
.min-w-0 { min-width: 0; }
.gap-05 { gap: 0.5rem; }
.gap-075 { gap: 0.75rem; }
.gap-1 { gap: 1rem; }
.lh-relaxed { line-height: 1.6; }
.align-start { align-items: flex-start; }
.text-md { }
.text-label { font-weight: 600; }
.text-link-primary { color: var(--color-primary); font-weight: 600; text-decoration: none; }
.cursor-pointer { cursor: pointer; }
.d-none { display: none; }
.d-flex { display: flex; }
.align-self-end { align-self: end; }
.mt-4 { margin-top: 2rem; }
.mt-6 { margin-top: 3rem; }
.font-mono { font-family: monospace; font-size: 0.85rem; }
.section-title-danger { color: var(--color-error-text); }
.w-narrow { max-width: 120px; }
.w-date-input { width: 10rem; }
.w-search { width: 200px; font-size: 0.85rem; }
.stat-card { flex: 1; min-width: 140px; text-align: center; }
.stat-value { font-size: 1.5rem; font-weight: 700; }
.stat-label { font-size: 0.85rem; }
.stat-sublabel { font-size: 0.8rem; margin-bottom: 0.25rem; }
.pre-block { background: var(--color-bg); padding: 0.75rem; border-radius: 6px; margin: 0 0 1rem 0; overflow-x: auto; }
.pre-details { font-size: 0.75rem; background: #f5f5f5; padding: 0.75rem; border-radius: 4px; overflow-x: auto; max-height: 300px; margin: 0; white-space: pre-wrap; word-break: break-word; }

/* ── Error Log ── */
.error-filter-row { gap: 0.25rem; flex-wrap: wrap; align-items: center; }
.error-search { margin-left: auto; display: flex; gap: 0.25rem; }
.error-timestamp { font-size: 0.8rem; white-space: nowrap; }
.error-message { font-size: 0.85rem; word-break: break-word; }
.error-details-btn { font-size: 0.7rem; padding: 2px 6px; }
.badge-danger { background: var(--color-error-bg, #fde8e8); color: var(--color-error-text, #c53030); font-size: 0.75rem; }
.th-time { width: 140px; }
.th-source { width: 90px; }
.th-action-sm { width: 40px; }
.address-verified { color: var(--color-success-text); font-weight: 600; font-size: 0.9rem; margin-left: 0.5rem; }
.summary-total-row { border-top: 2px solid var(--color-primary); }
.mobile-card-total { background: var(--color-neutral-bg); font-weight: 700; }
.badge-active-status { background: var(--color-success-bg); color: var(--color-success-text); border: none; }
.badge-inactive-status { background: var(--color-error-bg); color: var(--color-error-text); border: none; }
.badge-nudge-off { background: var(--color-warning-bg, #FFF3CD); color: var(--color-warning-text, #856404); margin-left: 0.25rem; }
.btn-toggle-active { background: var(--color-warning-bg); color: var(--color-warning-text); }
.btn-toggle-inactive { background: var(--color-success-bg); color: var(--color-success-text); }
.border-active { border-color: var(--color-success-text); }
.border-inactive { border-color: var(--color-text-muted); }
.border-warning { border-color: var(--color-warning-border); }
.border-info { border-color: var(--color-info-border); }
.border-success { border-color: var(--color-success-border); }
.border-error { border-color: var(--color-error-border, #C75B4A); }
.border-primary { border-color: var(--color-primary); }
.border-transparent { border-color: transparent; }
.flex-wrap { flex-wrap: wrap; }
.flex-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.m-0 { margin: 0; }

/* ── Filter Row ── */
.filter-row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: flex-end; }
.filter-field { flex: 1; min-width: 130px; margin-bottom: 0; }
.filter-field-lg { flex: 1; min-width: 160px; margin-bottom: 0; }
.filter-actions { margin-bottom: 0; }
.filter-card { padding-top: 0.75rem; padding-bottom: 0.75rem; }

/* ── Link/Copy Row ── */
.link-row { display: flex; gap: 0.5rem; align-items: center; }
.link-input { flex: 1; background: var(--color-bg-muted, #f5f0e8); font-size: 0.85rem; }
.link-hint { font-size: 0.85rem; }
.copy-confirm { display: none; font-size: 0.85rem; }


.badge-neutral { background: var(--color-neutral-bg); color: var(--color-body-text); }

/* ── Section Divider (used in expandable sections) ── */
.section-divider { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--color-border, #e5e0d8); }

/* ── Allergy Warning ── */
.allergy-warning { display: none; color: var(--color-error-text); font-size: 0.8rem; font-weight: 600; margin-top: 0.25rem; }
.allergy-warning.active { display: block; }

/* ── Table: no shadow ── */
.table-card-flat { box-shadow: none; }

/* ── Table: header spacing ── */
.th-spaced { padding-bottom: 1.25rem; }

/* ── Compact card bottom ── */
.card-tight-bottom { padding-bottom: 0; }

/* ── Price annotation ── */
.price-note { font-weight: 400; font-size: 0.8rem; }

/* ── Estimate note ── */
.estimate-note { margin-top: 0.5rem; font-size: 0.85rem; color: var(--color-text-muted); font-style: italic; }

/* ── Actions cell ── */
.actions-cell { display: flex; align-items: center; gap: 0.75rem; }

/* ── Details/Summary ── */
details.details-compact { margin-top: 1rem; }
details.details-compact summary { cursor: pointer; }
details.details-compact .details-body { margin-top: 0.5rem; }

/* ── Step markers (birthday form wizard) ── */
.step-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.step-title {
    display: flex;
    align-items: center;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

/* ── Header Actions (responsive button row) ── */
.header-actions { display: flex; gap: 0.5rem; }

/* ── Calendar ── */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-hdr { text-align: center; font-weight: 700; color: var(--color-text-muted); padding: 0.3rem 0; }
.cal-day { min-height: 3.2rem; border-radius: 6px; padding: 0.25rem 0.35rem; background: var(--color-bg); position: relative; }
.cal-day-num { font-weight: 600; color: var(--color-text); }
.cal-day.has-birthday { background: #fef3d0; border: 1.5px solid var(--color-accent); }
.cal-day.is-today .cal-day-num { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--color-primary); color: white; }
.cal-bday-name { display: block; color: var(--color-primary); font-weight: 600; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
a.cal-bday-name:hover { text-decoration: underline; }
.cal-empty { min-height: 3.2rem; }
a.cal-day { text-decoration: none; color: inherit; display: block; }
a.cal-day-empty:hover { background: var(--color-accent-faint, #fef3d0); cursor: pointer; }

/* ── Form Layout ── */
.max-w-form { max-width: 500px; }
.max-w-form-md { max-width: 520px; }
.max-w-form-lg { max-width: 600px; }

.flex-form-row {
    display: flex;
    gap: 0.75rem;
    align-items: end;
}

/* ── Table Action Cell ── */
.action-cell {
    white-space: nowrap;
}

/* ── Table text-link actions (uniform style for all table row actions) ── */
.tbl-link {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0;
    margin-right: 0.75rem;
}
.tbl-link:hover { text-decoration: underline; }
.tbl-link-danger { color: var(--color-error-text); }
.tbl-link-accent { color: var(--color-accent); }

/* ── Zone Editor (Locations) ── */
.zone-row {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    margin-bottom: 0.25rem;
}

.zone-input {
    padding: 0.3rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;

    width: 65px;
}

.zone-label {

    color: var(--color-text-muted);
}

.zone-remove {
    background: none;
    border: none;
    color: var(--color-error-text);
    cursor: pointer;

    padding: 0 0.25rem;
}

/* ── Inline Edit (Locations) ── */
.edit-input {
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;

}

.edit-row {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: end;
    margin-bottom: 0.5rem;
}

.edit-actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.btn-zone-add {
    padding: 0.2rem 0.6rem;
    background: none;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
    border-radius: 4px;
    cursor: pointer;

    font-weight: 600;
}

.btn-edit-save {
    padding: 0.25rem 0.75rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;

    font-weight: 600;
}

.btn-edit-cancel {
    padding: 0.25rem 0.75rem;
    background: none;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    cursor: pointer;

}

/* ── Component Patterns ── */
.card-padded { padding: 1.25rem; }
.border-top-subtle { border-top: 1px solid var(--color-neutral-bg); padding-top: 0.75rem; margin-top: 0.5rem; }
.modal-subtitle { margin: 0 0 1rem 0; color: var(--color-text-muted); }
.checkbox-label { display: inline-flex; align-items: center; gap: 0.25rem; cursor: pointer; }
.radio-label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; padding: 0.35rem 0; }
.checkbox-row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.qty-input { width: 60px; padding: 0.25rem; border: 1px solid var(--color-border); border-radius: 4px; }
.loc-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; }

/* Delivery method toggle button */
.delivery-toggle {
    display: inline-block;
    padding: 0;
    border-radius: 0;
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    background: none;
    border: 2px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}
.delivery-toggle:hover { text-decoration: underline; }
.delivery-toggle-self {
    color: var(--color-info-text);
}
.delivery-toggle-messenger {
    color: var(--color-success-text);
}
.delivery-toggle-nomessenger {
    color: var(--color-warning-text);
}
.edit-cell { background: var(--color-body-bg); padding: 1rem; }
.btn-rounded { border-radius: 6px; }
.btn-info { background: var(--color-info-bg); color: var(--color-info-text); border: 1px solid var(--color-info-border); }
.btn-success-soft { background: var(--color-success-bg); color: var(--color-success-text); border: 1px solid var(--color-success-border); }

/* ── Product Grid Cards ── */
.product-card-link {
    text-decoration: none;
    color: var(--color-body-text);
    overflow: hidden;
    display: block;
}

.product-card-img-wrap {
    aspect-ratio: 4/3;
    overflow: hidden;
}

.product-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card-placeholder {
    aspect-ratio: 4/3;
    background: var(--color-neutral-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card-body {
    padding: 1rem;
}

/* ── Error Table (ImportBirthdays) ── */
.error-table {
    width: 100%;
    border-collapse: collapse;

}

.error-table thead tr {
    border-bottom: 2px solid var(--color-neutral-bg);
    text-align: left;
}

.error-table th,
.error-table td {
    padding: 0.4rem;
}

.error-table tbody tr {
    border-bottom: 1px solid var(--color-neutral-bg);
}

/* ── Section Divider ── */
.border-top-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

/* ── Orders page ── */
.product-card-name { }
.summary-items { margin-bottom: 0.25rem; }
.btn-edit { color: var(--color-primary); text-decoration: none; margin-right: 0.25rem; }
.btn-md { padding: 0.5rem 1.5rem; border-radius: 6px; }
.btn-lg { padding: 0.65rem 2rem; border-radius: 8px; font-size: 1.05rem; font-weight: 600; }
.btn-full { width: 100%; }
.btn-primary-link { background: var(--color-primary); color: white; text-decoration: none; }
.btn-view-toggle { text-decoration: none; }
.form-row-addr-3 { display: grid; grid-template-columns: 1fr 2fr 1fr; gap: 0.75rem; }

/* Report filter row */
.form-row-filters {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr auto;
    gap: 0.75rem;
    align-items: end;
}

@media (max-width: 768px) {
    .form-row-filters {
        grid-template-columns: 1fr 1fr;
    }
}

/* DeliveryTimes settings grid — two cards side by side, equal height */
.dt-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: start;
}

@media (max-width: 768px) {
    .dt-settings-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Mobile Cards ── */
.mobile-card {
    display: none;
}

/* ── Dropdown menus ── */
.nav-dropdown {
    position: relative;
}

.nav-dropdown > a {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-surface);
    min-width: 200px;
    box-shadow: var(--shadow-nav-dropdown);
    border-radius: 0 0 8px 8px;
    list-style: none;
    z-index: 1000;
    border: 1px solid var(--color-border);
    border-top: none;
}

.dropdown-menu.active {
    display: block;
}

.dropdown-menu li a {
    padding: 0.75rem 1.2rem;
    display: block;
    color: var(--nav-link-color);
    text-decoration: none;

    transition: background 0.2s;
    border-bottom: 1px solid var(--nav-border-subtle);
}

.dropdown-menu li:last-child a {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.dropdown-menu li a:hover {
    background: var(--nav-link-hover-bg);
}

/* ── Help tooltips ── */
.help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    background: var(--color-neutral-bg);
    color: var(--color-primary);
    font-weight: 700;
    cursor: pointer;
    margin-left: 0.35rem;
    vertical-align: middle;
    user-select: none;
    flex-shrink: 0;
    line-height: 1;
    position: relative;
    top: -1px;
    transition: background 0.15s;
}

.help-icon:hover {
    background: #c4bca8;
}

.help-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.help-bubble {
    display: none;
    position: absolute;
    left: 0;
    top: calc(100% + 0.5rem);
    z-index: 200;
    background: var(--color-primary);
    color: var(--color-surface);
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.5;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    width: 280px;
    box-shadow: var(--shadow-popup);
}

.help-bubble.show,
.help-wrap:hover .help-bubble {
    display: block;
}

.help-bubble::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 14px;
    width: 12px;
    height: 12px;
    background: var(--color-primary);
    transform: rotate(45deg);
    border-radius: 2px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
        gap: 0.75rem;
    }

    .nav-brand {
        font-size: 1.25rem;
        padding: 0.85rem 0;
    }

    .mobile-toggle {
        display: block;
    }

    .nav-user {
        display: none;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-surface);
        flex-direction: column;
        display: none;
        box-shadow: var(--shadow-nav-mobile);
        border-top: 1px solid var(--color-border);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu a {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid var(--nav-border-subtle);
    }

    .mobile-logout {
        display: block;
    }

    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    /* Mobile tables */
    .data-table {
        display: none;
    }

    .mobile-card {
        display: block;
        background: var(--color-surface);
        border-radius: 8px;
        padding: 0.6rem 0.75rem;
        margin-bottom: 0.5rem;
        box-shadow: var(--shadow-card);
    }

    .mobile-card-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 0.25rem;
        padding-bottom: 0.25rem;
        border-bottom: 1px solid var(--color-neutral-bg);
    }

    .mobile-card-title {
        font-weight: 700;
    
        color: var(--color-primary);
    }

    .mobile-card-badge {
        padding: 0.25rem 0.6rem;
        border-radius: 4px;
    
        font-weight: 600;
    }

    .mobile-card-row {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.15rem 0;
    }

    .mobile-card-label {
        color: var(--color-text-muted);
        font-weight: 500;
    }

    .mobile-card-value {
        color: var(--color-body-text);
        font-weight: 600;
        text-align: right;
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .cake-summary-btn {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        padding: 0.35rem 0.65rem;
        font: inherit;
        line-height: 1.1;
        white-space: nowrap;
        cursor: pointer;
    }

    .cake-summary-btn:hover {
        filter: brightness(0.96);
    }

    .cake-summary-icon {
        font-size: 0.8em;
        opacity: 0.75;
    }

    .mobile-card-actions {
        margin-top: 0.35rem;
        padding-top: 0.35rem;
        border-top: 1px solid var(--color-neutral-bg);
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .mobile-card-actions a,
    .mobile-card-actions button,
    .mobile-card-actions form {
        flex: 1 1 100%;
        padding: 0.4rem;
        text-align: center;
        border-radius: 6px;
    
        font-weight: 600;
        text-decoration: none;
    }

    /* Mobile dropdowns */
    .nav-dropdown {
        position: static;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border-radius: 0;
        background: var(--nav-mobile-dropdown-bg);
        margin-left: 1rem;
    }

    .dropdown-menu li a {
        padding: 0.6rem 1.5rem;
    }

    .header-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .header-actions a {
        flex: 1 1 calc(50% - 0.25rem);
        text-align: center;
        font-size: 0.85rem;
        padding: 0.5rem 0.5rem;
    }

    .page-header { flex-wrap: wrap; gap: 0.5rem; }

    .auth-card,
    .auth-card-wide,
    .auth-card-register {
        margin: 1.5rem auto;
        padding: 1.25rem;
        max-width: 100%;
    }

    .flex-row,
    .flex-row-lg {
        flex-wrap: wrap;
    }

    .flex-row-lg > * {
        width: 100%;
    }

    .summary-row,
    .summary-total {
        gap: 0.75rem;
        align-items: flex-start;
    }

    .summary-row span:last-child,
    .summary-total span:last-child {
        flex-shrink: 0;
    }

    .date-nav {
        gap: 0.5rem;
    }

    .date-nav-label {
        text-align: center;
        flex: 1;
    }

    .form-row-half { flex-direction: column; gap: 0; }
    .form-row-addr { grid-template-columns: 1fr; }
    .form-row-addr-3 { grid-template-columns: 1fr; }
    .form-row-2 { grid-template-columns: 1fr; }
    .search-box { max-width: 100%; flex-direction: column; }
    .flex-between { flex-wrap: wrap; gap: 0.5rem; }
    .link-row { flex-direction: column; align-items: stretch; }
    .link-input { width: 100%; }
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-field,
    .filter-field-lg,
    .filter-actions {
        width: 100%;
    }

    .filter-actions .btn {
        width: 100%;
    }

    .qty-row {
        flex-wrap: wrap;
        align-items: flex-start;
    }
}

@media (max-width: 600px) {
    .grid-auto-cake {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .cake-card {
        padding: 0.65rem;
    }

    .cake-card .text-semibold,
    .cake-card .text-muted,
    .cake-card .text-primary {
        overflow-wrap: anywhere;
    }

    .image-zoom-link {
        padding: 0.2rem 0;
    }

    .order-summary {
        padding: 0.85rem;
    }

    .page-header > .btn-sm,
    .page-header > .btn,
    .page-header > a.btn-sm,
    .page-header > a.btn {
        width: 100%;
        text-align: center;
    }

    .mobile-card-header {
        gap: 0.5rem;
    }

    .mobile-card-badge {
        white-space: normal;
        text-align: center;
    }

    .help-bubble {
        position: fixed;
        left: 1rem;
        right: 1rem;
        top: auto;
        bottom: 1rem;
        width: auto;
    }

    .help-bubble::before {
        display: none;
    }

    .flatpickr-calendar {
        font-size: 1rem !important;
        padding: 0.35rem !important;
    }

    .flatpickr-day {
        height: 40px !important;
        line-height: 40px !important;
        max-width: 40px !important;
        flex-basis: 40px !important;
    }

    .flatpickr-months .flatpickr-month {
        height: 42px !important;
    }

    .flatpickr-current-month {
        font-size: 1rem !important;
    }

    .dayContainer,
    .flatpickr-innerContainer,
    .flatpickr-rContainer,
    .flatpickr-days {
        min-width: 280px !important;
        max-width: 280px !important;
        width: 280px !important;
    }
}

/* ── Date range picker (supplier / overview) ── */
.supplier-date-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: end;
}
.supplier-date-form .form-group {
    flex: 1;
    min-width: 130px;
}

/* ── Footer ── */
.site-footer {
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}
.site-footer a {
    color: var(--color-text-muted);
    text-decoration: none;
}
.site-footer a:hover {
    text-decoration: underline;
}

/* Closed dates calendar */
.closed-cal-legend {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}
.closed-cal-legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.closed-cal-legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    display: inline-block;
}
.closed-cal-legend-closed {
    background: var(--color-error-bg);
    border: 1px solid var(--color-error-border);
}
.closed-cal-legend-weekend {
    background: var(--color-body-bg);
}
.closed-cal-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}
.closed-cal-nav-btn {
    padding: 0.4rem 0.8rem;
    background: var(--color-neutral-bg);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
}
.closed-cal-month {
    color: var(--color-primary);
}
.closed-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
}
.closed-cal-header {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    padding: 0.4rem;
}
.closed-cal-header-weekend {
    color: var(--color-text-faint);
}
.closed-cal-day {
    padding: 0.35rem;
    border-radius: 6px;
    background: var(--color-surface);
    border: 2px solid transparent;
    min-height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}
.closed-cal-day:hover {
    opacity: 0.7;
}
.closed-cal-day-closed {
    background: var(--color-error-bg);
    border-color: var(--color-error-border);
    color: var(--color-error-text);
    font-weight: 700;
}
.closed-cal-day-weekend {
    background: var(--color-body-bg);
    color: var(--color-text-muted);
}
.closed-cal-status {
    font-size: 0.8rem;
    color: var(--color-text-faint);
    font-style: italic;
    margin-top: 0.5rem;
    display: inline-block;
}
.closed-cal-status-saved {
    color: var(--color-success-text);
}
