/*
 * Movora panels: the admin panel, the restaurant panel and the installer.
 * Plain CSS, no build step. Colours live in the variables below; change
 * --brand and --accent to re-colour everything.
 * Fonts: Fredoka (headings) and Onest (text), SIL Open Font License 1.1,
 * bundled in assets/fonts with their licence files.
 */

/* ------------------------------------------------------------------ fonts */

/* Fredoka and Onest, SIL Open Font License 1.1 (assets/fonts/*-OFL.txt).
   Latin and Latin Extended only; other scripts (Arabic, Urdu...) use the
   system font, which the browser picks per character. */

@font-face {
    font-family: "Fredoka";
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url("../fonts/Fredoka-latin.woff2") format("woff2");
    unicode-range:
        U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
        U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Fredoka";
    font-style: normal;
    font-weight: 500 700;
    font-display: swap;
    src: url("../fonts/Fredoka-latin-ext.woff2") format("woff2");
    unicode-range:
        U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
        U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113,
        U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Onest";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/Onest-latin.woff2") format("woff2");
    unicode-range:
        U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308,
        U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Onest";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/Onest-latin-ext.woff2") format("woff2");
    unicode-range:
        U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
        U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113,
        U+2C60-2C7F, U+A720-A7FF;
}

/* ------------------------------------------------------------------ tokens */

:root {
    --brand: #0E6B4F;
    --brand-dark: #0A4F3A;
    --brand-deep: #083D2D;
    --brand-light: #17855F;
    --brand-soft: #E3F4EC;
    --brand-softer: #F0FAF5;
    --accent: #C6F36B;
    --accent-ink: #0A3A2A;
    --accent-soft: #EEFBD3;
    --coral: #FF7A59;
    --coral-ink: #D04A2A;
    --coral-soft: #FFE8E0;
    --amber: #F5B83D;
    --amber-ink: #9A6400;
    --amber-soft: #FFF3D6;
    --sky: #3E8EDE;
    --sky-ink: #1F64AE;
    --sky-soft: #E2EFFC;
    --violet: #7A64E8;
    --violet-soft: #EDE9FD;

    --bg: #F4FBF7;
    --surface: #FFFFFF;
    --surface-2: #F7FBF9;
    --surface-3: #EEF6F2;
    --line: #E1EDE7;
    --line-strong: #CCDFD5;
    --ink: #10291F;
    --ink-2: #35574A;
    --muted: #6B8079;
    --faint: #9AB0A7;

    --side-bg: linear-gradient(180deg, #0B5741 0%, #0A4F3A 46%, #083D2D 100%);
    --side-ink: #E6F5EE;
    --side-muted: #8FC2AE;
    --side-hover: rgba(255, 255, 255, .07);

    --radius-lg: 24px;
    --radius: 18px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --shadow-sm: 0 1px 2px rgba(16, 41, 31, .05);
    --shadow: 0 1px 2px rgba(16, 41, 31, .04), 0 8px 24px rgba(16, 41, 31, .06);
    --shadow-lg: 0 12px 40px rgba(16, 41, 31, .16);
    --ring: 0 0 0 4px rgba(14, 107, 79, .16);

    --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-head: "Fredoka", "Onest", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
    --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

    --side-width: 264px;
    color-scheme: light;
}

:root[data-theme="dark"] {
    --brand: #2FA57B;
    --brand-dark: #23886A;
    --brand-light: #45BE92;
    --brand-soft: #173A2D;
    --brand-softer: #12291F;
    --accent: #C6F36B;
    --accent-soft: #263A16;
    --coral-soft: #3A2019;
    --coral-ink: #FF9C82;
    --amber-soft: #3A2E12;
    --amber-ink: #F5C766;
    --sky-soft: #15283D;
    --sky-ink: #8CC0F2;
    --violet-soft: #241F3D;

    --bg: #0B1A14;
    --surface: #12261D;
    --surface-2: #152C22;
    --surface-3: #1A3429;
    --line: #21392E;
    --line-strong: #2C4A3C;
    --ink: #E7F3ED;
    --ink-2: #B9D2C6;
    --muted: #8BA79A;
    --faint: #5F7B6F;

    --side-bg: linear-gradient(180deg, #0D221A 0%, #0A1C15 100%);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5);
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    :root[data-theme="auto"] {
        --brand: #2FA57B;
        --brand-dark: #23886A;
        --brand-light: #45BE92;
        --brand-soft: #173A2D;
        --brand-softer: #12291F;
        --accent-soft: #263A16;
        --coral-soft: #3A2019;
        --coral-ink: #FF9C82;
        --amber-soft: #3A2E12;
        --amber-ink: #F5C766;
        --sky-soft: #15283D;
        --sky-ink: #8CC0F2;
        --violet-soft: #241F3D;
        --bg: #0B1A14;
        --surface: #12261D;
        --surface-2: #152C22;
        --surface-3: #1A3429;
        --line: #21392E;
        --line-strong: #2C4A3C;
        --ink: #E7F3ED;
        --ink-2: #B9D2C6;
        --muted: #8BA79A;
        --faint: #5F7B6F;
        --side-bg: linear-gradient(180deg, #0D221A 0%, #0A1C15 100%);
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
        --shadow-lg: 0 12px 40px rgba(0, 0, 0, .5);
        color-scheme: dark;
    }
}

/* ------------------------------------------------------------------ base */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-family: var(--font-head);
    font-weight: 600;
    letter-spacing: -.01em;
    line-height: 1.2;
}

p {
    margin: 0 0 10px;
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
}

hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 16px 0;
}

code,
pre {
    font-family: var(--font-mono);
    font-size: 12.5px;
}

code {
    background: var(--surface-3);
    border-radius: 6px;
    padding: 1px 6px;
}

small {
    font-size: 12px;
}

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

.icon {
    width: 20px;
    height: 20px;
    flex: none;
    display: inline-block;
    vertical-align: middle;
}

.icon-sm {
    width: 16px;
    height: 16px;
}

.icon-xs {
    width: 13px;
    height: 13px;
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 12.5px;
}

.strong {
    font-weight: 600;
}

.nowrap {
    white-space: nowrap;
}

.d-block {
    display: block;
}

.grow {
    flex: 1;
}

.center {
    text-align: center;
}

.link {
    color: var(--brand);
    font-weight: 500;
}

.money {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.mono {
    font-family: var(--font-mono);
}

/* ------------------------------------------------------------------ layout */

.admin {
    display: grid;
    grid-template-columns: var(--side-width) minmax(0, 1fr);
    min-height: 100vh;
}

.side {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--side-bg);
    color: var(--side-ink);
    padding: 18px 14px 12px;
    overflow: hidden;
    z-index: 30;
}

.side::after {
    /* a soft lime glow at the bottom of the sidebar */
    content: "";
    position: absolute;
    left: -60px;
    bottom: -120px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(198, 243, 107, .14), transparent 70%);
    pointer-events: none;
}

.side-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 4px 8px 18px;
    color: #fff;
}

.side-brand:hover {
    text-decoration: none;
}

.side-brand strong {
    display: block;
    font-family: var(--font-head);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -.01em;
    line-height: 1.1;
}

.side-brand small {
    display: block;
    color: var(--side-muted);
    font-size: 12px;
}

.brand-mark {
    width: 40px;
    height: 40px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 13px;
    overflow: hidden;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.side-nav {
    flex: 1;
    overflow-y: auto;
    margin: 0 -6px;
    padding: 0 6px 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .15) transparent;
}

