/* =====================================================================
   SO3: Customer Reservation Portal (customer/*.php).
   Look of the approved mockups: cream page, white cards, cacao-brown
   buttons, soft status chips. Light and dark (html[data-theme="dark"]).
   Phone first: one column, windows become full-screen sheets with a
   sticky action bar, the three links sit in a bottom bar.
   ===================================================================== */

/* The portal reads the SAME tokens as the farm pages (assets/css/tokens.css:
   --cfl-* light, --cf-* dark), so a colour change there changes both. */
:root {
    --c-bg: var(--cfl-canvas, #F7F3EA);
    --c-surface: var(--cfl-surface, #FFFDF8);
    --c-tint: var(--cfl-surface-2, #FBF7EF);
    --c-tint-line: var(--cfl-border, #EDE4D6);
    --c-line: var(--cfl-border, #EDE4D6);
    --c-line-strong: var(--cfl-border-strong, #E0D4C0);
    --c-text: var(--cfl-text, #3D1C02);
    --c-text-2: var(--cfl-text-2, #5C4636);
    --c-muted: var(--cfl-muted, #75604F);
    --c-label: var(--cfl-muted, #75604F);
    --c-primary: var(--cfl-brown, #3D1C02);
    --c-primary-hover: var(--cfl-brown-hover, #522605);
    --c-on-primary: #FFFFFF;
    --c-accent: var(--cfl-gold, #C8861A);
    --c-link: var(--cfl-gold-deep, #9A5A08);
    --c-focus: var(--cfl-gold, #C8861A);
    --c-step-todo: var(--cfl-surface-3, #F4EEE2);

    --c-amber: var(--cfl-amber, #8B610C);   --c-amber-bg: var(--cfl-amber-tint, #FDF0D2);
    --c-orange: var(--cfl-amber, #8B610C);  --c-orange-bg: var(--cfl-amber-tint, #FDF0D2);
    --c-green: var(--cfl-green, #2D6A4F);   --c-green-bg: var(--cfl-green-tint, #EDF8F1);
    --c-brown: var(--cfl-text, #3D1C02);    --c-brown-bg: var(--cfl-gold-tint, rgba(200, 134, 26, .12));
    --c-gray: var(--cfl-gray, #6B5B4B);     --c-gray-bg: var(--cfl-gray-tint, #EFEBE4);
    --c-red: var(--cfl-red, #B42318);       --c-red-bg: var(--cfl-red-tint, #FFF2F2);
    --c-blue: var(--cfl-blue, #1D5A8A);     --c-blue-bg: var(--cfl-blue-tint, #E6EFF8);

    --c-note-bg: var(--cfl-amber-tint, #FDF0D2);  --c-note-line: var(--cfl-gold-line, rgba(200, 134, 26, .35));  --c-note-text: var(--cfl-amber, #8B610C);
    --c-soft-bg: var(--cfl-surface-2, #FBF7EF);   --c-soft-text: var(--cfl-text-2, #5C4636);

    --c-radius: 12px;
    --c-radius-sm: 12px;
    --c-shadow: var(--cfl-shadow, 0 1px 3px rgba(61, 28, 2, .05));
    --c-shadow-pop: var(--cfl-shadow-lg, 0 12px 32px -12px rgba(61, 28, 2, .18));
    --c-head-h: 72px;
    color-scheme: light;
}

html[data-theme="dark"] {
    --c-bg: var(--cf-bg);
    --c-surface: var(--cf-surface);
    --c-tint: var(--cf-surface-2);
    --c-tint-line: var(--cf-border);
    --c-line: var(--cf-border);
    --c-line-strong: var(--cf-border-strong);
    --c-text: var(--cf-text);
    --c-text-2: var(--cf-text-2);
    --c-muted: var(--cf-muted);
    --c-label: var(--cf-muted);
    --c-primary: var(--cf-gold);
    --c-primary-hover: var(--cf-gold-soft);
    --c-on-primary: var(--cf-on-gold, #2A1B04);
    --c-accent: var(--cf-gold);
    --c-link: var(--cf-gold-soft);
    --c-focus: var(--cf-gold);
    --c-step-todo: var(--cf-surface-3);

    --c-amber: var(--cf-gold-soft);  --c-amber-bg: var(--cf-gold-tint);
    --c-orange: var(--cf-gold-soft); --c-orange-bg: var(--cf-gold-tint);
    --c-green: var(--cf-green);      --c-green-bg: var(--cf-green-tint);
    --c-brown: var(--cf-gold-soft);  --c-brown-bg: var(--cf-gold-tint);
    --c-gray: var(--cf-text-2);      --c-gray-bg: var(--cf-surface-3);
    --c-red: var(--cf-red);          --c-red-bg: var(--cf-red-tint);
    --c-blue: var(--cf-blue);        --c-blue-bg: var(--cf-blue-tint);

    --c-note-bg: var(--cf-gold-tint);  --c-note-line: var(--cf-gold-line);  --c-note-text: var(--cf-gold-soft);
    --c-soft-bg: var(--cf-surface-2);  --c-soft-text: var(--cf-text-2);

    --c-shadow: var(--cf-shadow);
    --c-shadow-pop: var(--cf-shadow-lg);
    color-scheme: dark;
}

[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }

body.cust {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--c-bg);
    color: var(--c-text);
    font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: var(--c-primary); }
html[data-theme="dark"] a { color: var(--c-brown); }
h1, h2, h3 { color: var(--c-text); }

:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; }

.cust-sr {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.cust-skip {
    position: absolute;
    left: -999px;
    top: 8px;
    z-index: 100;
    padding: 10px 14px;
    background: var(--c-surface);
    color: var(--c-text);
    border-radius: 10px;
}
.cust-skip:focus { left: 8px; }

/* =====================================================================
   header
   ===================================================================== */

.cust-top {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-line);
}
.cust-top-in {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 1220px;
    height: var(--c-head-h);
    margin: 0 auto;
    padding: 0 24px;
}

.cust-brand { display: flex; align-items: center; gap: 12px; color: var(--c-text); text-decoration: none; min-width: 0; }
html[data-theme="dark"] .cust-brand { color: var(--c-text); }
.cust-logo {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--c-tint);
    flex-shrink: 0;
}

.cust-logo img { width: 30px; height: 30px; object-fit: contain; }
.cust-brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.cust-brand-name { font-family: "Playfair Display", Georgia, serif; font-size: 21px; font-weight: 700; color: var(--c-text); }
.cust-brand-farm { margin-top: 3px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--c-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }



.cust-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.cust-pop-wrap { position: relative; }

.cust-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--c-text);
    font-size: 19px;
    text-decoration: none;
    cursor: pointer;
}
.cust-icon-btn:hover, .cust-icon-btn[aria-expanded="true"] { background: var(--c-tint); }
.cust-dot {
    position: absolute;
    top: 9px;
    right: 10px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--c-primary);
    box-shadow: 0 0 0 2px var(--c-surface);
}
html[data-theme="dark"] .cust-dot { background: var(--c-accent); }

.cust-avatar {
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: var(--c-primary);
    color: var(--c-on-primary);
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .02em;
    cursor: pointer;
}
.cust-avatar:hover, .cust-avatar[aria-expanded="true"] { background: var(--c-primary-hover); }

.cust-lang {
    display: inline-flex;
    padding: 3px;
    min-height: 44px;
    align-items: center;
    border: 1px solid var(--c-line-strong);
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
}
.cust-lang span { min-width: 34px; padding: 6px 8px; border-radius: 999px; color: var(--c-muted); font-size: 12px; font-weight: 800; }
.cust-lang span.on { background: var(--c-primary); color: var(--c-on-primary); }

/* ---------- dropdowns (bell, avatar) ---------- */

.cust-pop {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 70;
    width: 380px;
    max-width: calc(100vw - 24px);
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--c-radius);
    box-shadow: var(--c-shadow-pop);
    overflow: hidden;
}
html[data-theme="dark"] .cust-pop { border-color: var(--c-line-strong); }
.cust-pop-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 12px; border-bottom: 1px solid var(--c-line); }
.cust-pop-head h2 { margin: 0; font-size: 17px; font-weight: 800; }
.cust-count-badge { padding: 3px 10px; border-radius: 999px; background: var(--c-brown-bg); color: var(--c-brown); font-size: 12px; font-weight: 700; }
.cust-pop-list { max-height: min(420px, 60vh); overflow-y: auto; overscroll-behavior: contain; }
.cust-pop-empty { margin: 0; padding: 26px 18px; color: var(--c-muted); text-align: center; font-size: 14px; }
.cust-pop-foot { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border-top: 1px solid var(--c-line); }

.cust-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 8px;
    border: 0;
    background: transparent;
    color: var(--c-text);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border-radius: 8px;
}
.cust-link-btn:hover { background: var(--c-tint); }
html[data-theme="dark"] .cust-link-btn { color: var(--c-text); }

.cust-notif {
    display: flex;
    gap: 14px;
    width: 100%;
    padding: 14px 18px;
    border: 0;
    border-bottom: 1px solid var(--c-line);
    background: transparent;
    color: var(--c-text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.cust-notif:last-child { border-bottom: 0; }
.cust-notif:hover { background: var(--c-tint); }
.cust-notif.unread { background: color-mix(in srgb, var(--c-tint) 70%, var(--c-brown-bg)); }
.cust-notif-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
    font-size: 16px;
}
.cust-notif-body { display: grid; gap: 2px; min-width: 0; }
.cust-notif-title { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 15px; }
.cust-notif:not(.unread) .cust-notif-title { font-weight: 700; }
.cust-unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c-primary); flex-shrink: 0; }
html[data-theme="dark"] .cust-unread-dot { background: var(--c-accent); }
.cust-notif-msg { color: var(--c-text-2); font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.cust-notif-time { color: var(--c-muted); font-size: 12.5px; }

.cust-notif-icon.green, .cust-tl-icon.green { background: var(--c-green-bg); color: var(--c-green); }
.cust-notif-icon.amber { background: var(--c-amber-bg); color: var(--c-amber); }
.cust-notif-icon.orange { background: var(--c-orange-bg); color: var(--c-orange); }
.cust-notif-icon.brown { background: var(--c-brown-bg); color: var(--c-brown); }
.cust-notif-icon.gray { background: var(--c-gray-bg); color: var(--c-gray); }
.cust-notif-icon.red { background: var(--c-red-bg); color: var(--c-red); }
.cust-notif-icon.blue { background: var(--c-blue-bg); color: var(--c-blue); }

.cust-notif-page { overflow: hidden; }
.cust-notif-page .cust-notif { padding: 16px 20px; }

.cust-eyebrow { color: var(--c-label); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.cust-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 0 18px;
    border: 0;
    background: transparent;
    color: var(--c-text);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
html[data-theme="dark"] .cust-menu-item { color: var(--c-text); }
.cust-menu-item i { width: 18px; color: var(--c-muted); text-align: center; }
.cust-menu-item:hover { background: var(--c-tint); }
.cust-menu-item.danger, .cust-menu-item.danger i { color: var(--c-red); }
.cust-logout { margin: 0; border-top: 1px solid var(--c-line); margin-top: 6px; padding-top: 6px; }

/* =====================================================================
   layout
   ===================================================================== */

.cust-main {
    flex: 1;
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    padding: 40px 24px 48px;
}
.cust-main-auth { max-width: 1000px; }
/* logged in: full width next to the sidebar, same padding as the farm pages */
body.cust-in .cust-main { max-width: none; margin: 0; padding: 28px 32px 40px; }

.cust-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 24px;
    margin-bottom: 18px;
}
.cust-page-head h1 { margin: 0 0 6px; font-size: 32px; line-height: 1.15; font-weight: 800; letter-spacing: -.01em; }
.cust-page-head p { margin: 0; max-width: 720px; color: var(--c-text-2); font-size: 16px; }

.cust-sort { display: flex; align-items: center; gap: 12px; color: var(--c-text-2); font-size: 15px; font-weight: 600; }
.cust-sort select, .cust-select select {
    min-height: 46px;
    min-width: 230px;
    padding: 0 40px 0 16px;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--c-radius-sm);
    background: var(--c-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2375604F' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 16px center;
    color: var(--c-text);
    font: inherit;
    font-size: 15px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.cust-updated { display: flex; align-items: center; gap: 6px; min-height: 22px; margin: 0 0 12px; color: var(--c-muted); font-size: 13px; }
.cust-updated .cust-link-btn { min-height: 44px; font-size: 13px; color: var(--c-text-2); }

/* about 4 columns on wide screens, 3 on laptops, 2 on tablets, 1 on phones */
.cust-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 22px; align-items: stretch; }
.cust-list { display: grid; gap: 16px; }
.cust-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; align-items: start; }

.cust-card {
    background: var(--c-surface);
    border: 1px solid var(--c-line);
    border-radius: var(--c-radius);
    box-shadow: var(--c-shadow);
}

.cust-label {
    display: block;
    color: var(--c-label);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}
.cust-sub { margin: 2px 0 0; color: var(--c-muted); font-size: 14px; }
.cust-unit { color: var(--c-muted); font-weight: 500; font-size: 14px; }
.cust-muted { color: var(--c-muted); }

/* ---------- chips ---------- */

.cust-chip, .cust-stage {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
}
.cust-chip.small { padding: 2px 9px; font-size: 12px; }
.cust-chip-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.cust-chip.amber { background: var(--c-amber-bg); color: var(--c-amber); }
.cust-chip.orange { background: var(--c-orange-bg); color: var(--c-orange); }
.cust-chip.green { background: var(--c-green-bg); color: var(--c-green); }
.cust-chip.brown { background: var(--c-brown-bg); color: var(--c-brown); }
.cust-chip.gray { background: var(--c-gray-bg); color: var(--c-gray); }
.cust-chip.red { background: var(--c-red-bg); color: var(--c-red); }
.cust-chip.blue { background: var(--c-blue-bg); color: var(--c-blue); }
.cust-stage { padding: 6px 14px; font-size: 14px; font-weight: 600; }
.cust-stage.dry { background: var(--c-brown-bg); color: var(--c-brown); }
.cust-stage.ferment { background: var(--c-gray-bg); color: var(--c-text-2); }
.cust-stage.review { background: var(--c-amber-bg); color: var(--c-amber); }
.cust-stage.ready { background: var(--c-green-bg); color: var(--c-green); }
.cust-head-chips { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }

/* ---------- banners ---------- */

.cust-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    padding: 14px 18px;
    border-radius: var(--c-radius-sm);
    font-size: 14.5px;
    line-height: 1.5;
}
.cust-banner i { margin-top: 3px; }
.cust-banner.note, .cust-banner.warn { background: var(--c-note-bg); border: 1px solid var(--c-note-line); color: var(--c-note-text); }
.cust-banner.warn { background: var(--c-amber-bg); border-color: transparent; color: var(--c-amber); }
.cust-banner.soft { background: var(--c-soft-bg); color: var(--c-soft-text); }
.cust-banner.ok { display: inline-flex; background: var(--c-green-bg); color: var(--c-green); }
.cust-banner.muted { background: var(--c-tint); color: var(--c-text-2); }
#cust-limit { margin-bottom: 16px; }
.cust-preorder-note { margin: 0 0 20px; }
.cust-sheet .cust-banner.warn { background: var(--c-note-bg); border: 1px solid var(--c-note-line); color: var(--c-note-text); }

/* =====================================================================
   Pre-order cards
   ===================================================================== */

.cust-batch { display: flex; flex-direction: column; gap: 18px; padding: 22px 22px 20px; scroll-margin-top: calc(var(--c-head-h) + 12px); }
.cust-batch-head { display: flex; flex-wrap: wrap-reverse; align-items: flex-start; justify-content: space-between; gap: 8px 12px; }
.cust-batch-head > div:first-child { flex: 1 1 150px; min-width: 0; }
.cust-batch-head h3 { margin: 0; font-size: 18px; font-weight: 800; }

.cust-steps-wrap { display: grid; gap: 8px; }
.cust-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 0; padding: 0; list-style: none; }
.cust-steps li { display: grid; gap: 7px; }
.cust-step-bar { height: 4px; border-radius: 4px; background: var(--c-step-todo); }
.cust-steps li.done .cust-step-bar { background: var(--c-primary); }
html[data-theme="dark"] .cust-steps li.done .cust-step-bar { background: var(--c-brown); }
.cust-step-name { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--c-muted); }
.cust-steps li.done .cust-step-name { color: var(--c-text); font-weight: 700; }

.cust-avail {
    display: grid;
    gap: 4px;
    padding: 16px 18px;
    border: 1px solid var(--c-tint-line);
    border-radius: 14px;
    background: var(--c-tint);
}
.cust-avail-date { font-size: 24px; font-weight: 800; line-height: 1.2; color: var(--c-text); }
.cust-avail-date.sm { font-size: 19px; }
.cust-avail-2 { grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.cust-avail-2 > div { display: grid; gap: 6px; align-content: start; justify-items: start; }
.cust-avail-2 .full { grid-column: 1 / -1; }
.cust-pending { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; color: var(--c-muted); font-size: 13.5px; }
.cust-fq { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; font-size: 14px; }
.cust-fq-label { color: var(--c-text-2); font-weight: 600; }
.cust-fq.small { margin: 0; }
.cust-moved-row { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.cust-moved { display: inline-flex; align-items: center; gap: 6px; color: var(--c-blue); font-size: 13px; font-weight: 600; }

.cust-kv2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0; }
.cust-kv2 > div { display: grid; gap: 6px; align-content: start; }
.cust-kv2 .cust-label { letter-spacing: .03em; }
.cust-kv2 dd { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.cust-kv2 dd strong { font-size: 18px; font-weight: 800; }
.cust-low { display: inline-flex; align-items: center; gap: 4px; color: var(--c-amber); font-size: 13px; font-weight: 600; }

.cust-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--c-line);
}
.cust-card-actions .cust-btn { gap: 8px; min-width: 0; padding: 6px 10px; font-size: 15px; line-height: 1.2; white-space: normal; }
.cust-nowrap { white-space: nowrap; }
.cust-why { margin: -8px 0 0; color: var(--c-muted); font-size: 13px; }

/* ---------- Available products ---------- */

.cust-product { display: flex; flex-direction: column; overflow: hidden; }
/* every photo fills the same box, whatever its own shape */
.cust-photo { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--c-tint); flex-shrink: 0; }
.cust-photo img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.cust-photo .cust-chip { position: absolute; top: 12px; left: 12px; z-index: 1; box-shadow: 0 2px 6px rgba(0, 0, 0, .18); }
/* solid badges on photos: readable on any picture */
.cust-photo .cust-chip.green { background: #2D6A4F; color: #fff; }   /* --cfl-green, on any photo */
.cust-photo .cust-chip.amber { background: #8B610C; color: #fff; }   /* --cfl-amber */
.cust-photo .cust-chip.gray { background: #4A4038; color: #fff; }
.cust-product-body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 20px 22px 22px; }
.cust-product-body h3 { margin: 0; font-size: 18px; font-weight: 800; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cust-product-body, .cust-batch, .cust-stat, .cust-rcard, .cust-next { font-variant-numeric: tabular-nums; }
.cust-batch-head h3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cust-unitline { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--c-muted); font-size: 14px; }
.cust-price { margin: 6px 0 0; }
.cust-price strong { font-size: 20px; font-weight: 800; }
.cust-availline { margin: 0 0 8px; color: var(--c-text-2); font-size: 15px; }
.cust-availline strong { color: var(--c-text); }
.cust-product-body .cust-btn { margin-top: auto; }

/* ---------- skeleton / empty ---------- */

.cust-skel { display: grid; gap: 14px; padding: 22px; min-height: 360px; }
.cust-skel.row { min-height: 0; }
.cust-skel .sk {
    display: block;
    height: 14px;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--c-tint) 0%, var(--c-line) 50%, var(--c-tint) 100%);
    background-size: 200% 100%;
    animation: cust-shimmer 1.4s ease-in-out infinite;
}
.cust-skel .w40 { width: 40%; height: 18px; }
.cust-skel .w60 { width: 60%; }
.cust-skel .w80 { width: 80%; }
.cust-skel .bar { height: 6px; }
.cust-skel .box { height: 96px; border-radius: 14px; }
.cust-skel .btn { height: 46px; border-radius: 12px; }
@keyframes cust-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

.cust-empty { display: grid; justify-items: center; gap: 12px; padding: 44px 24px; text-align: center; color: var(--c-text-2); }
.cust-empty i { font-size: 30px; color: var(--c-muted); }
.cust-empty p { margin: 0; max-width: 460px; }
.cust-loading { color: var(--c-muted); }

/* =====================================================================
   buttons + forms
   ===================================================================== */

.cust-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--c-radius-sm);
    background: var(--c-surface);
    color: var(--c-text);
    font: inherit;
    font-size: 15.5px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, border-color .15s;
}
html[data-theme="dark"] .cust-btn { color: var(--c-text); }
.cust-btn:hover { border-color: var(--c-primary); background: var(--c-tint); }
.cust-btn.primary { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-on-primary); }
.cust-btn.primary:hover { background: var(--c-primary-hover); border-color: var(--c-primary-hover); }
.cust-btn.danger { border-color: var(--c-red); color: var(--c-red); }
.cust-btn.danger:hover { background: var(--c-red-bg); }
.cust-btn.text { border-color: transparent; background: transparent; padding: 0 12px; }
.cust-btn.text:hover { background: var(--c-tint); border-color: transparent; }
.cust-btn.small { min-height: 40px; padding: 0 14px; font-size: 14px; }
.cust-btn.block { width: 100%; }
.cust-btn:disabled, .cust-btn:disabled:hover { opacity: .5; cursor: not-allowed; background: var(--c-surface); border-color: var(--c-line-strong); color: var(--c-text); }
.cust-btn.primary:disabled, .cust-btn.primary:disabled:hover { background: var(--c-primary); border-color: var(--c-primary); color: var(--c-on-primary); }

.cust-form { padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.cust-form h2 { margin: 0; font-size: 18px; }
.cust-field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.cust-field em { font-style: normal; font-weight: 400; color: var(--c-muted); }
.cust-field input, .cust-field textarea, .cust-field-block textarea {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--c-radius-sm);
    background: var(--c-surface);
    color: var(--c-text);
    font: inherit;
    font-size: 16px;
}
.cust-field textarea, .cust-field-block textarea { min-height: 84px; resize: vertical; }
.cust-field input[readonly] { background: var(--c-tint); color: var(--c-muted); }
.cust-field.has-error input { border-color: var(--c-red); }
.cust-hint { margin: 0; font-weight: 400; color: var(--c-muted); font-size: 13.5px; }
.cust-err { margin: 0; font-weight: 600; color: var(--c-red); font-size: 13.5px; }

.cust-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; }
.cust-check input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--c-primary); flex-shrink: 0; }
.cust-check.has-error { color: var(--c-red); }

.cust-alert {
    margin: 0;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--c-red-bg);
    color: var(--c-red);
    font-size: 14px;
    font-weight: 600;
}
.cust-alert.ok { background: var(--c-green-bg); color: var(--c-green); }
.cust-alert.warn { background: var(--c-amber-bg); color: var(--c-amber); }
.cust-welcome { margin-bottom: 16px; }

.cust-help { margin: 0; color: var(--c-muted); font-size: 13.5px; }
.cust-switch { margin: 0; font-size: 14px; text-align: center; }
.cust-staff-link { text-align: center; font-size: 13.5px; }
.cust-staff-link a { color: var(--c-muted); }
.cust-back { margin: 0 0 12px; }
.cust-back a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; }
.cust-note { margin-bottom: 14px; padding: 12px 14px; border-radius: 12px; background: var(--c-amber-bg); color: var(--c-amber); font-size: 14px; font-weight: 600; }

/* hero of the older pages (profile, privacy, auth) */
.cust-hero { margin: 0 0 18px; }
.cust-hero h1 { margin: 0 0 4px; font-size: 28px; line-height: 1.2; font-weight: 800; }
.cust-hero p { margin: 0; color: var(--c-text-2); }
.cust-hero.small h1 { font-size: 28px; }
.cust-hero-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }

.cust-tabs { display: flex; gap: 6px; margin-bottom: 16px; padding: 4px; border: 1px solid var(--c-line); border-radius: 999px; background: var(--c-surface); width: fit-content; max-width: 100%; }
.cust-tab { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; color: var(--c-text-2); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.cust-tab.active { background: var(--c-primary); color: var(--c-on-primary); }

/* ---------- auth pages ---------- */

.cust-auth { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: center; max-width: 440px; margin: 0 auto; }
.cust-auth-intro h1 { margin: 6px 0 6px; font-size: 26px; line-height: 1.25; }
.cust-auth-intro p { margin: 0; color: var(--c-text-2); }
@media (min-width: 900px) {
    .cust-auth { grid-template-columns: 1.1fr 1fr; max-width: none; gap: 40px; }
    .cust-auth-intro h1 { font-size: 34px; }
    .cust-staff-link { grid-column: 2; }
}

.cust-prose { padding: 26px; max-width: 760px; margin: 0 auto; }
.cust-prose h1 { margin-top: 0; font-size: 24px; }
.cust-prose h2 { margin: 18px 0 4px; font-size: 16px; }
.cust-prose p { margin: 0 0 8px; }

/* =====================================================================
   My Reservations
   ===================================================================== */

.cust-res-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.cust-seg { display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--c-surface); border: 1px solid var(--c-line); }
.cust-seg-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--c-text-2);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}
.cust-seg-btn[aria-selected="true"] { background: var(--c-primary); color: var(--c-on-primary); }
.cust-seg-count { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--c-gray-bg); color: var(--c-text-2); font-size: 12px; text-align: center; }
.cust-seg-btn[aria-selected="true"] .cust-seg-count { background: rgba(255, 255, 255, .22); color: #fff; }
.cust-res-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.cust-search { position: relative; display: block; }
.cust-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--c-muted); pointer-events: none; }
.cust-search input {
    width: 300px;
    min-height: 46px;
    padding: 0 14px 0 40px;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--c-radius-sm);
    background: var(--c-surface);
    color: var(--c-text);
    font: inherit;
    font-size: 15px;
}
.cust-search input::placeholder { color: var(--c-muted); }
.cust-select select { min-width: 190px; }

