/* StoreKissan components and layout. Uses only variables from tokens.css.
   Breakpoints: phone < 600, tablet 600–1023, computer 1024–1599, big screen 1600+. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    background: var(--sk-cream);
    color: var(--sk-ink);
    font-family: var(--sk-font);
    font-size: var(--fs-body);
    line-height: var(--sk-lh-body);
}
h1, h2, h3 { line-height: var(--sk-lh-heading); margin: 0; }
p { margin: 0; }
a { color: var(--sk-amber-700); }
button, input, select, textarea { font: inherit; }
[hidden] { display: none !important; }
.sk-num, .sk-tabular { font-variant-numeric: tabular-nums; }
.sk-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.sk-icon { width: 24px; height: 24px; flex-shrink: 0; }
.sk-icon-lg { width: 28px; height: 28px; }

/* ================= App shell ================= */
.sk-app { min-height: 100vh; }
.sk-sidebar, .sk-topbar { display: none; }
.sk-shell { min-width: 0; }
.sk-content { padding: var(--sp-4) var(--sp-4) var(--sp-6); }
.sk-content-inner { max-width: var(--content-max); margin: 0 auto; display: grid; gap: var(--sp-4); }
/* Grid children may shrink below their content's natural width (otherwise wide inputs push the page sideways). */
.sk-content-inner > *, .sk-hero-inner > * { min-width: 0; }

@media (min-width: 600px) {
    .sk-content { padding-left: var(--sp-6); padding-right: var(--sp-6); }
}

@media (min-width: 1024px) {
    .sk-app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; }
    .sk-sidebar {
        display: flex; flex-direction: column; gap: var(--sp-2);
        position: sticky; top: 0; height: 100vh; overflow-y: auto;
        padding: var(--sp-5) var(--sp-4);
        background: var(--sk-green-900); color: var(--sk-on-dark);
    }
    .sk-topbar {
        display: flex; align-items: center; gap: var(--sp-4);
        min-height: 72px; padding: var(--sp-3) var(--sp-7);
        background: var(--sk-card); border-bottom: 1px solid var(--sk-line);
        position: sticky; top: 0; z-index: 5;
    }
    .sk-content { padding: var(--sp-6) var(--sp-7) var(--sp-8); }
}

/* Phone / tablet: a slim bar with menu + logout on top of every page; the side menu is a drawer that slides in. */
.sk-phonebar {
    display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
    padding: env(safe-area-inset-top) var(--sp-2) 0; background: var(--sk-green-900); color: var(--sk-on-dark);
}
.sk-phonebar form { margin: 0; }
.sk-phonebar-btn {
    display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--tap); min-width: var(--tap);
    padding: 0 var(--sp-3); border: 0; border-radius: 12px; background: transparent; color: var(--sk-on-dark);
    font-family: inherit; font-size: var(--fs-body); font-weight: 700; cursor: pointer;
}
.sk-phonebar-btn:hover { background: var(--sk-green-800); }
.sk-side-close { display: none; }
.sk-menu-backdrop { position: fixed; inset: 0; z-index: 1090; background: var(--sk-backdrop); }
.sk-menu-backdrop[hidden] { display: none; }
@media (max-width: 1023px) {
    .sk-phonebar + .sk-menu-backdrop + .sk-topbar + .sk-hero, .sk-shell > .sk-hero { padding-top: var(--sp-3); }
    .sk-sidebar {
        display: flex; flex-direction: column; gap: var(--sp-2);
        position: fixed; top: 0; bottom: 0; left: 0; z-index: 1100; width: min(86vw, 320px); overflow-y: auto;
        padding: calc(var(--sp-4) + env(safe-area-inset-top)) var(--sp-4) calc(var(--sp-4) + env(safe-area-inset-bottom));
        background: var(--sk-green-900); color: var(--sk-on-dark);
        transform: translateX(-102%); visibility: hidden; transition: transform .2s ease, visibility .2s;
    }
    .sk-menu-open .sk-sidebar { transform: none; visibility: visible; }
    .sk-menu-open { overflow: hidden; }
    .sk-side-close {
        display: inline-flex; align-items: center; justify-content: center; align-self: flex-end;
        width: var(--tap); height: var(--tap); border: 0; border-radius: 12px; background: var(--sk-green-800);
        color: var(--sk-on-dark); cursor: pointer;
    }
}
@media (min-width: 1024px) { .sk-phonebar, .sk-menu-backdrop { display: none; } }
@media (prefers-reduced-motion: reduce) { .sk-sidebar { transition: none; } }

/* "Are you sure?" dialog (logout) */
.sk-dialog {
    width: min(92vw, 360px); padding: var(--sp-5); border: 1px solid var(--sk-line); border-radius: 20px;
    background: var(--sk-card); color: var(--sk-ink); box-shadow: var(--shadow-login);
}
.sk-dialog::backdrop { background: var(--sk-backdrop); }
.sk-dialog-text { margin: 0 0 var(--sp-4); font-size: var(--fs-section); font-weight: 700; }
.sk-dialog-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.sk-dialog-buttons .sk-btn { padding: 0 var(--sp-2); }

/* A button that was pressed: a small turning ring, and it cannot be pressed again (site.js "busy buttons"). */
.is-busy { pointer-events: none; opacity: .8; }
.sk-btn.is-busy::after, .sk-side-link.is-busy::after, .sk-phonebar-btn.is-busy::after, .sk-link.is-busy::after {
    content: ""; flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%;
    border: 3px solid currentColor; border-right-color: transparent; animation: sk-turn .7s linear infinite;
}
.sk-tile.is-busy, .sk-card-link.is-busy, .sk-booking-row.is-busy { position: relative; }
.sk-tile.is-busy::after, .sk-card-link.is-busy::after, .sk-booking-row.is-busy::after {
    content: ""; position: absolute; top: var(--sp-3); right: var(--sp-3); width: 16px; height: 16px; border-radius: 50%;
    border: 3px solid var(--sk-green-700); border-right-color: transparent; animation: sk-turn .7s linear infinite;
}

/* Sidebar */
.sk-side-brand { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-2) var(--sp-5); font-size: var(--fs-section); font-weight: 800; color: var(--sk-on-dark); text-decoration: none; min-height: var(--tap); }
.sk-side-brand .sk-logo { width: 44px; height: 44px; border-radius: 12px; }
.sk-side-link {
    display: flex; align-items: center; gap: var(--sp-3);
    min-height: 52px; padding: var(--sp-2) var(--sp-3);
    border-radius: 12px; color: var(--sk-hero-sub); text-decoration: none;
    font-size: var(--fs-body); font-weight: 600;
}
.sk-side-link:hover { background: var(--sk-green-800); color: var(--sk-on-dark); }
.sk-side-link.active { background: var(--sk-green-700); color: var(--sk-on-dark); }
.sk-side-group { margin-top: var(--sp-4); padding: 0 var(--sp-3); color: var(--sk-hero-sub); font-size: var(--fs-small); font-weight: 700; }
.sk-side-bottom { margin-top: auto; display: grid; gap: var(--sp-2); }
.sk-side-user { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); font-size: var(--fs-small); color: var(--sk-on-dark); }