.side-nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 40px;
    padding: 0 12px;
    margin: 1px 0;
    border-radius: 13px;
    color: var(--side-ink);
    font-weight: 500;
    transition: background .15s, color .15s;
}

.side-nav a:hover {
    background: var(--side-hover);
    text-decoration: none;
}

.side-nav a.is-active {
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
}

.nav-ic {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    opacity: .9;
}

.nav-ic .icon {
    width: 19px;
    height: 19px;
}

.nav-label {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.side-nav .count {
    min-width: 22px;
    height: 20px;
    padding: 0 7px;
    border-radius: 10px;
    background: var(--coral);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
}

.side-nav a.is-active .count {
    background: var(--brand-dark);
}

.side-group {
    margin-top: 14px;
}

.side-group > span {
    display: block;
    padding: 0 12px 6px;
    color: var(--side-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.side-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    padding: 12px 8px 2px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    color: var(--side-muted);
    font-size: 12px;
}

.side-foot a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--side-muted);
}

.side-foot a:hover {
    color: #fff;
    text-decoration: none;
}

.side-foot span {
    margin-left: auto;
}

.side-scrim {
    display: none;
}

.main {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 68px;
    padding: 0 28px;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
}

.topbar .right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-btn {
    display: none;
}

.search {
    position: relative;
    flex: 1;
    max-width: 460px;
    display: flex;
    align-items: center;
}

.search .icon {
    position: absolute;
    left: 15px;
    color: var(--muted);
    pointer-events: none;
}

.search input {
    width: 100%;
    height: 42px;
    padding: 0 16px 0 42px;
    border: 1px solid var(--line);
    border-radius: 21px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    box-shadow: var(--shadow-sm);
}

.search input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: var(--ring);
}

.me-btn {
    height: 44px;
    padding: 0 12px 0 5px;
    gap: 9px;
}

.me-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.2;
}

.me-text strong {
    font-size: 13px;
}

.me-text small {
    color: var(--muted);
    font-size: 11.5px;
}

.avatar {
    width: 34px;
    height: 34px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 700;
    font-size: 12.5px;
    overflow: hidden;
}

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

.avatar.lg {
    width: 64px;
    height: 64px;
    font-size: 20px;
}

.content {
    flex: 1;
    width: 100%;
    max-width: 1440px;
    padding: 8px 28px 48px;
}

.demo-note {
    position: relative;
    z-index: 40;
    padding: 8px 16px;
    background: var(--accent);
    color: var(--accent-ink);
    font-weight: 600;
    font-size: 13px;
    text-align: center;
}

/* ------------------------------------------------------------------ page head */

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px 20px;
    margin: 10px 0 22px;
}

.page-head h1 {
    font-size: 30px;
}

.page-head p {
    margin: 6px 0 0;
    color: var(--muted);
    max-width: 720px;
}

.page-head .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.crumb,
.crumbs a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.crumb:hover,
.crumbs a:hover {
    color: var(--brand);
    text-decoration: none;
}

.crumbs {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 6px;
    color: var(--brand);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* ------------------------------------------------------------------ cards and grids */

.card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px 0;
}

.card-head h2,
.card-head h3 {
    font-size: 18px;
}

.card-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.card-head .actions,
.card-head .sub {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.card-body {
    padding: 18px 22px 22px;
}

.card-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 14px 22px;
    border-top: 1px solid var(--line);
}

.card.is-flat {
    box-shadow: none;
}

.card.is-brand {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    border-color: transparent;
    color: #fff;
}

.card.is-lime {
    background: linear-gradient(120deg, #D6F98A, var(--accent));
    border-color: transparent;
    color: var(--accent-ink);
}

.grid {
    display: grid;
    gap: 20px;
}

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

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-main {
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
}

.stack > * + * {
    margin-top: 20px;
}

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

.kpi {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    color: var(--ink);
    overflow: hidden;
}

a.kpi:hover {
    text-decoration: none;
    border-color: var(--line-strong);
}

.kpi .ic {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 10px;
    border-radius: 14px;
    background: var(--tile-soft, var(--brand-soft));
    color: var(--tile, var(--brand));
}

.kpi .ic .icon {
    width: 21px;
    height: 21px;
}

.kpi .val {
    font-family: var(--font-head);
    font-size: 28px;
    font-weight: 600;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

.kpi .name {
    color: var(--muted);
    font-size: 13px;
}

.kpi .sub {
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--muted);
}

.kpi .up {
    color: var(--brand);
    font-weight: 600;
}

.kpi .down {
    color: var(--coral-ink);
    font-weight: 600;
}

.tone-green {
    --tile: #0E6B4F;
    --tile-soft: var(--brand-soft);
}

.tone-lime {
    --tile: #4F7A0E;
    --tile-soft: var(--accent-soft);
}

.tone-coral {
    --tile: var(--coral-ink);
    --tile-soft: var(--coral-soft);
}

.tone-amber {
    --tile: var(--amber-ink);
    --tile-soft: var(--amber-soft);
}

.tone-sky {
    --tile: var(--sky-ink);
    --tile-soft: var(--sky-soft);
}

.tone-violet {
    --tile: var(--violet);
    --tile-soft: var(--violet-soft);
}

.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--ink);
}

.tile:hover {
    border-color: var(--brand);
    text-decoration: none;
}

.hero {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px;
}

.hero h2 {
    font-size: 22px;
}

/* ------------------------------------------------------------------ buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 40px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 20px;
    background: var(--surface-3);
    color: var(--ink);
    font: inherit;
    font-weight: 600;
    font-size: 13.5px;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
}

.btn:hover {
    text-decoration: none;
    background: var(--line);
}

.btn:active {
    transform: translateY(1px);
}

.btn:disabled,
.btn.is-busy {
    opacity: .6;
    pointer-events: none;
}

.btn-primary {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 6px 14px rgba(14, 107, 79, .22);
}

.btn-primary:hover {
    background: var(--brand-dark);
}

.btn-lime {
    background: var(--accent);
    color: var(--accent-ink);
}

.btn-lime:hover {
    background: #B7E95A;
}

.btn-glass {
    background: var(--surface);
    border-color: var(--line);
    box-shadow: var(--shadow-sm);
}

.btn-glass:hover {
    background: var(--surface-2);
    border-color: var(--line-strong);
}

.btn-ghost {
    background: transparent;
    color: var(--ink-2);
}

.btn-ghost:hover {
    background: var(--surface-3);
}

.btn-danger {
    background: var(--coral);
    color: #fff;
}

.btn-danger:hover {
    background: var(--coral-ink);
}

.btn-danger-ghost {
    color: var(--coral-ink);
}

.btn-danger-ghost:hover {
    background: var(--coral-soft);
}

.btn-sm {
    height: 32px;
    padding: 0 12px;
    border-radius: 16px;
    font-size: 12.5px;
    gap: 5px;
}

.btn-lg {
    height: 48px;
    padding: 0 22px;
    border-radius: 24px;
    font-size: 15px;
}

.btn-icon {
    width: 40px;
    padding: 0;
}

.btn-sm.btn-icon {
    width: 32px;
}

.btn-block {
    width: 100%;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.btn .theme-moon {
    display: none;
}

:root[data-theme="dark"] .btn .theme-sun {
    display: none;
}

:root[data-theme="dark"] .btn .theme-moon {
    display: inline-block;
}

/* ------------------------------------------------------------------ forms */

.form-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 4px 18px;
}