.cust-rcard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px 24px;
    padding: 20px 24px;
    border-left: 4px solid var(--c-line-strong);
    scroll-margin-top: calc(var(--c-head-h) + 16px);
}
.cust-rcard.st-pending { border-left-color: var(--c-accent); }
.cust-rcard.st-needs_decision { border-left-color: var(--c-amber); }
.cust-rcard.st-confirmed { border-left-color: var(--c-primary); }
.cust-rcard.st-ready, .cust-rcard.st-completed { border-left-color: var(--c-green); }
.cust-rcard.st-rejected { border-left-color: var(--c-red); }
.cust-rcard.st-cancelled, .cust-rcard.st-expired { border-left-color: var(--c-line-strong); }
.cust-rcard.highlight { box-shadow: 0 0 0 3px var(--c-focus); }
.cust-rcard-main { display: grid; gap: 8px; min-width: 0; align-content: start; }
.cust-rcard-main h3 { margin: 0; font-size: 17px; font-weight: 800; }
.cust-rcard-main .cust-sub span { margin: 0 4px; }
.cust-facts-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 2px 0 0; color: var(--c-text-2); font-size: 14.5px; }
.cust-facts-line strong { color: var(--c-text); }
.cust-facts-line .sep { color: var(--c-line-strong); }
.cust-rcard .cust-banner { width: fit-content; max-width: 100%; padding: 10px 14px; font-size: 14px; }
/* the status chip top right, the actions right under the details (no long gap) */
.cust-rcard { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main chips" "actions actions"; }
.cust-rcard-main { grid-area: main; }
.cust-rcard-side { display: contents; }
.cust-rcard-side .cust-head-chips { grid-area: chips; align-self: start; }
.cust-rcard-actions { grid-area: actions; display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 8px; }
#cust-reservations .cust-list { grid-template-columns: repeat(auto-fill, minmax(min(520px, 100%), 1fr)); align-items: start; }

/* =====================================================================
   windows (sheets)
   ===================================================================== */

.modal {
    position: fixed;
    inset: 0;
    z-index: 8000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}
.modal.show { display: flex; }

.cust-modal .modal-box.cust-sheet {
    display: flex;
    flex-direction: column;
    width: min(520px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    border-radius: 20px;
    background: var(--c-surface);
    color: var(--c-text);
    box-shadow: var(--c-shadow-pop);
    overflow: hidden;
}
html[data-theme="dark"] .cust-modal .modal-box.cust-sheet { border: 1px solid var(--c-line-strong); }
.cust-modal .cust-sheet-sm { width: min(460px, calc(100vw - 32px)); }

.cust-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 24px 28px 10px; }
.cust-sheet-head h2 { margin: 0; font-size: 21px; font-weight: 800; line-height: 1.25; }
.cust-sheet-sub { display: grid; gap: 1px; margin-top: 4px; color: var(--c-text-2); font-size: 15px; }
.cust-sheet-sub span:last-child:not(:first-child) { color: var(--c-muted); font-size: 14px; }
.cust-sheet-name { font-weight: 600; color: var(--c-text-2); }
.cust-x {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin: -8px -12px 0 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--c-text-2);
    font-size: 20px;
    cursor: pointer;
    flex-shrink: 0;
}
.cust-x:hover { background: var(--c-tint); color: var(--c-text); }
.cust-sheet-body { display: grid; grid-auto-rows: max-content; align-content: start; gap: 18px; padding: 8px 28px 20px; overflow-y: auto; overscroll-behavior: contain; }
.cust-sheet-foot .cust-btn { padding: 0 12px; gap: 8px; }
.cust-sheet-foot { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 12px; padding: 16px 28px 24px; border-top: 1px solid var(--c-line); background: var(--c-surface); }

