/* Shared Tasta workspace theme. Individual registers own their column layout. */
.tasta-review {
    --ink: #172a40;
    --muted: #4f667a;
    --paper: #f3f6fa;
    --line: #d7e2ec;
    --white: #fff;
    --navy: #14253b;
    --navy-active: #213c56;
    --nav-text: #dce7f4;
    --teal: #116a66;
    --teal-hover: #0b5652;
    --bake: var(--teal);
    --focus: #6844af;
    --control-border: #aabed0;
    --raised: #eef3f8;
    --tint-plum: #e3f1f3;
    --tint-rich: #e9edf8;
    --tint-carrot: #faefdf;
    --tint-exotic: #eaf3e4;
    --tint-special: #f5e9f1;
    --side-width: 228px;
    --workspace-gutter: clamp(16px, 2.2vw, 32px);
    --ui-font: "Segoe UI", system-ui, sans-serif;
    color-scheme: light;
    background: var(--paper);
    color: var(--ink);
    font: 15px/1.5 var(--ui-font);
}

.tasta-review .sidebar {
    width: var(--side-width);
    padding: 20px 14px;
    overflow-y: auto;
    background: var(--navy);
    color: var(--nav-text);
    border: 0;
}

.tasta-review .sidebar .brand {
    padding: 4px 5px;
    gap: 10px;
    color: var(--white);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .02em;
}

.tasta-review .brand-logo {
    width: 47px;
    height: 47px;
    border: 1px solid #fff;
    border-radius: 8px;
    background: var(--white);
}

.tasta-review .brand small {
    margin-top: 1px;
    color: #b7cae0;
    font-size: 11px;
}

.tasta-review .nav-label { margin: 20px 9px 8px; color: #a8c0d8; font-size: 11px; }
.tasta-review .sidebar-note { color: #b7cae0; padding: 20px 9px 0; }
.tasta-review .sidebar-note p { font: 14px/1.5 var(--ui-font); margin: 4px 0; }

.tasta-review #workspace-navigation { gap: 3px; }
.tasta-review #workspace-navigation a {
    min-height: 38px;
    padding: 8px 11px;
    border-radius: 7px;
    color: var(--nav-text);
    font-size: 13px;
}

.tasta-review #workspace-navigation a:hover { background: #24394f; color: var(--white); }
.tasta-review #workspace-navigation :is(a.active, a[aria-current="page"]) {
    background: var(--navy-active);
    box-shadow: inset 3px 0 #59c8b8;
    color: var(--white);
}

.tasta-review .sidebar > .workspace-new-order {
    width: 100%;
    margin: 15px 0 2px;
    justify-content: flex-start;
}

.tasta-review .sidebar .workspace-new-order {
    background: #15736d;
    border-color: #3e9b94;
    color: var(--white);
    box-shadow: none;
}