.form-grid > * {
    grid-column: span 12;
}

.form-grid > .f-half {
    grid-column: span 6;
}

.form-grid > .f-third {
    grid-column: span 4;
}

.form-grid > .f-quarter {
    grid-column: span 3;
}

.form-grid > .f-full {
    grid-column: span 12;
}

.form-section {
    grid-column: span 12;
    margin: 14px 0 6px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
}

.form-section:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.form-section h3 {
    font-size: 16px;
}

.form-section p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.form-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.form-row > * {
    flex: 1 1 200px;
}

.field {
    margin-bottom: 14px;
}

.field > label,
.field-label {
    display: block;
    margin-bottom: 6px;
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 600;
}

.field > label.switch,
.field > label.check {
    display: inline-flex;
    margin-bottom: 0;
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
}

.field .req {
    color: var(--coral-ink);
}

.input,
.select,
.textarea {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    transition: border-color .15s, box-shadow .15s;
}

.textarea {
    height: auto;
    min-height: 96px;
    padding: 11px 14px;
    resize: vertical;
    line-height: 1.5;
}

.select {
    padding-right: 36px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B8079' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

.input:focus,
.select:focus,
.textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: var(--ring);
}

.input::placeholder,
.textarea::placeholder {
    color: var(--faint);
}

.input:disabled,
.select:disabled,
.textarea:disabled {
    background: var(--surface-3);
    color: var(--muted);
}

.is-invalid {
    border-color: var(--coral) !important;
}

.error,
.error-text {
    margin-top: 6px;
    color: var(--coral-ink);
    font-size: 12.5px;
    font-weight: 500;
}

.help {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12.5px;
}

.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group .addon {
    display: flex;
    align-items: center;
    padding: 0 13px;
    border: 1px solid var(--line-strong);
    border-left: 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: var(--surface-3);
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap;
}

.check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--ink);
    font-weight: 500;
    cursor: pointer;
}

.check input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--brand);
}

.switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
}

.switch input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.switch .track {
    position: relative;
    width: 44px;
    height: 26px;
    flex: none;
    border-radius: 13px;
    background: var(--line-strong);
    transition: background .2s;
}

.switch .track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    transition: transform .2s;
}

.switch input:checked + .track {
    background: var(--brand);
}

.switch input:checked + .track::after {
    transform: translateX(18px);
}

.switch input:focus-visible + .track {
    box-shadow: var(--ring);
}

.switch-help {
    margin: 4px 0 0 56px;
    color: var(--muted);
    font-size: 12.5px;
}

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

.check-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    cursor: pointer;
}

.check-card:has(input:checked) {
    border-color: var(--brand);
    background: var(--brand-softer);
}

.check-card input {
    accent-color: var(--brand);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip-check {
    position: relative;
}

.chip-check input {
    position: absolute;
    opacity: 0;
}

.chip-check span,
.chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 32px;
    padding: 0 13px;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    background: var(--surface);
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.chip-check input:checked + span {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.chip-check input:focus-visible + span {
    box-shadow: var(--ring);
}

.image-field {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-start;
}

.image-field > div {
    min-width: 0;
    max-width: 100%;
}

.image-field input[type="file"] {
    max-width: 100%;
}

.image-field .preview {
    width: 92px;
    height: 92px;
    flex: none;
    display: grid;
    place-items: center;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--faint);
    overflow: hidden;
}

.image-field.wide .preview {
    width: 184px;
}

.image-field .preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-field input[type="file"],
.file-row input[type="file"] {
    font: inherit;
    font-size: 13px;
    color: var(--muted);
}

.inline-upload,
.file-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.icon-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
    gap: 8px;
}

.icon-picker label {
    display: grid;
    place-items: center;
    height: 64px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    cursor: pointer;
}

.icon-picker input {
    position: absolute;
    opacity: 0;
}

.icon-picker label:has(input:checked) {
    border-color: var(--brand);
    box-shadow: var(--ring);
}

.icon-picker img {
    width: 40px;
    height: 40px;
}

.repeat-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.repeat-head,
.repeat-row {
    display: grid;
    grid-template-columns: var(--cols, 1fr 1fr auto);
    gap: 8px;
    align-items: center;
}

.repeat-head {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.sticky-save {
    position: sticky;
    bottom: 0;
    z-index: 5;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.form-card .card-body {
    padding-top: 20px;
}

/* ------------------------------------------------------------------ tables */

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    padding: 12px 16px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .03em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.table th:first-child {
    padding-left: 22px;
}

.table thead tr:first-child th:first-child {
    border-top-left-radius: var(--radius-lg);
}

.table thead tr:first-child th:last-child {
    border-top-right-radius: var(--radius-lg);
}

.card > .filters + .table-wrap .table th,
.card > .card-head + .table-wrap .table th {
    border-radius: 0 !important;
}

.table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.table td:first-child {
    padding-left: 22px;
}

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

.table tbody tr:hover td {
    background: var(--surface-2);
}

.table .actions {
    width: 1%;
    text-align: right;
    white-space: nowrap;
}

.table .actions form {
    display: inline;
}

.table .num,
.table .money {
    text-align: right;
}

.table.compact td,
.table.compact th {
    padding-top: 9px;
    padding-bottom: 9px;
}

.cell-flex {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.cell-flex strong,
.cell-flex a {
    display: block;
    font-weight: 600;
    color: var(--ink);
}

.cell-flex small {
    display: block;
    color: var(--muted);
}

.thumb {
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 12px;
    background: var(--surface-3);
    object-fit: cover;
    overflow: hidden;
}

.thumb.round {
    border-radius: 50%;
}

.empty-row {
    padding: 0 !important;
}

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 46px 20px;
    color: var(--muted);
    text-align: center;
}

.empty strong {
    color: var(--ink);
    font-family: var(--font-head);
    font-size: 17px;
    font-weight: 600;
}

.empty .empty-art {
    width: 84px;
    height: 84px;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--line);
}

.filters .select {
    width: auto;
    min-width: 150px;
    height: 38px;
}

.filters .input {
    width: auto;
    height: 38px;
}

.search-in {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 200px;
}

.search-in .icon {
    position: absolute;
    left: 13px;
    color: var(--muted);
}

.search-in input {
    width: 100%;
    height: 38px;
    padding: 0 14px 0 38px;
    border: 1px solid var(--line-strong);
    border-radius: 19px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
}

.search-in input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: var(--ring);
}

/* ------------------------------------------------------------------ badges, alerts */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 24px;
    padding: 0 10px;
    border-radius: 12px;
    background: var(--surface-3);
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-green {
    background: var(--brand-soft);
    color: var(--brand);
}

.badge-lime {
    background: var(--accent-soft);
    color: #4F7A0E;
}

.badge-red,
.badge-coral {
    background: var(--coral-soft);
    color: var(--coral-ink);
}

.badge-gold,
.badge-amber {
    background: var(--amber-soft);
    color: var(--amber-ink);
}

.badge-blue {
    background: var(--sky-soft);
    color: var(--sky-ink);
}

.badge-violet {
    background: var(--violet-soft);
    color: var(--violet);
}

.badge-dark {
    background: var(--ink);
    color: var(--surface);
}

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    flex: none;
    border-radius: 50%;
    background: var(--faint);
}

.dot.green {
    background: #2FA57B;
}

.dot.red {
    background: var(--coral);
}

.dot.amber {
    background: var(--amber);
}