.cust-section { margin: 4px 0 -8px; color: var(--c-label); font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.cust-rows { margin: 0; border: 1px solid var(--c-tint-line); border-radius: 14px; background: var(--c-tint); overflow: hidden; }
.cust-rows > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 18px; }
.cust-rows > div + div { border-top: 1px solid var(--c-tint-line); }
.cust-rows dt { color: var(--c-text-2); }
.cust-rows dd { margin: 0; text-align: right; }
.cust-rd-chip { margin-top: -6px; }
.cust-note-text { margin: 0; padding: 12px 16px; border-radius: 12px; background: var(--c-tint); white-space: pre-wrap; overflow-wrap: anywhere; }

.cust-status-tl { margin: 0; padding: 0; list-style: none; }
.cust-status-tl li { position: relative; display: grid; grid-template-columns: 14px 1fr; gap: 14px; padding-bottom: 16px; }
.cust-status-tl li:not(:last-child)::before { content: ""; position: absolute; left: 6px; top: 18px; bottom: 0; width: 2px; background: var(--c-line); }
.cust-tl-dot { width: 13px; height: 13px; margin-top: 5px; border-radius: 50%; background: var(--c-gray); }
.cust-tl-dot.amber { background: var(--c-accent); }
.cust-tl-dot.orange { background: var(--c-amber); }
.cust-tl-dot.brown { background: var(--c-primary); }
.cust-tl-dot.green { background: var(--c-green); }
.cust-tl-dot.red { background: var(--c-red); }
.cust-tl-dot.gray { background: var(--c-line-strong); }
.cust-status-tl strong { display: block; font-size: 15px; }
.cust-status-tl small { display: block; color: var(--c-muted); font-size: 13px; }
.cust-status-tl p { margin: 2px 0 0; color: var(--c-text-2); font-size: 14px; }