/* Top bar (computer) */
.sk-topbar-store { font-size: var(--fs-section); font-weight: 700; }
.sk-topbar-meta { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.sk-topbar-spacer { flex: 1; }
.sk-meta-chip { display: inline-flex; align-items: center; gap: var(--sp-1); min-height: 36px; padding: 0 var(--sp-3); border-radius: var(--r-pill); background: var(--sk-cream); border: 1px solid var(--sk-line); color: var(--sk-ink-2); font-size: var(--fs-small); }

/* ================= Hero (dark header) ================= */
.sk-hero {
    background: var(--sk-green-900); color: var(--sk-on-dark);
    padding: calc(var(--sp-4) + env(safe-area-inset-top)) var(--sp-4) var(--sp-6);
    border-radius: 0 0 24px 24px;
}
.sk-hero-inner { max-width: var(--content-max); margin: 0 auto; display: grid; gap: var(--sp-3); }
.sk-hero-row { display: flex; align-items: center; gap: var(--sp-3); }
.sk-hero-title { font-size: var(--fs-title); font-weight: 800; flex: 1; min-width: 0; }
.sk-hero-sub { color: var(--sk-hero-sub); font-size: var(--fs-small); }
.sk-hero-store { font-size: var(--fs-name); font-weight: 700; }
.sk-hero .sk-chips-dark { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
/* Home on a phone (2026-10-03): the buttons on one line, the greeting and the store name below at full width — they were
   squeezed into a narrow column beside the buttons. */
@media (max-width: 599px) {
    .sk-hero-row-home { flex-wrap: wrap; justify-content: flex-end; }
    .sk-hero-row-home .sk-hero-title { order: 2; flex: 0 0 100%; }
}
@media (min-width: 600px) { .sk-hero { padding-left: var(--sp-6); padding-right: var(--sp-6); } }
@media (min-width: 1024px) {
    .sk-hero { margin: var(--sp-6) var(--sp-7) 0; border-radius: var(--r-card); padding: var(--sp-5) var(--sp-6); }
    .sk-hero-inner { max-width: none; }
    .sk-hero .sk-hide-desktop, .sk-content .sk-hide-desktop { display: none; }
}
.sk-hero-back {
    display: inline-flex; align-items: center; justify-content: center;
    width: var(--tap); height: var(--tap); border-radius: 12px;
    background: var(--sk-green-800); color: var(--sk-on-dark);
}
.sk-dark-chip { display: inline-flex; align-items: center; gap: var(--sp-1); min-height: 36px; padding: 0 var(--sp-3); border-radius: var(--r-pill); background: var(--sk-green-800); color: var(--sk-on-dark); font-size: var(--fs-small); }

/* Avatar */
.sk-avatar {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: var(--tap); height: var(--tap); border-radius: 50%;
    background: var(--sk-amber-400); color: var(--sk-green-900); font-weight: 800; font-size: var(--fs-section);
}
.sk-avatar-light { background: var(--sk-green-100); color: var(--sk-green-700); }

/* Language switch: pill */
.sk-lang { display: inline-flex; margin: 0; padding: 3px; border-radius: var(--r-pill); background: var(--sk-green-800); }
.sk-lang button {
    min-height: var(--tap); min-width: var(--tap); padding: 0 var(--sp-3);
    border: 0; border-radius: var(--r-pill); background: transparent; color: var(--sk-on-dark);
    font-size: var(--fs-small); font-weight: 700; cursor: pointer;
}
.sk-lang button.active { background: var(--sk-amber-400); color: var(--sk-green-900); }
.sk-lang-light { background: var(--sk-cream); border: 1px solid var(--sk-line); }
.sk-lang-light button { color: var(--sk-ink-2); }

/* ================= Text ================= */
.sk-page-title { font-size: var(--fs-title); font-weight: 800; }
.sk-section-title { font-size: var(--fs-section); font-weight: 700; }
.sk-muted { color: var(--sk-muted); font-size: var(--fs-small); }
.sk-label { display: block; margin-bottom: var(--sp-2); color: var(--sk-ink-2); font-size: var(--fs-body); font-weight: 600; }
.sk-hint { color: var(--sk-muted); font-size: var(--fs-small); margin-top: var(--sp-1); }
.sk-step { color: var(--sk-hero-sub); font-size: var(--fs-small); font-weight: 600; }
.sk-link { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--sk-amber-700); font-weight: 600; font-size: var(--fs-body); text-decoration: none; }
.sk-link:hover { text-decoration: underline; }

/* ================= Cards ================= */
.sk-card { background: var(--sk-card); border: 1px solid var(--sk-line); border-radius: var(--r-card); padding: var(--card-pad); }
.sk-card-title { font-size: var(--fs-section); font-weight: 700; margin-bottom: var(--sp-3); }
.sk-card-link { display: block; color: inherit; text-decoration: none; }
.sk-card-link:hover { border-color: var(--sk-green-700); }
.sk-card-warn { background: var(--sk-amber-50); border-color: var(--sk-amber-line); color: var(--sk-amber-800); }
.sk-card-dashed { border-style: dashed; border-color: var(--sk-line-strong); background: transparent; text-align: center; color: var(--sk-muted); }
.sk-grid-2 { display: grid; gap: var(--sp-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sk-grid-auto { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.sk-stack { display: grid; gap: var(--sp-4); }
.sk-row { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.sk-row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }

/* ================= Buttons ================= */
.sk-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
    min-height: var(--btn-h); padding: 0 var(--sp-6);
    border-radius: var(--r-button); border: 2px solid transparent;
    font-size: var(--fs-button); font-weight: 700; text-decoration: none; cursor: pointer;
}
.sk-btn-primary { background: var(--sk-green-700); color: var(--sk-on-dark); box-shadow: var(--shadow-press); margin-bottom: 4px; }
.sk-btn-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--sk-green-900); }
.sk-btn-secondary { background: var(--sk-card); color: var(--sk-green-700); border-color: var(--sk-green-700); }
.sk-btn-danger { background: var(--sk-card); color: var(--sk-due); border-color: var(--sk-due); }
.sk-btn-block { width: 100%; }
.sk-btn-small { min-height: var(--tap); padding: 0 var(--sp-4); font-size: var(--fs-body); }
.sk-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: var(--tap); height: var(--tap); border-radius: 12px; border: 1.5px solid var(--sk-line-strong);
    background: var(--sk-card); color: var(--sk-green-700); cursor: pointer; text-decoration: none;
}

/* Action bar: main button fixed at the bottom on phone and tablet */
.sk-actionbar {
    /* Sticky, not fixed: stays at the bottom while scrolling, but never covers the last cards. */
    position: sticky; bottom: 0; z-index: 10;
    display: grid; gap: var(--sp-2);
    padding: var(--sp-3) var(--sp-4) calc(var(--sp-3) + env(safe-area-inset-bottom));
    background: var(--sk-card); border-top: 1px solid var(--sk-line);
}
.sk-actionbar > * { max-width: var(--content-max); width: 100%; margin: 0 auto; }
/* Phone / tablet (walkthrough 2026-09-27: six stacked buttons covered half the parchi): the main button full width, the others
   two per row and a little smaller; a bar with four or more buttons scrolls with the page instead of staying on top. */
@media (max-width: 1023px) {
    .sk-actionbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sk-actionbar > :first-child, .sk-actionbar > :last-child:nth-child(even) { grid-column: 1 / -1; }
    .sk-actionbar > :not(:first-child) { font-size: var(--fs-small); padding-inline: var(--sp-2); white-space: normal; text-align: center; }
    .sk-actionbar > :not(:first-child) .sk-btn { font-size: var(--fs-small); }
    .sk-actionbar:has(> :nth-child(4)) { position: static; }
}
@media (min-width: 1024px) {
    .sk-actionbar { position: static; padding: 0 var(--sp-7) var(--sp-8); background: transparent; border: 0; display: flex; flex-wrap: wrap; gap: var(--sp-3); }
    .sk-actionbar > * { width: auto; margin: 0; min-width: 260px; }
}

/* ================= Forms ================= */
.sk-field { display: grid; gap: var(--sp-1); }
.sk-input {
    width: 100%; min-height: var(--input-h); padding: 0 var(--sp-4);
    border: 1.5px solid var(--sk-line-strong); border-radius: var(--r-input);
    background: var(--sk-card); color: var(--sk-ink); font-size: var(--fs-input);
}
.sk-input:focus { outline: none; border: 2px solid var(--sk-green-700); }
.sk-input.is-error { border: 2px solid var(--sk-due); }
.sk-input-num { font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.sk-input-prefix { display: flex; align-items: stretch; }
.sk-input-prefix span {
    display: inline-flex; align-items: center; padding: 0 var(--sp-3);
    border: 1.5px solid var(--sk-line-strong); border-right: 0; border-radius: var(--r-input) 0 0 var(--r-input);
    background: var(--sk-cream); color: var(--sk-ink-2); font-size: var(--fs-input); font-weight: 600;
}
.sk-input-prefix .sk-input { border-radius: 0 var(--r-input) var(--r-input) 0; }
.sk-input-with-btn { position: relative; }
.sk-input-with-btn .sk-input { padding-right: 64px; }
.sk-input-with-btn button { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); height: var(--tap); width: var(--tap); border: 0; background: transparent; color: var(--sk-muted); cursor: pointer; }
.sk-field-error { color: var(--sk-due); font-size: var(--fs-small); font-weight: 600; }
.sk-form { display: grid; gap: var(--sp-5); }