.dot.live {
    background: #2FA57B;
    box-shadow: 0 0 0 0 rgba(47, 165, 123, .5);
    animation: live 1.8s infinite;
}

@keyframes live {
    70% {
        box-shadow: 0 0 0 8px rgba(47, 165, 123, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(47, 165, 123, 0);
    }
}

/* Order and ride statuses (App\Models\Order::STATUSES and Ride::STATUSES). */
.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 26px;
    padding: 0 11px;
    border-radius: 13px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    background: var(--surface-3);
    color: var(--ink-2);
}

.status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.status-placed,
.status-searching,
.status-scheduled {
    background: var(--amber-soft);
    color: var(--amber-ink);
}

.status-accepted,
.status-arrived,
.status-ready {
    background: var(--sky-soft);
    color: var(--sky-ink);
}

.status-picked_up,
.status-started {
    background: var(--violet-soft);
    color: var(--violet);
}

.status-delivered,
.status-completed,
.status-paid,
.status-approved {
    background: var(--brand-soft);
    color: var(--brand);
}

.status-cancelled,
.status-rejected,
.status-no_driver,
.status-failed,
.status-suspended {
    background: var(--coral-soft);
    color: var(--coral-ink);
}

.status-pending_payment,
.status-pending {
    background: var(--surface-3);
    color: var(--muted);
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 16px;
    padding: 13px 16px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    background: var(--surface-3);
    color: var(--ink);
    font-size: 13.5px;
}

.alert > .icon {
    margin-top: 1px;
}

.alert > div {
    flex: 1;
    min-width: 0;
}

.alert strong {
    font-weight: 600;
}

.alert-success {
    background: var(--brand-soft);
    border-color: color-mix(in srgb, var(--brand) 20%, transparent);
}

.alert-success > .icon {
    color: var(--brand);
}

.alert-error {
    background: var(--coral-soft);
    border-color: color-mix(in srgb, var(--coral) 30%, transparent);
}

.alert-error > .icon {
    color: var(--coral-ink);
}

.alert-info {
    background: var(--sky-soft);
    border-color: color-mix(in srgb, var(--sky) 25%, transparent);
}

.alert-info > .icon {
    color: var(--sky-ink);
}

.alert-warn {
    background: var(--amber-soft);
    border-color: color-mix(in srgb, var(--amber) 35%, transparent);
}

.alert-warn > .icon {
    color: var(--amber-ink);
}

/* ------------------------------------------------------------------ lists, text */

.list-plain {
    margin: 0;
    padding: 0;
    list-style: none;
}

.list-plain > li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.list-plain > li:last-child {
    border-bottom: 0;
}

.rows > * {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 22px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
}

.rows > *:last-child {
    border-bottom: 0;
}

a.row:hover,
.rows > a:hover {
    background: var(--surface-2);
    text-decoration: none;
}

.row-check {
    accent-color: var(--brand);
}

.kv,
.dl {
    display: grid;
    grid-template-columns: minmax(120px, max-content) 1fr;
    gap: 9px 18px;
    margin: 0;
}

.kv dt,
.dl dt {
    color: var(--muted);
}

.kv dd,
.dl dd {
    margin: 0;
    font-weight: 500;
    min-width: 0;
    overflow-wrap: anywhere;
}

.sum {
    width: 100%;
    border-collapse: collapse;
}

.sum td {
    padding: 6px 0;
}

.sum td:last-child {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.sum tr.total td {
    padding-top: 12px;
    border-top: 1px solid var(--line);
    font-weight: 700;
    font-size: 15px;
}

.sum tr.minus td:last-child {
    color: var(--brand);
}

.prose {
    max-width: 760px;
    line-height: 1.7;
}

.prose h1,
.prose h2,
.prose h3 {
    margin: 1.2em 0 .4em;
}

.prose ul,
.prose ol {
    padding-left: 1.3em;
}

.code-box {
    position: relative;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    font-family: var(--font-mono);
    font-size: 12.5px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.copy-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.copy-row .input {
    font-family: var(--font-mono);
    font-size: 12.5px;
}

.progress {
    height: 8px;
    border-radius: 4px;
    background: var(--surface-3);
    overflow: hidden;
}

.progress > span {
    display: block;
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--brand), var(--brand-light));
}

.timeline {
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline li {
    position: relative;
    padding: 0 0 16px 26px;
}

.timeline li::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 18px;
    bottom: 0;
    width: 2px;
    background: var(--line);
}

.timeline li:last-child::before {
    display: none;
}

.timeline li::after {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid var(--brand);
    background: var(--surface);
}

.timeline li.is-off::after {
    border-color: var(--line-strong);
}

.timeline li.is-bad::after {
    border-color: var(--coral);
}

.timeline strong {
    display: block;
    font-weight: 600;
}

.timeline small {
    color: var(--muted);
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    color: var(--muted);
    font-size: 12.5px;
}

.legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend i {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    background: var(--brand);
}

.legend i.b {
    background: var(--coral);
}

.bars-list > div {
    display: grid;
    grid-template-columns: minmax(90px, 160px) 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 6px 0;
}

.bars-list .bar {
    height: 10px;
    border-radius: 5px;
    background: var(--surface-3);
    overflow: hidden;
}

.bars-list .bar > span {
    display: block;
    height: 100%;
    border-radius: 5px;
    background: var(--brand);
}

.chart {
    display: block;
    width: 100%;
    overflow: visible;
}

.chart text {
    fill: var(--muted);
    font-size: 11px;
    font-family: var(--font);
}

.chart .grid-line {
    stroke: var(--line);
    stroke-dasharray: 3 4;
}

.chart .area-a {
    fill: color-mix(in srgb, var(--brand) 12%, transparent);
}

.chart .line-a {
    fill: none;
    stroke: var(--brand);
    stroke-width: 2.5;
    stroke-linejoin: round;
}

.chart .line-b {
    fill: none;
    stroke: var(--coral);
    stroke-width: 2;
    stroke-dasharray: 5 4;
}

/* ------------------------------------------------------------------ tabs */

.tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding: 5px;
    border-radius: 22px;
    background: var(--surface-3);
    width: fit-content;
    max-width: 100%;
}

.tabs a,
.tabs button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 15px;
    border: 0;
    border-radius: 17px;
    background: transparent;
    color: var(--ink-2);
    font: inherit;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
}

.tabs a:hover {
    text-decoration: none;
    color: var(--ink);
}

.tabs .is-active {
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}

.tabs .count {
    min-width: 20px;
    height: 18px;
    padding: 0 6px;
    border-radius: 9px;
    background: var(--coral);
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
}

.seg {
    display: inline-flex;
    padding: 4px;
    border-radius: 20px;
    background: var(--surface-3);
}

.seg label {
    position: relative;
}

.seg input {
    position: absolute;
    opacity: 0;
}

.seg span {
    display: block;
    height: 32px;
    padding: 0 14px;
    border-radius: 16px;
    color: var(--ink-2);
    font-weight: 600;
    font-size: 13px;
    line-height: 32px;
    cursor: pointer;
}

.seg input:checked + span {
    background: var(--brand);
    color: #fff;
}

.lang-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 14px 22px;
    border-bottom: 1px solid var(--line);
}