/* batch details */
.cust-bd-top { margin-top: -6px; }
.cust-tl { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.cust-tl li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.cust-tl-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--c-tint); color: var(--c-text-2); font-size: 14px; }
.cust-tl li.k-rain .cust-tl-icon { background: var(--c-blue-bg); color: var(--c-blue); }
.cust-tl li.k-evaluated .cust-tl-icon, .cust-tl li.k-dried .cust-tl-icon { background: var(--c-green-bg); color: var(--c-green); }
.cust-tl li.k-expected_ready .cust-tl-icon { background: var(--c-brown-bg); color: var(--c-brown); }
.cust-tl li.k-low_grade .cust-tl-icon { background: var(--c-amber-bg); color: var(--c-amber); }
.cust-tl strong { display: block; font-size: 15px; }
.cust-tl small { display: block; color: var(--c-muted); font-size: 13px; }
.cust-tl-detail { margin-top: 4px; color: var(--c-text-2); font-size: 14px; }
.cust-rules { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.cust-rules li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; color: var(--c-text-2); font-size: 14.5px; }
.cust-rules i { margin-top: 3px; color: var(--c-muted); }

/* pre-order / reserve */
.cust-field-block { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.cust-field-label { padding: 0; font-size: 15.5px; font-weight: 700; color: var(--c-text); }
.cust-field-label em { font-style: normal; font-weight: 400; color: var(--c-muted); }
.cust-qty-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.cust-unit-price { color: var(--c-text-2); font-size: 15px; }
.cust-stepper {
    display: inline-flex;
    align-items: stretch;
    width: fit-content;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--c-radius-sm);
    background: var(--c-surface);
    overflow: hidden;
}
.cust-step-btn {
    width: 52px;
    min-height: 50px;
    border: 0;
    background: transparent;
    color: var(--c-text-2);
    font-size: 15px;
    cursor: pointer;
}
.cust-step-btn:hover:not(:disabled) { background: var(--c-tint); color: var(--c-text); }
.cust-step-btn:disabled { color: var(--c-line-strong); cursor: not-allowed; }
.cust-step-field { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 96px; padding: 0 10px; border-left: 1px solid var(--c-line); border-right: 1px solid var(--c-line); }
.cust-step-field input {
    width: 64px;
    min-height: 48px;
    border: 0;
    background: transparent;
    color: var(--c-text);
    font: inherit;
    font-size: 18px;
    font-weight: 800;
    text-align: right;
}
.cust-step-field input:focus { outline: none; }
.cust-step-field:focus-within { box-shadow: inset 0 0 0 2px var(--c-focus); }
.cust-step-unit { color: var(--c-text-2); font-size: 15px; }

.cust-subtotal { display: grid; gap: 8px; padding: 18px 20px; border: 1px solid var(--c-tint-line); border-radius: 14px; background: var(--c-tint); }
.cust-subtotal-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 16px; font-weight: 700; }
.cust-subtotal-row strong { font-size: 24px; font-weight: 800; }
.cust-subtotal-row.line { padding-bottom: 10px; border-bottom: 1px solid var(--c-tint-line); color: var(--c-text-2); font-weight: 500; }
.cust-pay { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--c-text-2); font-size: 14.5px; font-weight: 700; }

.cust-rs-summary { display: flex; gap: 16px; align-items: center; padding: 14px; border: 1px solid var(--c-tint-line); border-radius: 14px; background: var(--c-tint); }
.cust-rs-summary img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.cust-rs-summary div { display: grid; gap: 2px; color: var(--c-text-2); font-size: 14.5px; }
.cust-rs-summary strong { color: var(--c-text); font-size: 17px; }