.tasta-review .sidebar .workspace-new-order:hover { background: #11625c; }
.tasta-review .workspace { margin-inline-start: var(--side-width); min-width: 0; }
.tasta-review.login-screen .workspace { margin-inline-start: 0; }
.tasta-review .workspace > main {
    max-width: 1760px;
    padding: 22px var(--workspace-gutter) 35px;
}

.tasta-review .topbar, .tasta-review .session-bar {
    height: auto;
    min-height: 32px;
    padding: 7px var(--workspace-gutter);
    border-color: var(--line);
    background: var(--white);
}

.tasta-review .topbar { font-size: 12px; }
.tasta-review .session-bar { gap: 8px 14px; color: var(--muted); }
.tasta-review .session-bar strong { color: var(--ink); }
.tasta-review .session-bar .button { min-height: 34px; padding: 5px 12px; }
.tasta-review footer { max-width: 1760px; padding-inline: var(--workspace-gutter); }
.tasta-review :is(h1, h2, h3) { font-family: var(--ui-font); color: var(--ink); letter-spacing: -.018em; }
.tasta-review h1, .tasta-review h2 { font-weight: 700; }
.tasta-review h3 { font-weight: 650; }
.tasta-review .page-heading { margin-bottom: 16px; }
.tasta-review .page-heading h1 { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.2; }
.tasta-review .eyebrow { color: var(--teal); font-size: 11px; letter-spacing: .09em; }
.tasta-review :is(.hint, .subtle) { color: var(--muted); font-size: 13px; }

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

.tasta-review .sidebar :focus-visible { outline-color: #8ce4d5; }
.tasta-review :is(.button, .button.bake) {
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid var(--teal);
    border-radius: 7px;
    background: var(--teal);
    color: var(--white);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.2;
}

.tasta-review :is(.button, .button.bake):hover { background: var(--teal-hover); border-color: var(--teal-hover); }
.tasta-review .button.secondary { background: var(--white); border-color: var(--control-border); color: var(--ink); }
.tasta-review .button.secondary:hover { background: var(--raised); border-color: #809db6; }
.tasta-review .button.danger { background: #a1263f; border-color: #a1263f; color: var(--white); }
.tasta-review .button.danger:hover { background: #881c32; border-color: #881c32; }
.tasta-review :is(button, .button):disabled { cursor: not-allowed; opacity: .65; }
.tasta-review .workspace main :is(.view-link, td a:not(.button, .queue-action)) {
    color: #135965;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.tasta-review .queue-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.tasta-review .queue-actions > .queue-action,
.tasta-review .queue-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 6px 9px;
    border: 1px solid var(--action-border, #bdcddd);
    border-radius: 6px;
    background: var(--action-bg, #edf3fa);
    color: var(--action-ink, #243f5c);
    font: 650 12px/1.2 var(--ui-font);
    text-align: center;
    text-decoration: none;
}

.tasta-review .queue-action:hover { border-color: var(--action-ink, #243f5c); text-decoration: underline; text-underline-offset: 2px; }
.tasta-review .queue-action--edit { --action-bg: #eeeefa; --action-ink: #424084; --action-border: #c3c3e7; }
.tasta-review .queue-action--production { --action-bg: #e3f4ef; --action-ink: #075450; --action-border: #a9d3ca; }
.tasta-review .queue-action--payment { --action-bg: #fcf1dc; --action-ink: #704609; --action-border: #dfc396; }
.tasta-review .queue-action--view { --action-bg: #eaf2fa; --action-ink: #264760; --action-border: #b3c7dd; }

.tasta-review :is(.panel, .list-panel, .metric, .pending-summary, .invoice-sheet) {
    border-color: var(--line);
    border-radius: 10px;
    background: var(--white);
}

.tasta-review :is(.panel, .list-panel) { box-shadow: 0 2px 5px #152a4210; }
.tasta-review .panel h2 { padding-bottom: 9px; color: var(--ink); }
.tasta-review .filters { background: var(--white); border-color: var(--line); }
.tasta-review label { color: #344e66; font-size: 13px; }
.tasta-review :is(input, select, textarea) {
    min-width: 0;
    border-color: var(--control-border);
    border-radius: 6px;
    background: var(--white);
    color: var(--ink);
}

.tasta-review :is(input, textarea)::placeholder { color: #5f7486; }
.tasta-review :is(input[type="checkbox"], input[type="radio"]) {
    display: inline-block;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    min-height: 18px;
    padding: 0;
    accent-color: var(--teal);
}

.tasta-review td { border-color: var(--line); }
.tasta-review th { background: var(--raised); color: #344d64; }
.tasta-review :is(.work-table, .list-panel table:not([class])) { font-variant-numeric: tabular-nums; }
.tasta-review .list-panel table:not([class]) :is(th, td) { padding: 10px 12px; font-size: 13px; }
.tasta-review .work-table tbody tr:nth-child(even) { background: #f7f9fc; }
.tasta-review :is(.work-table, .list-panel table:not([class])) tbody tr:hover { background: #edf5f8; }
.tasta-review .pill { color: #2d4d64; background: #eaf1f8; font-size: 12px; font-weight: 650; border-radius: 5px; }
.tasta-review .pill:is(.status-preparing, .progress) { color: #68430c; background: #faead1; }
.tasta-review .pill:is(.status-ready, .ready) { color: #18544c; background: #dff4ea; }
.tasta-review .pill:is(.status-completed, .done) { color: #33506f; background: #e3ebf7; }
.tasta-review .pill:is(.status-cancelled, .cancelled) { color: #812238; background: #fbe8ed; }
.tasta-review :is(.alphabet a, .catalogue-nav .button, .quantity-link) { border-color: var(--control-border); }
.tasta-review .quantity-link { color: #18565b; background: #edf7f6; }
.tasta-review .quantity-link:hover { background: #d9eeeb; border-color: #82b6ae; }
.tasta-review .notice {
    border-color: #b6d9d3;
    background: #eaf6f4;
    color: #214a4b;
    font-size: 13px;
    line-height: 1.5;
}

.tasta-review .notice.form-error { border-color: #dfb2bd; background: #fbecf0; color: #861b36; }
.tasta-review .notice ul { padding-inline-start: 22px; margin: 5px 0; }
.tasta-review .catalogue-line { border-color: var(--line); background: #fbfcfe; }
.tasta-review .line-headings { background: var(--raised); }
.tasta-review .catalogue-line .line-fields { border-color: var(--line); }
.tasta-review :is(.order-action-bar, #order-totals) { border-color: var(--control-border); }
.tasta-review :is(#customer-results, [data-panel-id="customer-results"]) { list-style: none; max-height: 270px; overflow: auto; margin: 0; padding: 0; }
.tasta-review :is(#customer-results, [data-panel-id="customer-results"]) [role="option"] {
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    background: var(--white);
    color: var(--ink);
    cursor: pointer;
}

.tasta-review :is(#customer-results, [data-panel-id="customer-results"]) :is([role="option"]:hover, [aria-selected="true"]) {
    background: #e4f4ef;
    outline: 2px solid var(--teal);
    outline-offset: -2px;
}

.tasta-review.login-screen {
    background: linear-gradient(165deg, var(--navy) 0 32%, #eaf1f7 32% 74%, var(--paper) 74%);
}

.tasta-review.login-screen .workspace > main { max-width: 560px; padding-top: clamp(24px, 7vh, 70px); }
.tasta-review.login-screen .simple-login {
    width: 100%;
    margin: 0 auto 26px;
    padding: clamp(18px, 5vw, 30px);
    border: 1px solid var(--line);
    border-top: 4px solid #238579;
    border-radius: 13px;
    background: var(--white);
    box-shadow: 0 11px 34px #11273e24;
}

.tasta-review.login-screen .login-brands { margin-bottom: 16px; }
.tasta-review.login-screen .login-brands img { width: 80px; }
.tasta-review.login-screen .demo-credential-panel { padding: 0; border: 0; }
.tasta-review.login-screen .demo-credential-panel h1 { font-size: 27px; }
.tasta-review.login-screen .demo-credential-panel p { margin: 0 0 12px; }
.tasta-review.login-screen .demo-credential-panel form .button { margin-top: 10px; }

/* Native dialog supplies the modal focus boundary and keyboard escape behavior. */
.tasta-review:has(.order-panel[open]) { overflow: hidden; }
.tasta-review .order-panel {
    position: fixed;
    inset: 0 0 0 auto;
    margin: 0 0 0 auto;
    width: min(900px, calc(100% - 32px));
    height: 100%;
    height: 100dvh;
    max-width: none;
    max-height: none;
    padding: 0;
    border: 0;
    border-inline-start: 1px solid var(--line);
    overflow: hidden;
    background: var(--paper);
    color: var(--ink);
    box-shadow: -8px 0 30px #0a1b3652;
}

.tasta-review .order-panel[open] { display: flex; flex-direction: column; }
.tasta-review .order-panel::backdrop { background: #11243b91; }
.tasta-review .order-panel-header {
    display: flex;
    flex: 0 0 auto;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px clamp(12px, 2vw, 22px);
    border-bottom: 1px solid var(--line);
    background: var(--white);
}

.tasta-review .order-panel-title { margin: 0; font-size: clamp(20px, 2.4vw, 26px); }
.tasta-review .order-panel-header .order-panel-close {
    display: grid;
    place-content: center;
    flex: 0 0 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 4px;
    border: 1px solid var(--control-border);
    border-radius: 7px;
    background: var(--white);
    color: var(--ink);
    font-size: 17px;
}

.tasta-review .order-panel-close:hover { background: var(--raised); }
.tasta-review .order-panel-body {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    overflow: auto;
    overscroll-behavior: contain;
    scroll-padding-top: var(--order-action-height, 75px);
    padding: 14px clamp(12px, 2vw, 22px) 24px;
    container: order-panel / inline-size;
}

.tasta-review .order-panel-loading { padding: 24px 8px; color: var(--muted); }
.tasta-review #order-panel .page-heading:has(+ [data-panel-id="order-form"]),
.tasta-review #order-panel .page-heading:has(+ .task-order-label) > h1 { display: none; }
.tasta-review #order-panel .page-heading > div { min-width: 0; overflow-wrap: anywhere; }
.tasta-review #order-panel .order-action-bar {
    top: 0;
    padding: 8px;
    margin-bottom: 10px;
}

.tasta-review #order-panel .panel { padding: 12px; margin-bottom: 12px; }
.tasta-review #order-panel .order-customer-panel label, .tasta-review #order-panel .line-cell { margin-bottom: 0; }
.tasta-review #order-panel .order-schedule { margin-top: 8px; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tasta-review #order-panel .customer-finder { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 4px 10px; }
.tasta-review #order-panel .customer-finder :is([data-panel-id="customer-results"], [data-panel-id="customer-search-status"]) { grid-column: 1 / -1; }
.tasta-review #order-panel .customer-finder [data-panel-id="clear-customer"] { grid-column: 2; grid-row: 1; margin: 0; }
.tasta-review #order-panel :is([data-panel-id="customer-results"], [data-panel-id="customer-search-status"], [data-panel-id="customer-selection"], [data-panel-id="customer-save-message"]):empty { display: none; }
.tasta-review #order-panel .catalogue-line { padding: 4px 8px; margin: 4px 0; }
.tasta-review #order-panel .catalogue-line details[data-line-disclosure] { padding: 0; border-bottom: 0; }
.tasta-review #order-panel .line-headings { display: none; }
.tasta-review #order-panel .line-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tasta-review #order-panel .line-cell { min-width: 0; }
.tasta-review #order-panel .line-cell > span { position: static; display: block; width: auto; height: auto; clip-path: none; }
.tasta-review #order-panel .line-net output { font-weight: 700; font-variant-numeric: tabular-nums; }
.tasta-review #order-panel .order-action-bar .button { min-height: 40px; margin: 0; }
.tasta-review #order-panel .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.tasta-review .production-task-form fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin: 10px 0; }
.tasta-review .production-task-form legend { padding-inline: 4px; font-weight: 650; }
.tasta-review .production-stage-control { max-width: 18rem; }
.tasta-review .production-stage-control :is(input, select) { max-width: 100%; }

@container order-panel (min-width: 650px) {
    .tasta-review #order-panel .line-headings,
    .tasta-review #order-panel .line-fields {
        display: grid;
        grid-template-columns: minmax(0, 1.35fr) minmax(0, .95fr) minmax(60px, .6fr) minmax(70px, .7fr) minmax(75px, .75fr) minmax(70px, .7fr);
        align-items: center;
        gap: 8px;
    }

    .tasta-review #order-panel .line-headings { padding: 7px 8px; font-size: 12px; font-weight: 650; }
    .tasta-review #order-panel .line-cell > span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }
}

@container order-panel (max-width: 470px) {
    .tasta-review #order-panel .customer-finder { grid-template-columns: minmax(0, 1fr); }
    .tasta-review #order-panel .customer-finder [data-panel-id="clear-customer"] { grid-column: auto; grid-row: auto; justify-self: start; }
    .tasta-review #order-panel .order-schedule { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tasta-review #order-panel .order-schedule > label:has(.date-entry) { grid-column: 1 / -1; }
    .tasta-review #order-panel .line-fields > .line-cell:nth-of-type(-n+3),
    .tasta-review #order-panel .line-net { grid-column: 1 / -1; }
    .tasta-review #order-panel .line-net { display: flex; justify-content: space-between; }
    .tasta-review #order-panel .order-action-bar output { flex: 1 1 95px; }
    .tasta-review #order-panel .product-table thead { display: none; }
    .tasta-review #order-panel .product-table tbody { display: block; }
    .tasta-review #order-panel .product-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tasta-review #order-panel .product-table td {
        display: block;
        grid-column: auto;
        width: auto;
        text-align: left;
        padding: 4px 7px;
        border-bottom: 0;
        font-size: 13px;
    }
    .tasta-review #order-panel .product-table td:first-child { grid-column: 1 / -1; font-weight: 650; }
    .tasta-review #order-panel .product-table td[data-label]::before { content: attr(data-label) !important; display: block !important; }
    .tasta-review #order-panel .product-table td:first-child::before { display: none !important; }
}

@media screen and (max-width: 1050px) {
    .tasta-review { --side-width: 198px; }
}

@media screen and (max-width: 760px) {
    .tasta-review { --side-width: 0px; --workspace-gutter: 12px; }
    .tasta-review .sidebar { width: auto; padding: 9px 12px; overflow: visible; }
    .tasta-review .sidebar .brand { padding: 1px 0; }
    .tasta-review .sidebar .brand-logo { width: 38px; height: 38px; }
    .tasta-review .sidebar > .desktop-new-order { display: none; }
    .tasta-review .sidebar-note { display: none; }
    .tasta-review .workspace > main { padding-top: 14px; }
    .tasta-review #workspace-menu { color: var(--white); border-color: #6692ad; background: #233d55; }
    .tasta-review .session-bar form { margin-inline-start: auto; }
    .tasta-review .queue-actions { width: 100%; }
    .tasta-review .queue-action, .tasta-review .button { min-height: 44px; }
    .tasta-review :is(input, select, textarea):not([type="checkbox"], [type="radio"]) { font-size: 16px; }
    .tasta-review .order-panel { width: 100%; border-inline-start: 0; }
    .tasta-review .order-panel-body { padding-bottom: max(24px, env(safe-area-inset-bottom)); }

    /* These tables do not have mobile data labels. Keep their actual column headers. */
    .tasta-review .list-panel .table-wrap { overflow-x: auto; }
    .tasta-review .list-panel .table-wrap > table:not([class]) { display: table; min-width: 33rem; }
    .tasta-review .list-panel .table-wrap > table:not([class]) thead { display: table-header-group; }
    .tasta-review .list-panel .table-wrap > table:not([class]) tbody { display: table-row-group; }
    .tasta-review .list-panel .table-wrap > table:not([class]) tr { display: table-row; }
    .tasta-review .list-panel .table-wrap > table:not([class]) :is(th, td) { display: table-cell; width: auto; }
    .tasta-review .list-panel .table-wrap > table:not([class]) td::before { display: none !important; }
}

@media print {
    .tasta-review { --ink: #222; --paper: #fff; background: #fff; }
    .tasta-review :is(.panel, .list-panel, .invoice-sheet) { box-shadow: none; }
    .tasta-review .order-panel { display: none !important; }
}

.tasta-review .sidebar-toggle { margin-block: 6px; border-color: #637f98; color: #fff; background: transparent; }
.tasta-review .sidebar :is(.rail-icon,.sidebar-toggle > [aria-hidden]) { width: 19px; font-size: 17px; text-align: center; flex: none; }
.tasta-review .sidebar-account { margin-top: auto; padding: 10px 0 0; border-top: 1px solid #637f98; color: #e9f0fa; }
.tasta-review .sidebar-account :is(a,button,.sidebar-identity) {
    display: flex; align-items: center; gap: 8px; padding: 5px 8px;
    border: 0; background: none; color: inherit; font: inherit; min-height: 33px;
}
.tasta-review .sidebar-account :is(a,button):hover { background: #294158; border-radius: 5px; }
.tasta-review .sidebar-identity strong { min-width: 0; overflow-wrap: anywhere; }
.tasta-review .sidebar-toggle:hover { background: #294158; }
.tasta-review .custom-variant[hidden] { display: none; }
.tasta-review .custom-variant { margin: 8px 0; }
.tasta-review .line-weight { margin: 5px 0; color: var(--muted); font-size: .85rem; }
@media (min-width: 761px) {
    .tasta-review.sidebar-collapsed { --side-width: 62px; }
    .tasta-review.sidebar-collapsed .sidebar { padding-inline: 8px; }
    .sidebar-collapsed .sidebar :is(.rail-label, .nav-label, .brand span) { display: none; }
    .sidebar-collapsed .sidebar .brand { justify-content: center; }
    .tasta-review.sidebar-collapsed .sidebar :is(.button,nav a,.sidebar-account a,.sidebar-account button,.sidebar-identity) {
        display: flex; justify-content: center; width: 100%; min-height: 38px; padding: 4px;
    }
    .tasta-review.sidebar-collapsed .sidebar nav { gap: 3px; }
}
@media (max-width: 760px) {
    .tasta-review .sidebar-toggle { display: none; }
    .tasta-review .sidebar-account { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 7px; padding-top: 4px; margin-top: 6px; }
}