.lang-tabs-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.lang-tab {
    position: relative;
    height: 32px;
    padding: 0 13px;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    background: var(--surface);
    color: var(--ink-2);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.lang-tab small {
    margin-left: 5px;
    color: var(--muted);
    font-weight: 500;
}

.lang-tab.is-active {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.lang-tab.is-active small {
    color: rgba(255, 255, 255, .75);
}

.lang-tab .missing {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--coral);
    border: 2px solid var(--surface);
}

.tr-pane[hidden] {
    display: none;
}

.tr-badge {
    margin-left: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

/* settings */

.settings {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.settings-nav {
    position: sticky;
    top: 84px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.settings-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 12px;
    border-radius: 13px;
    color: var(--ink-2);
    font-weight: 500;
}

.settings-nav a:hover {
    background: var(--surface-2);
    text-decoration: none;
}

.settings-nav a.is-active {
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 600;
}

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

/* ------------------------------------------------------------------ editors */

.md {
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    overflow: hidden;
}

.md-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 6px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
}

.md-bar button,
.md-tab {
    height: 30px;
    min-width: 30px;
    padding: 0 9px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink-2);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.md-bar button:hover,
.md-tab:hover {
    background: var(--surface-3);
}

.md-tab.is-active {
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.md-text {
    display: block;
    width: 100%;
    min-height: 220px;
    padding: 14px;
    border: 0;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    line-height: 1.65;
    outline: none;
    resize: vertical;
}

.md-preview {
    min-height: 220px;
    padding: 14px;
}

/* app texts editor (Languages > texts) */

.texts-list {
    display: flex;
    flex-direction: column;
}

.text-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    padding: 12px 22px;
    border-bottom: 1px solid var(--line);
}

.text-row.is-edited {
    background: var(--accent-soft);
}

.text-src {
    color: var(--muted);
    font-size: 13px;
}

.text-src code {
    display: block;
    margin-bottom: 4px;
    background: none;
    padding: 0;
    color: var(--faint);
    font-size: 11.5px;
}

.text-val .textarea {
    min-height: 42px;
}

.edited-note {
    color: #4F7A0E;
    font-size: 12px;
    font-weight: 600;
}

/* phone preview (push composer) */

.phone-preview {
    position: sticky;
    top: 84px;
}

.phone {
    width: 280px;
    margin: 0 auto;
    padding: 12px;
    border-radius: 40px;
    background: #10291F;
    box-shadow: var(--shadow-lg);
}

.phone-top {
    padding: 34px 14px 220px;
    border-radius: 30px;
    background: linear-gradient(180deg, #17855F, #0A4F3A);
}

.notif {
    padding: 11px 13px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .92);
    color: #10291F;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .2);
}

.notif-head {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 4px;
    color: #6B8079;
    font-size: 11px;
}

.notif-head img {
    width: 16px;
    height: 16px;
    border-radius: 5px;
}

.notif strong {
    display: block;
    font-size: 13px;
}

.notif p {
    margin: 2px 0 0;
    font-size: 12.5px;
}

/* setup checklist and steps */

.setup-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setup-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--ink);
}

.setup-item:hover {
    text-decoration: none;
    border-color: var(--line-strong);
}

.setup-item .tick {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: none;
    border-radius: 50%;
    border: 2px solid var(--line-strong);
    color: transparent;
}

.setup-item.is-done .tick {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.setup-item.is-done {
    opacity: .7;
}

.steps-list {
    counter-reset: step;
    margin: 0;
    padding: 0;
    list-style: none;
}

.steps-list li {
    position: relative;
    padding: 0 0 14px 40px;
    counter-increment: step;
}

.steps-list li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: -1px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 700;
    font-size: 12.5px;
    line-height: 26px;
    text-align: center;
}

.steps {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
}

.steps span {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--line);
}

.steps span.on {
    background: linear-gradient(90deg, var(--brand), var(--brand-light));
}

/* ------------------------------------------------------------------ maps */

.map-box {
    position: relative;
    width: 100%;
    height: 440px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface-3);
    z-index: 0;
}

.map-box.tall {
    height: 620px;
}

.map-box.short {
    height: 280px;
}

.card > .map-box {
    border-radius: 0;
}

.card > .map-box:last-child {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.map-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 12px 22px;
}

.map-pin {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: var(--brand);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .3);
}

.map-pin.is-busy {
    background: var(--violet);
}

.map-pin.is-order {
    background: var(--coral);
    border-radius: 10px;
}

.map-pin.is-ride {
    background: var(--amber);
    color: #10291F;
    border-radius: 10px;
}

.map-pin.is-vertex {
    width: 16px;
    height: 16px;
    border-width: 2px;
    background: var(--accent);
    cursor: grab;
}

.leaflet-container {
    font-family: var(--font) !important;
}

/* ------------------------------------------------------------------ dropdown, modal, toasts */

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 210px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .15s, transform .15s, visibility .15s;
    z-index: 50;
}

.dropdown.is-open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.dropdown-menu a,
.dropdown-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 38px;
    padding: 0 11px;
    border: 0;
    border-radius: 10px;
    background: none;
    color: var(--ink);
    font: inherit;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
}

.dropdown-menu a:hover,
.dropdown-menu button:hover {
    background: var(--surface-2);
    text-decoration: none;
}

.dropdown-menu hr {
    margin: 6px 0;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(8, 30, 22, .45);
    backdrop-filter: blur(3px);
}

.modal.is-open {
    display: flex;
}

.modal-card {
    width: 100%;
    max-width: 440px;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
}

.modal-card h3 {
    font-size: 20px;
    margin-bottom: 8px;
}

.modal-card p {
    color: var(--ink-2);
}

.modal-card .actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
}

.modal-card.wide {
    max-width: 620px;
}

.toasts {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 120;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 360px;
    padding: 12px 16px;
    border-radius: var(--radius);
    background: var(--ink);
    color: var(--surface);
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    animation: toast-in .2s ease-out;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
}

/* ------------------------------------------------------------------ sign-in and installer */

.auth {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 30px 16px;
    background:
        radial-gradient(900px 500px at 100% 0%, rgba(198, 243, 107, .35), transparent 60%),
        radial-gradient(800px 600px at 0% 100%, rgba(14, 107, 79, .18), transparent 60%),
        var(--bg);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
}

.auth-card .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.auth-card .brand strong {
    display: block;
    font-family: var(--font-head);
    font-size: 21px;
    font-weight: 600;
    line-height: 1.1;
}

.auth-card .brand small {
    color: var(--muted);
}

.auth-card h1 {
    font-size: 26px;
    margin-bottom: 6px;
}

.auth-card > p {
    color: var(--muted);
    margin-bottom: 20px;
}

/* ------------------------------------------------------------------ pagination */

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.pagination a,
.pagination span {
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 17px;
    color: var(--ink-2);
    font-weight: 600;
    font-size: 13px;
}

.pagination a:hover {
    background: var(--surface-3);
    text-decoration: none;
}

.pagination .is-active {
    background: var(--brand);
    color: #fff;
}

.pagination .is-disabled {
    color: var(--faint);
}

/* ------------------------------------------------------------------ responsive */

@media (max-width: 1180px) {
    .grid-main {
        grid-template-columns: minmax(0, 1fr);
    }

    .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1023px) {
    .admin {
        grid-template-columns: minmax(0, 1fr);
    }

    .side {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: var(--side-width);
        transform: translateX(-100%);
        transition: transform .25s ease;
        box-shadow: var(--shadow-lg);
    }

    .side-open .side {
        transform: none;
    }

    .side-open .side-scrim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 25;
        background: rgba(8, 30, 22, .4);
    }

    .menu-btn {
        display: inline-flex;
    }

    .topbar {
        padding: 0 16px;
    }

    .content {
        padding: 6px 16px 40px;
    }

    .settings {
        grid-template-columns: minmax(0, 1fr);
    }

    .settings-nav {
        position: static;
        flex-direction: row;
        overflow-x: auto;
    }

    .settings-nav a {
        white-space: nowrap;
    }
}