.cust-chips-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cust-day {
    display: grid;
    gap: 2px;
    justify-items: center;
    min-height: 62px;
    padding: 8px 4px;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--c-radius-sm);
    background: var(--c-surface);
    color: var(--c-text);
    font: inherit;
    cursor: pointer;
}
.cust-day span { color: var(--c-muted); font-size: 12px; font-weight: 700; letter-spacing: .05em; }
.cust-day strong { font-size: 16px; font-weight: 800; }
.cust-day:hover { border-color: var(--c-primary); }
.cust-day[aria-pressed="true"] { border: 2px solid var(--c-primary); background: var(--c-brown-bg); padding: 7px 3px; }
html[data-theme="dark"] .cust-day[aria-pressed="true"] { border-color: var(--c-brown); }

.cust-location { display: flex; gap: 10px; margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--c-tint); color: var(--c-text-2); font-size: 14.5px; }
.cust-location i { margin-top: 3px; color: var(--c-amber); }
.cust-location strong { color: var(--c-text); }
.cust-counter { justify-self: end; color: var(--c-muted); font-size: 13px; }

/* preferences + footer windows */
.cust-pref { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.cust-pref legend { padding: 0; font-size: 17px; font-weight: 800; }
.cust-pref p { margin: 0 0 6px; color: var(--c-text-2); font-size: 14.5px; }
.cust-toggle-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cust-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 54px;
    padding: 0 12px;
    border: 1px solid var(--c-line-strong);
    border-radius: var(--c-radius-sm);
    background: var(--c-surface);
    color: var(--c-text);
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}
.cust-toggle .fa-check { display: none; }
.cust-toggle[aria-pressed="true"] { border: 2px solid var(--c-primary); background: var(--c-brown-bg); }
html[data-theme="dark"] .cust-toggle[aria-pressed="true"] { border-color: var(--c-brown); }
.cust-toggle[aria-pressed="true"] .fa-check { display: inline-block; }

.cust-info-row { display: grid; grid-template-columns: 28px 1fr; gap: 10px; color: var(--c-text); text-decoration: none; }
.cust-info-row i { margin-top: 4px; color: var(--c-muted); }
.cust-info-row strong { display: block; }
.cust-info-row p { margin: 2px 0 0; color: var(--c-text-2); }
.cust-info-row.link { padding: 10px; margin: -10px; border-radius: 12px; }
.cust-info-row.link:hover { background: var(--c-tint); }

/* =====================================================================
   footer
   ===================================================================== */

.cust-foot { background: var(--c-surface); border-top: 1px solid var(--c-line); }
.cust-foot-in {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 20px;
    max-width: 1220px;
    margin: 0 auto;
    padding: 18px 24px;
    color: var(--c-text-2);
    font-size: 14px;
}
.cust-foot-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.cust-foot-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: var(--c-text);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
html[data-theme="dark"] .cust-foot-link { color: var(--c-text); }
.cust-foot-link i { color: var(--c-muted); }
.cust-foot-link:hover span { text-decoration: underline; }

/* =====================================================================
   receipt (80 mm wide)
   ===================================================================== */