/* Choice cards (radio) */
.sk-choice {
    display: flex; align-items: center; gap: var(--sp-3);
    min-height: 60px; padding: var(--sp-3) var(--sp-4);
    border: 1.5px solid var(--sk-line-strong); border-radius: var(--r-input); background: var(--sk-card); cursor: pointer;
}
.sk-choice input { width: 24px; height: 24px; accent-color: var(--sk-green-700); flex-shrink: 0; }
.sk-choice:has(input:checked) { border: 2px solid var(--sk-green-700); background: var(--sk-green-100); }
.sk-choice strong { display: block; font-size: var(--fs-body); }
.sk-choice span { color: var(--sk-muted); font-size: var(--fs-small); }
.sk-choices { display: grid; gap: var(--sp-3); }
.sk-choices-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }

/* ================= Messages ================= */
.sk-alert { display: flex; gap: var(--sp-2); align-items: flex-start; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-input); background: var(--sk-due-bg); color: var(--sk-due); font-weight: 600; }
.sk-success { display: flex; gap: var(--sp-2); align-items: center; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-input); background: var(--sk-ok-bg); color: var(--sk-ok); font-weight: 700; }
.sk-warn { display: flex; gap: var(--sp-2); align-items: flex-start; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-input); background: var(--sk-amber-50); border: 1px solid var(--sk-amber-line); color: var(--sk-amber-800); font-weight: 600; }
.sk-toast {
    position: fixed; left: 50%; bottom: calc(110px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20;
    padding: var(--sp-3) var(--sp-5); border-radius: var(--r-pill); background: var(--sk-green-900); color: var(--sk-on-dark); font-weight: 600;
}

/* Badges: colour always with a word */
.sk-badge { display: inline-flex; align-items: center; gap: var(--sp-1); min-height: 32px; padding: 0 var(--sp-3); border-radius: var(--r-pill); font-size: var(--fs-small); font-weight: 700; white-space: nowrap; }
.sk-badge-ok { background: var(--sk-ok-bg); color: var(--sk-ok); }
.sk-badge-due { background: var(--sk-due-bg); color: var(--sk-due); }
.sk-badge-half { background: var(--sk-half-bg); color: var(--sk-amber-800); }
.sk-badge-closed { background: var(--sk-closed-bg); color: var(--sk-ink-2); }
.sk-badge-plain { background: var(--sk-cream); color: var(--sk-ink-2); border: 1px solid var(--sk-line); }

/* ================= Chips / filters ================= */
.sk-chips { display: flex; gap: var(--sp-2); flex-wrap: wrap; }
.sk-chip {
    display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 var(--sp-4);
    border: 1.5px solid var(--sk-line-strong); border-radius: var(--r-pill); background: var(--sk-card);
    color: var(--sk-ink-2); font-size: var(--fs-body); font-weight: 600; text-decoration: none; cursor: pointer;
}
.sk-chip.active { background: var(--sk-green-900); border-color: var(--sk-green-900); color: var(--sk-on-dark); }

/* Segmented control (floor switcher, on the dark header) */
.sk-segments { display: flex; gap: var(--sp-1); padding: 4px; border-radius: 16px; background: var(--sk-green-800); overflow-x: auto; }
.sk-segments a {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); min-width: 72px; padding: 0 var(--sp-3);
    border-radius: 12px; color: var(--sk-hero-sub); font-weight: 700; font-size: var(--fs-body); text-decoration: none; white-space: nowrap;
}
.sk-segments a.active { background: var(--sk-card); color: var(--sk-green-900); }