@media (max-width: 720px) {
    body {
        font-size: 14.5px;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: minmax(0, 1fr);
    }

    .form-grid > .f-half,
    .form-grid > .f-third,
    .form-grid > .f-quarter {
        grid-column: span 12;
    }

    .page-head h1 {
        font-size: 25px;
    }

    .me-text,
    .search {
        display: none;
    }

    .card-head,
    .card-body,
    .card-foot,
    .filters {
        padding-left: 16px;
        padding-right: 16px;
    }

    .table td:first-child,
    .table th:first-child {
        padding-left: 16px;
    }

    .kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .kpi {
        padding: 14px;
    }

    .kpi .val {
        font-size: 23px;
    }

    .text-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .map-box {
        height: 340px;
    }

    .kv,
    .dl {
        grid-template-columns: minmax(0, 1fr);
        gap: 2px;
    }

    .kv dd,
    .dl dd {
        margin-bottom: 8px;
    }
}

.auth-card.is-wide {
    max-width: 580px;
}

.toon {
    display: inline-block;
    width: 48px;
    height: 48px;
    flex: none;
    object-fit: contain;
}

.toon.sm {
    width: 32px;
    height: 32px;
}

.toon.lg,
.toon.empty-art {
    width: 96px;
    height: 96px;
}

/* ---- operations ---- */

/* Order and ride pages: the number with its status next to it. */
.ops-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

/* Plain counters in the list tabs; the coral .count stays for things waiting for staff. */
.tabs .ops-count {
    min-width: 20px;
    height: 18px;
    padding: 0 6px;
    border-radius: 9px;
    background: var(--line);
    color: var(--ink-2);
    font-size: 11px;
    line-height: 18px;
    text-align: center;
}

.ops-sub {
    margin-bottom: 8px;
    color: var(--muted);
    font-family: var(--font);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.ops-note {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
    color: var(--coral-ink);
}

.ops-person {
    margin-bottom: 14px;
}

/* Key/value lists in the 340 px side column: a narrower label column. */
.kv.is-compact {
    grid-template-columns: minmax(84px, max-content) minmax(0, 1fr);
}

/* A button that looks like a link: shows a masked code, copies the share link. */
.ops-reveal {
    padding: 0 4px;
    border: 0;
    background: none;
    color: var(--brand);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.ops-reveal:hover {
    text-decoration: underline;
}

.map-pin.is-mini {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

/* Pickup and drop-off of a ride. */
.ops-route {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 180px;
}

.ops-route > span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ops-route.is-large {
    gap: 10px;
    margin-top: 16px;
}

.ops-route.is-large strong {
    margin-right: 6px;
}

.ops-dot {
    width: 9px;
    height: 9px;
    flex: none;
    border-radius: 50%;
    background: var(--amber);
}

.ops-dot.is-b {
    background: var(--brand);
}

.ops-dot.is-driver {
    background: var(--violet);
}

/* The chat between the customer and the driver. */
.chat {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-msg {
    align-self: flex-start;
    max-width: 78%;
    padding: 9px 13px;
    border-radius: 16px 16px 16px 4px;
    background: var(--surface-3);
}

.chat-msg.from-driver {
    align-self: flex-end;
    border-radius: 16px 16px 4px 16px;
    background: var(--brand-soft);
}

.chat-msg.from-system {
    align-self: center;
    max-width: 100%;
    padding: 2px 0;
    background: none;
    color: var(--muted);
    font-size: 12.5px;
    text-align: center;
}

.chat-msg strong {
    display: block;
    font-size: 12.5px;
}

.chat-msg p {
    margin: 2px 0;
    overflow-wrap: anywhere;
}

.chat-msg small {
    color: var(--muted);
}

/* Open SOS alerts. */
.table tr.is-alert td {
    background: var(--coral-soft);
}

.table tr.is-alert td:first-child {
    box-shadow: inset 4px 0 0 var(--coral);
}

/* Resolving an alert inside a table row. */
.ops-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 260px;
}

.ops-inline .input {
    height: 34px;
}

/* Reviews. */
.stars {
    color: var(--amber);
    font-size: 15px;
    letter-spacing: 1px;
}

.stars .off {
    color: var(--line-strong);
}

.ops-review {
    min-width: 240px;
    max-width: 460px;
}

.ops-review p {
    margin: 0 0 6px;
    overflow-wrap: anywhere;
}

.ops-reply {
    margin-bottom: 6px;
    padding: 6px 10px;
    border-left: 3px solid var(--brand);
    border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
    background: var(--surface-2);
    color: var(--ink-2);
    font-size: 13px;
}

.table tr.is-hidden td:not(.actions) {
    opacity: .6;
}

/* ---- people and money ---- */

/* Money below zero (cash a driver owes, money taken), and money added. */
.pm-neg {
    color: var(--coral-ink);
}

.pm-pos {
    color: var(--brand);
}

.pm-star {
    color: var(--amber);
}

/* A toon picture centred in a .thumb box. */
.pm-thumb {
    display: grid;
    place-items: center;
}

.pm-pre {
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.pm-rank {
    width: 22px;
    flex: none;
    color: var(--muted);
    font-weight: 700;
    text-align: center;
}

.pm-section {
    margin: 26px 0 12px;
    font-size: 19px;
}

.pm-big {
    margin-bottom: 12px;
    font-family: var(--font-head);
    font-size: 32px;
    font-weight: 600;
    line-height: 1.15;
}

.table .pm-total td {
    border-top: 1px solid var(--line-strong);
    background: var(--surface-2);
    font-weight: 700;
}

.filters .pm-presets {
    margin-bottom: 0;
}

/* Small forms that open over the page (reject with a note, mark as paid). */
.pm-pop[popover] {
    margin: auto;
    border: 0;
    color: var(--ink);
    max-width: min(440px, calc(100vw - 32px));
}

form.pm-pop[popover]:popover-open {
    display: block;
}

.pm-pop::backdrop {
    background: rgba(8, 30, 22, .45);
}

/* The restaurant form's picture fields wrap on phones instead of widening the page. */
.pm-form .image-field {
    flex-wrap: wrap;
}

.pm-form .image-field > div {
    min-width: 0;
    max-width: 100%;
}

.pm-form .image-field input[type="file"] {
    max-width: 100%;
}

/* Opening hours editor of the restaurant form. */
.pm-hours {
    margin-top: 16px;
    border-top: 1px solid var(--line);
}

.pm-hours[hidden],
.pm-hours-ranges[hidden] {
    display: none;
}

.pm-hours-day {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.pm-hours-name {
    width: 100px;
    padding-top: 7px;
}

.pm-hours-ranges {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.pm-hours-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pm-hours-list:empty {
    display: none;
}

.pm-hours-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pm-hours-range .input {
    width: 124px;
    height: 38px;
}

.pm-hours-day .error {
    flex-basis: 100%;
    margin-top: 0;
}

.pm-hours-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    padding-top: 14px;
}

.pm-hours-foot .help {
    margin: 0;
}

@media (max-width: 720px) {
    .pm-hours-name {
        width: 100%;
        padding-top: 0;
    }

    .pm-hours-range .input {
        width: 112px;
    }
}

/* ---- restaurant panel ---- */

/* An admin viewing the panel as the restaurant */
.rp-viewas {
    position: relative;
    z-index: 40;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 10px;
    padding: 8px 16px;
    background: var(--ink);
    color: var(--surface);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.rp-viewas form {
    display: inline;
}

.rp-viewas button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent);
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.rp-mark .toon {
    width: 100%;
    height: 100%;
}

.rp-foot-site {
    margin-left: 0;
    margin-right: auto;
}

/* Open, Busy, Closed in the top bar */
.rp-avail {
    display: inline-flex;
    flex: none;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.rp-avail button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 13px;
    border: 0;
    border-radius: 17px;
    background: transparent;
    color: var(--ink-2);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.rp-avail button:hover {
    background: var(--surface-3);
}

.rp-avail button.is-on[value="open"] {
    background: var(--brand);
    color: #fff;
}

.rp-avail button.is-on[value="busy"] {
    background: var(--amber);
    color: #3A2700;
}

.rp-avail button.is-on[value="closed"] {
    background: var(--coral);
    color: #fff;
}

.rp-avail button.is-on .dot {
    background: currentColor;
}

.rp-avail button.is-busy {
    opacity: .7;
}

/* A switch that saves at once (menu items, categories) */
.rp-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 4px 0;
    border: 0;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.rp-toggle .track {
    position: relative;
    width: 44px;
    height: 26px;
    flex: none;
    border-radius: 13px;
    background: var(--line-strong);
    transition: background .2s;
}

.rp-toggle .track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    transition: transform .2s;
}

.rp-toggle[aria-pressed="true"] {
    color: var(--brand);
}

.rp-toggle[aria-pressed="true"] .track {
    background: var(--brand);
}

.rp-toggle[aria-pressed="true"] .track::after {
    transform: translateX(18px);
}

.rp-toggle:focus-visible {
    outline: none;
}

.rp-toggle:focus-visible .track {
    box-shadow: var(--ring);
}

.rp .btn[hidden] {
    display: none;
}

.toast.is-bad {
    background: var(--coral-ink);
    color: #fff;
}

/* Join form */
.rp-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.rp-coords {
    margin-top: 10px;
}

.rp-coords .field {
    margin-bottom: 0;
}

/* Live order board */
.rb-head .actions {
    align-items: center;
}

.rb-live {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.rb-live.is-off {
    color: var(--coral-ink);
}

.rb-live.is-off .dot {
    background: var(--coral);
    box-shadow: none;
    animation: none;
}

.rb-colnav {
    display: none;
}

.rb-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.rb-board[hidden],
.rb-colnav[hidden] {
    display: none;
}

.rb-col {
    min-width: 0;
    padding: 12px;
    border-radius: var(--radius-lg);
    background: var(--surface-3);
}

.rb-col-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 6px 12px;
}

.rb-col-head h2 {
    font-size: 17px;
}

.rb-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    align-items: start;
}

.rb-empty {
    padding: 28px 12px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.rb-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    container-type: inline-size;
}

.rb-card.is-new {
    border-color: color-mix(in srgb, var(--coral) 45%, var(--line));
}

.rb-card.is-ringing {
    border-color: var(--coral);
    animation: rb-ring 1.4s ease-in-out infinite;
}

@keyframes rb-ring {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 122, 89, .5), var(--shadow);
    }

    50% {
        box-shadow: 0 0 0 7px rgba(255, 122, 89, 0), var(--shadow);
    }
}

.rb-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.rb-card-head > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
}

.rb-num {
    color: var(--ink);
    font-family: var(--font-head);
    font-size: 18px;
    font-weight: 600;
}

.rb-time {
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}

.rb-who,
.rb-state,
.rb-driver,
.rb-timer {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13.5px;
}

.rb-who {
    color: var(--ink-2);
}

.rb-items {
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px dashed var(--line-strong);
}

.rb-items li {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--line-strong);
}