.cust-receipt { padding-top: 12px; }
.cust-rc {
    width: 80mm;
    max-width: 100%;
    margin: 0 auto;
    padding: 12px 10px;
    background: #fff;
    color: #111;
    font-family: "Courier New", ui-monospace, monospace;
    font-size: 12px;
    line-height: 1.45;
    border: 1px dashed #ccc;
}
.cust-rc p { margin: 0 0 2px; }
.cust-rc-center { text-align: center; }
.cust-rc-brand { font-weight: 700; font-size: 14px; }
.cust-rc-void { text-align: center; font-weight: 700; color: #B42318; letter-spacing: 3px; }   /* printed receipt: always light */
.cust-rc-meta { margin: 8px 0; padding: 6px 0; border-top: 1px dashed #999; border-bottom: 1px dashed #999; }
.cust-rc-meta div, .cust-rc-sums div, .cust-rc-vat div { display: flex; justify-content: space-between; gap: 8px; }
.cust-rc-meta dt, .cust-rc-meta dd { margin: 0; }
.cust-rc-table { width: 100%; border-collapse: collapse; }
.cust-rc-table td { padding: 3px 0; vertical-align: top; }
.cust-rc-table small { display: block; color: #555; }
.cust-rc-table .num { text-align: right; white-space: nowrap; }
.cust-rc-sums { margin-top: 6px; padding-top: 6px; border-top: 1px dashed #999; }
.cust-rc-sums .total { font-weight: 700; font-size: 14px; }
.cust-rc-vat { margin: 6px 0; padding-top: 6px; border-top: 1px dashed #999; }

/* ---------- toast ---------- */

.cust-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 9500;
    max-width: calc(100vw - 32px);
    padding: 12px 20px;
    border-radius: 12px;
    background: var(--c-primary);
    color: #fff;
    font-size: 14.5px;
    font-weight: 600;
    opacity: 0;
    transform: translate(-50%, 10px);
    pointer-events: none;
    transition: opacity .2s, transform .2s;
}
html[data-theme="dark"] .cust-toast { background: var(--c-text); color: var(--c-bg); }
.cust-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* =====================================================================
   sizes
   ===================================================================== */

@media (max-width: 1080px) {
}

@media (max-width: 860px) {
    :root { --c-head-h: 64px; }
    .cust-top-in { padding: 0 16px; gap: 10px; }
    .cust-main { padding: 24px 16px 32px; }
    .cust-page-head h1 { font-size: 26px; }
    .cust-page-head p { font-size: 15px; }
    .cust-res-tools { flex-direction: column; align-items: stretch; }
    .cust-res-filters { display: grid; grid-template-columns: 1fr; }
    .cust-search input, .cust-select select { width: 100%; min-width: 0; }
    .cust-seg { width: 100%; }
    .cust-seg-btn { flex: 1; justify-content: center; }
    /* phone: status chip on top, then the facts, then the actions */
    .cust-rcard { grid-template-columns: 1fr; grid-template-areas: "chips" "main" "actions"; gap: 12px; padding: 18px; }
    .cust-rcard-side .cust-head-chips { justify-content: flex-start; }
    .cust-rcard-actions { justify-content: stretch; }
    .cust-rcard-actions .cust-btn { flex: 1 1 auto; }
    .cust-foot-in { flex-direction: column; align-items: flex-start; padding: 16px; }
}

@media (max-width: 680px) {
    .cust-grid { gap: 16px; }
    .cust-page-head { align-items: stretch; }
    .cust-sort { width: 100%; }
    .cust-sort select { flex: 1; min-width: 0; }
    .cust-batch { padding: 18px; }
    .cust-facts-line { flex-direction: column; align-items: flex-start; gap: 2px; }
    .cust-facts-line .sep { display: none; }
    .cust-avail-date { font-size: 22px; }

    /* windows: full-screen sheets, actions stay at the bottom */
    .modal { padding: 0; align-items: stretch; }
    .cust-modal .modal-box.cust-sheet,
    .cust-modal .cust-sheet-sm {
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        max-height: none;
        border-radius: 0;
        border: 0;
    }
    .cust-sheet-head { padding: 16px 16px 8px; position: sticky; top: 0; background: var(--c-surface); }
    .cust-sheet-head h2 { font-size: 19px; }
    .cust-x { margin: -6px -6px 0 0; }
    .cust-sheet-body { flex: 1; padding: 8px 16px 20px; }
    .cust-sheet-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(0, 0, 0, .06); }
    .cust-chips-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
    .cust-pop { position: fixed; top: calc(var(--c-head-h) + 6px); left: 12px; right: 12px; width: auto; max-width: none; }
}

@media (max-width: 420px) {
    .cust-brand-farm { letter-spacing: .06em; font-size: 10.5px; }
    .cust-brand-name { font-size: 19px; }
    .cust-logo { width: 40px; height: 40px; }
    .cust-card-actions { grid-template-columns: 1fr; }
    .cust-kv2 dd strong { font-size: 17px; }
    .cust-chips-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .cust-avail-2 { grid-template-columns: 1fr; }
    .cust-sheet-foot { grid-auto-flow: row; grid-auto-columns: auto; }
    .cust-sheet-foot .cust-btn.primary { order: -1; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* =====================================================================
   Logged-in frame: sidebar like the farm's pages (280 px, icons-only
   72 px when collapsed; a drawer under 1024 px) + top bar + content.
   ===================================================================== */

:root { --cust-sb: 280px; --cust-sb-mini: 72px; --cust-sb-bg: var(--cfl-brown, #3D1C02); --cust-sb-line: rgba(255, 255, 255, .10); }
html[data-theme="dark"] { --cust-sb-bg: var(--cf-sidebar); --cust-sb-line: var(--cf-border); }

body.cust-in { display: block; }

.cust-sb {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    width: var(--cust-sb);
    height: 100vh;
    height: 100dvh;
    background: var(--cust-sb-bg);
    color: #fff;
    transition: width .25s ease, transform .25s ease;
}
html[data-theme="dark"] .cust-sb { border-right: 1px solid var(--cust-sb-line); }
html.cust-sb-collapsed .cust-sb { width: var(--cust-sb-mini); }
html.cust-sb-no-anim .cust-sb, html.cust-sb-no-anim .cust-shell { transition: none !important; }

.cust-sb-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 80px;
    padding: 18px 14px 18px 18px;
    border-bottom: 1px solid var(--cust-sb-line);
}
.cust-sb-logo-btn {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    cursor: default;
}
.cust-sb-logo-btn img { width: 30px; height: 30px; object-fit: contain; }
html.cust-sb-collapsed .cust-sb-logo-btn { cursor: pointer; }
.cust-sb-brand { display: flex; flex-direction: column; min-width: 0; color: #fff; text-decoration: none; line-height: 1.1; }
.cust-sb-name { font-family: "Playfair Display", Georgia, serif; font-size: 20px; font-weight: 700; color: #fff; }
.cust-sb-name span { color: var(--c-accent); }
.cust-sb-farm { margin-top: 4px; color: rgba(255, 255, 255, .72); font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cust-sb-collapse {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-left: auto;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, .7);
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
}
.cust-sb-collapse:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.cust-sb-nav { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 18px 12px; overflow-y: auto; }
.cust-sb-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, .8);
    font: inherit;
    font-size: 14.5px;
    font-weight: 500;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background .18s ease, color .18s ease;
}
html[data-theme="dark"] .cust-sb-link { color: rgba(255, 255, 255, .8); }
.cust-sb-link:hover { background: rgba(255, 255, 255, .10); color: #fff; }
.cust-sb-link.active { background: rgba(200, 134, 26, .22); color: #E0A544; font-weight: 600; }   /* same as the farm sidebar */
.cust-sb-link.danger { color: #FCA5A5; }
.cust-sb-link.danger:hover { background: rgba(248, 113, 113, .14); color: #FECACA; }
.cust-sb-icon { width: 20px; min-width: 20px; text-align: center; font-size: 16px; }
.cust-sb-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cust-sb-badge {
    min-width: 22px;
    margin-left: auto;
    padding: 1px 7px;
    border-radius: 999px;
    background: #C8861A;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}
.cust-sb :focus-visible { outline: 2px solid #E0A544; outline-offset: 2px; }


/* collapsed: icons only */
html.cust-sb-collapsed .cust-sb-hide,
html.cust-sb-collapsed .cust-sb-label,
html.cust-sb-collapsed .cust-sb-collapse { display: none; }
html.cust-sb-collapsed .cust-sb-logo { justify-content: center; padding: 18px 0; }
html.cust-sb-collapsed .cust-sb-link { justify-content: center; padding: 10px 0; }
html.cust-sb-collapsed .cust-sb-badge { position: absolute; top: 4px; right: 8px; min-width: 18px; padding: 0 5px; font-size: 10.5px; }

.cust-sb-tip {
    position: fixed;
    z-index: 6000;
    padding: 6px 10px;
    border-radius: 6px;
    background: #291502;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transform: translateY(-50%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
    pointer-events: none;
    opacity: 0;
    transition: opacity .12s ease;
}
.cust-sb-tip.show { opacity: 1; }

.cust-sb-overlay { position: fixed; inset: 0; z-index: 990; background: rgba(20, 10, 2, .45); }

/* the page next to the sidebar */
.cust-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin-left: var(--cust-sb);
    transition: margin-left .25s ease;
}
html.cust-sb-collapsed .cust-shell { margin-left: var(--cust-sb-mini); }

.cust-topbar {
    position: sticky;
    top: 0;
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 14px;
    height: 73px;
    padding: 0 32px;
    background: var(--c-surface);
    border-bottom: 1px solid var(--c-line);
}
.cust-topbar-title { min-width: 0; font-size: 22px; font-weight: 800; color: var(--c-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cust-topbar .cust-tools { margin-left: auto; }
.cust-menu-btn { display: none; flex-shrink: 0; }
.cust-topbar .cust-tools { flex-shrink: 0; }
body.cust-in .cust-pop { top: calc(100% + 10px); }

/* page header: title + helper left; Last updated (+ sort) right */
.cust-head-side { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 16px; }
.cust-head-side .cust-updated { margin: 0; }
.cust-page-head .cust-updated { margin: 0; }

/* =====================================================================
   Buyer Dashboard
   ===================================================================== */

.cust-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 16px; margin-bottom: 22px; }
.cust-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 104px;
    padding: 18px 20px;
    color: var(--c-text);
    text-decoration: none;
    border-left: 4px solid var(--c-line-strong);
}
html[data-theme="dark"] .cust-stat { color: var(--c-text); }
.cust-stat:hover { border-color: var(--c-primary); }
.cust-stat-n { font-size: 30px; font-weight: 800; line-height: 1.1; }
.cust-stat-label { color: var(--c-text-2); font-size: 14.5px; font-weight: 600; }
.cust-stat-sub { color: var(--c-muted); font-size: 13px; }
.cust-stat.good { border-left-color: var(--c-green); }
.cust-stat.good .cust-stat-n { color: var(--c-green); }
.cust-stat.alert { border-left-color: var(--c-amber); }
.cust-stat.alert .cust-stat-n { color: var(--c-orange); }
.cust-stat.warn { border-left-color: var(--c-accent); }

.cust-dash-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 22px; align-items: start; }
.cust-dash-col { display: grid; gap: 22px; min-width: 0; }
.cust-dash-card, .cust-next { padding: 20px 22px; }
.cust-dash-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 14px; }
.cust-dash-head h2 { margin: 0; font-size: 17px; font-weight: 800; }
.cust-dash-head .cust-link-btn { min-height: 40px; font-size: 13.5px; }

.cust-next { border-left: 4px solid var(--c-primary); }
.cust-next-body { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.cust-next-main { display: grid; gap: 8px; min-width: 0; flex: 1 1 360px; }
.cust-next-name { font-size: 19px; font-weight: 800; }
.cust-next-main .cust-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cust-next-facts { display: grid; grid-template-columns: repeat(3, minmax(0, max-content)); gap: 6px 28px; margin: 4px 0 0; }
.cust-next-facts div { display: grid; gap: 2px; }
.cust-next-facts dt { color: var(--c-label); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.cust-next-facts dd { margin: 0; font-size: 17px; font-weight: 800; }

.cust-dash-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.cust-dash-list > li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 0; border-top: 1px solid var(--c-line); }
.cust-dash-list > li:first-child { border-top: 0; padding-top: 4px; }
.cust-dash-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; }
.cust-dash-icon.orange { background: var(--c-orange-bg); color: var(--c-orange); }
.cust-dash-icon.green { background: var(--c-green-bg); color: var(--c-green); }
.cust-dash-text { display: grid; gap: 2px; flex: 1 1 220px; min-width: 0; }
.cust-dash-text strong { font-size: 15px; }
.cust-dash-text > span { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--c-text-2); font-size: 14px; }
.cust-dash-list.pre > li { display: grid; gap: 10px; }
.cust-dash-pre-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; color: var(--c-text-2); font-size: 14px; }
.cust-dash-pre-foot .cust-pending { margin: 0; }
.cust-dash-empty { display: flex; align-items: center; gap: 12px; padding: 6px 0; color: var(--c-text-2); }
.cust-dash-empty i { font-size: 22px; color: var(--c-muted); }
.cust-dash-empty p { margin: 0; }
.cust-dash-notifs { margin: 0 -22px -20px; border-top: 1px solid var(--c-line); }
.cust-dash-notifs .cust-notif { padding: 14px 22px; }

.cust-shortcuts { display: grid; gap: 10px; }
.cust-shortcut {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 64px;
    padding: 12px 16px;
    border: 1px solid var(--c-line);
    border-radius: var(--c-radius-sm);
    color: var(--c-text);
    text-decoration: none;
}
html[data-theme="dark"] .cust-shortcut { color: var(--c-text); }
.cust-shortcut:hover { border-color: var(--c-primary); background: var(--c-tint); }
.cust-shortcut > i:first-child { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--c-brown-bg); color: var(--c-brown); }
.cust-shortcut > span { display: grid; flex: 1; min-width: 0; }
.cust-shortcut > span span { color: var(--c-muted); font-size: 13.5px; }
.cust-shortcut > i:last-child { color: var(--c-muted); }

/* skeleton of a product card (same photo ratio) */
.cust-skel.product { padding: 0 0 22px; gap: 14px; }
.cust-skel.product .sk { margin: 0 22px; }
.cust-skel .sk.photo { margin: 0; height: auto; aspect-ratio: 16 / 10; border-radius: 0; }
.cust-skel.product .sk.btn { margin-top: auto; }

/* ---------- sizes of the logged-in frame ---------- */

@media (max-width: 1279px) {
    .cust-dash-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1023px) {
    .cust-sb { width: min(300px, 86vw); transform: translateX(-100%); box-shadow: none; }
    html.cust-sb-open .cust-sb { transform: translateX(0); box-shadow: 0 0 40px rgba(0, 0, 0, .35); }
    .cust-shell { margin-left: 0 !important; }
    .cust-menu-btn { display: inline-flex; margin-left: -8px; }
    .cust-topbar { padding: 0 24px; }
    body.cust-in .cust-main { padding: 24px 24px 32px; }
}

@media (max-width: 680px) {
    .cust-topbar { height: 64px; padding: 0 12px 0 16px; gap: 8px; }
    .cust-topbar-title { font-size: 18px; }
    body.cust-in .cust-main { padding: 20px 16px 28px; }
    body.cust-in .cust-pop { position: fixed; top: 70px; left: 12px; right: 12px; width: auto; max-width: none; }
    .cust-head-side { justify-content: flex-start; }
    .cust-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .cust-stat { min-height: 92px; padding: 14px 16px; }
    .cust-stat-n { font-size: 26px; }
    /* phone: the next pickup first, then the cards, then the rest */
    #cust-dashboard { display: flex; flex-direction: column; gap: 16px; }
    #cust-dashboard .cust-dash-grid, #cust-dashboard .cust-dash-col { display: contents; }
    #cust-dashboard .cust-next { order: -1; }
    #cust-dashboard .cust-stats { margin: 0; }
    .cust-dash-card, .cust-next { padding: 18px; }
    .cust-dash-notifs { margin: 0 -18px -18px; }
    .cust-next-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cust-next-body .cust-btn { width: 100%; }
}

/* =====================================================================
   Login / register / reset: the farm's login layout (login.php):
   photo panel left, form card right; EN|TL + theme top right.
   ===================================================================== */

body.cust-authpage { background: var(--cfl-topbar, #FDFBF6); }
html[data-theme="dark"] body.cust-authpage { background: var(--cf-bg); }

.cust-auth-page { display: flex; min-height: 100vh; min-height: 100dvh; }

.cust-visual {
    position: relative;
    width: 58%;
    min-height: 100vh;
    background: #3D1C02 url("../images/login-background.webp") center / cover no-repeat;
    overflow: hidden;
}
.cust-visual-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(33, 13, 2, .55), rgba(33, 13, 2, .10)); }
html[data-theme="dark"] .cust-visual-overlay { background: linear-gradient(90deg, rgba(0, 0, 0, .66), rgba(0, 0, 0, .34)); }
.cust-visual-text { position: absolute; left: 45px; bottom: 42px; z-index: 1; max-width: 500px; color: #fff; }
.cust-visual-text h2 { margin: 0 0 10px; color: #fff; font-size: 38px; line-height: 1.15; text-shadow: 0 2px 16px rgba(0, 0, 0, .3); }
.cust-visual-text p { margin: 0; max-width: 430px; color: rgba(255, 255, 255, .94); font-size: 15px; line-height: 1.6; text-shadow: 0 1px 9px rgba(0, 0, 0, .3); }

.cust-auth-side { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; padding: 20px 35px 18px; }
.cust-auth-tools { display: flex; align-items: center; gap: 8px; align-self: flex-end; }
.cust-auth-main { flex: 1; display: flex; align-items: center; justify-content: center; width: 100%; padding: 24px 0; }
.cust-auth-card { width: 100%; max-width: 455px; }
html[data-theme="dark"] .cust-auth-card {
    padding: 36px 34px;
    border: 1px solid var(--cf-border);
    border-radius: 18px;
    background: #18181A;
    box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .8);
}

.cust-auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 30px; }
.cust-auth-brand img { width: 44px; height: 44px; object-fit: contain; }
.cust-auth-name { font-family: "Playfair Display", Georgia, serif; font-size: 31px; font-weight: 700; line-height: 1; }
.cust-auth-name .cacao { color: var(--c-text); }
.cust-auth-name .flow { color: var(--c-accent); }

.cust-auth-head { margin-bottom: 22px; }
.cust-auth-head h1 { margin: 0 0 8px; color: var(--c-text); font-size: 30px; line-height: 1.2; font-weight: 800; }
.cust-auth-head p { margin: 0; color: var(--c-muted); font-size: 14px; line-height: 1.55; }
.cust-auth-head strong { color: var(--c-text); }

.cust-auth-msg {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 16px;
    padding: 11px 14px;
    border: 1px solid var(--cfl-red-line, #F0CCCC);
    border-radius: 10px;
    background: var(--c-red-bg);
    color: var(--c-red);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.45;
}
.cust-auth-msg i { margin-top: 2px; }
.cust-auth-msg.ok { border-color: transparent; background: var(--c-green-bg); color: var(--c-green); }
html[data-theme="dark"] .cust-auth-msg { border-color: var(--cf-red-line); }

.cust-auth-form { display: grid; gap: 16px; }
.cust-auth-field { display: grid; gap: 7px; }
.cust-auth-field label { color: var(--c-text); font-size: 12.5px; font-weight: 700; }
.cust-auth-field label em { color: var(--c-muted); font-style: normal; font-weight: 500; }
.cust-auth-label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cust-auth-link {
    min-height: 44px;
    margin: -12px -2px;
    padding: 0 2px;
    border: 0;
    background: none;
    color: var(--c-link);
    font: inherit;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
}
.cust-auth-link:hover { text-decoration: underline; }
.cust-input-wrap { position: relative; }
.cust-input-icon { position: absolute; top: 50%; left: 15px; transform: translateY(-50%); color: var(--c-muted); font-size: 14px; pointer-events: none; }
.cust-input-wrap input {
    width: 100%;
    height: 52px;
    padding: 0 50px 0 43px;
    border: 1.5px solid var(--c-line-strong);
    border-radius: 12px;
    background: var(--c-surface);
    color: var(--c-text);
    font: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.cust-input-wrap input::placeholder { color: var(--c-muted); opacity: .8; }
.cust-input-wrap input:focus { border-color: var(--c-accent); box-shadow: 0 0 0 3px rgba(200, 134, 26, .25); }
html[data-theme="dark"] .cust-input-wrap input { background: #131315; border-color: #2E2E33; }
html[data-theme="dark"] .cust-input-wrap input:focus { border-color: var(--cf-gold-line); background: #161618; }
.cust-auth-field.has-error input { border-color: var(--c-red); }
.cust-eye {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--c-muted);
    font-size: 14px;
    cursor: pointer;
}
.cust-eye:hover { background: var(--c-tint); color: var(--c-accent); }

.cust-auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border: 1.5px solid var(--c-primary);
    border-radius: 12px;
    background: var(--c-primary);
    color: var(--c-on-primary);
    font: inherit;
    font-size: 14.5px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(61, 28, 2, .12);
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
html[data-theme="dark"] .cust-auth-btn { color: var(--c-on-primary); box-shadow: none; }
.cust-auth-btn:hover { background: var(--c-primary-hover); border-color: var(--c-primary-hover); }
.cust-auth-btn[aria-busy="true"] { opacity: .8; cursor: progress; }
.cust-auth-btn.outline { border-color: var(--c-line-strong); background: transparent; color: var(--c-text); box-shadow: none; }
html[data-theme="dark"] .cust-auth-btn.outline { color: var(--c-text); }
.cust-auth-btn.outline i { color: var(--c-link); }
.cust-auth-btn.outline:hover { border-color: var(--c-accent); background: var(--c-tint); }

.cust-auth-or { display: flex; align-items: center; gap: 12px; margin: 20px 0 14px; color: var(--c-muted); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.cust-auth-or::before, .cust-auth-or::after { content: ""; flex: 1; height: 1px; background: var(--c-line); }
.cust-auth-staff { margin: 18px 0 0; text-align: center; font-size: 13px; }
.cust-auth-staff a { display: inline-flex; align-items: center; min-height: 44px; color: var(--c-muted); }
html[data-theme="dark"] .cust-auth-staff a { color: var(--c-muted); }
.cust-auth-staff a:hover { color: var(--c-text); }

.cust-auth-consent { display: flex; gap: 12px; align-items: flex-start; color: var(--c-text-2); font-size: 13.5px; line-height: 1.5; cursor: pointer; }
.cust-auth-consent input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--c-accent); flex-shrink: 0; }
.cust-auth-consent a { color: var(--c-link); font-weight: 700; text-decoration: underline; }
.cust-auth-consent.has-error { color: var(--c-red); }
.cust-auth-form .cust-err { margin-top: -4px; }

.cust-auth-foot { margin: 0; color: var(--c-muted); font-size: 12px; text-align: center; }
.cust-auth-foot a { color: var(--c-muted); text-decoration: underline; }
.cust-forgot-text { margin: 0; color: var(--c-text-2); line-height: 1.55; }

@media (max-width: 1000px) {
    .cust-visual { width: 46%; }
    .cust-visual-text { left: 30px; bottom: 30px; }
    .cust-visual-text h2 { font-size: 30px; }
}

/* phone / small tablet: the photo becomes a short band with the headline */
@media (max-width: 768px) {
    .cust-auth-page { flex-direction: column; }
    .cust-visual { width: 100%; min-height: 0; height: 132px; }
    .cust-visual-text { left: 16px; right: 16px; bottom: 14px; }
    .cust-visual-text h2 { margin: 0; font-size: 20px; }
    .cust-visual-text p { display: none; }
    .cust-auth-side { padding: 12px 16px 16px; }
    .cust-auth-tools { position: absolute; top: 10px; right: 12px; z-index: 2; }
    .cust-auth-tools .cust-lang { background: rgba(0, 0, 0, .6); border-color: rgba(255, 255, 255, .45); }
    .cust-auth-tools .cust-lang span { color: #fff; }
    .cust-auth-tools .cust-lang span.on { background: #C8861A; color: #2A1B04; }
    .cust-auth-tools .cust-icon-btn { background: rgba(0, 0, 0, .6); color: #fff; }
    .cust-auth-main { padding: 8px 0 16px; align-items: flex-start; }
    .cust-auth-brand { margin-bottom: 20px; }
    .cust-auth-head h1 { font-size: 26px; }
    html[data-theme="dark"] .cust-auth-card { padding: 24px 18px; }
}

/* =====================================================================
   Account card at the bottom of the sidebar + its menu. Same markup,
   spacing and colours as the farm pages' sidebar profile (#profile-trigger
   / #profile-dropdown); the menu opens upward (to the side when collapsed).
   ===================================================================== */
.sidebar-profile-section { position: relative; flex-shrink: 0; padding: 10px; border-top: 1px solid var(--cust-sb-line); }
.sidebar-profile { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 0; border-radius: 10px; background: transparent; color: #fff; font: inherit; text-align: left; cursor: pointer; transition: background .2s ease; }
.sidebar-profile:hover, .sidebar-profile[aria-expanded="true"] { background: rgba(255, 255, 255, .08); }
html[data-theme="dark"] .sidebar-profile:hover, html[data-theme="dark"] .sidebar-profile[aria-expanded="true"] { background: rgba(255, 255, 255, .05); }
.sidebar-avatar, .dropdown-avatar { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; min-width: 38px; border-radius: 50%; background: linear-gradient(135deg, #aaa, #666); color: #fff; font-size: 15px; }
.dropdown-avatar { width: 40px; height: 40px; min-width: 40px; }
html[data-theme="dark"] .sidebar-avatar, html[data-theme="dark"] .dropdown-avatar { background: var(--cf-surface-3); border: 1px solid var(--cf-border-soft, rgba(255, 255, 255, .06)); }
.sidebar-user-info { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.sidebar-user-label { color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-sub { margin-top: 2px; color: rgba(255, 255, 255, .72); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-profile-chev { margin-left: auto; color: rgba(255, 255, 255, .4); font-size: 12px; transition: transform .2s ease; }
.sidebar-profile[aria-expanded="true"] .sidebar-profile-chev { transform: rotate(180deg); }
html.cust-sb-collapsed .sidebar-profile { justify-content: center; padding: 10px 0; }

.cust-profile-dropdown { position: absolute; left: 10px; bottom: calc(100% + 4px); z-index: 2000; width: 250px; max-width: calc(100vw - 20px); background: #fff; border-radius: 16px; box-shadow: 0 10px 35px rgba(61, 28, 2, .18); overflow: hidden; }
.cust-profile-dropdown[hidden] { display: none; }
html.cust-sb-collapsed .cust-profile-dropdown { left: calc(100% + 8px); bottom: 10px; }
html[data-theme="dark"] .cust-profile-dropdown { background: #1C1C1F; border: 1px solid var(--cf-border-strong); border-radius: 12px; box-shadow: var(--cf-shadow-lg); }
.cust-profile-dropdown .dropdown-header { padding: 14px 16px; border-bottom: 1px solid #F0EBE0; }
html[data-theme="dark"] .cust-profile-dropdown .dropdown-header { border-bottom-color: var(--cf-border); }
.cust-profile-dropdown .dropdown-user { display: flex; align-items: center; gap: 10px; }
.cust-profile-dropdown .dropdown-who { min-width: 0; }
.cust-profile-dropdown .dropdown-name { color: #3D1C02; font-size: 15px; font-weight: 700; overflow-wrap: anywhere; }
.cust-profile-dropdown .dropdown-email { margin-top: 2px; color: var(--cfl-muted, #75604F); font-size: 13px; overflow-wrap: anywhere; }
html[data-theme="dark"] .cust-profile-dropdown .dropdown-name { color: #F0ECE5; }
html[data-theme="dark"] .cust-profile-dropdown .dropdown-email { color: var(--cf-muted); }
.cust-profile-dropdown .dropdown-content { padding: 6px; }
.cust-profile-dropdown .dropdown-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border: 0; border-radius: 8px; background: transparent; color: #3D1C02; font: inherit; font-size: 14px; text-align: left; text-decoration: none; cursor: pointer; }
.cust-profile-dropdown .dropdown-item:hover, .cust-profile-dropdown .dropdown-item:focus-visible { background: #FDF8F0; }
.cust-profile-dropdown .dropdown-item:focus-visible { outline: 2px solid #C8861A; outline-offset: -2px; }
.cust-profile-dropdown .dropdown-item.danger { color: #DC2626; }
.cust-profile-dropdown .dropdown-item.danger:hover, .cust-profile-dropdown .dropdown-item.danger:focus-visible { background: #FFF1F1; }
.cust-profile-dropdown .dropdown-icon { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; min-width: 32px; border-radius: 8px; background: #FDF3E0; color: #C8861A; }
.cust-profile-dropdown .dropdown-item.danger .dropdown-icon { background: #FFF1F1; color: #DC2626; }
.cust-profile-dropdown .dropdown-divider { height: 1px; margin: 4px 0; background: #F0EBE0; }
.cust-profile-dropdown .cust-logout { margin: 0; padding: 0; border: 0; }
html[data-theme="dark"] .cust-profile-dropdown .dropdown-item { color: var(--cf-text-2); }
html[data-theme="dark"] .cust-profile-dropdown .dropdown-item:hover, html[data-theme="dark"] .cust-profile-dropdown .dropdown-item:focus-visible { background: rgba(255, 255, 255, .06); color: var(--cf-text); }
html[data-theme="dark"] .cust-profile-dropdown .dropdown-item.danger { color: var(--cf-red); }
html[data-theme="dark"] .cust-profile-dropdown .dropdown-item.danger:hover, html[data-theme="dark"] .cust-profile-dropdown .dropdown-item.danger:focus-visible { background: var(--cf-red-tint); }
html[data-theme="dark"] .cust-profile-dropdown .dropdown-icon { background: var(--cf-gold-tint); color: var(--cf-gold); border: 1px solid var(--cf-gold-line); }
html[data-theme="dark"] .cust-profile-dropdown .dropdown-item.danger .dropdown-icon { background: var(--cf-red-tint); color: var(--cf-red); border-color: transparent; }
html[data-theme="dark"] .cust-profile-dropdown .dropdown-divider { background: var(--cf-border); }
.cust-menu-badge { margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--c-accent); color: #2A1B04; font-size: 12px; font-weight: 700; text-align: center; }

/* top-bar logo: only when the sidebar is a drawer */
.cust-topbar-logo { display: none; align-items: center; gap: 8px; color: var(--c-text); text-decoration: none; flex-shrink: 0; }
.cust-topbar-logo img { width: 30px; height: 30px; object-fit: contain; }
.cust-topbar-brand { font-family: "Playfair Display", Georgia, serif; font-size: 19px; font-weight: 700; color: var(--c-text); }
.cust-topbar-brand span { color: var(--c-accent); }

@media (max-width: 1023px) {
    .cust-topbar-logo { display: inline-flex; }
}
@media (max-width: 680px) {
    .cust-topbar-title { display: none; }
    .cust-topbar .cust-tools { margin-left: auto; }
}

/* ---------- print: the receipt only ---------- */

@media print {
    @page { size: 80mm auto; margin: 4mm; }
    body.cust * { visibility: hidden; }
    .cust-rc, .cust-rc * { visibility: visible !important; }
    .cust-rc { position: absolute; left: 0; top: 0; border: 0; width: 72mm; }
    .cust-top, .cust-sb, .cust-topbar, .cust-foot, .cust-sheet-head, .cust-sheet-foot { display: none !important; }
}

/* footer of the logged-in frame: same side padding as the content */
body.cust-in .cust-foot-in { max-width: none; margin: 0; padding: 16px 32px; }
@media (max-width: 1023px) { body.cust-in .cust-foot-in { padding: 16px 24px; } }
@media (max-width: 680px) { body.cust-in .cust-foot-in { padding: 16px; } }