/* ================= Home ================= */
.sk-stats { display: grid; gap: var(--sp-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1024px) { .sk-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sk-stat { display: grid; gap: var(--sp-1); }
a.sk-stat { color: inherit; text-decoration: none; }   /* the portal's two big numbers open their cards below (2026-10-14) */
.sk-stat-label { color: var(--sk-ink-2); font-size: var(--fs-small); font-weight: 600; }
.sk-stat-value { font-size: var(--fs-number); font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.sk-stat-unit { color: var(--sk-muted); font-size: var(--fs-small); }
.sk-stat.sk-card-warn .sk-stat-label, .sk-stat.sk-card-warn .sk-stat-unit { color: var(--sk-amber-800); }

.sk-tiles { display: grid; gap: var(--sp-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 600px) { .sk-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sk-tile {
    display: grid; gap: var(--sp-3); align-content: start; min-height: 132px; padding: var(--sp-4);
    background: var(--sk-card); border: 1px solid var(--sk-line); border-radius: var(--r-card);
    color: var(--sk-ink); text-decoration: none;
}
.sk-tile:hover { border-color: var(--sk-green-700); }
.sk-tile-icon { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: var(--r-tile-icon); }
.sk-tile-word { font-size: var(--fs-name); font-weight: 700; line-height: var(--sk-lh-heading); }
.sk-tile-inward .sk-tile-icon { background: var(--sk-tile-inward); color: var(--sk-tile-inward-ink); }
.sk-tile-outward .sk-tile-icon { background: var(--sk-tile-outward); color: var(--sk-tile-outward-ink); }
.sk-tile-bardana .sk-tile-icon { background: var(--sk-tile-bardana); color: var(--sk-tile-bardana-ink); }
.sk-tile-search .sk-tile-icon { background: var(--sk-tile-search); color: var(--sk-tile-search-ink); }
.sk-tile-board .sk-tile-icon { background: var(--sk-tile-board); color: var(--sk-tile-board-ink); }
.sk-tile-report .sk-tile-icon { background: var(--sk-tile-report); color: var(--sk-tile-report-ink); }

.sk-desktop-only { display: none; }
@media (min-width: 1024px) {
    .sk-desktop-only { display: block; }
    .sk-home-lower { display: grid; gap: var(--sp-4); grid-template-columns: 3fr 2fr; }
}

/* Table */
.sk-table { width: 100%; border-collapse: collapse; font-size: var(--fs-body); }
.sk-table th { text-align: left; color: var(--sk-ink-2); font-size: var(--fs-small); font-weight: 700; padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--sk-line); }
.sk-table td { padding: var(--sp-3); border-bottom: 1px solid var(--sk-line); }
.sk-table td.sk-empty { text-align: center; color: var(--sk-muted); padding: var(--sp-6); }
.sk-table .sk-right { text-align: right; font-variant-numeric: tabular-nums; }

/* Capacity bars */
.sk-bars { display: grid; gap: var(--sp-4); }
.sk-bar-head { display: flex; justify-content: space-between; gap: var(--sp-3); font-weight: 600; }
.sk-bar { height: 14px; border-radius: var(--r-pill); background: var(--sk-green-100); overflow: hidden; }
.sk-bar > span { display: block; height: 100%; background: var(--sk-green-700); border-radius: var(--r-pill); }

/* ================= Party search / cards ================= */
.sk-search-box {
    display: flex; align-items: center; gap: var(--sp-2);
    min-height: 58px; padding: 0 var(--sp-2) 0 var(--sp-4);
    border-radius: 16px; background: var(--sk-card); color: var(--sk-ink);
}
.sk-search-box input {
    flex: 1; width: 0; min-width: 0; min-height: 56px; border: 0; background: transparent; outline: none;
    font-size: var(--fs-search); font-weight: 700; color: var(--sk-ink);
}
.sk-search-box .sk-icon-btn { border: 0; background: var(--sk-green-100); }
.sk-person { display: grid; gap: var(--sp-3); }
.sk-person-top { display: flex; align-items: center; gap: var(--sp-3); }
.sk-person-name { font-size: var(--fs-name); font-weight: 700; line-height: var(--sk-lh-heading); }
.sk-person-sub { color: var(--sk-muted); font-size: var(--fs-small); }
.sk-person-main { flex: 1; min-width: 0; min-height: var(--tap); display: flex; flex-direction: column; justify-content: center; }
.sk-person-bottom { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding-top: var(--sp-3); border-top: 1.5px dashed var(--sk-line-strong); flex-wrap: wrap; }
.sk-mobile { font-size: var(--fs-body); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.sk-mobile mark { background: var(--sk-amber-50); color: var(--sk-amber-700); font-weight: 800; border-radius: 6px; padding: 0 2px; }

/* ================= Store layout ================= */
.sk-counts { display: grid; gap: var(--sp-2); grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sk-count { padding: var(--sp-3); border-radius: 14px; background: var(--sk-card); border: 1px solid var(--sk-line); text-align: center; }
.sk-count strong { display: block; font-size: var(--fs-count); font-weight: 800; font-variant-numeric: tabular-nums; }
.sk-count span { font-size: var(--fs-small); color: var(--sk-ink-2); }

.sk-pillars { display: grid; gap: var(--sp-2); grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (min-width: 600px) { .sk-pillars { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .sk-pillars { grid-template-columns: repeat(8, minmax(0, 1fr)); } }
@media (min-width: 1600px) { .sk-pillars { grid-template-columns: repeat(10, minmax(0, 1fr)); } }
.sk-pillar {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 72px; padding: var(--sp-1); border-radius: 14px;
    text-decoration: none; text-align: center; line-height: 1.2; word-break: break-word;
}
.sk-pillar strong { font-size: var(--fs-section); font-weight: 800; }
.sk-pillar small { font-size: var(--fs-small); font-weight: 600; }
.sk-pillar-full { background: var(--sk-green-700); color: var(--sk-on-dark); }
.sk-pillar-half { background: var(--sk-half-bg); color: var(--sk-amber-800); }
.sk-pillar-empty { background: var(--sk-card); color: var(--sk-ink-2); border: 1.5px dashed var(--sk-line-strong); }
.sk-pillar-closed { background: var(--sk-closed-bg); color: var(--sk-ink-2); }
.sk-legend { display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-5); color: var(--sk-ink-2); font-size: var(--fs-small); }
.sk-legend span { display: inline-flex; align-items: center; gap: var(--sp-2); }
.sk-legend i { width: 20px; height: 20px; border-radius: 6px; display: inline-block; }
.sk-legend .l-full { background: var(--sk-green-700); }
.sk-legend .l-half { background: var(--sk-half-bg); }
.sk-legend .l-empty { background: var(--sk-card); border: 1.5px dashed var(--sk-line-strong); }
.sk-legend .l-closed { background: var(--sk-closed-bg); }
.sk-preview-grid .sk-pillar { min-height: 52px; }

/* Lot number */
.sk-lot { font-size: var(--fs-lot); font-weight: 800; line-height: 1.1; color: var(--sk-green-900); font-variant-numeric: tabular-nums; word-break: break-all; }
.sk-code { font-family: var(--sk-font); font-weight: 700; background: var(--sk-cream); border: 1px solid var(--sk-line); border-radius: 8px; padding: 2px var(--sp-2); }

/* Summary before saving */
.sk-summary { font-size: var(--fs-section); font-weight: 700; line-height: var(--sk-lh-heading); }

/* ================= Login ================= */
.sk-auth { min-height: 100vh; }
.sk-auth-band {
    background: var(--sk-green-900); color: var(--sk-on-dark);
    padding: calc(var(--sp-3) + env(safe-area-inset-top)) var(--sp-5) 56px;
    border-radius: 0 0 24px 24px;
}
.sk-auth-band-inner { max-width: 440px; margin: 0 auto; display: grid; gap: var(--sp-2); justify-items: center; text-align: center; }
.sk-auth-top { width: 100%; display: flex; justify-content: flex-end; }
.sk-logo { display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 16px; background: var(--sk-card); color: var(--sk-green-900); }
.sk-logo .sk-icon { width: 32px; height: 32px; }
.sk-brand { font-size: var(--fs-brand); font-weight: 800; color: var(--sk-on-dark); line-height: 1.2; }
.sk-tagline { color: var(--sk-hero-sub); font-size: var(--fs-body); }
.sk-auth-card {
    position: relative; max-width: 440px; margin: -32px auto 0; padding: var(--sp-5);
    background: var(--sk-card); border: 1px solid var(--sk-line); border-radius: 20px; box-shadow: var(--shadow-login);
    display: grid; gap: var(--sp-4);
}
.sk-auth-card .sk-form { gap: var(--sp-4); }
.sk-auth-wrap { padding: 0 var(--sp-4) var(--sp-7); }
.sk-auth-foot { max-width: 440px; margin: var(--sp-5) auto 0; text-align: center; color: var(--sk-muted); font-size: var(--fs-small); }
.sk-demo { display: grid; gap: var(--sp-2); padding-top: var(--sp-3); border-top: 1.5px dashed var(--sk-line-strong); }
/* Development only: the three demo buttons in one row, so the whole card fits one screen. */
.sk-demo-buttons { display: grid; gap: var(--sp-2); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sk-demo-buttons .sk-btn { padding: 0 var(--sp-1); line-height: 1.2; text-align: center; }
/* Computer: brand panel on the left, the login card on the right — everything on one screen, no scrolling. */
@media (min-width: 1024px) {
    .sk-auth { display: grid; grid-template-columns: minmax(360px, 42%) 1fr; }
    .sk-auth-band {
        display: flex; align-items: center; justify-content: center;
        min-height: 100vh; padding: var(--sp-7); border-radius: 0; position: relative;
    }
    .sk-auth-band-inner { gap: var(--sp-3); }
    .sk-auth-top { position: absolute; top: var(--sp-5); right: var(--sp-5); width: auto; }
    .sk-logo { width: 72px; height: 72px; border-radius: 20px; }
    .sk-logo .sk-icon { width: 40px; height: 40px; }
    .sk-auth-wrap { display: flex; flex-direction: column; justify-content: center; min-height: 100vh; padding: var(--sp-5) var(--sp-7); }
    .sk-auth-card { width: 100%; margin: 0 auto; padding: var(--sp-6) var(--sp-7); }
}

/* Login: slow lights on the dark band, the logo floats, the card and the lines come in once. */
.sk-auth-band { position: relative; overflow: hidden; isolation: isolate; }
.sk-auth-band::before, .sk-auth-band::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.sk-auth-band::before {
    width: 320px; height: 320px; left: -110px; top: -120px;
    background: radial-gradient(circle, var(--sk-auth-glow-a), transparent 70%);
    animation: sk-drift 12s ease-in-out infinite alternate;
}
.sk-auth-band::after {
    width: 440px; height: 440px; right: -160px; bottom: -220px;
    background: radial-gradient(circle, var(--sk-auth-glow-b), transparent 70%);
    animation: sk-drift 16s ease-in-out infinite alternate-reverse;
}
.sk-logo { animation: sk-float 4s ease-in-out infinite; }
.sk-auth-band .sk-brand { animation: sk-rise .5s ease-out both; }
.sk-auth-band .sk-tagline { animation: sk-rise .5s ease-out .1s both; }
.sk-auth-card { animation: sk-rise .45s ease-out both; }
.sk-auth-points { display: none; }
@keyframes sk-drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(60px, 40px) scale(1.15); } }
@keyframes sk-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes sk-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.sk-auth-links { display: grid; }
@media (min-width: 1024px) {
    .sk-auth-links { display: flex; flex-wrap: wrap; column-gap: var(--sp-5); }
    .sk-demo-buttons { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .sk-auth-points {
        display: grid; gap: var(--sp-2); list-style: none; padding: 0; margin: var(--sp-4) 0 0;
        text-align: left; color: var(--sk-on-dark); font-size: var(--fs-body);
    }
    .sk-auth-points li { display: flex; align-items: center; gap: var(--sp-2); animation: sk-rise .5s ease-out both; }
    .sk-auth-points li:nth-child(1) { animation-delay: .2s; }
    .sk-auth-points li:nth-child(2) { animation-delay: .35s; }
    .sk-auth-points li:nth-child(3) { animation-delay: .5s; }
}
@media (prefers-reduced-motion: reduce) {
    .sk-auth-band::before, .sk-auth-band::after, .sk-auth *, .sk-auth-card { animation: none !important; }
}

/* Login: the little cold store on the dark band (Views/Shared/_AuthScene.cshtml) */
.sk-scene { display: block; width: 240px; max-width: 86%; height: auto; overflow: hidden; }
.sk-scene .s-line { fill: none; stroke: var(--sk-on-dark); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sk-scene .s-ground { stroke: var(--sk-hero-sub); }
.sk-scene .s-wall { fill: var(--sk-green-800); stroke: var(--sk-on-dark); stroke-width: 2; }
.sk-scene .s-roof { fill: var(--sk-green-700); stroke: var(--sk-on-dark); stroke-width: 2; stroke-linejoin: round; }
.sk-scene .s-door { fill: var(--sk-green-900); stroke: var(--sk-on-dark); stroke-width: 2; }
.sk-scene .s-slat { stroke: var(--sk-hero-sub); stroke-width: 1.5; }
.sk-scene .s-window { fill: var(--sk-amber-400); animation: sk-glow 4s ease-in-out infinite; }
.sk-scene .s-bed, .sk-scene .s-cab { fill: var(--sk-amber-400); stroke: var(--sk-on-dark); stroke-width: 1.5; stroke-linejoin: round; }
.sk-scene .s-sack { fill: var(--sk-amber-line); stroke: var(--sk-amber-800); stroke-width: 1; }
.sk-scene .s-wheel { fill: var(--sk-green-900); stroke: var(--sk-on-dark); stroke-width: 2; }
.sk-scene .s-truck { animation: sk-truck 15s ease-in-out infinite; }
.sk-scene .s-face { transform-box: view-box; transform-origin: 55px 0; animation: sk-face 15s linear infinite; }
.sk-scene .s-wheel-turn { transform-box: fill-box; transform-origin: center; animation: sk-wheel 15s ease-in-out infinite; }
.sk-scene .s-sack { transform-box: fill-box; transform-origin: center; animation: 15s ease-in-out infinite; }
.sk-scene .s-sack-1 { animation-name: sk-sack-1; } .sk-scene .s-sack-2 { animation-name: sk-sack-2; }
.sk-scene .s-sack-3 { animation-name: sk-sack-3; } .sk-scene .s-sack-4 { animation-name: sk-sack-4; }
.sk-scene .s-sack-5 { animation-name: sk-sack-5; }
.sk-scene .s-smoke { fill: var(--sk-hero-sub); opacity: 0; transform-box: fill-box; transform-origin: center; animation: sk-smoke 1.5s ease-out infinite; }
.sk-scene .s-smoke-2 { animation-delay: .5s; }
.sk-scene .s-smoke-3 { animation-delay: 1s; }
.sk-scene .s-flake { transform-box: fill-box; transform-origin: center; animation: sk-turn 14s linear infinite; }
.sk-scene .s-snow { fill: var(--sk-hero-sub); animation: sk-snow 7s linear infinite; }
.sk-scene .s-snow-2 { animation-delay: -2.5s; animation-duration: 9s; }
.sk-scene .s-snow-3 { animation-delay: -4s; }
.sk-scene .s-snow-4 { animation-delay: -1s; animation-duration: 8s; }
.sk-scene .s-snow-5 { animation-delay: -5.5s; animation-duration: 10s; }
.sk-scene .s-snow-6 { animation-delay: -3s; }
.sk-scene .s-mist { fill: var(--sk-hero-sub); opacity: 0; animation: sk-mist 3.6s ease-out infinite; }
.sk-scene .s-mist-2 { animation-delay: 1.2s; }
.sk-scene .s-mist-3 { animation-delay: 2.4s; }
/* comes from far away, waits at the store door while the sacks go in, turns and goes back empty, comes again */
@keyframes sk-truck { 0% { transform: translateX(-230px); } 30%, 64% { transform: translateX(14px); } 100% { transform: translateX(-230px); } }
@keyframes sk-face { 0%, 64% { transform: scaleX(1); } 67%, 100% { transform: scaleX(-1); } }
@keyframes sk-wheel { 0% { transform: rotate(0); } 30%, 64% { transform: rotate(900deg); } 100% { transform: rotate(1800deg); } }
/* each sack goes up over the cab and into the door, one after another */
@keyframes sk-sack-5 { 0%, 34% { transform: none; opacity: 1; } 37% { transform: translate(55px, -16px); opacity: 1; } 40% { transform: translate(111px, 18px) scale(.6); opacity: 0; } 40.1%, 100% { transform: none; opacity: 0; } }
@keyframes sk-sack-4 { 0%, 39% { transform: none; opacity: 1; } 42% { transform: translate(63px, -16px); opacity: 1; } 45% { transform: translate(126px, 18px) scale(.6); opacity: 0; } 45.1%, 100% { transform: none; opacity: 0; } }
@keyframes sk-sack-3 { 0%, 44% { transform: none; opacity: 1; } 47% { transform: translate(52px, -28px); opacity: 1; } 50% { transform: translate(103px, 6px) scale(.6); opacity: 0; } 50.1%, 100% { transform: none; opacity: 0; } }
@keyframes sk-sack-2 { 0%, 49% { transform: none; opacity: 1; } 52% { transform: translate(59px, -28px); opacity: 1; } 55% { transform: translate(118px, 6px) scale(.6); opacity: 0; } 55.1%, 100% { transform: none; opacity: 0; } }
@keyframes sk-sack-1 { 0%, 54% { transform: none; opacity: 1; } 57% { transform: translate(66px, -28px); opacity: 1; } 60% { transform: translate(133px, 6px) scale(.6); opacity: 0; } 60.1%, 100% { transform: none; opacity: 0; } }
@keyframes sk-smoke { 0% { opacity: 0; transform: translate(0, 0) scale(.6); } 20% { opacity: .7; } 100% { opacity: 0; transform: translate(-10px, -20px) scale(2); } }
@keyframes sk-turn { to { transform: rotate(360deg); } }
@keyframes sk-snow { from { transform: translateY(-6px); } to { transform: translateY(128px); } }
@keyframes sk-mist { 0% { opacity: 0; transform: translateY(0) scale(.6); } 25% { opacity: .5; } 100% { opacity: 0; transform: translate(-10px, -22px) scale(1.5); } }
@keyframes sk-glow { 0%, 100% { opacity: 1; } 50% { opacity: .65; } }
.sk-scene .s-mist { transform-box: fill-box; transform-origin: center; }
@media (min-width: 1024px) { .sk-scene { width: 380px; max-width: 90%; } }
/* Still picture: the trolley waits at the store, a little snow in the air */
@media (prefers-reduced-motion: reduce) {
    .sk-scene * { animation: none !important; }
    .sk-scene .s-truck { transform: translateX(14px); }
    .sk-scene .s-snow-1 { transform: translateY(30px); } .sk-scene .s-snow-2 { transform: translateY(70px); }
    .sk-scene .s-snow-3 { transform: translateY(18px); } .sk-scene .s-snow-4 { transform: translateY(12px); }
    .sk-scene .s-snow-5 { transform: translateY(40px); } .sk-scene .s-snow-6 { transform: translateY(90px); }
}

/* Login: "get the mobile app" — two buttons, the steps open under them */
.sk-getapp { display: grid; gap: var(--sp-2); padding-top: var(--sp-3); border-top: 1px solid var(--sk-line); }
.sk-getapp-title { display: flex; align-items: center; gap: var(--sp-2); font-weight: 700; color: var(--sk-ink); font-size: var(--fs-body); }
.sk-getapp-buttons { display: grid; gap: var(--sp-2); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sk-getapp-buttons .sk-btn { padding: 0 var(--sp-2); gap: var(--sp-2); }
.sk-getapp-steps { display: grid; gap: var(--sp-1); margin: 0; padding-left: var(--sp-5); color: var(--sk-ink); font-size: var(--fs-body); }
.sk-getapp-done { display: flex; align-items: center; gap: var(--sp-2); color: var(--sk-green-700); font-weight: 600; font-size: var(--fs-body); }
.sk-getapp[hidden], .sk-getapp-steps[hidden], .sk-getapp-done[hidden], .sk-getapp-buttons[hidden] { display: none; }
/* संदेश गिनती: the packs given to an owner, one under the other */
.sk-pack-row + .sk-pack-row { border-top: 1px solid var(--sk-line); padding-top: var(--sp-3); }
/* One of the two is shown: in the card on a phone / tablet, on the dark brand panel on a computer. */
.sk-getapp-band { display: none; }
@media (min-width: 1024px) {
    .sk-getapp-card { display: none; }
    .sk-getapp-band {
        display: grid; width: 100%; margin-top: var(--sp-4); padding-top: var(--sp-4); border-top-color: var(--sk-green-800);
        text-align: left; animation: sk-rise .5s ease-out .65s both;
    }
    .sk-getapp-band .sk-getapp-title, .sk-getapp-band .sk-getapp-steps, .sk-getapp-band .sk-getapp-done { color: var(--sk-on-dark); }
    .sk-getapp-band .sk-btn-secondary { background: transparent; color: var(--sk-on-dark); border-color: var(--sk-hero-sub); }
    .sk-getapp-band .sk-btn-secondary:hover { background: var(--sk-green-800); }
}

/* ================= Print (bardana slip) ================= */
@media print {
    .sk-sidebar, .sk-topbar, .sk-hero, .sk-actionbar, .sk-no-print, .sk-phonebar, .sk-menu-backdrop { display: none !important; }
    body { background: var(--sk-card); }
    .sk-content { padding: 0; }
}
.sk-side-logout { width: 100%; border: 0; background: transparent; cursor: pointer; }

/* Reconciliation: two sides next to each other; stacked on phone */
.sk-recon { grid-template-columns: 1fr; }
@media (min-width: 600px) { .sk-recon { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Printable bag slip: A5, or a 3-inch (72 mm) thermal roll */
.sk-slip { background: #fff; border: 2px solid var(--sk-ink); border-radius: var(--r-input); padding: var(--sp-4); color: var(--sk-ink); }
.sk-slip-a5 { max-width: 148mm; }
.sk-slip-thermal { max-width: 72mm; padding: var(--sp-3); font-size: 0.9rem; }
/* Head: store name big, then the paper's name in a ruled band (works on a black-and-white printer too) */
.sk-slip-head { display: grid; gap: 2px; text-align: center; padding-bottom: var(--sp-3); }
.sk-slip-store { font-size: var(--fs-section); font-weight: 800; line-height: 1.2; }
.sk-slip-head > strong:last-child { margin-top: var(--sp-2); padding: var(--sp-1) 0; border-top: 2px solid var(--sk-ink); border-bottom: 2px solid var(--sk-ink);
    font-size: var(--fs-name); letter-spacing: .04em; }
/* The one number that matters, in a box */
.sk-slip-lot { margin: var(--sp-3) 0 0; padding: var(--sp-2) var(--sp-3); border: 1.5px solid var(--sk-ink); border-radius: var(--r-input); }
/* Rows: label and value side by side, a fine line under each, values left-aligned right next to their label */
.sk-slip-rows { display: grid; grid-template-columns: 36% 1fr; gap: 0; margin: var(--sp-3) 0; }
.sk-slip-rows dt, .sk-slip-rows dd { margin: 0; padding: var(--sp-2) 0; border-bottom: 1px dotted var(--sk-line-strong); }
.sk-slip-rows dt { color: var(--sk-ink-2); font-weight: 600; padding-right: var(--sp-3); }
.sk-slip-rows dd { text-align: left; font-weight: 700; overflow-wrap: anywhere; }
.sk-slip-rows + .sk-slip-rows { margin-top: var(--sp-2); border-top: 1.5px solid var(--sk-ink); }
/* Signature / thumb: two empty boxes to sign in */
.sk-slip-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--sp-4); min-height: 22mm; margin-top: var(--sp-3);
    color: var(--sk-ink-2); font-size: var(--fs-small); }
.sk-slip-foot > span { flex: 1; height: 3.4em; padding-top: var(--sp-1); border-top: 1.5px solid var(--sk-ink); text-align: center; }
/* "जमा ₹… · बाक़ी ₹…" beside a farmer's entry (owner, 2026-10-08) */
.sk-party-money { flex-wrap: wrap; gap: var(--sp-2); }

/* "डुप्लीकेट प्रति" on a slip printed again (owner, 2026-10-08): on the paper of that print only, never on the screen. */
.sk-copy-mark { display: none; }
@media print {
    body.sk-printing-copy .sk-copy-mark { display: block; margin: 0 0 var(--sp-3); padding: var(--sp-1) var(--sp-3); text-align: center;
        font-weight: 800; border: 1.5px dashed var(--sk-line-strong); }
}
@media print {
    .sk-slip { border-radius: 0; padding: var(--sp-3); max-width: none; break-inside: avoid; }
    .sk-slip-thermal { width: 72mm; }
    @page { margin: 8mm; }
}

/* Less important table columns are left out on narrow phones (no sideways scrolling). */
@media (max-width: 599px) { .sk-hide-phone { display: none; } }

/* Count cards holding rupee amounts: 2 × 2 on phone so ₹ figures never spill out */
@media (max-width: 599px) { .sk-counts-money { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sk-nowrap { white-space: nowrap; }

/* ---------- Day 4: small shared pieces ---------- */
.sk-note-line { display: flex; gap: var(--sp-2); align-items: flex-start; color: var(--sk-ink-2); }
.sk-note-line .sk-icon { flex-shrink: 0; margin-top: 2px; }
.sk-stats-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sk-stats-3 > :first-child { grid-column: 1 / -1; }
@media (min-width: 600px) { .sk-stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .sk-stats-3 > :first-child { grid-column: auto; } }
@media (min-width: 1024px) { .sk-stats.sk-stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sk-date-range { display: grid; gap: var(--sp-3); grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; }
.sk-date-range > button { grid-column: 1 / -1; }
.sk-date-range > .sk-field { min-width: 0; }
.sk-date-range .sk-input { width: 100%; min-width: 0; }
@media (min-width: 600px) { .sk-date-range { grid-template-columns: 1fr 1fr auto; } .sk-date-range > button { grid-column: auto; } }
/* the search box of a long list (2026-10-15): a whole row on the phone, beside the dates on a wider screen */
.sk-date-range > .sk-date-search { grid-column: 1 / -1; }
@media (min-width: 600px) {
    .sk-date-range:has(.sk-date-search) { grid-template-columns: 1fr 1fr 1.5fr auto; }
    .sk-date-range > .sk-date-search { grid-column: auto; }
}

/* ---------- Gate (spec 9.15) ---------- */
.sk-vehicle-pick { border: 0; padding: 0; margin: 0; display: grid; gap: var(--sp-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sk-vehicle-pick legend { grid-column: 1 / -1; margin-bottom: var(--sp-2); }
@media (min-width: 600px) { .sk-vehicle-pick { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sk-vehicle { position: relative; display: grid; justify-items: center; gap: var(--sp-2); padding: var(--sp-4) var(--sp-2);
    border: 1.5px solid var(--sk-line-strong); border-radius: var(--r-card); background: var(--sk-card); cursor: pointer; text-align: center;
    min-height: var(--tap); }
.sk-vehicle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sk-vehicle-icon .sk-icon { width: 56px; height: 56px; color: var(--sk-green-800); }
.sk-vehicle:has(input:checked) { border: 3px solid var(--sk-green-700); background: var(--sk-green-100); }
.sk-vehicle:has(input:focus-visible) { outline: 3px solid var(--sk-amber-400); }
.sk-input-plate { text-transform: uppercase; letter-spacing: 1px; font-weight: 700; }
.sk-more-fields summary { min-height: var(--tap); display: flex; align-items: center; color: var(--sk-green-800); font-weight: 700; cursor: pointer; }
.sk-more-fields[open] summary { margin-bottom: var(--sp-3); }

.sk-gate-party, .sk-gate-result { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: var(--sp-2); align-items: center;
    padding: var(--sp-2) 0; border-bottom: 1px solid var(--sk-line); }
.sk-gate-result { grid-template-columns: auto minmax(0, 1fr) auto; }
.sk-gate-party-name { display: grid; min-width: 0; }
.sk-gate-party-name strong { font-size: var(--fs-name); overflow-wrap: anywhere; }
.sk-input-bags { width: 5em; }
.sk-icon-btn-line { border: 1px solid var(--sk-line-strong); }
.sk-search-inline { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-2); }
.sk-search-inline .sk-input { width: 100%; min-width: 0; }

.sk-token-card { display: grid; justify-items: center; gap: var(--sp-2); text-align: center; }
.sk-token-label { font-size: var(--fs-section); font-weight: 700; color: var(--sk-ink-2); }
.sk-token-big { font-size: var(--fs-token); font-weight: 800; line-height: 1; color: var(--sk-green-900); font-variant-numeric: tabular-nums; }
.sk-slip-token { font-size: var(--fs-number); }

.sk-gate-strip > span, .sk-strip-part { display: inline-flex; gap: var(--sp-1); align-items: center; }
.sk-gate-strip { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; padding: var(--sp-3) var(--sp-4);
    background: var(--sk-amber-50); border: 1px solid var(--sk-amber-line); border-radius: var(--r-card); color: var(--sk-amber-800); }
.sk-refresh-note { display: flex; gap: var(--sp-2); align-items: center; }
.sk-gate-card { display: grid; gap: var(--sp-3); }
.sk-gate-card-done { background: var(--sk-cream); }
.sk-gate-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sp-3); align-items: center; }
.sk-token-mid { display: grid; justify-items: center; min-width: 72px; padding: var(--sp-1) var(--sp-2); border-radius: var(--r-input);
    background: var(--sk-green-900); color: var(--sk-on-dark); font-size: var(--fs-token-mid); font-weight: 800; line-height: 1.05;
    font-variant-numeric: tabular-nums; }
.sk-token-mid small { font-size: var(--fs-small); font-weight: 600; }
.sk-gate-vehicle { display: grid; min-width: 0; }
.sk-gate-vehicle strong { display: flex; gap: var(--sp-2); align-items: center; }
.sk-plate { font-weight: 700; letter-spacing: 1px; overflow-wrap: anywhere; }
.sk-gate-farmers { margin: 0; overflow-wrap: anywhere; }
.sk-gate-meta { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin: 0; color: var(--sk-ink-2); }
.sk-gate-actions { display: grid; gap: var(--sp-2); }
.sk-more > summary { list-style: none; width: 100%; }
.sk-more > summary::-webkit-details-marker { display: none; }
.sk-more-menu { display: grid; gap: var(--sp-2); margin-top: var(--sp-2); }
@media print { .sk-no-print { display: none !important; } }

/* ================= Inward (Day 5) ================= */
.sk-lot-mid { font-size: var(--fs-number); }
.sk-lot-line { display: flex; align-items: baseline; gap: var(--sp-2); flex-wrap: wrap; }
/* One pillar of a lot: pick list, bags, remove. */
/* Phone: the pick list on its own line (pillar names stay readable), bags and remove below it. */
.sk-place-row { display: grid; gap: var(--sp-3); grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
.sk-place-row > .sk-field:first-child { grid-column: 1 / -1; }
@media (min-width: 600px) {
    .sk-place-row { grid-template-columns: minmax(0, 1fr) 8em auto; }
    .sk-place-row > .sk-field:first-child { grid-column: auto; }
}
/* Two big choices side by side from tablet up; one under the other on a phone. */
.sk-choices-wide { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .sk-choices-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sk-place-row select.sk-input { min-width: 0; }
.sk-slip-lot { display: flex; align-items: baseline; justify-content: center; gap: var(--sp-2); font-size: var(--fs-section); }
.sk-slip-lot strong { font-size: var(--fs-number); }
.sk-slip-place { display: block; }

/* Audit trail (बदलाव का रिकॉर्ड): "name: value" pairs */
.sk-kv { display: grid; grid-template-columns: minmax(96px, max-content) 1fr; gap: var(--sp-1) var(--sp-3); margin: 0 0 var(--sp-3); }
.sk-kv dt { color: var(--sk-muted); }
.sk-kv dd { margin: 0; overflow-wrap: anywhere; }

/* सेटिंग page: big links with an icon and one plain line */
.sk-setup-link { display: flex; gap: var(--sp-4); align-items: center; min-height: 80px; }
.sk-setup-link .sk-tile-icon { flex: none; background: var(--sk-tile-report); color: var(--sk-tile-report-ink); }
.sk-setup-title { display: block; font-size: var(--fs-name); color: var(--sk-ink); }
.sk-setup-hint { display: block; }

/* A button that looks like a link (e.g. "OTP दोबारा भेजें") */
.sk-link-button { background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; }

/* बाक़ी सब सेटिंग: one row per setting — name, where it comes from, value in words */
.sk-setting { display: flex; align-items: center; gap: var(--sp-3); min-height: 64px; }
.sk-setting-main { flex: 1; min-width: 0; display: grid; gap: var(--sp-1); }
.sk-setting-main strong { font-size: var(--fs-body); color: var(--sk-ink); }
.sk-setting-value { font-weight: 700; color: var(--sk-green-700); text-align: right; max-width: 45%; overflow-wrap: anywhere; }
.sk-plan-banner { margin-bottom: var(--sp-4); }

/* QR code on slips (opens the record when scanned) and the scanner's camera view */
.sk-qr { width: 30mm; height: 30mm; display: block; margin: var(--sp-3) auto 0; }
.sk-slip-thermal .sk-qr { width: 26mm; height: 26mm; }
.sk-qr-note { text-align: center; color: var(--sk-ink-2); font-size: var(--fs-small); }
/* किसान ऐप on the आमद पर्ची (2026-10-14): the app QR and, once, the PIN. */
.sk-app-box { margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1.5px dashed var(--sk-line-strong); text-align: center; }
.sk-scan-video { width: 100%; max-height: 60vh; border-radius: var(--r-card); background: var(--sk-green-900); object-fit: cover; }

/* Voice typing: a mic button inside the box (only shown when the phone's browser can listen) */
.sk-voice-wrap { position: relative; display: block; }
.sk-voice-wrap > .sk-input { padding-right: 56px; }
.sk-voice-wrap.has-lang > .sk-input, .sk-search-box .sk-voice-wrap.has-lang > input { padding-right: 104px; }
.sk-voice-lang { position: absolute; right: 50px; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border: 0; background: transparent;
                 color: var(--sk-muted); font: inherit; font-size: var(--fs-body); font-weight: 700; cursor: pointer; }
.sk-voice-wrap > textarea ~ .sk-voice-btn, .sk-voice-wrap > textarea ~ .sk-voice-lang { top: 26px; }
.sk-voice-btn { position: absolute; right: 1px; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border: 0; border-radius: var(--r-input);
    background: var(--sk-green-100); color: var(--sk-green-700); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.sk-voice-btn.is-listening { background: var(--sk-due-bg); color: var(--sk-due); }
.sk-input.is-heard { box-shadow: 0 0 0 3px var(--sk-amber-400); }

/* "सुनें": read a balance aloud */
.sk-speak-btn { display: inline-flex; align-items: center; gap: var(--sp-2); }
.sk-search-box .sk-voice-wrap, .sk-search-inline .sk-voice-wrap { flex: 1; min-width: 0; display: flex; align-items: center; }
.sk-search-box .sk-voice-wrap > input { flex: 1; width: 0; padding-right: 56px; }
.sk-search-inline .sk-voice-wrap > .sk-input { width: 100%; }
/* Saves kept on the phone while there is no network (same look as a warning, its own class) */
.sk-pending { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; margin-bottom: var(--sp-4);
    padding: var(--sp-3) var(--sp-4); border-radius: var(--r-input); background: var(--sk-amber-50);
    border: 1px solid var(--sk-amber-line); color: var(--sk-amber-800); font-weight: 600; }
.sk-pending[hidden] { display: none; }
/* A short text link used as a button (e.g. "रद्द करें") still gets a full 48px tap area */
.sk-link-tap { min-width: var(--tap); justify-content: center; padding: 0 var(--sp-2); }

/* ================= Statement (B2) ================= */
.sk-print-only { display: none; }
.sk-statement { display: grid; gap: var(--sp-4); }
@media print {
    .sk-print-only { display: grid; }
    .sk-statement .sk-card { break-inside: avoid; border: 1px solid var(--sk-line); }
}

/* ================= Registers (B3) ================= */
/* A wide register scrolls sideways inside its own box; the page never does. */
.sk-table-wrap { overflow-x: auto; max-width: 100%; }
.sk-table-report th, .sk-table-report td { white-space: nowrap; }
.sk-table-report tfoot th { border-top: 2px solid var(--sk-ink-2); color: var(--sk-ink); }
@media print {
    .sk-table-wrap { overflow: visible; }
    .sk-table-report { font-size: 11pt; }
    .sk-table-report th, .sk-table-report td { padding: 2pt 4pt; white-space: normal; }
    @page { size: A4 landscape; margin: 10mm; }
}

/* ================= आज का बोर्ड and the TV screen (B4) ================= */
.sk-board { display: grid; gap: var(--sp-3); }
.sk-board-date { font-size: var(--fs-section); font-weight: 700; display: flex; align-items: center; gap: var(--sp-2); }
.sk-board-grid { display: grid; gap: var(--sp-3); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1024px) { .sk-board-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sk-board-cell { display: grid; gap: var(--sp-1); align-content: start; }
.sk-board-label { color: var(--sk-muted); font-size: var(--fs-small); font-weight: 600; }
.sk-board-big { font-size: var(--fs-number); font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.sk-board-yes { border-color: var(--sk-ok); background: var(--sk-ok-bg); }
.sk-board-yes .sk-board-big { color: var(--sk-ok); }
.sk-board-no { border-color: var(--sk-due); background: var(--sk-due-bg); }
.sk-board-no .sk-board-big { color: var(--sk-due); }
.sk-board-notice { display: flex; gap: var(--sp-2); align-items: flex-start; font-size: var(--fs-section); font-weight: 600; }
.sk-check-grid { display: grid; gap: var(--sp-2); grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.sk-textarea { min-height: 96px; padding: var(--sp-3) var(--sp-4); line-height: var(--sk-lh-body); resize: vertical; }
/* TV: a big, plain screen for the store's display. */
.sk-tv { background: var(--sk-cream); }
.sk-tv-main { max-width: var(--content-max); margin: 0 auto; padding: var(--sp-5); display: grid; gap: var(--sp-4); }
.sk-tv-head { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-title); flex-wrap: wrap; }
.sk-tv-head .sk-tv-clock { margin-left: auto; font-variant-numeric: tabular-nums; }
.sk-board-tv .sk-board-big { font-size: var(--fs-lot); }
.sk-board-tv .sk-board-date { font-size: var(--fs-title); }
.sk-tv-figures .sk-board-big { font-size: var(--fs-lot); }

/* ================= भंडारण प्रमाण-पत्र (B5): printed on A4 ================= */
.sk-cert { max-width: 210mm; display: grid; gap: var(--sp-4); }
.sk-cert-head { display: grid; gap: var(--sp-1); text-align: center; border-bottom: 2px solid var(--sk-ink); padding-bottom: var(--sp-3); }
.sk-cert-title { font-size: var(--fs-title); font-weight: 800; text-align: center; }
.sk-cert-body { line-height: var(--sk-lh-body); margin: 0; white-space: pre-line; }   /* the wording keeps its lines and numbered points */
.sk-cert .sk-table td, .sk-cert .sk-table th { white-space: nowrap; padding-left: var(--sp-2); padding-right: var(--sp-2); }
.sk-cert-sign { display: flex; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; padding-top: var(--sp-6); }
.sk-cert-sign span { border-top: 1px solid var(--sk-ink); padding-top: var(--sp-2); min-width: 180px; text-align: center; }
@media print { .sk-cert { max-width: none; } @page { size: A4 portrait; margin: 15mm; } }

/* संदेश रिकॉर्ड (B6): the message text as the farmer would read it */
.sk-msg-body { margin: 0; padding: var(--sp-3); background: var(--sk-cream); border-radius: var(--r-card); line-height: var(--sk-lh-body); overflow-wrap: anywhere; }

/* ================= किसान पोर्टल (B7): one column, phone first ================= */
.sk-kisan-main { max-width: 560px; }
/* Computer: the portal's page is long, so the dark panel with the store's and the farmer's name stays on the screen while the
   cards scroll (it was centred in the whole page's height and so out of sight — owner's screenshot, 2026-10-08). */
@media (min-width: 1024px) {
    .sk-kisan .sk-auth-band { position: sticky; top: 0; height: 100vh; align-self: start; }
    .sk-kisan .sk-auth-wrap { justify-content: flex-start; }
}
.sk-kisan-lot { padding: var(--sp-2) 0; border-bottom: 1px solid var(--sk-line); gap: var(--sp-3); flex-wrap: wrap; }
.sk-kisan-lot:last-child { border-bottom: 0; }
.sk-kisan-note { text-align: center; }

/* ================= बुकिंग (B8) ================= */
.sk-badge-warn { background: var(--sk-amber-50); color: var(--sk-amber-800); }
.sk-booking-row { padding: var(--sp-2) 0; border-bottom: 1px solid var(--sk-line); gap: var(--sp-3); flex-wrap: wrap; min-height: 48px; align-items: center; }
.sk-booking-row:last-child { border-bottom: 0; }
.sk-stack-tight { display: grid; gap: var(--sp-1); }
.sk-pad { padding: var(--sp-3); border-radius: var(--r-card); margin: 0; }
.sk-booking-days { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: var(--sp-2); }
.sk-booking-days > .sk-card { padding: var(--sp-3); }

/* किसान पोर्टल: one button per store he deals with (store name + owner's firm) */
.sk-store-pick { justify-content: flex-start; text-align: left; height: auto; min-height: 56px; padding-top: var(--sp-2); padding-bottom: var(--sp-2); line-height: 1.3; }

/* ================= स्टोर का नक़्शा (9.9): pillar tiles, colour always with a word ================= */
.sk-map-row { display: grid; gap: var(--sp-2); grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
.sk-map-pillar { display: grid; gap: 2px; justify-items: center; min-height: 72px; padding: var(--sp-2); border-radius: var(--r-input);
                 border: 1px solid var(--sk-line); color: var(--sk-ink); text-decoration: none; background: var(--sk-card); }
.sk-map-pillar strong { font-size: var(--fs-body); }
.sk-map-word { font-weight: 700; }
.sk-fill-empty { background: var(--sk-card); color: var(--sk-muted); }
.sk-fill-low, .sk-fill-used { background: var(--sk-ok-bg); border-color: var(--sk-ok); }
.sk-fill-half { background: var(--sk-half-bg); border-color: var(--sk-amber-line); }
.sk-fill-full { background: var(--sk-due-bg); border-color: var(--sk-due); }
.sk-fill-over { background: var(--sk-due); color: var(--sk-card); border-color: var(--sk-due); }
.sk-rank { display: inline-block; min-width: 2ch; }
.sk-void-row td { text-decoration: line-through; color: var(--sk-muted); }

/* हिसाब-किताब (9.10) */
.sk-table-compact td { padding: var(--sp-1) var(--sp-2); }
.sk-no-js-only { display: none; }
.sk-map-floor > summary { min-height: 48px; display: flex; align-items: center; gap: var(--sp-2); cursor: pointer; }
.sk-map-floor[open] > summary { margin-bottom: var(--sp-2); }

/* किसान पोर्टल PIN (spec 10.2): the four digits big enough to read and copy; "या PIN" line between the two ways in. */
.sk-big-number { font-size: var(--fs-lot); font-weight: 700; letter-spacing: 0.3em; margin: 0; }
.sk-or { margin-top: var(--sp-3); }

/* संदेश सेटिंग: a checkbox line big enough to tap; long hook addresses wrap instead of pushing the page sideways. */
.sk-check { display: flex; align-items: center; gap: var(--sp-2); min-height: 48px; }
.sk-check input { width: 24px; height: 24px; }
#hook-card .sk-code { display: inline-block; max-width: 100%; word-break: break-all; }

/* A kept copy shown with no network (sw.js): a red line at the very top, with the time the page is from. */
.sk-offline-copy { position: sticky; top: 0; z-index: 1000; background: var(--sk-due-bg); color: var(--sk-due); font-weight: 700;
                   padding: var(--sp-2) var(--sp-4); text-align: center; border-bottom: 2px solid var(--sk-due); }