.rb-qty {
    flex: none;
    min-width: 30px;
    color: var(--brand);
    font-size: 15px;
    font-weight: 700;
}

.rb-items strong {
    display: block;
    font-size: 14.5px;
    font-weight: 600;
}

.rb-items small {
    display: block;
    color: var(--muted);
    font-size: 12.5px;
}

.rb-items em {
    display: block;
    color: var(--coral-ink);
    font-size: 12.5px;
    font-style: normal;
    font-weight: 600;
}

.rb-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin: 0;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: var(--amber-soft);
    color: var(--amber-ink);
    font-size: 13px;
    font-weight: 600;
}

.rb-pay {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 8px;
}

.rb-pay .badge {
    height: auto;
    min-height: 24px;
    padding: 3px 10px;
    line-height: 1.3;
    white-space: normal;
}

.rb-pay strong {
    margin-left: auto;
    font-family: var(--font-head);
    font-size: 19px;
    font-weight: 600;
}

.rb-timer {
    color: var(--sky-ink);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.rb-timer.is-soon {
    color: var(--amber-ink);
}

.rb-timer.is-late {
    color: var(--coral-ink);
}

.rb-state {
    color: var(--muted);
    font-weight: 600;
}

.rb-state.is-done {
    color: var(--brand);
}

.rb-driver {
    color: var(--ink-2);
}

.rb-driver small {
    display: block;
    color: var(--muted);
}

.rb-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

.rb-actions .btn {
    flex: 1;
    height: 46px;
    border-radius: 23px;
    font-size: 14.5px;
}

.rb-actions .btn-icon {
    flex: none;
    width: 46px;
}

/* Narrow cards (three columns on a tablet): Accept gets its own row above Reject. */
@container (max-width: 270px) {
    .rb-actions.is-three .btn-primary {
        flex-basis: 100%;
        order: -1;
    }
}

/* Board dialogs */
.rb-prep {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0 16px;
}

.rb-prep label {
    position: relative;
}

.rb-prep input {
    position: absolute;
    opacity: 0;
}

.rb-prep span {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 58px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--surface);
    font-family: var(--font-head);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.1;
    cursor: pointer;
}

.rb-prep span small {
    color: var(--muted);
    font-family: var(--font);
    font-size: 11px;
    font-weight: 500;
}

.rb-prep input:checked + span {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
}

.rb-prep input:checked + span small {
    color: rgba(255, 255, 255, .8);
}

.rb-prep input:focus-visible + span {
    box-shadow: var(--ring);
}

.rb-reasons {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0 14px;
}

.rb-code {
    max-width: 220px;
    height: 58px;
    font-family: var(--font-mono);
    font-size: 26px;
    letter-spacing: .4em;
    text-align: center;
    text-indent: .4em;
}

.modal .rb-code {
    display: block;
    margin: 14px auto 0;
}

/* Order page */
.rp-next .card-body > form + details,
.rp-next .card-body > p + details {
    margin-top: 16px;
}

.rp-reject summary {
    list-style: none;
}

.rp-reject summary::-webkit-details-marker {
    display: none;
}

.rp-reject[open] summary {
    margin-bottom: 4px;
}

.rp-reject form {
    max-width: 560px;
}

.rp-code-form .btn-row {
    align-items: stretch;
}

.rp-item-note {
    color: var(--coral-ink);
    font-weight: 600;
}

.rp-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.rp-date .input {
    width: auto;
    height: 38px;
}

/* Menu */
.rp-menu-search {
    max-width: 420px;
}

.rp-menu .cell-flex > div {
    min-width: 0;
}

.rp-menu tr.is-off .cell-flex {
    opacity: .55;
}

.rp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
}

.rp-tags .badge {
    height: 20px;
    padding: 0 8px;
    font-size: 11px;
}

.rp-was {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.rp-no-pic {
    display: grid;
    place-items: center;
    color: var(--faint);
}

.rp-cats > li {
    gap: 6px;
}

.rp-cats > li.is-off strong {
    color: var(--muted);
}

.rp-move {
    display: flex;
}

.rp-cat-menu {
    min-width: 250px;
}

.rp-cat-menu form:first-child {
    display: flex;
    gap: 6px;
    padding: 4px;
}

.rp-cat-menu .input {
    height: 34px;
}

.rp-cat-menu form:first-child .btn {
    width: auto;
    height: 34px;
    padding: 0 12px;
    background: var(--brand);
    color: #fff;
}

.rp-add-cat {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.rp-art label {
    height: 58px;
}

.rp-art img {
    width: 38px;
    height: 38px;
}

.rp-art-none {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

/* Option groups of a menu item */
.rp-groups {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 14px;
}

.rp-group {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.rp-group-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px 96px auto;
    gap: 10px;
    align-items: end;
}

.rp-group-head .field-label {
    margin-bottom: 4px;
    font-size: 12px;
}

.rp-values {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 14px 0 10px;
}

.rp-value {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px auto auto auto;
    gap: 8px 12px;
    align-items: center;
}

.rp-value-head {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.rp-value .check {
    font-size: 13px;
}

.rp-value-error {
    grid-column: 1 / -1;
    margin-top: 0;
}

/* Store settings: opening hours */
.rp-hours {
    margin-top: 6px;
}

.rp-day {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 10px 16px;
    align-items: start;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.rp-day-name .field-label {
    margin-bottom: 4px;
}

.rp-day-name .select {
    height: 38px;
}

.rp-ranges {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-top: 24px;
}

.rp-range {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.rp-range .input {
    width: 128px;
    height: 38px;
}

.rp-day:not(.is-open) .rp-ranges {
    display: none;
}

.rp-day-error {
    grid-column: 2;
    margin-top: 0;
}

/* Sticky save bar of the long forms */
.rp-savebar {
    position: sticky;
    bottom: 12px;
    z-index: 6;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Reviews */
.rp-stars {
    display: inline-flex;
    gap: 1px;
    color: var(--line-strong);
}

.rp-stars .icon {
    width: 17px;
    height: 17px;
}

.rp-stars .icon.is-on {
    color: var(--amber);
}

.rp-review {
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
}

.rp-review-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
}

.rp-review-text {
    margin: 8px 0 12px;
    overflow-wrap: anywhere;
}

.rp-reply-form .textarea {
    min-height: 60px;
    margin-bottom: 8px;
}

.rp-reply {
    margin-top: 10px;
    padding: 10px 12px;
    border-left: 3px solid var(--brand);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: var(--brand-softer);
}

.rp-reply strong {
    display: block;
    font-size: 12px;
}

.rp-rating {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.rp-rating-val {
    font-family: var(--font-head);
    font-size: 42px;
    font-weight: 600;
    line-height: 1;
}

/* Earnings */
.rp-plus {
    color: var(--brand);
    font-weight: 600;
}

.rp-minus {
    color: var(--coral-ink);
    font-weight: 600;
}

.rp-narrow {
    max-width: 760px;
}

@media (max-width: 1023px) {
    .rb-colnav {
        position: sticky;
        top: 68px;
        z-index: 10;
        display: flex;
        gap: 4px;
        margin: -6px 0 14px;
        padding: 5px;
        border-radius: 24px;
        background: var(--surface-3);
    }

    .rb-colnav button {
        display: inline-flex;
        flex: 1;
        align-items: center;
        justify-content: center;
        gap: 6px;
        height: 40px;
        padding: 0 8px;
        border: 0;
        border-radius: 20px;
        background: transparent;
        color: var(--ink-2);
        font: inherit;
        font-size: 13.5px;
        font-weight: 600;
        cursor: pointer;
    }

    .rb-colnav button.is-active {
        background: var(--surface);
        color: var(--ink);
        box-shadow: var(--shadow-sm);
    }

    .rb-n {
        min-width: 22px;
        height: 20px;
        padding: 0 6px;
        border-radius: 10px;
        background: var(--line);
        font-size: 12px;
        line-height: 20px;
        text-align: center;
    }

    .rb-colnav button[data-col="new"] .rb-n {
        background: var(--coral);
        color: #fff;
    }

    .rb-board {
        grid-template-columns: minmax(0, 1fr);
    }

    .rb-col {
        display: none;
        padding: 0;
        background: none;
    }

    .rb-col-head {
        display: none;
    }

    .rb-board[data-current="new"] .rb-col[data-column="new"],
    .rb-board[data-current="preparing"] .rb-col[data-column="preparing"],
    .rb-board[data-current="ready"] .rb-col[data-column="ready"] {
        display: block;
    }
}

@media (max-width: 720px) {
    .topbar {
        gap: 8px;
        padding: 0 12px;
    }

    .rp-avail button {
        gap: 5px;
        height: 32px;
        padding: 0 9px;
        font-size: 12.5px;
    }

    .rp-viewas {
        font-size: 12px;
    }

    .rb-head .actions {
        width: 100%;
    }

    .rb-head .actions .btn {
        flex: 1;
    }

    .rb-tabs {
        width: 100%;
    }

    .rb-tabs button {
        flex: 1;
        justify-content: center;
    }

    .rb-prep span {
        height: 54px;
    }

    .rp-group-head {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    }

    .rp-group-name {
        grid-column: 1 / -1;
    }

    .rp-value {
        grid-template-columns: minmax(0, 1fr) auto auto;
        padding-bottom: 10px;
        border-bottom: 1px dashed var(--line-strong);
    }

    .rp-value-head {
        display: none;
    }

    .rp-value .rp-value-name {
        grid-column: 1 / -1;
    }

    .rp-value .input-group {
        grid-column: 1 / -1;
    }

    .rp-day {
        grid-template-columns: minmax(0, 1fr);
    }

    .rp-range .input {
        width: 108px;
    }

    /* Menu items as stacked rows: the item, then its price and switch. */
    .table.rp-menu thead {
        display: none;
    }

    .table.rp-menu,
    .table.rp-menu tbody {
        display: block;
    }

    .table.rp-menu tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 6px 12px;
        padding: 12px 16px;
        border-bottom: 1px solid var(--line);
    }

    .table.rp-menu tbody tr:last-child {
        border-bottom: 0;
    }

    .table.rp-menu td {
        padding: 0;
        border: 0;
    }

    .table.rp-menu td:first-child {
        grid-column: 1 / -1;
        padding-left: 0;
    }

    .table.rp-menu td.money {
        padding-left: 44px;
        text-align: left;
    }

    .table.rp-menu tbody tr:hover td {
        background: none;
    }

    .table.rp-menu td.actions {
        display: none;
    }

    .table.rp-menu tr[hidden] {
        display: none;
    }

    .rp-ranges {
        padding-top: 0;
    }

    .rp-day-error {
        grid-column: 1;
    }

    .rp-review {
        padding: 16px;
    }

    .rp-savebar .btn-lg {
        flex: 1;
    }
}

@media (max-width: 380px) {
    .rp-avail .dot {
        display: none;
    }

    .rp-avail button {
        padding: 0 8px;
    }
}
