:root {
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    background: #f4f6f8;
    color: #18211c;
}

body {
    margin: 0;
    background: #f4f6f8;
}

.synthetic-hall-banner {
    position: sticky;
    top: 0;
    /* Below every dialog layer (70 workflow, 80 action, 100 form) so the
       warning never covers a modal heading or eats its clicks. */
    z-index: 60;
    padding: 0.5rem 1rem;
    background: #fff0a8;
    border-bottom: 1px solid #d7b63b;
    color: #352b05;
    font-size: 0.875rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-align: center;
}

h1:focus {
    outline: none;
}

.invalid {
    outline: 1px solid #e50000;
}

.entry-page {
    box-sizing: border-box;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.entry-panel {
    width: min(100%, 42rem);
    box-sizing: border-box;
    padding: clamp(1.5rem, 5vw, 3rem);
    border: 1px solid #dbe3de;
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 18px 50px rgb(30 53 40 / 8%);
}

.entry-panel h1,
.entry-panel p {
    margin: 0;
}

.entry-panel h1 {
    margin-top: 0.45rem;
    font-size: clamp(2rem, 7vw, 3.2rem);
    line-height: 1;
    letter-spacing: -0.045em;
}

.entry-panel > p:not(.entry-kicker) {
    margin-top: 0.8rem;
    color: #526159;
}

.entry-session {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.25rem;
}

.entry-kicker {
    color: #185d3e;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.entry-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 2rem;
}

.entry-action {
    min-height: 88px;
    box-sizing: border-box;
    display: grid;
    align-content: center;
    gap: 0.3rem;
    padding: 1rem;
    border: 1px solid #cad6ce;
    border-radius: 0.85rem;
    color: #17211b;
    text-decoration: none;
}

.entry-action:hover,
.entry-action:focus-visible {
    border-color: #185d3e;
    outline: 3px solid rgb(24 93 62 / 18%);
    outline-offset: 2px;
}

.entry-action-primary {
    border-color: #185d3e;
    background: #185d3e;
    color: #fff;
}

.entry-action span {
    color: #526159;
    font-size: 0.9rem;
}

.entry-action-primary span {
    color: #dbece3;
}

.session-logout-form {
    display: inline-flex;
    margin: 0;
}

.session-logout-button {
    min-height: 44px;
    padding: 0 1rem;
    border: 1px solid #b9c8bf;
    border-radius: 999px;
    background: #fff;
    color: #26372d;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.session-logout-button:hover,
.session-logout-button:focus-visible,
.entry-home-link:hover,
.entry-home-link:focus-visible,
.access-denied-actions a:hover,
.access-denied-actions a:focus-visible {
    border-color: #185d3e;
    outline: 3px solid rgb(24 93 62 / 18%);
    outline-offset: 2px;
}

.access-denied-panel,
.not-found-panel {
    max-width: 34rem;
}

.access-denied-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    margin-bottom: 1.2rem;
    border-radius: 18px;
    background: #fff0df;
    color: #8b4b16;
    font-size: 1.6rem;
    font-weight: 900;
}

.access-denied-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.6rem;
}

.access-denied-actions .session-logout-button {
    border-color: #185d3e;
    background: #185d3e;
    color: #fff;
}

.access-denied-actions a,
.entry-home-link {
    min-height: 44px;
    box-sizing: border-box;
    display: inline-grid;
    place-items: center;
    padding: 0 1rem;
    border: 1px solid #cad6ce;
    border-radius: 999px;
    color: #26372d;
    font-weight: 750;
    text-decoration: none;
}

.entry-home-link {
    margin-top: 1.6rem;
}

@media (max-width: 34rem) {
    .entry-actions {
        grid-template-columns: 1fr;
    }

    .access-denied-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .access-denied-actions .session-logout-form,
    .access-denied-actions .session-logout-button,
    .access-denied-actions a {
        width: 100%;
    }
}

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

.pos-entry-shell {
    --entry-ink: #272126;
    --entry-muted: #6e646b;
    --entry-coral: #b93e47;
    min-height: 100vh;
    color: var(--entry-ink);
    background: #f7f5f2;
    font-family: Nunito, "Avenir Next", "Segoe UI", ui-rounded, sans-serif;
}

.pos-entry-topbar {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem clamp(1rem, 4vw, 2.5rem);
    border-bottom: 1px solid #ddd8d3;
    background: #fff;
}

.pos-entry-topbar .brand > span.brand-mark {
    background: var(--entry-coral);
}

.pos-entry-main {
    width: min(100% - 2rem, 54rem);
    box-sizing: border-box;
    margin: 0 auto;
    padding: clamp(2.25rem, 7vw, 4.75rem) 0 4rem;
}

.pos-entry-heading {
    max-width: 40rem;
    margin-bottom: 1.75rem;
}

.pos-entry-kicker {
    margin: 0 0 0.35rem;
    color: var(--entry-coral);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.pos-entry-heading h1,
.pos-entry-state h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.1rem);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.pos-entry-heading > p:last-child,
.pos-entry-state > p:last-of-type {
    margin: 0.75rem 0 0;
    color: var(--entry-muted);
    line-height: 1.55;
}

.pos-entry-directory {
    display: grid;
    gap: 1rem;
}

.pos-entry-group {
    overflow: hidden;
    border: 1px solid #d9d3ce;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 24px rgb(50 38 45 / 5%);
}

.pos-entry-group-heading {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #ebe7e3;
    background: #fbfaf8;
}

.pos-entry-group-heading h2,
.pos-entry-group-heading p {
    margin: 0;
}

.pos-entry-group-heading h2 {
    font-size: 1rem;
}

.pos-entry-group-heading p {
    margin-top: 0.15rem;
    color: var(--entry-muted);
    font-size: 0.78rem;
}

.pos-entry-group-heading > span {
    flex: 0 0 auto;
    color: var(--entry-muted);
    font-size: 0.78rem;
    font-weight: 750;
}

.pos-entry-option {
    width: 100%;
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 1rem;
    border: 0;
    border-bottom: 1px solid #ebe7e3;
    background: #fff;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.pos-entry-option:last-child {
    border-bottom: 0;
}

.pos-entry-option:hover,
.pos-entry-option:focus-visible {
    outline: none;
    background: #fff2f0;
    box-shadow: inset 4px 0 var(--entry-coral);
}

.pos-entry-option > span:first-child {
    display: grid;
    gap: 0.1rem;
}

.pos-entry-option strong {
    font-size: 1rem;
}

.pos-entry-option small {
    color: var(--entry-muted);
}

.pos-entry-option > span:last-child {
    color: var(--entry-coral);
    font-size: 1.2rem;
    font-weight: 900;
}

.pos-entry-state {
    min-height: 22rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    max-width: 42rem;
    outline: none;
}

.pos-entry-state-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    margin-bottom: 1.15rem;
    border-radius: 10px;
    background: #ffe6e2;
    color: #8d252b;
    font-size: 1.35rem;
    font-weight: 900;
}

.pos-entry-spinner {
    width: 36px;
    height: 36px;
    margin-bottom: 1.25rem;
    border: 4px solid #ded7d2;
    border-top-color: var(--entry-coral);
    border-radius: 50%;
    animation: pos-entry-spin 0.8s linear infinite;
}

@keyframes pos-entry-spin {
    to { transform: rotate(360deg); }
}

.pos-entry-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.5rem;
}

.pos-entry-actions .primary-action,
.pos-entry-actions .secondary-action {
    min-height: 46px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    border-radius: 8px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.pos-entry-actions .primary-action {
    border: 1px solid var(--entry-coral);
    background: var(--entry-coral);
    color: #fff;
}

.pos-entry-actions .secondary-action {
    border: 1px solid #cfc8c3;
    background: #fff;
    color: var(--entry-ink);
}

@media (max-width: 36rem) {
    .pos-entry-topbar {
        padding-inline: 0.75rem;
    }

    .pos-entry-topbar .brand strong {
        display: none;
    }

    .pos-entry-main {
        width: min(100% - 1.25rem, 54rem);
        padding-top: 2rem;
    }

    .pos-entry-heading {
        margin-bottom: 1.25rem;
    }

    .pos-entry-group-heading {
        align-items: flex-start;
    }

    .pos-entry-group-heading > span {
        padding-top: 0.15rem;
    }

    .pos-entry-actions,
    .pos-entry-actions > * {
        width: 100%;
    }
}

.pos-shell {
    --pos-coral: #c8444c;
    --pos-coral-dark: #8f2828;
    --pos-ink: #3b2e3a;
    --pos-muted: #786a74;
    min-height: 100vh;
    box-sizing: border-box;
    color: var(--pos-ink);
    background:
        radial-gradient(circle at 4% 0%, rgb(255 221 198 / 55%), transparent 31rem),
        linear-gradient(155deg, #fffbf6 5%, #fff3f6 100%);
    font-family: Nunito, "Avenir Next", "Segoe UI", ui-rounded, sans-serif;
}

/* Command strip: one compact full-width bar across the top of the sale.
   Register identity left, actions and operator right, content right below. */
.pos-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 60px;
    box-sizing: border-box;
    padding: 0 clamp(1rem, 3vw, 2rem);
    border-bottom: 1px solid var(--ui-line);
    background: var(--ui-surface);
    box-shadow: 0 1px 2px rgb(20 32 27 / 4%);
}

.pos-register-id {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    min-height: 44px;
    color: var(--ui-ink);
    text-decoration: none;
}

.pos-register-copy {
    overflow: hidden;
    font-size: 0.92rem;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.pos-register-copy strong {
    font-weight: 800;
    letter-spacing: -0.01em;
}

.pos-register-copy small {
    color: var(--ui-muted);
    font-weight: 650;
}

.pos-brand-mark {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--ui-ink);
    color: #fff;
}

.pos-brand-mark svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

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

.workspace-account {
    position: relative;
}

/* The administrator's account menu floats fixed at the top-right corner
   instead of living at the sidebar's bottom, where its always-drop-down
   panel opened below the screen edge. z-index 65: above the synthetic
   banner (60), below the dialog layers (70+). The trigger itself uses the
   standard pill (avatar + name + role) — same look as the POS page. */
.admin-shell .workspace-account-floating {
    position: fixed;
    top: 0.85rem;
    right: 1.1rem;
    z-index: 65;
}

body:has(.synthetic-hall-banner) .admin-shell .workspace-account-floating {
    top: calc(34px + 0.6rem);
}

.workspace-account-trigger {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.35rem 0.7rem 0.35rem 0.35rem;
    border: 1px solid #F4EBE3;
    border-radius: 999px;
    background: #fff;
    color: #3B2E3A;
    box-shadow: 0 10px 24px -14px rgba(59, 46, 58, 0.22);
    font: inherit;
    font-family: Nunito, "Avenir Next", "Segoe UI", ui-rounded, system-ui, sans-serif;
    text-align: left;
    cursor: pointer;
}

.workspace-account-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFE0C2, #FFC9B8);
    font-size: 1.2rem;
}

.workspace-account-copy {
    display: grid;
    line-height: 1.1;
}

.workspace-account-copy strong {
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-account-copy small {
    margin-top: 0.2rem;
    color: #6F6372;
    font-weight: 700;
}

.workspace-account-chevron {
    width: 1rem;
    color: #6F6372;
    font-size: 1rem;
    text-align: center;
    transition: transform 140ms ease;
}

.workspace-account-trigger[aria-expanded="true"] .workspace-account-chevron {
    transform: rotate(180deg);
}

.workspace-account-dismiss {
    position: fixed;
    z-index: 49;
    inset: 0;
}

.workspace-account-panel {
    position: absolute;
    z-index: 50;
    top: calc(100% + 0.55rem);
    right: 0;
    width: min(17rem, calc(100vw - 1.6rem));
    box-sizing: border-box;
    padding: 0.65rem;
    border: 1px solid #d9dfdb;
    border-radius: 1rem;
    background: #fff;
    color: #26372d;
    box-shadow: 0 18px 55px rgb(43 31 38 / 20%);
}

.workspace-account-panel > p {
    margin: 0.25rem 0.55rem 0.45rem;
    color: #6c7771;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.workspace-account-item {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    box-sizing: border-box;
    padding: 0.65rem 0.75rem;
    border-radius: 0.7rem;
    color: inherit;
    font-weight: 800;
    text-decoration: none;
}

.workspace-account-item:hover,
.workspace-account-item:focus-visible {
    outline: 0;
    background: #edf4f0;
}

.workspace-account-item[aria-disabled="true"] {
    background: #f0f2f1;
    color: #7a847f;
    cursor: not-allowed;
}

.workspace-account-action {
    width: 100%;
    border: 0;
    background: transparent;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.workspace-account-action:disabled {
    color: #8a938e;
    cursor: not-allowed;
}

.workspace-account-warning {
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #f1f3f2;
    color: #68736d;
}

.workspace-account-warning.is-active {
    background: #fff0bd;
    color: #8a5700;
}

.workspace-account-item strong,
.workspace-account-item small {
    display: block;
}

.workspace-account-item small {
    margin-top: 0.2rem;
    font-size: 0.72rem;
    font-weight: 650;
}

.workspace-account-divider {
    height: 1px;
    margin: 0.45rem 0.2rem;
    background: #e2e6e3;
}

.workspace-account-panel .session-logout-form,
.workspace-account-panel .session-logout-button {
    width: 100%;
}

.workspace-account-panel .session-logout-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-inline: 0.75rem;
    border: 0;
    border-radius: 0.7rem;
}
.pos-secondary-action,
.pos-category,
.pos-cart-close{
    min-width: 44px;
    min-height: 44px;
    border: 1px solid #e3d8d0;
    border-radius: 999px;
    background: #fff;
    color: var(--pos-ink);
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.pos-secondary-action:hover,
.pos-secondary-action:focus-visible,
.pos-category:hover,
.pos-category:focus-visible,
.pos-operator .session-logout-button:hover,
.pos-operator .session-logout-button:focus-visible{
    border-color: var(--pos-coral);
    outline: 3px solid rgb(235 93 93 / 17%);
    outline-offset: 2px;
}

.pos-operator .session-logout-button {
    border-color: #e3d8d0;
    color: var(--pos-ink);
    white-space: nowrap;
    box-shadow: 0 6px 16px rgb(122 92 110 / 8%);
}

.pos-focus-state .session-logout-form,
.admin-state .session-logout-form {
    margin-top: 1.25rem;
}

.pos-workspace {
    width: min(100%, 100rem);
    min-height: calc(100vh - 60px);
    margin: 0 auto;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 26rem);
    gap: clamp(1.25rem, 2.3vw, 2rem);
    padding: 0.75rem clamp(1rem, 3vw, 2rem) 2rem;
}

.pos-error-banner {
    width: min(calc(100% - 2rem), 54rem);
    box-sizing: border-box;
    display: flex;
    gap: 0.45rem;
    justify-content: center;
    margin: 1rem auto 0;
    padding: 0.85rem 1rem;
    border: 1px solid #d88787;
    border-radius: 0.9rem;
    background: #fff0ee;
    color: #7d2020;
}

.pos-success-toast {
    position: fixed;
    right: clamp(1rem, 3vw, 2rem);
    bottom: 1.5rem;
    z-index: 100;
    max-width: min(26rem, calc(100vw - 2rem));
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    box-sizing: border-box;
    padding: 0.75rem 1rem;
    border: 1px solid #9bc9a7;
    border-radius: 0.9rem;
    background: #effaf2;
    color: #225c31;
    font-weight: 800;
    box-shadow: 0 12px 30px rgb(34 92 49 / 16%);
}

.pos-success-toast > span:first-child {
    width: 1.45rem;
    height: 1.45rem;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: #d5efdc;
}

.pos-products {
    min-width: 0;
}

/* The scan shorthand's refusal line appears only when it has something to say. */
.pos-main-scan-strip {
    min-height: 1.6rem;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 clamp(1rem, 3vw, 2rem);
    padding-top: 0.35rem;
    color: var(--pos-muted);
    font-size: 0.85rem;
    font-weight: 700;
}

.pos-main-scan-strip:not(:empty)::before {
    content: "";
    width: 1.1rem;
    height: 1.1rem;
    flex: 0 0 auto;
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23786a74' stroke-linecap='round'%3E%3Cpath d='M4 5v14M7 5v14M10 5v9M10 17v2M13 5v14M16 5v14M19 5v9M19 17v2'/%3E%3C/svg%3E");
}

.pos-main-scan-strip.is-error {
    color: var(--pos-coral-dark);
    font-weight: 800;
}

.pos-main-scan-strip.is-error:not(:empty)::before {
    display: none;
}

.pos-cart-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

.pos-eyebrow {
    margin: 0 0 0.35rem;
    color: var(--pos-coral-dark);
    font-size: 0.77rem;
    font-weight: 850;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.pos-cart h2,
.pos-focus-state h1,
.pos-empty-products h2 {
    margin: 0;
    letter-spacing: -0.04em;
}

.pos-search input {
    width: min(18rem, 27vw);
    min-height: 48px;
    box-sizing: border-box;
    padding: 0 1rem;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: var(--pos-ink);
    font: inherit;
    box-shadow: 0 6px 16px rgb(122 92 110 / 8%);
}

.pos-search input:focus {
    border-color: var(--pos-coral);
    outline: 3px solid rgb(235 93 93 / 16%);
}

.pos-categories {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    margin: 0 0 1.35rem;
    padding: 3px;
}

/* The search field closes the category row: chips first, search at the end. */
.pos-categories .pos-search {
    margin-left: auto;
}

.pos-categories .pos-search input {
    width: min(15rem, 20vw);
}

.pos-category {
    flex: 0 0 auto;
    padding: 0 1.1rem;
    border: 0;
    color: #6d5e69;
    box-shadow: 0 6px 14px rgb(122 92 110 / 8%);
}

.pos-category.is-active {
    border-color: var(--pos-coral);
    background: linear-gradient(135deg, #db5b4f, var(--pos-coral));
    color: #fff;
    box-shadow: 0 9px 20px rgb(200 68 76 / 28%);
}

.pos-product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(8.5rem, 1fr));
    gap: clamp(0.8rem, 1.5vw, 1.15rem);
}

.pos-product {
    min-height: 190px;
    display: grid;
    grid-template-rows: 1fr auto auto auto;
    justify-items: start;
    padding: 1.25rem;
    border: 0;
    border-radius: 1.65rem;
    color: var(--pos-ink);
    text-align: left;
    font: inherit;
    cursor: pointer;
    box-shadow: 0 9px 20px rgb(122 92 110 / 9%);
    transition: transform 120ms ease, box-shadow 120ms ease;
    background: var(--product-tile-color, #ffe4d6);
}

.pos-product:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgb(70 50 40 / 11%);
}

.pos-product:focus-visible {
    outline: 4px solid #2d5f91;
    outline-offset: 3px;
}

.product-color-peach { --product-tile-color: #ffe4d6; }
.product-color-rose { --product-tile-color: #ffdce6; }
.product-color-sage { --product-tile-color: #e4f1dc; }
.product-color-lavender { --product-tile-color: #eee1fb; }
.product-color-amber { --product-tile-color: #fff0ce; }
.product-color-sand { --product-tile-color: #fbe3d2; }
.product-color-sky { --product-tile-color: #dbeef6; }
.product-color-berry { --product-tile-color: #ffe0ec; }

/* The sprite only supplies <use> targets and must never take up space. */
.product-art-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.pos-product-art {
    font-size: 2.75rem;
    line-height: 1;
}

/* An image or a drawing fills a fixed 4:3 frame, so a product with art and one
   without occupy exactly the same space and the grid never reflows. */
.pos-product-art.product-media-image,
.pos-product-art.product-media-art {
    width: 100%;
    aspect-ratio: 4 / 3;
    display: block;
    border-radius: 1.1rem;
    object-fit: cover;
}

.pos-product-name {
    margin-top: 1rem;
    font-size: 1.02rem;
    font-weight: 900;
}

.pos-product-price {
    margin-top: 0.32rem;
    color: var(--pos-coral-dark);
    font-size: 1.02rem;
    font-weight: 900;
}

.pos-stock-hint {
    margin-top: 0.35rem;
    color: #655c63;
    font-size: 0.76rem;
    font-weight: 700;
}

.pos-cart {
    position: sticky;
    top: 1rem;
    align-self: start;
    min-height: min(690px, calc(100vh - 112px));
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    padding: clamp(1.25rem, 2vw, 1.75rem);
    border: 0;
    border-radius: 2rem;
    background: #fff;
    box-shadow: 0 18px 46px rgb(200 68 76 / 14%);
}

.pos-cart h2 {
    font-size: 1.45rem;
    font-weight: 900;
}

.pos-cart-close {
    display: none;
    font-size: 1.65rem;
    line-height: 1;
}

.pos-cart-lines {
    display: grid;
    gap: 0.2rem;
    margin-top: 1rem;
}

.pos-cart-line {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.7rem;
    align-items: center;
    padding: 0.85rem 0;
    border-bottom: 1px solid #f3e4ec;
}

.pos-line-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #d26060;
    background: #ffe8e1;
    overflow: hidden;
    font-size: 1.15rem;
}

.pos-line-icon.product-media-image,
.pos-line-icon.product-media-art {
    background: none;
    object-fit: cover;
}

.pos-cart-line-copy {
    min-width: 0;
    display: grid;
    gap: 0.18rem;
}

.pos-cart-line-copy span {
    color: var(--pos-muted);
    font-size: 0.8rem;
}

.pos-cart-line-summary {
    display: grid;
    grid-template-columns: auto 44px;
    align-items: center;
    gap: 0.45rem;
}

.pos-cart-remove {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid #ecd8d8;
    border-radius: 13px;
    background: #fff8f7;
    color: #9f3030;
    cursor: pointer;
}

.pos-cart-remove svg {
    width: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pos-cart-remove:hover:not(:disabled) {
    border-color: #d59c9c;
    background: #fff0ee;
}

.pos-cart-remove:focus-visible {
    outline: 3px solid #2d5f91;
    outline-offset: 2px;
}

.pos-cart-remove:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Antall-stepper: tre adskilte, avrundede celler (konseptet fra
   docs/design/grid-salg-runde) — myk verdiflate, lette ±-tegn, blå hover. */
.pos-quantity {
    grid-column: 2 / 4;
    display: grid;
    grid-template-columns: 52px 3.75rem 52px;
    gap: 0.5rem;
    align-items: center;
    justify-content: end;
    text-align: center;
}

.pos-quantity-input {
    width: 3.75rem;
    min-height: 52px;
    box-sizing: border-box;
    border: 1px solid var(--ui-line);
    border-radius: 14px;
    background: var(--ui-surface-soft);
    color: var(--ui-ink);
    text-align: center;
    font: inherit;
    font-size: 1.5rem;
    font-weight: 850;
    font-variant-numeric: tabular-nums;
}

.pos-quantity-input:focus {
    border-color: var(--ui-primary);
    outline: 3px solid rgb(54 87 214 / 15%);
    outline-offset: 1px;
    background: var(--ui-surface);
}

.pos-quantity-input[aria-invalid="true"] {
    border-color: var(--ui-danger);
}

.pos-quantity-error {
    grid-column: 1 / -1;
    max-width: 15rem;
    color: var(--ui-danger);
    font-size: 0.75rem;
    font-weight: 750;
    text-align: right;
}

.pos-quantity button {
    min-width: 52px;
    min-height: 52px;
    border: 1px solid var(--ui-line);
    border-radius: 14px;
    background: var(--ui-surface);
    color: var(--ui-ink);
    font: inherit;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: 120ms ease;
}

.pos-quantity button:hover:not(:disabled) {
    border-color: #9bacec;
    background: var(--ui-primary-soft);
}

.pos-quantity button:disabled {
    opacity: .45;
    cursor: default;
}

.pos-quantity button:focus-visible {
    outline: 3px solid rgb(54 87 214 / 28%);
    outline-offset: 2px;
}

.pos-paper-actions {
    grid-template-columns: 52px auto 52px 52px;
}

.pos-paper-cart-info {
    color: var(--pos-muted);
    font-size: 0.85rem;
    font-weight: 750;
    white-space: nowrap;
}

.pos-paper-cart-range {
    grid-column: 1 / -1;
    color: var(--pos-muted);
    font-size: 0.8rem;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.pos-paper-actions .pos-quantity-error {
    grid-column: 1 / -1;
    text-align: right;
}

/* Bokoppgjør · utklippsreke: the Selg ark dialog is one long ticket — round
   zone, sheet zone, receipt — torn apart at dashed perforations. The round
   zone is the head: game name big, round number small, live state beneath.
   Concept: docs/design/grid-salg-runde (B · Utklippsreke). */

.pos-paper-modal-head {
    display: grid;
    justify-items: center;
    gap: 0.1rem;
    margin: 0 0 18px;
    text-align: center;
}

.pos-paper-entry .pos-paper-modal-head .pos-state-icon {
    width: 48px;
    height: 48px;
    margin: 0 0 0.6rem;
    border-radius: 16px;
    font-size: 1.5rem;
}

.pos-paper-entry .pos-paper-modal-head .pos-eyebrow {
    margin: 0 0 2px;
    font-size: 11px;
    letter-spacing: 1.32px;
}

.pos-paper-entry .pos-paper-modal-head h1 {
    font-size: 2.3rem;
    letter-spacing: -1.66px;
    line-height: 1.05;
}

.pos-paper-entry .pos-paper-product { max-width: 34rem; margin: 6px 0 0; color: var(--ui-muted); font-size: 14px; font-weight: 650; }

.pos-paper-ticket {
    width: min(100%, 25rem);
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--ui-line);
    border-radius: 22px;
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow-sm);
}

.pos-paper-round-zone {
    padding: 20px 22px 18px;
    background: var(--ui-primary-soft);
    text-align: center;
    transition: background 150ms ease;
}

.pos-paper-round-zone.is-empty { background: #f1f3f2; }

.pos-paper-zone-label {
    display: block;
    margin: 0 0 8px;
    color: var(--ui-primary-dark);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.pos-paper-round-zone.is-empty .pos-paper-zone-label { color: #596660; }
.pos-paper-sheet-zone .pos-paper-zone-label { color: var(--ui-muted); }

.pos-paper-round-game {
    display: block;
    margin-top: 0;
    font-size: 26px;
    font-weight: 850;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.pos-paper-round-game.is-muted {
    max-width: 26ch;
    margin: 0 auto;
    color: #596660;
    font-size: 1.02rem;
    font-weight: 750;
}

.pos-paper-round-state {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 10px;
    color: var(--ui-positive);
    font-size: 11.5px;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.pos-paper-round-state i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ui-positive);
    animation: pos-paper-live-pulse 2.4s ease-in-out infinite;
}

@keyframes pos-paper-live-pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgb(22 112 90 / 12%); }
    50% { box-shadow: 0 0 0 5px rgb(22 112 90 / 22%); }
}

@media (prefers-reduced-motion: reduce) {
    .pos-paper-round-state i { animation: none; box-shadow: 0 0 0 4px rgb(22 112 90 / 14%); }
}

/* The tear line: dashes with semicircular bites clipped out of the ticket's
   edge — the overflow:hidden above crops the circles to their inner half. */
.pos-paper-perf {
    position: relative;
    border-top: 2px dashed var(--ui-line-strong);
}

.pos-paper-perf i {
    position: absolute;
    top: -8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--ui-surface);
}

.pos-paper-perf i.is-left { left: 0; transform: translate(-50%, 0); }
.pos-paper-perf i.is-right { right: 0; transform: translate(50%, 0); }

.pos-paper-sheet-zone {
    padding: 22px 22px 20px;
    text-align: center;
}

.pos-paper-range {
    display: block;
    margin-top: 4px;
    font-size: 42px;
    font-weight: 850;
    letter-spacing: -0.02em;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
}

.pos-paper-sheet-zone.is-readonly {
    background: #f8f9f8;
}

.pos-paper-position-note {
    display: block;
    margin-top: 0.55rem;
    color: var(--ui-muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.pos-paper-sheet-zone.is-readonly .pos-paper-gate-retry {
    margin-top: 0.9rem;
}

.pos-paper-caution {
    display: block;
    min-height: 1.1rem;
    margin-top: 0.45rem;
    color: var(--ui-warning);
    font-size: 0.85rem;
    font-weight: 750;
}

.pos-paper-receipt-zone { padding: 16px 22px 18px; }

.pos-paper-receipt-line {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    color: var(--ui-muted);
    font-size: 13.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.pos-paper-receipt-line strong {
    color: var(--ui-ink);
    font-size: 16px;
    font-weight: 850;
}

.pos-paper-receipt-line span:first-child { white-space: nowrap; }

.pos-paper-receipt-leader {
    flex: 1;
    min-width: 1.5rem;
    border-bottom: 2px dotted var(--ui-line-strong);
    transform: translateY(-3px);
}

.pos-paper-gate-zone {
    display: grid;
    justify-items: center;
    gap: 0.8rem;
    padding: 1.45rem 1.25rem 1.35rem;
    text-align: center;
}

.pos-paper-gate-zone p {
    max-width: 34ch;
    margin: 0;
    color: var(--ui-danger);
    font-size: 0.92rem;
    font-weight: 750;
}

.pos-paper-gate-retry {
    border: 0;
    border-radius: 14px;
    padding: 0.65rem 1.3rem;
    background: var(--ui-primary);
    color: #fff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.pos-paper-gate-retry:disabled { opacity: .6; cursor: default; }

/* Stepper and scan share one row at the concept's dimensions; the scan
   field's placeholder wraps to two lines inside it, like the mock. */
.pos-paper-controls {
    display: grid;
    grid-template-columns: 218px minmax(0, 1fr);
    gap: 10px;
    width: min(100%, 25rem);
    margin: 18px auto 0;
}

.pos-paper-stepper { grid-column: 1; width: 100%; grid-template-columns: 52px minmax(0, 1fr) 52px; }
.pos-paper-stepper .pos-quantity-input { width: auto; }
.pos-paper-scan-field { grid-column: 2; }

.pos-paper-scan-field {
    display: flex;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
    min-height: 52px;
    padding: 0 14px;
    border: 1px solid var(--ui-line);
    border-radius: 14px;
    background: var(--ui-surface-soft);
    cursor: text;
}

.pos-paper-scan-field:focus-within {
    border-color: var(--ui-primary);
    outline: 3px solid rgb(54 87 214 / 15%);
}

.pos-paper-scan-field svg {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: #8a948f;
    stroke-width: 1.7;
}

.pos-paper-scan-field .pos-scan-input {
    flex: 1;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
    font-size: 14px;
    /* 550 snaps to Inter 600 (semibold) — 500 keeps the placeholder as quiet
       as the concept, whose fallback font renders 550 much lighter. */
    font-weight: 500;
    letter-spacing: 0;
    color: var(--ui-ink);
    /* The field is auto-focused for the wedge scanner; Chromium's native
       focus ring on Linux paints sage-green (rgb(144 199 170)) bars along
       the element's edges. The wrapper's focus-within ring is the focus
       indicator — the native one must go. */
    outline: none;
    resize: none;
    overflow: hidden;
    white-space: pre-wrap;
    word-wrap: break-word;
    /* rows="1" keeps the box one line tall and clips the placeholder's second
       line — 2×17px lets both wrapped lines show, centered by the wrapper. */
    height: 34px;
}

.pos-paper-scan-field .pos-scan-input::placeholder { color: #8a948f; }

.pos-paper-entry .pos-primary-action {
    min-height: 56px;
    border-radius: 16px;
}

.pos-paper-entry .pos-reserve-actions { margin-top: 16px; }

.pos-paper-scan-error {
    width: min(100%, 25rem);
    margin: 10px auto 0;
    color: var(--ui-danger);
    font-size: 0.85rem;
    font-weight: 750;
    text-align: center;
}



.pos-empty-cart,
.pos-empty-products {
    display: grid;
    justify-items: center;
    align-content: center;
    text-align: center;
    color: var(--pos-muted);
}

.pos-empty-cart {
    flex: 1;
    min-height: 15rem;
}

.pos-empty-cart > span,
.pos-empty-products > span {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 19px;
    background: #fff1e9;
    color: var(--pos-coral);
    font-size: 1.5rem;
}

.pos-empty-cart strong {
    margin-top: 0.8rem;
    color: var(--pos-ink);
}

.pos-empty-cart p,
.pos-empty-products p {
    margin: 0.35rem 0 0;
}

.pos-empty-products {
    min-height: 20rem;
}

.pos-empty-products h2 {
    margin-top: 1rem;
    color: var(--pos-ink);
}

.pos-cart-footer {
    display: grid;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 2px dashed #eedce5;
}

.pos-cart-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    font-size: 1rem;
}

.pos-cart-total strong {
    color: #b2353d;
    font-size: clamp(1.65rem, 3vw, 2.2rem);
    letter-spacing: -0.04em;
}

.pos-cart-payouts {
    display: grid;
    gap: .65rem;
    padding-top: 1rem;
    border-top: 1px solid #eadfd8;
}

.pos-cart-payouts h3 {
    margin: 0;
    color: var(--pos-muted);
    font-size: .76rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.pos-payout-line {
    display: grid;
    grid-template-columns: 38px 1fr auto 40px;
    gap: .65rem;
    align-items: center;
    padding: .75rem;
    border: 1px solid #cde4da;
    border-radius: 16px;
    background: #f2faf6;
}

.pos-payout-line > span {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #d8f1e5;
    color: #176443;
    font-weight: 900;
}

.pos-payout-line div { display: grid; min-width: 0; }
.pos-payout-line small { color: var(--pos-muted); overflow: hidden; text-overflow: ellipsis; }
.pos-payout-line > strong { color: #176443; white-space: nowrap; }
.pos-payout-line button { min-width: 44px; min-height: 44px; border: 0; border-radius: 12px; background: transparent; font-size: 1.25rem; cursor: pointer; }

.pos-balance-breakdown {
    display: grid;
    gap: .35rem;
    padding: .75rem 0;
    border-bottom: 1px solid #eadfd8;
    color: var(--pos-muted);
    font-size: .88rem;
}

.pos-balance-breakdown span { display: flex; justify-content: space-between; }
.pos-terminal-breakdown { width: min(100%, 28rem); }

.pos-focus-state .pos-text-input,
.pos-focus-state > select {
    width: min(100%, 28rem);
    min-height: 54px;
    box-sizing: border-box;
    padding: .8rem 1rem;
    border: 1px solid var(--ui-line);
    border-radius: 14px;
    background: var(--ui-surface-soft);
    color: var(--ui-ink);
    font: inherit;
}

.pos-focus-state > label { width: min(100%, 28rem); margin-top: 1rem; text-align: left; font-weight: 800; }
.pos-paper-edit-icon { display:grid; place-items:center; color:var(--pos-muted); }
.pos-paper-edit-icon:hover:not(:disabled) { color:var(--pos-ink); }
.pos-paper-edit-icon svg { width:1.1rem; height:1.1rem; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }

.pos-win-result {
    width: min(100%, 28rem);
    box-sizing: border-box;
    display: grid;
    gap: .25rem;
    margin: 1rem 0;
    padding: 1.15rem;
    border: 2px solid #b8dfcc;
    border-radius: 20px;
    background: #effaf4;
}

.pos-wallet-amount,
.pos-wallet-confirm {
    display: grid;
    gap: .35rem;
    width: min(100%, 34rem);
    box-sizing: border-box;
    padding: 1.15rem 1.3rem;
    border-radius: 1rem;
    background: #f3f0ff;
    border: 1px solid #cfc8fa;
}

.pos-wallet-amount strong { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.pos-wallet-confirm small { color: var(--pos-muted); }
/* The identify column shares the pay screen's one field rail (25rem, same as
   the Beløp label and money input) so slot, divider, search and results align. */
.pos-wallet-search { display: flex; width: min(100%, 25rem); }
.pos-wallet-search input { flex: 1; min-width: 0; }
.pos-wallet-results { display: grid; gap: .55rem; width: min(100%, 25rem); }
.pos-wallet-results button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1rem;
    border: 1px solid #ddcec4;
    border-radius: .85rem;
    background: white;
    color: var(--pos-ink);
    text-align: left;
}
.pos-wallet-results button:hover { border-color: #6456d8; background: #f7f5ff; }
.pos-wallet-results span, .pos-empty-inline { color: var(--pos-muted); }
.pos-wallet-results .pos-wallet-identity {
    min-width: 0;
    display: grid;
    gap: .18rem;
}
.pos-wallet-results .pos-wallet-identity strong {
    overflow: hidden;
    color: var(--pos-ink);
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pos-wallet-results .pos-wallet-identity > span,
.pos-wallet-results .pos-wallet-user-id {
    font-size: .82rem;
}
.pos-wallet-results .pos-wallet-user-id {
    max-width: 11rem;
    text-align: right;
    overflow-wrap: anywhere;
}
.pos-search-status {
    width: min(100%, 34rem);
    margin: -.35rem 0 0;
    color: var(--pos-muted);
    font-size: .82rem;
    font-weight: 700;
}
.pos-win-result strong { color: #176443; font-size: 2rem; }
.pos-win-result small { color: var(--pos-muted); }

.pos-win-hint { margin: .75rem 0; color: var(--pos-muted); }

.pos-win-list {
    width: min(100%, 28rem);
    max-height: 16rem;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid #b8dfcc;
    border-radius: 14px;
    background: #fff;
}

.pos-paper-win-modal { gap: .75rem; }
.pos-paper-win-modal > p,
.pos-paper-win-modal > button { margin: 0; }
.pos-paper-win-modal .pos-win-list { max-height: min(26rem, 42vh); }
.pos-paper-win-modal .pos-win-result { margin: 0; padding: .75rem; }
.pos-paper-win-modal .pos-win-result strong { font-size: 1.5rem; }
.pos-win-blocked { margin: 0; padding: .5rem .85rem .75rem; }
@media (max-width: 480px) {
    .pos-paper-win-modal .pos-win-row { grid-template-columns: auto auto 1fr auto; gap: .5rem; }
    .pos-paper-win-modal .pos-win-grid { grid-column: 2 / -1; }
}

.pos-win-group {
    padding: .5rem .85rem .35rem;
    color: var(--pos-muted);
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    background: #f2f7f4;
}

.pos-win-group + .pos-win-row { border-top: 0; }

.pos-win-row {
    display: grid;
    grid-template-columns: auto auto auto 1fr auto;
    align-items: center;
    gap: .75rem;
    padding: .6rem .85rem;
    cursor: pointer;
}

.pos-win-row + .pos-win-row { border-top: 1px solid var(--line); }

.pos-win-row input[type="checkbox"] { width: 1.35rem; height: 1.35rem; accent-color: #176643; }

.pos-win-badge {
    min-width: 2.6rem;
    padding: .2rem .5rem;
    border-radius: 999px;
    background: #176643;
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
    text-align: center;
}

.pos-win-badge-unknown { background: var(--line); color: var(--pos-muted); }

.pos-win-shout { color: var(--pos-muted); }

.pos-win-amount { font-weight: 700; color: #176643; justify-self: end; }

.pos-win-grid { color: var(--pos-muted); font-variant-numeric: tabular-nums; }

.pos-focus-state {
    width: min(calc(100% - 2rem), 35rem);
    min-height: 100vh;
    box-sizing: border-box;
    display: grid;
    justify-items: center;
    align-content: center;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

.pos-focus-state h1 {
    font-size: clamp(2.2rem, 7vw, 4rem);
    line-height: 1;
}

.pos-focus-state > p:not(.pos-eyebrow):not(.pos-inline-error) {
    max-width: 28rem;
    margin: 0.8rem 0 0;
    color: var(--pos-muted);
    font-size: 1.05rem;
}

.pos-state-icon,
.pos-spinner {
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    margin-bottom: 1.2rem;
    border-radius: 24px;
    background: #ffe4dc;
    color: var(--pos-coral-dark);
    font-size: 2rem;
    font-weight: 850;
    box-shadow: 0 14px 28px rgb(235 93 93 / 13%);
}

.pos-state-sun {
    background: #fff0bd;
    color: #a76400;
}

.pos-spinner {
    width: 48px;
    height: 48px;
    border: 5px solid #f3d8d0;
    border-top-color: var(--pos-coral);
    border-radius: 50%;
    background: var(--ui-surface);
    animation: pos-spin 800ms linear infinite;
}

@keyframes pos-spin {
    to { transform: rotate(360deg); }
}

.pos-day-start label {
    justify-self: start;
    margin: 2rem 0 0.45rem;
    font-weight: 800;
}

.pos-money-input {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    border: 2px solid #dfd2c8;
    border-radius: 1.1rem;
    background: #fff;
    overflow: hidden;
}

.pos-money-input:focus-within {
    border-color: var(--pos-coral);
    outline: 3px solid rgb(235 93 93 / 15%);
}

.pos-money-input input {
    min-width: 0;
    min-height: 58px;
    box-sizing: border-box;
    padding: 0 0 0 1rem;
    border: 0;
    outline: 0;
    color: var(--pos-ink);
    font: inherit;
    font-size: 1.35rem;
    font-weight: 800;
}

.pos-money-input span {
    padding: 0 1rem;
    color: var(--pos-muted);
    font-weight: 800;
}

.pos-day-start small {
    justify-self: start;
    margin-top: 0.45rem;
    color: var(--pos-muted);
}

.pos-inline-error {
    margin: 0.7rem 0 0;
    color: #a72020;
    font-weight: 700;
}

.pos-primary-action,
.pos-secondary-action,
.pos-login-action {
    min-height: 52px;
    box-sizing: border-box;
    padding: 0 1.35rem;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
}

.pos-support-link {
    display: grid;
    place-items: center;
    color: var(--pos-ink);
    text-decoration: none;
}

.pos-primary-action {
    width: 100%;
    margin-top: 1.4rem;
    border: 0;
    border-radius: 1rem;
    background: linear-gradient(135deg, #ff7e76, var(--pos-coral));
    color: #fff;
    box-shadow: 0 12px 24px rgb(235 93 93 / 22%);
}

.oppsett-receipt-defaults {
    display: grid;
    gap: .45rem;
    margin: 1rem 0;
}

.oppsett-receipt-defaults label {
    display: grid;
    grid-template-columns: minmax(8rem, 1fr) minmax(11rem, 1.2fr);
    align-items: center;
    gap: .75rem;
    min-height: 52px;
    padding: .55rem .7rem;
    border: 1px solid var(--ui-line);
    border-radius: 12px;
    font-weight: 750;
}

.oppsett-receipt-defaults select {
    min-height: 44px;
}

.pos-receipt-answer-actions {
    width: min(100%, 28rem);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
    margin-top: 1rem;
}

.pos-receipt-answer-actions > button {
    min-height: 54px;
    margin: 0;
}

@media (max-width: 480px) {
    .oppsett-receipt-defaults label,
    .pos-receipt-answer-actions {
        grid-template-columns: 1fr;
    }
}

.pos-settlement-review {
    width: min(100%, 30rem);
    display: grid;
    gap: .1rem;
    margin: 1rem 0;
    padding: .55rem 1rem;
    border: 1px solid #d9dfe8;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 30px rgb(30 42 68 / 8%);
}

.pos-settlement-review span {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #edf0f4;
}

.pos-settlement-review span:last-child {
    border-bottom: 0;
    font-size: 1.05rem;
}

.pos-reserve-banner {
    width: auto;
    max-width: 22rem;
    min-height: 44px;
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-sizing: border-box;
    margin: 0;
    padding: 0.6rem 1rem;
    border: 1px solid #d49a28;
    border-radius: 0.9rem;
    background: #fff3cf;
    color: #714800;
    font: inherit;
    text-align: center;
    cursor: pointer;
}

.pos-reserve-banner strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pos-reserve-banner:hover,
.pos-reserve-banner:focus-visible {
    border-color: #a76700;
    outline: 3px solid rgb(212 154 40 / 22%);
    outline-offset: 2px;
}

.pos-reserve-banner:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.pos-device-modal-layer {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    place-items: start center;
    box-sizing: border-box;
    padding: clamp(4.5rem, 10vh, 7rem) 1rem 1rem;
    overflow-y: auto;
}

.pos-device-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgb(43 31 38 / 38%);
    backdrop-filter: blur(2px);
}

.pos-device-modal {
    position: relative;
    z-index: 1;
    width: min(100%, 30rem);
    display: grid;
    gap: 0.8rem;
    box-sizing: border-box;
    padding: 1.25rem;
    border: 1px solid #eadbd4;
    border-radius: 1.35rem;
    background: #fffaf8;
    color: var(--pos-ink);
    box-shadow: 0 24px 70px rgb(43 31 38 / 30%);
}

.pos-device-modal:focus {
    outline: none;
}

.pos-device-modal > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.1rem 0.1rem 0.4rem;
}

.pos-device-modal h2 {
    margin: 0.15rem 0 0;
    font-size: clamp(1.55rem, 4vw, 2rem);
    letter-spacing: -0.035em;
}

.pos-modal-kicker {
    color: #9c2929;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pos-modal-close {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border: 1px solid #e3d8d0;
    border-radius: 50%;
    background: #fff;
    color: var(--pos-ink);
    font: inherit;
    font-size: 1.55rem;
    line-height: 1;
    cursor: pointer;
}

.pos-device-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.8rem 1rem;
    box-sizing: border-box;
    padding: 1rem;
    border: 1px solid #eadfd9;
    border-radius: 1rem;
    background: #fff;
}

.pos-device-row-heading {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pos-device-row-heading > div {
    display: grid;
    gap: 0.15rem;
}

.pos-device-row-heading span:last-child,
.pos-device-inline small {
    color: var(--pos-muted);
    font-size: 0.82rem;
}

.pos-device-symbol {
    width: 2.4rem;
    height: 2.4rem;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 0.75rem;
    background: #f7eee9;
    color: #873333;
}

.pos-device-switch {
    width: 58px;
    height: 44px;
    position: relative;
    box-sizing: border-box;
    margin: 0;
    padding: 8px 3px;
    border: 2px solid #b9bebb;
    border-radius: 999px;
    background: #d9ddda;
    cursor: pointer;
    transition: background 140ms ease, border-color 140ms ease;
}

.pos-device-switch > span {
    width: 24px;
    height: 24px;
    display: block;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 7px rgb(43 31 38 / 22%);
    transition: transform 140ms ease;
}

.pos-device-switch.is-on {
    border-color: #18725a;
    background: #1f896c;
}

.pos-device-switch.is-on > span {
    transform: translateX(24px);
}

.pos-device-switch:focus-visible {
    outline: 4px solid #2d5f91;
    outline-offset: 3px;
}

.pos-device-switch:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.pos-device-inline {
    grid-column: 1 / -1;
    display: grid;
    gap: 0.7rem;
    box-sizing: border-box;
    padding: 0.85rem;
    border: 1px solid #e2b44f;
    border-radius: 0.8rem;
    background: #fff6d9;
    color: #5b3b00;
}

.pos-device-inline-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.pos-device-inline-actions .pos-primary-action,
.pos-device-inline-actions .pos-secondary-action {
    width: 100%;
    min-height: 46px;
    margin-top: 0;
    padding-inline: 0.8rem;
}

.pos-device-inline-actions .pos-primary-action {
    background: #b92f3a;
}

.pos-device-progress {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 750;
}

.pos-device-progress i {
    width: 0.85rem;
    height: 0.85rem;
    border: 2px solid #d6a13b;
    border-top-color: transparent;
    border-radius: 50%;
    animation: pos-spin 800ms linear infinite;
}

.pos-reserve-actions {
    display: grid;
    width: min(100%, 28rem);
    gap: 0.75rem;
}

.pos-reserve-actions .pos-primary-action,
.pos-reserve-actions .pos-secondary-action {
    width: 100%;
    margin-top: 0;
}

.pos-card-state {
    width: min(calc(100% - 2rem), 43rem);
    min-height: calc(100vh - 88px);
}

.pos-state-card {
    background: #e8eafd;
    color: #4653a6;
}

.pos-terminal-amount {
    width: 100%;
    box-sizing: border-box;
    display: grid;
    justify-items: center;
    gap: 0.35rem;
    margin-top: 1.35rem;
    padding: 1.2rem;
    border: 2px solid #bbc1ec;
    border-radius: 1.25rem;
    background: #f0f1ff;
}

.pos-terminal-amount span {
    color: #5d6191;
    font-size: 0.8rem;
    font-weight: 850;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.pos-terminal-amount strong {
    color: #343e8d;
    font-size: clamp(2.4rem, 8vw, 4.3rem);
    letter-spacing: -0.055em;
    line-height: 1;
}

.pos-card-steps {
    width: 100%;
    box-sizing: border-box;
    display: grid;
    gap: 0.5rem;
    margin: 1.1rem 0;
    padding-left: 1.8rem;
    color: #554a52;
    text-align: left;
}

.pos-card-steps li::marker {
    color: #505cb0;
    font-weight: 900;
}

.pos-card-outcomes {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 0.7rem;
    margin-top: 1rem;
}

.pos-card-outcomes button {
    min-height: 86px;
    display: grid;
    align-content: center;
    gap: 0.3rem;
    padding: 0.7rem;
    border: 1px solid #ddd3da;
    border-radius: 1rem;
    background: #fff;
    color: var(--pos-ink);
    font: inherit;
    cursor: pointer;
}

.pos-card-outcomes button:focus-visible {
    outline: 4px solid #2d5f91;
    outline-offset: 3px;
}

.pos-card-outcomes button > span {
    color: var(--pos-muted);
    font-size: 0.72rem;
    line-height: 1.25;
}

.pos-card-outcomes .pos-outcome-approved {
    border-color: #9fc9a5;
    background: #eef8eb;
    color: #285b31;
}

.pos-card-outcomes .pos-outcome-declined {
    border-color: #ccc;
    background: #fff;
    color: var(--pos-ink);
}

.pos-card-outcomes button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pos-primary-action:disabled,
.pos-cash-presets button:disabled {
    background: #e6e2dd;
    color: #a09a92;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 1;
}

.pos-cash-entry {
    position: relative;
    align-content: start;
    min-height: 0;
    padding-top: clamp(2rem, 8vh, 6rem);
}

.pos-cash-entry label {
    justify-self: start;
    margin: 1.8rem 0 0.45rem;
    font-weight: 850;
}

.pos-cash-entry small {
    justify-self: start;
    margin-top: 0.55rem;
    color: var(--pos-muted);
}

.pos-state-cash {
    background: #e6f3df;
    color: #35642d;
    font-size: 1.2rem;
    text-transform: uppercase;
}

.pos-back-action {
    justify-self: start;
    margin-bottom: 2rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #735d6c;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.pos-back-action:focus-visible {
    outline: 3px solid #2d5f91;
    outline-offset: 4px;
}

.pos-cash-presets {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.pos-cash-presets button {
    min-height: 48px;
    padding: 0.4rem;
    border: 1px solid #e3d8d0;
    border-radius: 0.85rem;
    background: #fff;
    color: var(--pos-ink);
    font: inherit;
    font-size: 0.83rem;
    font-weight: 850;
    cursor: pointer;
}

.pos-cash-presets button:hover,
.pos-cash-presets button:focus-visible {
    border-color: var(--pos-coral);
    outline: 3px solid rgb(235 93 93 / 15%);
}

.pos-change-card {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.25rem;
    padding: 1rem 1.15rem;
    border-radius: 1rem;
    background: #eaf5e5;
    color: #284e2e;
}

.pos-change-card strong {
    font-size: clamp(1.45rem, 5vw, 2rem);
}

.pos-cash-state {
    min-height: calc(100vh - 88px);
}

.pos-cash-state .pos-state-icon {
    background: #e8f3df;
    color: #376735;
}

.pos-cash-state.pos-focus-error .pos-state-icon {
    background: #ffe4dc;
    color: #9b3030;
}

.pos-auto-progress {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 1.5rem;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    background: #edf3ef;
    color: #40534a;
    font-size: 0.88rem;
    font-weight: 800;
}

.pos-auto-progress span {
    width: 0.75rem;
    height: 0.75rem;
    border: 2px solid #9ab0a2;
    border-top-color: #275b3d;
    border-radius: 50%;
    animation: pos-spin 800ms linear infinite;
}

.pos-stop-note {
    width: 100%;
    box-sizing: border-box;
    margin-top: 1.5rem;
    padding: 1rem;
    border: 2px solid #a93434;
    border-radius: 1rem;
    background: #fff0ee;
    color: #7d2020;
    font-weight: 800;
}

.pos-primary-action:focus-visible,
.pos-secondary-action:focus-visible {
    outline: 4px solid #2d5f91;
    outline-offset: 3px;
}

.pos-secondary-action {
    margin-top: 1.5rem;
    border-radius: 1rem;
}

.pos-login-action {
    display: grid;
    place-items: center;
    margin-top: 1.5rem;
    border-radius: 1rem;
    background: var(--pos-coral);
    color: #fff;
    text-decoration: none;
}

.pos-mobile-cart-bar {
    display: none;
}

@media (max-width: 78rem) {
    .pos-product-grid {
        grid-template-columns: repeat(3, minmax(8.5rem, 1fr));
    }
}

@media (max-width: 54rem) {
    .pos-topbar {
        min-height: 56px;
        gap: 0.5rem;
    }

    .pos-reserve-banner {
        width: 44px;
        min-width: 44px;
        padding: 0;
        border-radius: 50%;
    }

    .pos-reserve-banner strong {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        clip-path: inset(50%);
    }

    .pos-success-toast {
        right: 0.8rem;
        bottom: 0.8rem;
        left: 0.8rem;
        min-height: 62px;
        max-width: calc(100% - 1.6rem);
        justify-content: center;
        border-radius: 1.1rem;
    }

    .pos-register-copy small {
        display: none;
    }

    .pos-device-modal-layer {
        padding: 3.25rem 0.75rem 0.75rem;
    }

    .workspace-account-avatar {
        width: 38px;
        height: 38px;
    }

    .pos-workspace {
        display: block;
        min-height: auto;
        padding-bottom: 6.5rem;
    }

    .pos-categories .pos-search {
        flex-basis: 100%;
        margin-left: 0;
    }

    .pos-search input {
        width: 100%;
    }

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

    .pos-product {
        min-height: 158px;
    }

    .pos-mobile-cart-bar {
        position: fixed;
        z-index: 20;
        right: 0.8rem;
        bottom: 0.8rem;
        left: 0.8rem;
        display: block;
    }

    .pos-mobile-cart-bar button {
        width: 100%;
        min-height: 62px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 1.2rem;
        border: 0;
        border-radius: 1.1rem;
        background: linear-gradient(135deg, #ff7e76, var(--pos-coral));
        color: #fff;
        font: inherit;
        font-weight: 800;
        box-shadow: 0 14px 30px rgb(102 48 43 / 28%);
    }

    .pos-cart {
        position: fixed;
        z-index: 30;
        inset: 0;
        min-height: 100vh;
        display: none;
        border: 0;
        border-radius: 0;
        overflow-y: auto;
    }

    .pos-cart.is-open {
        display: flex;
    }

    .pos-cart-close {
        display: block;
    }

    .pos-card-state {
        min-height: calc(100vh - 76px);
        padding: 1.3rem 1rem 2rem;
    }

    .pos-card-state .pos-state-icon {
        width: 54px;
        height: 54px;
        margin-bottom: 0.8rem;
        border-radius: 18px;
    }

    .pos-card-steps {
        margin-block: 0.8rem;
    }

    .pos-card-outcomes {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .pos-card-outcomes button {
        min-height: 64px;
    }
}

@media (max-width: 25rem) {
    .pos-topbar {
        padding-inline: 0.8rem;
    }

    .pos-workspace {
        padding-inline: 0.8rem;
    }

    .pos-operator {
        gap: 0.4rem;
    }

    .workspace-account-copy strong {
        max-width: 4.8rem;
    }

    .workspace-account-copy small {
        font-size: 0.7rem;
    }

    .pos-product-grid {
        gap: 0.65rem;
    }

    .pos-product {
        min-height: 138px;
        padding: 0.85rem;
        border-radius: 1.1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pos-product {
        transition: none;
    }

    .pos-spinner,
    .pos-auto-progress span {
        animation-duration: 1.8s;
    }
}/* Operator hierarchy and transaction modals --------------------------------
   Handlinger belongs to the workspace header. Dagen belongs to the operator
   menu. Transaction helpers stay over the sale instead of replacing it. */
.pos-header-action,
.workspace-account-trigger,
.pos-primary-action,
.pos-secondary-action,
.pos-category,
.pos-cart-close,
.admin-shell .button,
.session-logout-button{
    border-radius: 999px;
}

/* Selected Handlinger direction: Concept A -------------------------------
   Label-only symbol tiles stay quick to scan as configured actions grow. */
.pos-action-menu-modal {
    width: min(100%, 45rem);
    gap: 1.25rem;
    padding: 1.55rem;
}

.pos-action-menu-modal .pos-modal-heading {
    position: relative;
    min-height: 3.25rem;
    display: grid;
    place-items: center;
    justify-content: center;
    padding-inline: 3.25rem;
    text-align: center;
}

.pos-action-menu-modal .pos-action-heading-copy {
    justify-content: center;
}

.pos-action-menu-modal .pos-modal-close {
    min-width: 44px;
    min-height: 44px;
    position: absolute;
    top: 50%;
    right: 0;
    width: 42px;
    height: 42px;
    box-sizing: border-box;
    display: grid;
    place-items: center;
    padding: 0 0 2px;
    border-color: rgb(23 32 29 / 8%);
    background: #f5f8f6;
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 60%);
    font-size: 1.25rem;
    line-height: 1;
    transform: translateY(-50%);
}

.pos-action-menu-modal .pos-modal-close:hover:not(:disabled),
.pos-action-menu-modal .pos-modal-close:focus-visible {
    border-color: #aebbe9;
    background: var(--ui-primary-soft);
}

@media (max-width: 720px) {
    .pos-action-menu-modal {
        gap: 1rem;
        padding: 1.2rem;
    }

    .pos-action-menu-modal .pos-action-grid {
        grid-template-columns: 1fr;
    }
}

/* Contextual operator action sheet -----------------------------------------
   One scalable grid keeps every configured action equally easy to reach. */
.pos-action-menu-modal {
    width: min(100%, 48rem);
    gap: 1.3rem;
    padding: 1.45rem;
    border-color: rgb(255 255 255 / 82%);
    background:
        radial-gradient(circle at 0 0, rgb(54 87 214 / 7%), transparent 22rem),
        #fff;
}

.pos-action-menu-modal .pos-modal-heading {
    align-items: center;
}

.pos-action-heading-copy {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .9rem;
}

.pos-action-heading-copy .pos-eyebrow {
    font-size: .7rem;
}

.pos-action-heading-copy .pos-eyebrow,
.pos-action-heading-copy h1,
.pos-action-heading-copy p {
    margin: 0;
}

.pos-action-heading-copy h1 {
    margin-top: .12rem;
}

.pos-action-heading-copy p:last-child {
    margin-top: .22rem;
    color: var(--ui-muted);
    font-size: .9rem;
}

.pos-action-menu-modal .pos-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .65rem;
}

.pos-action-menu-modal .pos-action-choice {
    min-height: 96px;
    grid-template-columns: 3rem minmax(0, 1fr);
    align-items: center;
    gap: .9rem;
    padding: .9rem 1rem;
    border-color: rgb(23 32 29 / 10%);
    border-radius: 17px;
    background: rgb(255 255 255 / 92%);
    box-shadow: 0 4px 12px rgb(20 32 27 / 4%);
    transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.pos-action-menu-modal .pos-action-choice:hover:not(:disabled),
.pos-action-menu-modal .pos-action-choice:focus-visible {
    border-color: rgb(54 87 214 / 32%);
    background: #fff;
    box-shadow: 0 9px 22px rgb(20 32 27 / 8%);
    transform: translateY(-1px);
}

.pos-action-menu-modal .pos-action-choice:active:not(:disabled) {
    transform: translateY(0) scale(.992);
}

.pos-action-menu-modal .pos-action-choice:disabled {
    opacity: .56;
    box-shadow: none;
}

.pos-action-menu-modal .pos-action-symbol {
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 14px;
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 55%);
}

.pos-action-menu-modal .pos-action-choice-cash .pos-action-symbol {
    background: #e4f5ef;
    color: #176a55;
}

.pos-action-menu-modal .pos-action-choice-wallet .pos-action-symbol {
    background: #ece9ff;
    color: #5743b8;
}

.pos-action-menu-modal .pos-action-choice-payout .pos-action-symbol {
    background: #fff0c9;
    color: #8b5b00;
}

.pos-action-menu-modal .pos-action-choice strong {
    color: var(--ui-ink);
    font-size: 1rem;
    letter-spacing: -.01em;
    line-height: 1.25;
}

.pos-action-menu-modal .pos-action-choice small {
    margin-top: .18rem;
    color: #5f6b65;
    font-size: .75rem;
}

.pos-action-arrow {
    width: 1.8rem;
    height: 1.8rem;
    display: grid !important;
    place-items: center;
    border: 1px solid var(--ui-line);
    border-radius: 50%;
    background: #fff;
    color: var(--ui-ink);
    font-size: .85rem;
    transition: transform 120ms ease;
}

.pos-action-choice:hover:not(:disabled) .pos-action-arrow,
.pos-action-choice:focus-visible .pos-action-arrow {
    transform: translateX(2px);
}

@media (max-width: 720px) {
    .pos-action-menu-modal {
        width: 100%;
        gap: .9rem;
        padding: 1rem;
        border-radius: 28px 28px 20px 20px;
    }

    .pos-action-heading-copy {
        gap: .7rem;
    }

    .pos-action-heading-copy p:last-child {
        display: none;
    }

    .pos-action-menu-modal .pos-action-grid {
        grid-template-columns: 1fr;
        gap: .55rem;
    }

    .pos-action-menu-modal .pos-action-choice {
        min-height: 76px;
        grid-template-columns: 2.55rem minmax(0, 1fr) 1.75rem;
        padding: .55rem .62rem;
    }

    .pos-action-menu-modal .pos-action-symbol {
        width: 2.55rem;
        height: 2.55rem;
        border-radius: 13px;
    }

    .pos-action-arrow {
        width: 1.65rem;
        height: 1.65rem;
    }
}

.pos-header-action {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    gap: .48rem;
    padding: .35rem 1rem;
    border: 1px solid var(--ui-line);
    background: rgb(255 255 255 / 94%);
    color: var(--ui-ink);
    box-shadow: var(--ui-shadow-sm);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.pos-header-action > span {
    color: var(--ui-primary-dark);
    font-size: 1.15rem;
    line-height: 1;
}

.pos-header-action:hover:not(:disabled),
.pos-header-action:focus-visible {
    border-color: #aebbe9;
    background: var(--ui-primary-soft);
}

.pos-action-modal-backdrop {
    position: fixed;
    z-index: 80;
    inset: 0;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    padding: 1.25rem;
    background: rgb(20 27 24 / 44%);
    backdrop-filter: blur(5px);
    animation: pos-modal-fade 130ms ease-out;
}

.pos-action-modal {
    width: min(100%, 37rem);
    max-height: min(46rem, calc(100vh - 2.5rem));
    overflow: auto;
    box-sizing: border-box;
    display: grid;
    gap: 1rem;
    padding: clamp(1.1rem, 3vw, 1.6rem);
    border: 1px solid rgb(255 255 255 / 70%);
    border-radius: 28px;
    background: var(--ui-surface);
    color: var(--ui-ink);
    box-shadow: 0 30px 90px rgb(14 22 18 / 28%);
    animation: pos-modal-rise 160ms ease-out;
}

.pos-action-menu-modal {
    width: min(100%, 42rem);
}

.pos-modal-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.pos-modal-heading h1,
.pos-modal-heading p {
    margin: 0;
}

.pos-modal-heading h1 {
    margin-top: .18rem;
    color: var(--ui-ink);
    font-size: clamp(1.65rem, 4vw, 2.15rem);
    letter-spacing: -.04em;
}

.pos-modal-heading p:last-child:not(.pos-eyebrow) {
    max-width: 31rem;
    margin-top: .4rem;
    color: var(--ui-muted);
    line-height: 1.45;
}

.pos-modal-close {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border: 1px solid var(--ui-line);
    border-radius: 50%;
    background: var(--ui-surface-soft);
    color: var(--ui-ink);
    font: 700 1.4rem/1 inherit;
    cursor: pointer;
}

.pos-modal-close:hover:not(:disabled),
.pos-modal-close:focus-visible {
    border-color: #aebbe9;
    background: var(--ui-primary-soft);
}

.pos-action-modal > label,
.pos-action-modal legend {
    color: var(--ui-ink);
    font-weight: 800;
}

.pos-action-modal > select {
    min-height: 50px;
    padding: .7rem .9rem;
    border: 1px solid var(--ui-line);
    border-radius: 16px;
    background: var(--ui-surface);
    color: var(--ui-ink);
    font: inherit;
}

.pos-action-modal .pos-text-input {
    width: 100%;
    min-height: 52px;
    box-sizing: border-box;
    padding: .75rem 1rem;
    border: 1px solid var(--ui-line-strong);
    border-radius: 999px;
    background: var(--ui-surface);
    color: var(--ui-ink);
    font: inherit;
}

.pos-action-modal .pos-text-input:focus {
    border-color: var(--ui-primary);
    outline: 3px solid rgb(54 87 214 / 15%);
}

.pos-action-modal .pos-action-grid button {
    border-radius: 22px;
}

.pos-action-modal .pos-action-grid small {
    color: #4f5b55;
}

.pos-action-modal .pos-action-symbol {
    border-radius: 50%;
}

.pos-action-modal .pos-action-grid button:disabled span small {
    color: #35423c;
}

.workspace-account-panel .workspace-account-action:disabled {
    opacity: .55;
}

@keyframes pos-modal-fade {
    from { opacity: 0; }
}

@keyframes pos-modal-rise {
    from { opacity: 0; transform: translateY(8px) scale(.985); }
}

@media (max-width: 720px) {
    .pos-operator {
        gap: .45rem;
    }

    .pos-header-action {
        min-height: 46px;
        padding-inline: .85rem;
    }

    .pos-action-modal-backdrop {
        align-items: end;
        padding: .65rem;
    }

    .pos-action-modal {
        max-height: calc(100vh - 1.3rem);
        padding: 1.15rem;
        border-radius: 26px;
    }

    .pos-action-grid button {
        min-height: 78px;
        border-radius: 20px;
    }
}

@media (max-width: 25rem) {
    .pos-header-action {
        width: 46px;
        min-width: 46px;
        padding: 0;
        font-size: 0;
    }

    .pos-header-action > span {
        font-size: 1.2rem;
    }
}

button,
input,
select {
    font: inherit;
}

button {
    min-height: 44px;
}

.admin-shell {
    min-height: 100vh;
}

.brand {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    color: inherit;
    text-decoration: none;
}

.brand > span.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: #185d3e;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.brand strong {
    font-size: 1.02rem;
    letter-spacing: -0.02em;
}
.status{
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 0 0.65rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 750;
}

.admin-main {
    box-sizing: border-box;
}

.page-kicker {
    margin: 0 0 0.55rem;
    color: #2e7653;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.admin-main h1,
.admin-main h2,
.admin-main p {
    margin-top: 0;
}

.admin-main h1 {
    margin-bottom: 0.65rem;
    font-size: clamp(2.2rem, 5vw, 3.7rem);
    line-height: 1;
    letter-spacing: -0.055em;
}

.admin-main h2 {
    margin-bottom: 0.25rem;
    font-size: 1.2rem;
    letter-spacing: -0.025em;
}

.page-lead {
    max-width: 42rem;
    margin-bottom: 2rem;
    color: #65736b;
    font-size: 1rem;
}

.readiness {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.15rem 1.25rem;
    border: 1px solid;
    border-radius: 15px;
}

.card-resolution {
    display: grid;
    gap: 0.9rem;
    margin-bottom: 1.2rem;
    padding: clamp(1rem, 3vw, 1.35rem);
    border: 2px solid #d19a3e;
    border-radius: 15px;
    background: #fff8e3;
}

.card-resolution h2,
.card-resolution p {
    margin: 0;
}
.card-resolution > p{
    margin-top: 0.25rem;
    color: #6d5b3c;
    font-size: 0.84rem;
}

.card-resolution label {
    display: grid;
    gap: 0.4rem;
    color: #51452f;
    font-size: 0.8rem;
    font-weight: 750;
}

.card-resolution input {
    min-height: 46px;
    box-sizing: border-box;
    padding: 0 0.8rem;
    border: 1px solid #cdbb94;
    border-radius: 8px;
    background: #fff;
}

.readiness.blocked {
    border-color: #f1d5a1;
    background: #fff9ed;
}

.readiness.ready {
    border-color: #b9deca;
    background: #eff9f3;
}

.readiness-icon,
.state-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f6c761;
    color: #4c3600;
    font-weight: 900;
}

.readiness.ready .readiness-icon {
    background: #57a777;
    color: #fff;
}

.readiness p {
    margin: 0.2rem 0 0;
    color: #6c685b;
    font-size: 0.88rem;
}

.button {
    min-height: 44px;
    padding: 0 1rem;
    border: 1px solid transparent;
    border-radius: 9px;
    font-weight: 750;
    cursor: pointer;
}

.button.primary {
    background: #185d3e;
    color: #fff;
}

.button.primary:hover {
    background: #104c31;
}

.button.secondary {
    border-color: #cfd8d2;
    background: #fff;
    color: #283a30;
}
.button:focus-visible,
.text-button:focus-visible,
input:focus-visible,
select:focus-visible{
    outline: 3px solid #90c7aa;
    outline-offset: 2px;
}

.button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.admin-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.summary-card {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    padding: 1.3rem;
    border: 1px solid #dde3df;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 8px 25px rgb(23 48 34 / 4%);
}

.payout-config-card {
    min-height: 0;
}

.card-heading {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.3rem;
    color: #5c6961;
    font-size: 0.84rem;
    font-weight: 700;
}

.card-icon {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 9px;
    background: #eaf3ee;
    color: #185d3e;
    font-weight: 850;
}

.big-number {
    font-size: 2.2rem;
    line-height: 1;
}

.summary-card > p {
    margin: 0.4rem 0 1rem;
    color: #657168;
    font-size: 0.85rem;
}

.seller-summary > strong {
    line-height: 1.3;
}

.text-button {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: auto -0.3rem -0.5rem;
    padding: 0 0.3rem;
    border: 0;
    background: transparent;
    color: #185d3e;
    font-size: 0.85rem;
    font-weight: 760;
    cursor: pointer;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.3rem;
}

/* The one create-action pattern in admin: a dashed add-row at the END of the
   list it creates into — it reads as the list's own last item, not a
   page-level button floating above the content. */
.admin-add-row {
    box-sizing: border-box;
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    border: 1.5px dashed color-mix(in srgb, var(--bk-coral) 38%, transparent);
    border-radius: 14px;
    background: color-mix(in srgb, var(--bk-coral) 4%, transparent);
    color: var(--bk-sec);
    font: inherit;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: background .12s, border-color .12s, color .12s;
}

.admin-add-row:hover:not(:disabled),
.admin-add-row:focus-visible {
    background: color-mix(in srgb, var(--bk-coral) 9%, transparent);
    border-color: var(--bk-coral);
    color: var(--bk-ink);
}

.admin-add-row:disabled {
    opacity: 0.45;
    cursor: default;
}

/* The plus travels in a soft round chip so the colour lives in one spot
   instead of shouting from the whole border+label. */
.admin-add-row .add-row-glyph {
    width: 26px;
    height: 26px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: color-mix(in srgb, var(--bk-coral) 13%, transparent);
    color: var(--bk-coral);
}

/* detail-cards are full-bleed (padding 0, overflow hidden, 26px radius):
   inset the row so the card's rounded corners cannot shear it. */
.detail-card > .admin-add-row {
    width: calc(100% - 1.8rem);
    margin: 0.7rem 0.9rem 0.9rem;
}

.oppsett-panel .admin-add-row,
.empty-state .admin-add-row {
    margin-top: 0.7rem;
}

/* The floating account pill (184px wide, see .workspace-account-floating)
   owns the top-right corner on wide screens; keep heading action buttons
   clear of it. Narrow screens put the pill over the sidebar top bar instead,
   where headings never reach it. */
@media (min-width: 900px) {
    .admin-shell .section-heading {
        padding-right: 12rem;
    }
}

/* Heading-row action groups (e.g. Utbetalinger): without this the buttons
   sit on one whitespace-thin gap and crowd each other. */
.settlement-heading-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.6rem;
}

.product-name {
    display: grid;
    gap: 0.25rem;
}
.product-name span{
    color: #667169;
    font-size: 0.78rem;
}

.money {
    text-align: right;
}

.status.active {
    background: #e4f4ea;
    color: #17633c;
}

.status.inactive {
    background: #eef0ef;
    color: #66716a;
}

.status.warning {
    background: #fff1cf;
    color: #735600;
}
.icon-close{
    min-height: 44px;
    border: 0;
    background: transparent;
    color: #2b6848;
    font-size: 0.82rem;
    font-weight: 750;
    cursor: pointer;
}

.icon-close {
    width: 44px;
    font-size: 1.6rem;
    color: #637168;
}

.empty-state {
    display: grid;
    place-items: center;
    padding: 4rem 1rem;
    border: 1px dashed #c7d2cb;
    border-radius: 15px;
    background: #fff;
    text-align: center;
}

.empty-state > span {
    font-size: 2rem;
}

.empty-state h2,
.empty-state h3 {
    margin-top: 1rem;
}

.empty-state p {
    color: #6b776f;
}

.form-card {
    margin-top: 1.5rem;
    padding: clamp(1.1rem, 3vw, 1.7rem);
    border: 1px solid #cfd9d3;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 14px 40px rgb(19 43 30 / 7%);
}

.form-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}

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

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

.form-grid .wide {
    grid-column: 1 / -1;
}

.form-grid .legacy-inline-status {
    color: #46564c;
}

.form-card label {
    display: grid;
    gap: 0.45rem;
    color: #46564c;
    font-size: 0.82rem;
    font-weight: 700;
}

.form-card input:not([type=checkbox]),
.form-card select {
    box-sizing: border-box;
    width: 100%;
    min-height: 46px;
    padding: 0 0.8rem;
    border: 1px solid #cbd5cf;
    border-radius: 8px;
    background: #fff;
    color: #17211b;
}

.export-card {
    max-width: 850px;
}

.export-fields {
    grid-template-columns: minmax(180px, 1.4fr) repeat(2, minmax(145px, 1fr));
}

.export-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.2rem;
}

.export-state {
    max-width: 850px;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.2rem;
    border: 1px solid #d6dfda;
    border-radius: 12px;
    background: #fff;
}

.export-state h2,
.export-state p {
    margin: 0;
}

.export-state p {
    margin-top: 0.2rem;
    color: #65736b;
    font-size: 0.88rem;
}

.archive-workspace {
    max-width: 850px;
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid #d6dfda;
}

.archive-workspace h2 {
    margin: 0;
    font-size: 2rem;
}

.archive-result {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.archive-result > div:first-child {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: #46564c;
}

.archive-file-list {
    overflow: hidden;
    border: 1px solid #d6dfda;
    border-radius: 12px;
    background: #fff;
}

.archive-file-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 72px;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #e7ece9;
}

.archive-file-row:last-child {
    border-bottom: 0;
}

.archive-file-row span {
    display: grid;
    gap: 0.15rem;
}

.archive-file-row small {
    color: #65736b;
}

.check-row {
    min-height: 44px;
    grid-template-columns: 22px 1fr !important;
    align-items: center;
    gap: 0.6rem !important;
    margin-top: 1rem;
}

.check-row input {
    width: 20px;
    height: 20px;
    accent-color: #185d3e;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.2rem;
}

.form-help {
    margin: 1rem 0 0;
    padding: 0.8rem;
    border-radius: 8px;
    background: #f2f5f3;
    color: #5a685f;
    font-size: 0.82rem;
}

.form-help.compact {
    margin: 0.45rem 0 0;
    padding: 0;
    background: none;
    font-size: 0.78rem;
}

.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0.5rem 0 1.5rem;
}

.button.quiet-danger {
    border-color: #e4c7c7;
    background: #fff;
    color: #8a2929;
}

.toast-message {
    position: fixed;
    right: 1.2rem;
    bottom: 1.2rem;
    z-index: 20;
    padding: 0.9rem 1.1rem;
    border-radius: 10px;
    background: #174f36;
    color: #fff;
    box-shadow: 0 10px 35px rgb(0 0 0 / 18%);
}

.toast-message.error {
    background: #9a2c2c;
}

.admin-state {
    min-height: 100vh;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 0.7rem;
    box-sizing: border-box;
    padding: 2rem;
    background: #f4f6f5;
    text-align: center;
}

.admin-state h1,
.admin-state p {
    margin: 0;
}

.admin-state p {
    color: #526159;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #c9d8d0;
    border-top-color: #185d3e;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 800px) {
    .admin-main {
        width: min(100% - 1.5rem, 1080px);
        padding: 2rem 0 4rem;
    }

    .admin-main h1 {
        font-size: 2.35rem;
    }

    .readiness {
        grid-template-columns: auto 1fr;
    }

    .readiness .button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .admin-cards {
        grid-template-columns: 1fr;
    }

    .summary-card {
        min-height: 155px;
    }

    .section-heading {
        align-items: flex-end;
    }

    .section-heading .button {
        flex: 0 0 auto;
    }

    .form-grid.two {
        grid-template-columns: 1fr;
    }

    .export-fields {
        grid-template-columns: 1fr;
    }

    .archive-result > div:first-child,
    .archive-file-row {
        align-items: stretch;
        flex-direction: column;
    }

    .form-grid .wide {
        grid-column: auto;
    }

}

@media (max-width: 430px) {
    .brand strong {
        display: none;
    }

    .page-lead {
        margin-bottom: 1.4rem;
    }

    .section-heading {
        gap: 0.8rem;
    }

    .section-heading .button {
        padding: 0 0.75rem;
        font-size: 0.78rem;
    }

    .payout-admin-workspace .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .payout-admin-workspace .section-heading .button {
        align-self: flex-start;
    }

    .admin-shell .payout-admin-workspace .step {
        align-items: stretch;
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .admin-shell .payout-admin-workspace .step-body {
        grid-column: 2;
    }

    .admin-shell .payout-admin-workspace .step .button {
        grid-column: 1 / -1;
        width: 100%;
    }

}

.return-search {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
    gap: 14px;
    align-items: end;
    padding: 20px;
    margin-top: 24px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
}
.return-search label,
.return-reason{
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: .85rem;
    font-weight: 700;
}
.return-search input,
.return-search select,
.return-reason textarea{
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 11px;
    background: white;
    color: var(--ink);
    font: inherit;
}
.return-summary{
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 18px 20px;
}

.return-lines {
    display: grid;
}

.return-line {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    min-height: 78px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
}

.return-line > div:first-child {
    display: grid;
    gap: 2px;
}

.return-line span,
.return-line small {
    color: var(--muted);
}

.return-reason {
    padding: 18px 20px 4px;
}

.return-reason textarea {
    resize: vertical;
}

.return-summary {
    padding-bottom: 10px;
}

.return-summary strong,
.return-total {
    font-size: 1.35rem;
}

.terminal-amount {
    display: grid;
    gap: 4px;
    width: 100%;
    padding: 18px;
    margin-top: 8px;
    border-radius: 14px;
    background: var(--ink);
    color: white;
}

.terminal-amount strong {
    font-size: clamp(2rem, 6vw, 3.5rem);
}

@media (max-width: 700px) {
    .return-search {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .return-search .button {
        width: 100%;
    }
.return-line,
.return-summary{
        padding-inline: 16px;
    }

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

    .return-reason {
        padding-inline: 16px;
    }
}

.pos-day-workspace {
    max-width: 660px;
}

.pos-day-workspace > label {
    justify-self: start;
    margin: .8rem 0 .4rem;
    font-weight: 850;
}

.day-kind-group-label {
    margin: .8rem 0 0;
    font-weight: 850;
    font-size: .8rem;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.day-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: 100%;
    margin-top: 8px;
}

.day-actions-flow > button:last-child,
.day-actions-flow > button:only-child {
    grid-column: 1 / -1;
}

.day-actions-flow button {
    min-height: 60px;
    padding: 10px 14px;
}

.day-actions-flow button small {
    display: none;
}

.purchase-reminder {
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    margin: 12px 0 4px;
    padding: 14px 16px;
    border: 1px solid #d8c27b;
    border-radius: 14px;
    background: #fff8df;
    color: var(--pos-ink);
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.purchase-reminder > span:nth-child(2) {
    display: grid;
    gap: 3px;
}

.purchase-reminder small {
    color: var(--pos-muted);
}

.purchase-reminder:focus-visible {
    outline: 4px solid #2d5f91;
    outline-offset: 3px;
}

.purchase-receipt-input {
    position: relative;
    box-sizing: border-box;
    min-width: 0;
    width: 100%;
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px dashed var(--pos-line);
    border-radius: 14px;
    background: white;
}

.purchase-file-button {
    justify-self: start;
    padding: 9px 13px;
    border-radius: 10px;
    background: var(--pos-green-soft);
    color: var(--pos-green);
    font-weight: 850;
}

.purchase-file-native {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.purchase-receipt-input:focus-within {
    outline: 4px solid #2d5f91;
    outline-offset: 3px;
}

.purchase-receipt-input small {
    color: var(--pos-green);
    overflow-wrap: anywhere;
}

.day-close-purchase-note {
    display: grid;
    gap: 4px;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid #d8c27b;
    border-radius: 14px;
    background: #fff8df;
}

.day-close-purchase-note span {
    color: var(--pos-muted);
}

.day-close-workspace {
    width: min(920px, calc(100% - 40px));
    margin: 0 auto;
    padding: 42px 0 72px;
}

.day-close-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 28px;
    margin: 22px 0 26px;
}

.day-close-heading h1 {
    margin: 4px 0 8px;
    font-size: clamp(2.1rem, 5vw, 3.6rem);
    line-height: 1;
}

.day-close-heading p {
    margin: 0;
}

.day-close-note,
.day-close-blockers,
.day-close-step,
.day-close-block,
.day-close-difference-explanation,
.day-close-complete {
    border: 1px solid #d9e2dd;
    border-radius: 22px;
    background: #fff;
}

.day-close-note {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 20px;
    margin-bottom: 20px;
    background: #edf7f1;
}

.day-close-step {
    display: grid;
    grid-template-columns: minmax(0, min(100%, 34rem));
    gap: 18px;
    justify-items: stretch;
    justify-content: center;
    padding: 28px;
}

.day-close-step > div:last-child {
    display: grid;
    gap: 14px;
}

.day-close-step h2,
.day-close-block h2,
.day-close-blockers h2,
.day-close-blockers h3,
.day-close-difference-explanation h2,
.day-close-difference-explanation h3,
.day-close-complete h2 {
    margin: 0;
    font-size: 1.45rem;
}

/* The close is one sheet: the count, the report figures and the reconcile
   summary stacked in reading order, all of it fillable from the first look. */
.day-close-sheet {
    display: grid;
    gap: 20px;
}

.day-close-block {
    display: grid;
    gap: 14px;
    padding: 28px;
    justify-items: stretch;
}

.day-close-block > p {
    margin: 0;
}

.day-close-block > label {
    display: grid;
    gap: 7px;
    font-weight: 750;
}

.day-close-block .pos-money-input,
.day-close-block .pos-primary-action,
.day-close-block .pos-secondary-action {
    width: min(100%, 420px);
}

.day-close-block textarea {
    width: 100%;
    min-height: 52px;
    padding: 12px 14px;
    border: 1px solid #aebdb5;
    border-radius: 12px;
    background: #fff;
    color: #102219;
    font: inherit;
}

/* Says in words what the line is for, so «frivillig» is never colour alone. */
.day-close-settlement-tag {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 9px;
    border-radius: 999px;
    background: #eef2f0;
    color: #3d4f47;
    font-size: 0.78rem;
    font-weight: 700;
    vertical-align: middle;
}

.day-close-step p {
    margin: 0 0 4px;
}

.day-close-step-number {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 15px;
    background: #12633f;
    color: #fff;
    font-weight: 800;
}

.day-close-step .pos-money-input,
.day-close-step .pos-primary-action {
    width: min(100%, 420px);
}

.day-close-comparison {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.day-close-comparison article {
    display: grid;
    gap: 6px;
    min-height: 108px;
    padding: 20px;
    border: 1px solid #d9e2dd;
    border-radius: 18px;
    background: #fff;
}

.day-close-comparison strong {
    font-size: 1.45rem;
}

/* A figure POS fetched: shown as a read-only card, never as an empty field. */
.day-close-fetched-line {
    box-sizing: border-box;
    display: grid;
    gap: 6px;
    width: min(100%, 420px);
    margin-bottom: 12px;
    padding: 16px 20px;
    border: 1px solid #d9e2dd;
    border-radius: 18px;
    background: #fff;
}

.day-close-fetched-line h3 {
    margin: 0;
}

.day-close-fetched-line .day-close-settlement-preview strong {
    font-size: 1.45rem;
}

/* The report number sits under its figure, as wide as the amount field. */
.day-close-settlement-reference {
    display: grid;
    gap: 6px;
    width: min(100%, 420px);
    margin: 10px 0 4px;
    font-weight: 600;
}

.day-close-settlement-reference input {
    box-sizing: border-box;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid #aebdb5;
    border-radius: 12px;
    background: #fff;
    color: #102219;
    font: inherit;
    font-weight: 500;
}

/* The NT slip's own check digit, next to the two figures it checks. */
.day-close-nt-check {
    box-sizing: border-box;
    display: grid;
    gap: 10px;
    width: min(100%, 420px);
    margin: 4px 0 18px;
    padding: 14px 18px;
    border: 1px dashed #aebdb5;
    border-radius: 14px;
    background: #f6f9f7;
}

.day-close-nt-check p {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin: 0;
}

.day-close-nt-check strong {
    font-size: 1.25rem;
}

.day-close-nt-confirm {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    font-weight: 700;
    cursor: pointer;
}

.day-close-nt-confirm input {
    width: 22px;
    height: 22px;
}

.difference.ok {
    background: #edf7f1;
    color: #124f35;
}

.day-close-movements {
    margin-bottom: 20px;
    padding: 16px 20px;
    border: 1px solid #d9e2dd;
    border-radius: 18px;
    background: #fff;
}

.day-close-movements ul {
    display: grid;
    gap: 8px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
}

.day-close-movements li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 12px;
    align-items: baseline;
    font-size: .92rem;
}

.day-close-movements li small {
    grid-column: 1 / -1;
    color: #5c6b64;
}

.difference.attention {
    background: #fff3d9;
    color: #6f4800;
}

.day-close-blockers {
    display: grid;
    gap: 12px;
    padding: 24px;
    margin-bottom: 20px;
    border-color: #e8c77f;
    background: #fff8e8;
}

.day-close-blockers > div {
    display: grid;
    gap: 3px;
    padding-top: 12px;
    border-top: 1px solid #ead8af;
}
.day-close-step > div > label{
    display: grid;
    gap: 7px;
    font-weight: 750;
}
.day-close-step textarea{
    width: 100%;
    min-height: 52px;
    padding: 12px 14px;
    border: 1px solid #aebdb5;
    border-radius: 12px;
    background: #fff;
    color: #102219;
    font: inherit;
}

.day-close-card-comparison {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 16px;
    border-radius: 14px;
    background: #f1f4f2;
}

.day-close-card-comparison span {
    display: grid;
    gap: 4px;
}

.day-close-difference-explanation {
    display: grid;
    gap: 14px;
    padding: 24px 28px;
    margin-top: 20px;
    border-color: #e8c77f;
    background: #fff8e8;
}

.day-close-difference-explanation p,
.day-close-difference-explanation h2 {
    margin: 0;
}

.day-close-difference-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.day-close-difference-summary span {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    min-width: 210px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff;
}

.day-close-difference-explanation label {
    font-weight: 750;
}

.day-close-difference-explanation textarea {
    width: min(100%, 620px);
    min-height: 76px;
    padding: 12px 14px;
    border: 1px solid #aebdb5;
    border-radius: 12px;
    background: #fff;
    color: #102219;
    font: inherit;
}

.day-close-final-action {
    display: grid;
    gap: 10px;
    justify-items: end;
    margin-top: 20px;
}

.day-close-final-action .pos-primary-action {
    width: min(100%, 420px);
}

.day-close-complete {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 44px 28px;
    text-align: center;
}

.day-close-complete p {
    max-width: 540px;
    margin: 0;
}

@media (max-width: 620px) {
    .day-close-workspace {
        width: min(100% - 24px, 920px);
        padding-top: 26px;
    }

    .day-close-heading,
    .day-close-note,
    .day-close-card-comparison {
        align-items: stretch;
        flex-direction: column;
    }

    .day-close-comparison {
        grid-template-columns: 1fr;
    }

    .day-close-comparison article {
        min-height: 86px;
    }

    .day-close-step {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .day-close-block {
        padding: 20px;
    }

    .day-close-difference-explanation {
        padding: 20px;
    }

    .day-close-difference-summary span {
        width: 100%;
    }

    .day-close-final-action {
        justify-items: stretch;
    }
}

.day-actions button {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 2px 12px;
    align-items: center;
    min-height: 76px;
    padding: 10px 14px;
    border: 1px solid var(--pos-line);
    border-radius: 16px;
    background: white;
    color: var(--pos-ink);
    text-align: left;
    cursor: pointer;
}

.day-actions button:hover,
.day-actions button:focus-visible {
    border-color: var(--pos-green);
    box-shadow: 0 0 0 3px rgba(41, 105, 74, .13);
}

.day-actions button > span {
    grid-row: 1 / 3;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 14px;
    background: var(--pos-green-soft);
    color: var(--pos-green);
    font-size: 1.5rem;
    font-weight: 800;
}

.day-actions button strong {
    font-size: 1rem;
}

.day-actions button small {
    color: var(--pos-muted);
}

.day-reason-input {
    box-sizing: border-box;
    width: 100%;
    min-height: 72px;
    padding: 12px 14px;
    border: 1px solid var(--pos-line);
    border-radius: 12px;
    background: white;
    color: var(--pos-ink);
    font: inherit;
    resize: vertical;
}

.day-movement-reason {
    display: grid;
    gap: 4px;
    width: 100%;
    padding: 16px;
    border: 1px solid var(--pos-line);
    border-radius: 14px;
    background: white;
}

.day-movement-reason span {
    color: var(--pos-muted);
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
}

@media (max-width: 600px) {
    .day-actions {
        grid-template-columns: 1fr;
    }
}

/* =========================================================================
   Daggry — soft, warm admin theme (scoped to .admin-shell; POS is untouched)
   Source of truth: docs/design/admin-redesign (kassens fargefamilie)
   ========================================================================= */
:root {
    --bk-bg: #FDF8F3;
    --bk-surface: #FFFFFF;
    --bk-surface-2: #FAF3EC;
    --bk-line: #F4EBE3;
    --bk-line-soft: #F8F1E9;
    --bk-ink: #3B2E3A;
    --bk-sec: #5F5260;
    --bk-muted: #6F6372;
    --bk-coral: #C8444C;       /* AA text on light surfaces (≈4.8:1) */
    --bk-coral-dark: #8F2828;
    --bk-coral-soft: #FBEBEB;  /* selected-nav / soft fills */
    --bk-peach: #FFE4D2;
    --bk-ok: #185D3E;
    --bk-ok-tint: #E9F6EE;
    --bk-ok-border: #CDE6D4;
    --bk-warn: #8A5700;
    --bk-warn-tint: #FBF1E0;
    --bk-warn-border: #F0DBA8;
    --bk-bad: #8D252B;
    --bk-bad-tint: #FBEAE8;
    --bk-bad-border: #F0CFCB;
    --bk-radius: 16px;
    --bk-radius-lg: 26px;
    --bk-shadow: 0 1px 2px rgba(59, 46, 58, 0.02), 0 18px 44px rgba(59, 46, 58, 0.05);
    --bk-shadow-sm: 0 10px 24px -14px rgba(59, 46, 58, 0.22);
}

.admin-shell {
    font-family: Nunito, "Avenir Next", "Segoe UI", ui-rounded, system-ui, sans-serif;
    background:
        radial-gradient(60% 50% at 82% -12%, #FFEDD9 0%, transparent 58%),
        radial-gradient(55% 45% at 4% -14%, #FDEEF1 0%, transparent 55%),
        var(--bk-bg);
    background-attachment: fixed;
    color: var(--bk-ink);
}

/* --- typography (Nunito throughout, like the kasse) --- */
.admin-shell .page-kicker {
    color: var(--bk-coral);
    font-weight: 700;
}
.admin-shell .admin-main h1 {
    font-weight: 750;
    letter-spacing: -0.028em;
    color: var(--bk-ink);
}
.admin-shell .admin-main h2 {
    letter-spacing: -0.01em;
}
.admin-shell .page-lead {
    color: var(--bk-sec);
}

/* --- buttons: soft pills --- */
.admin-shell .button {
    min-height: 46px;
    padding: 0 1.25rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 0.92rem;
    transition: background .15s, border-color .15s, transform .05s;
}
.admin-shell .button.primary {
    background: linear-gradient(135deg, #D4606A, #C8444C 62%);
    color: #fff;
    box-shadow: 0 9px 24px rgba(200, 68, 76, 0.30);
}
.admin-shell .button.primary:hover {
    background: linear-gradient(135deg, #C8515B, #B03A42 62%);
    box-shadow: 0 12px 28px rgba(200, 68, 76, 0.38);
}
.admin-shell .button.secondary {
    background: var(--product-tile-color, var(--bk-surface));
    border-color: var(--bk-line);
    color: var(--bk-ink);
}
.admin-shell .button.secondary:hover {
    border-color: var(--bk-coral);
}
.admin-shell .button.quiet-danger {
    background: var(--bk-surface);
    border-color: var(--bk-bad-border);
    color: var(--bk-bad);
}
.admin-shell .button:focus-visible,
.admin-shell .text-button:focus-visible,
.admin-shell input:focus-visible,
.admin-shell select:focus-visible{
    outline: 3px solid var(--bk-coral);
    outline-offset: 2px;
}
.admin-shell .check-row input {
    accent-color: var(--bk-coral);
}
.admin-shell .button:disabled,
.admin-shell .button.primary:disabled,
.admin-shell .button.secondary:disabled {
    background: var(--bk-line-soft);
    color: var(--bk-muted);
    border-color: var(--bk-line);
    box-shadow: none;
    opacity: 1;
    cursor: not-allowed;
}

/* --- forms --- */
.admin-shell .form-card {
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius-lg);
    background: var(--bk-surface);
    box-shadow: var(--bk-shadow);
}
.admin-shell .form-card label {
    color: var(--bk-sec);
    font-weight: 600;
}
.admin-shell .form-card input:not([type=checkbox]),
.admin-shell .form-card select {
    min-height: 48px;
    border: 1px solid var(--bk-line);
    border-radius: 12px;
    background: var(--bk-surface-2);
    color: var(--bk-ink);
    transition: border-color .15s, box-shadow .15s;
}
.admin-shell .form-card input:not([type=checkbox]):focus,
.admin-shell .form-card select:focus {
    border-color: var(--bk-coral);
    box-shadow: 0 0 0 3px rgba(200, 90, 62, 0.16);
    outline: none;
}
.admin-shell .form-help {
    background: var(--bk-line-soft);
    color: var(--bk-muted);
    border-radius: 12px;
}
.admin-shell .card-resolution input {
    border-radius: 12px;
    border-color: var(--bk-line);
}

/* --- readiness + states (soft pastel, AA) --- */
.admin-shell .readiness {
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius);
    background: var(--bk-surface);
    box-shadow: var(--bk-shadow-sm);
}
.admin-shell .readiness.ready {
    border-color: var(--bk-ok-border);
    background: var(--bk-ok-tint);
}
.admin-shell .readiness.blocked {
    border-color: var(--bk-warn-border);
    background: var(--bk-warn-tint);
}
.admin-shell .readiness strong {
    color: var(--bk-ink);
}
.admin-shell .readiness p {
    color: var(--bk-sec);
}
.admin-shell .readiness-icon,
.admin-shell .state-icon {
    background: var(--bk-warn-border);
    color: var(--bk-warn);
}
.admin-shell .readiness.ready .readiness-icon {
    background: var(--bk-ok);
    color: #fff;
}

/* --- uncertain-card resolution (soft peach) --- */
.admin-shell .card-resolution {
    border: 1px solid #F1D2B0;
    border-radius: var(--bk-radius-lg);
    background: #FBEFE3;
    box-shadow: var(--bk-shadow-sm);
}
.admin-shell .card-resolution h2 {
    color: var(--bk-ink);
}
.admin-shell .card-resolution > p{
    color: var(--bk-sec);
}
.admin-shell .card-resolution label {
    color: var(--bk-sec);
}

/* --- status pills + role chip --- */
.admin-shell .status {
    border-radius: 999px;
    font-weight: 600;
}
.admin-shell .status.active {
    background: var(--bk-ok-tint);
    color: var(--bk-ok);
}
.admin-shell .status.inactive {
    background: #F1ECE3;
    color: var(--bk-muted);
}
.admin-shell .status.warning {
    background: var(--bk-warn-tint);
    color: var(--bk-warn);
}

/* --- toast (soft, AA) --- */
.admin-shell .toast-message {
    border-radius: 14px;
    background: var(--bk-ok-tint);
    color: var(--bk-ok);
    border: 1px solid var(--bk-ok-border);
    box-shadow: var(--bk-shadow);
    font-weight: 600;
}
.admin-shell .toast-message.error {
    background: var(--bk-bad-tint);
    color: var(--bk-bad);
    border-color: var(--bk-bad-border);
}/* --- accent text links stay coral --- */
.admin-shell .text-button{
    color: var(--bk-coral);
}

/* Plain in-content links (no class) — e.g. «fra halloversikten» in oppsett. */
.admin-shell .admin-main a:not([class]) {
    color: var(--bk-coral);
    font-weight: 650;
    text-decoration: none;
}
.admin-shell .admin-main a:not([class]):hover {
    text-decoration: underline;
}

/* The dev-only synthetic-hall banner is sticky too; dock the sidebar under it
   so the account chip is not pushed below the fold. */
body:has(.synthetic-hall-banner) .admin-sidebar {
    top: 34px;
    height: calc(100vh - 34px);
}

/* --- varsler (bell) — the one place needs-attention surfaces --- */
.admin-shell .admin-ready-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0 0.75rem;
}

.admin-shell .admin-ready-row .admin-ready {
    padding: 0;
}

.admin-shell .notif-anchor {
    position: relative;
    flex: none;
}

.admin-shell .notif-btn {
    position: relative;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--bk-line);
    border-radius: 50%;
    background: var(--bk-surface);
    color: var(--bk-sec);
    cursor: pointer;
    transition: background .14s, color .14s, transform .14s;
}

.admin-shell .notif-btn:hover {
    background: var(--bk-coral-soft);
    color: var(--bk-coral);
    transform: translateY(-1px);
}

.admin-shell .notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 19px;
    height: 19px;
    display: grid;
    place-items: center;
    padding: 0 0.3rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #FBBF24, #F97316);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    box-shadow: 0 3px 8px rgba(245, 158, 11, 0.4), 0 0 0 2px #FFF;
}

/* Oversized rather than position:fixed — the sidebar's backdrop-filter makes
   it a containing block, so a fixed backdrop would only cover the sidebar. */
.admin-shell .popover-backdrop {
    position: absolute;
    top: -100vh;
    left: -100vw;
    width: 300vw;
    height: 300vh;
    z-index: 39;
    background: transparent;
}

.admin-shell .popover {
    position: absolute;
    z-index: 40;
    min-width: 230px;
    padding: 0.55rem;
    border: 1px solid var(--bk-line);
    border-radius: 20px;
    background: var(--bk-surface);
    box-shadow: var(--bk-shadow-sm), 0 24px 60px rgba(59, 46, 58, 0.14);
}

.admin-shell .popover.notif {
    /* Anchored to the sidebar's left edge — the popover is wider than the
       sidebar, so right-anchoring would push it off-screen. Opens upward. */
    left: 0;
    bottom: calc(100% + 10px);
    width: min(350px, calc(100vw - 2rem));
    box-sizing: border-box;
}

.admin-shell .popover-label {
    margin: 0.2rem 0 0.35rem;
    padding: 0 0.65rem;
    color: var(--bk-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.admin-shell .notif-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.7rem;
    padding: 0.65rem 0.7rem;
    border-radius: 15px;
    transition: background .13s;
}

.admin-shell .notif-item:hover {
    background: var(--bk-surface-2);
}

.admin-shell .notif-item .button {
    grid-column: 2;
    justify-self: start;
    margin-top: 0.45rem;
    min-height: 38px;
    padding: 0 0.9rem;
    font-size: 0.85rem;
}

.admin-shell .notif-ico {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #FDECC8;
    color: #9A6700;
    font-size: 0.82rem;
    font-weight: 800;
}

.admin-shell .notif-ico.ok {
    display: inline-grid;
    width: 22px;
    height: 22px;
    vertical-align: -0.45rem;
    margin-right: 0.35rem;
    background: #DDF2E5;
    color: var(--bk-ok);
    font-size: 0.7rem;
}

.admin-shell .notif-body b {
    display: block;
    font-size: 0.89rem;
    font-weight: 700;
    color: var(--bk-ink);
}

.admin-shell .notif-body span {
    display: block;
    color: var(--bk-muted);
    font-size: 0.79rem;
}

.admin-shell .popover-divider {
    margin: 0.45rem 0.6rem;
    border: 0;
    border-top: 1px solid var(--bk-line-soft);
}

.admin-shell .notif-all {
    margin: 0.35rem 0.15rem 0.3rem;
    color: var(--bk-muted);
    font-size: 0.8rem;
}

.admin-shell .resolve-context {
    margin: 0 0 0.4rem;
}

/* --- dagsoppgjør: én kort, én liste, pager --- */
.admin-shell .day-card {
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius-lg);
    background: var(--bk-surface);
    box-shadow: var(--bk-shadow);
    overflow: hidden;
}

.admin-shell .day-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem;
    box-sizing: border-box; /* div rows missed the button reset and grew past the card */
    width: 100%;
    padding: 0.95rem 1.5rem;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    text-align: left;
}

/* Sum + pill + action travel together; on narrow screens the cluster drops
   to its own right-aligned line instead of clipping at the card edge. */
.admin-shell .day-side {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex: none;
    margin-left: auto;
}

.admin-shell .day-row + .day-row {
    border-top: 1px solid var(--bk-line-soft);
}

.admin-shell .day-row.is-clickable {
    cursor: pointer;
}

.admin-shell .day-row.is-clickable:hover {
    background: var(--bk-surface-2);
}

.admin-shell .day-row.is-clickable:hover .day-when {
    color: var(--bk-coral);
}

.admin-shell .day-id {
    min-width: 0;
    flex: 1;
}

.admin-shell .day-id .day-when {
    display: block;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--bk-ink);
}

.admin-shell .day-id small {
    display: block;
    color: var(--bk-muted);
    font-size: 0.8rem;
}

.admin-shell .day-sum {
    font-weight: 700;
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: var(--bk-ink);
}

.admin-shell .pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex: none;
    min-height: 26px;
    padding: 0 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.admin-shell .pill.ok {
    background: #DDF2E5;
    color: var(--bk-ok);
}

.admin-shell .pill.warn {
    background: #FDECC8;
    color: #9A6700;
}

.admin-shell .pill.neutral {
    background: var(--bk-surface-2);
    color: var(--bk-sec);
}

.admin-shell .day-row .button.small {
    flex: none;
    min-height: 38px;
    padding: 0 0.9rem;
    font-size: 0.85rem;
}

.admin-shell .pager-row {
    display: flex;
    justify-content: center;
    padding: 0.95rem 1rem 0.9rem;
    border-top: 1px solid var(--bk-line-soft);
}

.admin-shell .pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem;
}

.admin-shell .page-btn {
    min-height: 34px;
    min-width: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.75rem;
    border: 1px solid #E7D8CD;
    border-radius: 999px;
    background: var(--bk-surface);
    color: var(--bk-sec);
    font-size: 0.85rem;
    font-weight: 650;
    cursor: pointer;
}

.admin-shell .page-btn:hover:not(:disabled) {
    background: var(--bk-surface-2);
    color: var(--bk-ink);
}

.admin-shell .page-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.admin-shell .page-btn.is-current {
    min-width: 0;
    border-color: var(--bk-coral);
    background: var(--bk-coral-soft);
    color: var(--bk-coral-dark);
    cursor: default;
}

/* --- Z-rapport-oppsummering i dialog --- */
.admin-shell .z-sub {
    margin: 0.25rem 0 0;
    color: var(--bk-muted);
    font-size: 0.85rem;
}

.admin-shell .z-list {
    display: grid;
    gap: 0.45rem;
    margin: 0;
}

.admin-shell .z-list > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.45rem;
    border-bottom: 1px solid var(--bk-line-soft);
}

.admin-shell .z-list > div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.admin-shell .z-list dt {
    color: var(--bk-sec);
    font-size: 0.88rem;
    font-weight: 600;
}

.admin-shell .z-list dd {
    margin: 0;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--bk-ink);
}

/* --- rapporter: økonomidokumenter som detaljlister --- */
.admin-shell .detail-card {
    margin-top: 1.4rem;
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius-lg);
    background: var(--bk-surface);
    box-shadow: var(--bk-shadow);
    overflow: hidden;
}

.admin-shell .detail-card .card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--bk-line);
}

.admin-shell .detail-card .card-head h2 {
    margin: 0;
    font-size: 1.06rem;
    font-weight: 750;
    letter-spacing: -0.015em;
    color: var(--bk-ink);
}

.admin-shell .detail-card .card-head small {
    color: var(--bk-muted);
    font-size: 0.8rem;
}

.admin-shell .detail-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 1.05rem 1.5rem;
}

.admin-shell .detail-row + .detail-row {
    border-top: 1px solid var(--bk-line-soft);
}

.admin-shell .detail-row h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--bk-ink);
}

.admin-shell .detail-row .detail-note {
    display: block;
    margin-top: 0.15rem;
    color: var(--bk-muted);
    font-size: 0.79rem;
}

.admin-shell .detail-row .detail-value {
    color: var(--bk-sec);
    font-size: 0.9rem;
}

.admin-shell .detail-row .date-range {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.admin-shell .detail-row .date-range label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--bk-sec);
    font-size: 0.85rem;
}

.admin-shell .detail-row.detail-row-stack {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
}

.admin-shell .detail-row.detail-row-stack .saft-controls {
    display: grid;
    gap: 0.7rem;
    justify-items: start;
}

.admin-shell .detail-row .control-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.admin-shell .detail-row .control-fields label {
    display: grid;
    gap: 0.25rem;
    color: var(--bk-sec);
    font-size: 0.8rem;
}

.admin-shell .detail-foot {
    margin: 0;
    padding: 0 1.5rem 1rem;
    color: var(--bk-muted);
    font-size: 0.82rem;
}

/* --- utbetalinger: rader med rediger --- */
.admin-shell .detail-row.detail-row-button {
    width: 100%;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    grid-template-columns: minmax(0, 1fr) auto;
}

.admin-shell .detail-row.detail-row-button:hover {
    background: var(--bk-surface-2);
}

.admin-shell .detail-row.detail-row-button:hover h3 {
    color: var(--bk-coral);
}

.admin-shell .detail-row .detail-go {
    flex: none;
    color: var(--bk-coral);
    font-size: 0.86rem;
    font-weight: 700;
    white-space: nowrap;
}

.admin-shell .settlement-heading-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.admin-shell .settlement-heading-actions .button {
    white-space: nowrap;
}

/* --- produkter: gruppechips, rader, bryter --- */
.admin-shell .chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 1.1rem 0 0.9rem;
}

.admin-shell .chip {
    min-height: 37px;
    padding: 0 1.05rem;
    border: 1px solid #E7D8CD;
    border-radius: 999px;
    background: var(--bk-surface);
    color: var(--bk-sec);
    font-size: 0.87rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .14s, color .14s, border-color .14s;
}

.admin-shell .chip:hover {
    background: var(--bk-surface-2);
    color: var(--bk-ink);
}

.admin-shell .chip.is-on {
    border-color: var(--bk-coral);
    background: var(--bk-coral-soft);
    color: var(--bk-coral-dark);
}

.admin-shell .product-card-list {
    margin-top: 0;
}

.admin-shell .product-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 1rem 0.35rem 0.5rem;
    transition: background .12s;
}

/* The card's tools (visibility switch + drag grip) travel together; on narrow
   screens they drop to their own right-aligned line so the name and meta text
   get the full row width. */
.admin-shell .row-tools {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

/* One big touch target: tile, name and price open the product together. The
   row's own padding still breathes around it. */
.admin-shell .product-open {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    min-height: 44px;
    padding: 0.3rem 0.8rem 0.3rem 0.3rem;
    border: 0;
    border-radius: 14px;
    background: none;
    text-align: left;
    cursor: pointer;
}

@media (max-width: 560px) {
    .admin-shell .product-row {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 0.1rem;
        padding: 0.4rem 0.75rem 0.5rem 0.5rem;
    }

    .admin-shell .row-tools {
        justify-content: flex-end;
        margin-right: 0.3rem;
    }

    .admin-shell .product-open {
        grid-template-columns: 44px minmax(0, 1fr) auto;
        gap: 0.7rem;
        padding: 0.2rem 0.4rem 0.2rem 0.2rem;
    }

    .admin-shell .product-open .prod-tile {
        width: 44px;
        height: 44px;
    }
}

.admin-shell .product-row:hover {
    background: var(--bk-surface-2);
}

.admin-shell .product-row + .product-row {
    border-top: 1px solid var(--bk-line-soft);
}

.admin-shell .product-row.is-hidden-row .product-id strong {
    color: var(--bk-muted);
}

.admin-shell .prod-tile {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    font-size: 1.3rem;
    font-weight: 800;
    box-shadow: inset 0 0 0 1px rgba(59, 46, 58, 0.035);
}

.admin-shell .product-id {
    min-width: 0;
}

.admin-shell .product-id strong {
    display: block;
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--bk-ink);
}

.admin-shell .product-open:hover .product-id strong {
    color: var(--bk-coral);
    text-decoration: underline;
}

.admin-shell .product-id small {
    display: block;
    color: var(--bk-muted);
    font-size: 0.79rem;
    /* Wrap the code·group·stock line evenly instead of leaving orphans. */
    text-wrap: balance;
}

.admin-shell .product-price {
    font-weight: 700;
    font-size: 0.98rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: var(--bk-ink);
}

.admin-shell .switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 44px;
    height: 25px;
    /* The global button touch-target (button { min-height: 44px }) otherwise
       wins over height and the pill renders as a 44×44 circle. */
    min-height: 0;
    flex: none;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #E3D9D2;
    cursor: pointer;
    transition: background .16s;
}

.admin-shell .switch::after {
    content: "";
    position: absolute;
    left: 3px;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(59, 46, 58, 0.25);
    transition: transform .16s;
}

.admin-shell .switch[aria-checked="true"] {
    background: var(--bk-coral);
}

.admin-shell .switch[aria-checked="true"]::after {
    transform: translateX(19px);
}

.admin-shell .switch:disabled {
    opacity: 0.5;
    cursor: default;
}

/* The grip replaces the old ▲/▼ pair: drag with any pointer, or focus it and
   use the arrow keys (product-drag.js routes both). touch-action: none keeps
   the browser from scrolling instead of dragging — only this strip opts out,
   the rest of the card scrolls and clicks as usual. */
.admin-shell .drag-handle {
    width: 34px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--bk-muted);
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.admin-shell .drag-handle:hover,
.admin-shell .drag-handle:focus-visible {
    color: var(--bk-ink);
    background: var(--bk-surface-2);
}

.admin-shell .drag-handle:active {
    cursor: grabbing;
}

.admin-shell .product-row.is-dragging {
    opacity: 0.45;
}

/* Card-wide drag: press-and-hold or mouse-drag anywhere on the card (see
   product-drag.js). Keep long-press furniture out of the way. */
.admin-shell .product-row,
.admin-shell .product-open {
    -webkit-touch-callout: none;
}

.admin-shell .product-row.is-dragging .product-open {
    cursor: grabbing;
}

.admin-shell .product-row.is-drop-before {
    box-shadow: inset 0 3px 0 var(--bk-coral);
}

.admin-shell .product-row.is-drop-after {
    box-shadow: inset 0 -3px 0 var(--bk-coral);
}

/* --- innfellbare lister (slettede produkter, tellinger) --- */
.admin-shell .admin-details {
    margin-top: 1rem;
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius);
    background: var(--bk-surface-2);
}

.admin-shell .admin-details > summary {
    padding: 0.8rem 1.2rem;
    color: var(--bk-sec);
    font-size: 0.88rem;
    font-weight: 650;
    cursor: pointer;
}

.admin-shell .admin-details[open] > summary {
    border-bottom: 1px solid var(--bk-line);
}

.admin-shell .admin-details > *:not(summary) {
    margin: 0.9rem 1.2rem;
}

.admin-shell .admin-details .form-help {
    margin-bottom: 0.9rem;
}

/* --- shell + sidebar + pill nav (concept «Daggry myk») --- */
.admin-shell {
    display: grid;
    grid-template-columns: 272px minmax(0, 1fr);
    align-items: start;
}

/* The hall directory has no sidebar — it stacks its own topbar + main. */
.admin-shell.hall-picker-shell {
    display: block;
}

.hall-picker-topbar .brand > span.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    background: linear-gradient(135deg, #FFE4D2, #FFC5B8);
    color: var(--bk-coral-dark);
}

.hall-picker-topbar .brand strong {
    color: var(--bk-ink);
}
.admin-shell .admin-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    box-sizing: border-box;
    height: 100vh;
    padding: 1.25rem 1rem;
    border-right: 1px solid var(--bk-line);
    background: rgba(255, 251, 245, 0.82);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}
.admin-shell .brand {
    gap: 0.7rem;
    padding: 0 0.35rem;
}
.admin-shell .brand > span.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    background: linear-gradient(145deg, #FFE4D2, #FFC5B8);
    color: var(--bk-coral-dark);
    font-weight: 800;
    font-size: 0.74rem;
    letter-spacing: 0.04em;
    box-shadow: 0 10px 24px rgba(200, 68, 76, 0.16);
}
.admin-shell .brand .brand-copy {
    display: grid;
    line-height: 1.15;
}
.admin-shell .brand strong {
    font-weight: 800;
    font-size: 0.98rem;
    letter-spacing: -0.01em;
    color: var(--bk-ink);
}
.admin-shell .brand small {
    color: var(--bk-muted);
    font-size: 0.75rem;
}
/* hall-velger */
.admin-shell .admin-hall {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius);
    background: var(--bk-surface-2);
    color: inherit;
    text-decoration: none;
    transition: border-color .15s, background .15s;
}
.admin-shell .admin-hall:hover {
    border-color: var(--bk-line-strong, #E7D8CD);
    background: #fff;
}
.admin-shell .admin-hall-dot {
    width: 9px;
    height: 9px;
    flex: none;
    border-radius: 50%;
    background: #35A06B;
    box-shadow: 0 0 0 3px rgba(53, 160, 107, 0.18);
}
.admin-shell .admin-hall-dot.warn {
    background: #F5A623;
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.20);
}
.admin-shell .admin-hall-copy {
    min-width: 0;
    flex: 1;
    display: grid;
    line-height: 1.25;
    /* keep the ellipsis from kissing the caret */
    padding-right: 0.4rem;
}
.admin-shell .admin-hall-copy strong {
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-shell .admin-hall-copy small {
    color: var(--bk-muted);
    font-size: 0.72rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.admin-shell .admin-hall-caret {
    color: var(--bk-muted);
    font-size: 0.7rem;
}
/* navigasjon */
.admin-shell .admin-sidenav {
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
}
.admin-shell .admin-nav-group {
    margin: 1rem 0 0.4rem 0.75rem;
    color: var(--bk-muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.admin-shell .admin-nav-group:first-child {
    margin-top: 0;
}
.admin-shell .admin-sidenav a,
.admin-shell .admin-sidenav button {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 46px;
    padding: 0 0.9rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--bk-sec);
    font-weight: 600;
    font-size: 0.94rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: background .14s, color .14s, box-shadow .14s;
}
.admin-shell .admin-sidenav a span,
.admin-shell .admin-sidenav button span {
    width: 24px;
    color: var(--bk-muted);
    font-size: 1rem;
    text-align: center;
}
.admin-shell .admin-sidenav a:hover,
.admin-shell .admin-sidenav button:hover {
    background: #fff;
    color: var(--bk-ink);
    box-shadow: var(--bk-shadow);
}
.admin-shell .admin-sidenav a.selected,
.admin-shell .admin-sidenav button.selected {
    background: var(--bk-coral-soft);
    color: var(--bk-coral-dark);
    font-weight: 650;
    box-shadow: 0 4px 14px rgba(200, 68, 76, 0.10);
}
.admin-shell .admin-sidenav a.selected span,
.admin-shell .admin-sidenav button.selected span {
    color: var(--bk-coral);
}
/* sidefot */
.admin-shell .admin-sidefoot {
    position: relative;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding-top: 0.95rem;
    border-top: 1px solid var(--bk-line);
}
.admin-shell .admin-ready {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    /* align the dot with the nav icons' column (pills pad 0.9rem) */
    padding: 0 0.75rem;
    color: var(--bk-sec);
    font-size: 0.8rem;
    font-weight: 600;
}
.admin-shell .admin-ready-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #35A06B;
    box-shadow: 0 0 0 3px rgba(53, 160, 107, 0.18);
}
.admin-shell .admin-ready.warn .admin-ready-dot {
    background: #F5A623;
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.20);
}
/* --- oversikt: KPI-tiles og snarveier --- */
.admin-shell .kpi-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.admin-shell .kpi-card {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    padding: 1.2rem 1.35rem 1.25rem;
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius);
    background: var(--bk-surface);
    box-shadow: var(--bk-shadow);
}

.admin-shell .kpi-label {
    color: var(--bk-sec);
    font-size: 0.86rem;
    font-weight: 650;
}

.admin-shell .kpi-value {
    font-size: 2.05rem;
    font-weight: 800;
    letter-spacing: -0.032em;
    line-height: 1.12;
    color: var(--bk-ink);
}

.admin-shell .kpi-value small {
    font-size: 1rem;
    font-weight: 650;
    color: var(--bk-sec);
}

.admin-shell .kpi-sub {
    color: var(--bk-muted);
    font-size: 0.82rem;
}

.admin-shell .shortcut-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.admin-shell .shortcut {
    display: grid;
    gap: 0.3rem;
    padding: 1.15rem 1.35rem;
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius);
    background: var(--bk-surface);
    box-shadow: var(--bk-shadow);
    color: inherit;
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .16s, box-shadow .16s, transform .16s;
}

.admin-shell .shortcut:hover {
    border-color: #DCC9BA;
    box-shadow: var(--bk-shadow-sm);
    transform: translateY(-2px);
}

.admin-shell .shortcut:hover .shortcut-go {
    text-decoration: underline;
}

.admin-shell .shortcut b {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--bk-ink);
}

.admin-shell .shortcut span {
    color: var(--bk-sec);
    font-size: 0.86rem;
}

.admin-shell .shortcut .shortcut-go {
    color: var(--bk-coral);
    font-weight: 700;
}

.admin-shell .text-link {
    min-height: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--bk-coral);
    font: inherit;
    font-weight: 650;
    text-decoration: underline;
    text-decoration-color: rgb(200 68 76 / 35%);
    cursor: pointer;
}

.admin-shell .text-link:hover {
    text-decoration-color: var(--bk-coral);
}

/* One tile per row on phone widths — «Dagsoppgjøret» does not fit a third. */
@media (max-width: 640px) {
    .admin-shell .kpi-row,
    .admin-shell .shortcut-row {
        grid-template-columns: 1fr;
    }
}
.admin-shell .admin-main {
    width: min(100% - clamp(2.6rem, 6vw, 6.4rem), 1000px);
    margin: 0 auto;
    padding: 2.4rem 0 4rem;
}
@media (max-width: 1080px) {
    .admin-shell {
        grid-template-columns: minmax(0, 1fr);
    }
    .admin-shell .admin-sidebar {
        position: static;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.6rem;
        padding: 0.8rem 1rem;
        border-right: 0;
        border-bottom: 1px solid var(--bk-line);
    }
    .admin-shell .admin-sidenav {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .admin-shell .admin-nav-group {
        display: none;
    }
    .admin-shell .admin-sidefoot {
        margin-top: 0;
        margin-left: auto;
        flex-direction: row;
        align-items: center;
        border-top: 0;
        padding-top: 0;
    }
    .admin-shell .admin-main {
        width: min(100% - 2rem, 1000px);
        padding: 1.6rem 0 3rem;
    }
}

.workspace-account-trigger:hover,
.workspace-account-trigger:focus-visible {
    border-color: #C8444C;
}
.admin-shell .workspace-account-panel {
    border: 1px solid var(--bk-line);
    background: var(--bk-surface);
    color: var(--bk-ink);
    box-shadow: var(--bk-shadow);
}
.admin-shell .workspace-account-panel > p {
    color: var(--bk-muted);
}
.admin-shell .workspace-account-item {
    font-weight: 600;
    color: var(--bk-ink);
}
.admin-shell .workspace-account-item:hover,
.admin-shell .workspace-account-item:focus-visible {
    background: var(--bk-line-soft);
}
.admin-shell .workspace-account-item[aria-disabled="true"] {
    background: var(--bk-line-soft);
    color: var(--bk-muted);
}
.admin-shell .workspace-account-divider {
    background: var(--bk-line);
}

/* --- overview: task-first Neste steg (T-095) --- */
.admin-shell .overview {
    display: grid;
    gap: 0.4rem;
}
.admin-shell .overview-hero {
    margin-bottom: 0.4rem;
}
.admin-shell .overview-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
}
.admin-shell .overview-status .overview-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.admin-shell .overview-status.ok {
    background: var(--bk-ok-tint);
    color: var(--bk-ok);
}
.admin-shell .overview-status.ok .overview-dot {
    background: var(--bk-ok);
}
.admin-shell .overview-status.warn {
    background: var(--bk-warn-tint);
    color: var(--bk-warn);
}
.admin-shell .overview-status.warn .overview-dot {
    background: #d89a38;
}
.admin-shell .sec-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 1.6rem 0 0.9rem;
}
.admin-shell .sec-label h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.admin-shell .sec-label small {
    color: var(--bk-muted);
    font-size: 0.82rem;
}
.admin-shell .sec-label-gap {
    margin-top: 2.4rem;
}
.admin-shell .step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.1rem 1.2rem;
    margin-bottom: 0.8rem;
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius-lg);
    background: var(--bk-surface);
    box-shadow: var(--bk-shadow-sm);
}
.admin-shell .step.step-warn {
    border-color: var(--bk-warn-border);
    background: var(--bk-warn-tint);
}
.admin-shell .step-num {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    color: var(--bk-warn);
    font-weight: 700;
    border: 1px solid var(--bk-warn-border);
}
.admin-shell .step-body {
    min-width: 0;
    flex: 1;
}
.admin-shell .step-body > b {
    font-size: 1rem;
    font-weight: 600;
    display: block;
    line-height: 1.3;
}
.admin-shell .step-body > span {
    color: var(--bk-sec);
    font-size: 0.88rem;
}
.admin-shell .step-body > span b {
    color: var(--bk-ink);
    font-weight: 600;
}
.admin-shell .step-help {
    margin: 0.5rem 0 0;
    color: var(--bk-muted);
    font-size: 0.82rem;
}
.admin-shell .step-field {
    display: grid;
    gap: 0.4rem;
    margin: 0.8rem 0;
    color: var(--bk-sec);
    font-size: 0.8rem;
    font-weight: 600;
}
.admin-shell .step-field input {
    box-sizing: border-box;
    min-height: 46px;
    padding: 0 0.8rem;
    border: 1px solid var(--bk-line);
    border-radius: 12px;
    background: #fff;
    color: var(--bk-ink);
}
.admin-shell .step .button {
    align-self: center;
}
.admin-shell .step-done {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 1.3rem;
    border: 1px solid var(--bk-ok-border);
    border-radius: var(--bk-radius-lg);
    background: var(--bk-ok-tint);
    box-shadow: var(--bk-shadow-sm);
}
.admin-shell .step-done-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--bk-ok);
    color: #fff;
    font-weight: 700;
}
.admin-shell .step-done b {
    display: block;
}
.admin-shell .step-done span {
    color: var(--bk-sec);
    font-size: 0.88rem;
}

/* --- soft summary cards --- */
.admin-shell .admin-cards {
    gap: 1rem;
}
.admin-shell .summary-card {
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius-lg);
    background: var(--bk-surface);
    box-shadow: var(--bk-shadow-sm);
}
.admin-shell .card-heading {
    color: var(--bk-sec);
}
.admin-shell .card-icon {
    border-radius: 11px;
    background: #f7eae2;
    color: var(--bk-coral);
}
.admin-shell .big-number {
    font-weight: 750;
    letter-spacing: -0.02em;
}
.admin-shell .summary-card > p {
    color: var(--bk-muted);
}
.admin-shell .seller-summary > strong {
    color: var(--bk-ink);
    font-size: 1.1rem;
}

/* --- produkter (T-096) --- */
.admin-shell .section-heading {
    margin-bottom: 1.4rem;
}
.admin-shell .product-name strong {
    color: var(--bk-ink);
}
.admin-shell .product-name span{
    color: var(--bk-muted);
}
.admin-shell .money {
    color: var(--bk-ink);
    font-weight: 600;
}
.admin-shell .icon-close {
    color: var(--bk-muted);
}
.admin-shell .form-title h2 {
    color: var(--bk-ink);
}
.admin-shell .empty-state {
    border: 1px dashed var(--bk-line);
    border-radius: var(--bk-radius-lg);
    background: var(--bk-surface);
    box-shadow: var(--bk-shadow-sm);
}
.admin-shell .empty-state h2,
.admin-shell .empty-state h3 {
    color: var(--bk-ink);
}
.admin-shell .empty-state p {
    color: var(--bk-muted);
}

/* --- retur + SAF-T + arkiv (T-097) --- */
/* The return-workspace CSS referenced these tokens but they were never defined,
   so mapping them on .admin-shell (inherited by the return flow) styles it soft. */
.admin-shell {
    --line: var(--bk-line);
    --line-strong: #e0d4bf;
    --surface: var(--bk-surface);
    --surface-soft: var(--bk-surface-2);
    --ink: var(--bk-ink);
    --muted: var(--bk-muted);
    --lime-soft: #f7eae2;
    --accent: var(--bk-coral);
}

.admin-shell .export-state {
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius);
    background: var(--bk-surface);
    box-shadow: var(--bk-shadow-sm);
}
.admin-shell .export-state p {
    color: var(--bk-muted);
}
.admin-shell .archive-workspace {
    border-top: 1px solid var(--bk-line);
}
.admin-shell .archive-workspace h2 {
    color: var(--bk-ink);
}
.admin-shell .archive-result > div:first-child {
    color: var(--bk-sec);
}
.admin-shell .archive-file-list {
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius);
    background: var(--bk-surface);
    box-shadow: var(--bk-shadow-sm);
    overflow: hidden;
}
.admin-shell .archive-file-row {
    border-bottom-color: var(--bk-line-soft);
}
.admin-shell .archive-file-row small {
    color: var(--bk-muted);
}
.admin-shell .return-search{
    border-color: var(--bk-line);
    background: var(--bk-surface);
    box-shadow: var(--bk-shadow-sm);
}
.admin-shell .return-search input,
.admin-shell .return-search select,
.admin-shell .return-reason textarea{
    border-color: var(--bk-line);
    border-radius: 12px;
    background: var(--bk-surface-2);
    color: var(--bk-ink);
}
.admin-shell .return-search label,
.admin-shell .return-reason{
    color: var(--bk-sec);
}
.admin-shell .return-line span,
.admin-shell .return-line small{
    color: var(--bk-muted);
}
.admin-shell .return-line {
    border-bottom-color: var(--bk-line-soft);
}

/* --- reports: daily settlements, accounting basis and control archive --- */
.reports-workspace,
.report-recovery {
    display: grid;
    gap: 2rem;
}

.reports-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
}

.reports-heading h1 {
    margin: 0.2rem 0 0.6rem;
}

.report-section-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
}

.report-section-links a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 0 0.85rem;
    border: 1px solid var(--bk-line);
    border-radius: 999px;
    background: var(--bk-surface);
    color: var(--bk-sec);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}

.report-section-links a:hover,
.report-section-links a:focus-visible {
    border-color: var(--bk-coral);
    color: var(--bk-coral);
}

.report-filter-card {
    max-width: none;
    display: flex;
    align-items: end;
    gap: 1rem;
    padding: 1rem;
}

.report-filter-fields {
    flex: 1;
    grid-template-columns: minmax(190px, 1.4fr) repeat(2, minmax(145px, 1fr));
}

.report-filter-card > .button {
    min-height: 46px;
}

.report-section {
    display: grid;
    gap: 1.2rem;
    scroll-margin-top: 6rem;
}

.report-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
}

.report-section-heading h2,
.report-section-heading h3,
.report-section-heading p {
    margin: 0;
}

.report-section-heading h2 {
    margin-top: 0.15rem;
    font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.report-section-heading p:not(.page-kicker) {
    margin-top: 0.3rem;
    color: var(--bk-muted);
}

.report-section-heading > span {
    min-width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--bk-line-soft);
    color: var(--bk-sec);
    font-weight: 750;
}

.report-attention {
    display: grid;
    gap: 1rem;
    padding: 1.25rem;
    border: 1px solid #efc5af;
    border-radius: var(--bk-radius-lg);
    background: #fff8f2;
}

.report-exception-list {
    display: grid;
    gap: 0.65rem;
}

.report-exception {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1rem;
    border: 1px solid var(--bk-line);
    border-left: 5px solid var(--bk-coral);
    border-radius: 14px;
    background: var(--bk-surface);
}

.report-exception > div {
    min-width: 0;
    display: grid;
    gap: 0.18rem;
}

.report-exception span,
.report-exception small {
    color: var(--bk-muted);
    font-size: 0.8rem;
}

.report-exception strong {
    color: var(--bk-ink);
}

.report-exception p {
    margin: 0;
    color: var(--bk-sec);
    font-size: 0.88rem;
}

.report-exception.is-open {
    border-left-color: #3f76a2;
}

.settlement-list {
    overflow: hidden;
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius-lg);
    background: var(--bk-surface);
    box-shadow: var(--bk-shadow-sm);
}

.settlement-row {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(150px, 0.8fr) minmax(270px, 1.2fr) minmax(250px, 1.5fr);
    align-items: center;
    gap: 1.2rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--bk-line-soft);
}

.settlement-row:last-child {
    border-bottom: 0;
}

.settlement-row.needs-attention {
    box-shadow: inset 5px 0 0 var(--bk-coral);
}

.settlement-row.is-open {
    box-shadow: inset 5px 0 0 #3f76a2;
}

.settlement-identity {
    min-width: 0;
    display: grid;
    gap: 0.15rem;
}

.settlement-identity span,
.settlement-identity small,
.settlement-guidance span {
    color: var(--bk-muted);
    font-size: 0.78rem;
}

.settlement-values {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
    margin: 0;
}

.settlement-values div {
    min-width: 0;
    display: grid;
    gap: 0.12rem;
}

.settlement-values dt {
    color: var(--bk-muted);
    font-size: 0.72rem;
}

.settlement-values dd {
    margin: 0;
    color: var(--bk-ink);
    font-size: 0.9rem;
    font-weight: 750;
}

.settlement-detail,
.settlement-guidance {
    min-width: 0;
    display: grid;
    gap: 0.22rem;
    color: var(--bk-sec);
    font-size: 0.78rem;
}

.settlement-difference.has-difference {
    color: #a44529;
    font-weight: 750;
}

.settlement-difference.is-zero {
    color: #25724d;
}

.report-empty {
    margin: 0;
}

.accounting-basis,
.control-archive {
    padding-top: 1.75rem;
    border-top: 1px solid var(--bk-line);
}

.report-summary-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
}

.report-summary-cards article {
    display: grid;
    gap: 0.35rem;
    padding: 1rem;
    border: 1px solid var(--bk-line);
    border-radius: 16px;
    background: var(--bk-surface);
}

.report-summary-cards span {
    color: var(--bk-muted);
    font-size: 0.78rem;
}

.report-summary-cards strong {
    color: var(--bk-ink);
    font-size: 1.45rem;
}

.accounting-breakdown,
.control-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.accounting-breakdown > article,
.control-card {
    min-width: 0;
    padding: 1.1rem;
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius-lg);
    background: var(--bk-surface);
    box-shadow: var(--bk-shadow-sm);
}

.accounting-breakdown h3,
.control-card > h3 {
    margin: 0 0 0.8rem;
}

.accounting-breakdown > article > p,
.control-card > p {
    color: var(--bk-muted);
    font-size: 0.85rem;
}

.accounting-line {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.8rem;
    padding: 0.7rem 0;
    border-top: 1px solid var(--bk-line-soft);
    color: var(--bk-sec);
    font-size: 0.82rem;
}

.accounting-line strong {
    color: var(--bk-ink);
}

.control-fields {
    display: grid;
    grid-template-columns: 1fr repeat(2, minmax(125px, 0.75fr));
    gap: 0.7rem;
    margin: 1rem 0;
}

.control-fields label {
    display: grid;
    gap: 0.35rem;
    color: var(--bk-sec);
    font-size: 0.75rem;
    font-weight: 700;
}

.control-fields input,
.control-fields select {
    width: 100%;
    min-height: 44px;
    padding: 0 0.7rem;
    border: 1px solid var(--bk-line);
    border-radius: 10px;
    background: var(--bk-surface-2);
    color: var(--bk-ink);
}

.inline-report-state {
    display: grid;
    gap: 0.2rem;
    margin-top: 1rem;
    padding: 0.8rem;
    border-left: 4px solid #25724d;
    background: #f3faf6;
    color: var(--bk-sec);
    font-size: 0.8rem;
}

.inline-report-state.blocked {
    border-left-color: var(--bk-coral);
    background: #fff5ef;
}

.inline-report-state .button {
    justify-self: start;
    margin-top: 0.5rem;
}

.archive-card .archive-workspace {
    max-width: none;
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.archive-card .export-card {
    margin-top: 1rem;
    padding: 0;
    border: 0;
    box-shadow: none;
}

.archive-card .export-fields {
    grid-template-columns: minmax(0, 1fr) repeat(2, minmax(125px, 0.75fr));
}

/* Native date/select inputs carry a ~150px intrinsic min-width that overflows
   these tracks; let them size to the track instead of past it. */
.export-fields input,
.export-fields select {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
}

@media (max-width: 960px) {
    .settlement-row {
        grid-template-columns: minmax(140px, 0.8fr) minmax(260px, 1.2fr);
    }

    .settlement-detail,
    .settlement-guidance {
        grid-column: 1 / -1;
    }

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

    .control-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .reports-heading,
    .report-section-heading,
    .report-filter-card,
    .report-exception {
        align-items: stretch;
        flex-direction: column;
    }

    .report-section-links {
        justify-content: flex-start;
    }

    .report-filter-fields,
    .settlement-row,
    .accounting-breakdown,
    .control-fields,
    .archive-card .export-fields {
        grid-template-columns: 1fr;
    }

    .settlement-detail,
    .settlement-guidance {
        grid-column: auto;
    }

    .report-summary-cards {
        grid-template-columns: 1fr 1fr;
    }

    .accounting-line {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .report-exception .button,
    .report-section-heading .button {
        width: 100%;
    }
}

/* --- produkter: pretty card grid + icon (v2) --- */
.admin-shell .product-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.admin-shell .product-card-shell {
    min-width: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius-lg);
    background: var(--product-tile-color, var(--bk-surface));
    box-shadow: var(--bk-shadow-sm);
    transition: transform .1s, border-color .15s, box-shadow .15s, opacity .15s;
}
.admin-shell .product-card-shell:hover {
    transform: translateY(-2px);
    border-color: var(--bk-coral);
    box-shadow: var(--bk-shadow);
}
.admin-shell .product-card-shell.is-inactive {
    opacity: 0.78;
}
.admin-shell .product-card {
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.2rem;
    border: 0;
    border-radius: inherit;
    background: transparent;
    box-shadow: none;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition: transform .1s, border-color .15s, box-shadow .15s;
}
.admin-shell .product-card:focus-visible {
    outline: 3px solid var(--bk-coral);
    outline-offset: 2px;
}
.admin-shell .product-card-top {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}
.admin-shell .product-card-tile {
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 16px;
    overflow: hidden;
    font-size: 1.7rem;
    line-height: 1;
    color: #fff;
}

/* An image or a drawing fills the tile; the gradients below stay as the
   backdrop for products showing only their initial. */
.admin-shell .product-card-tile.product-media-image,
.admin-shell .product-card-tile.product-media-art {
    background: none;
    object-fit: cover;
}
.admin-shell .product-card-shell:nth-child(4n+1) .product-card-tile {
    background: linear-gradient(135deg, #f6b597, #e87457);
}
.admin-shell .product-card-shell:nth-child(4n+2) .product-card-tile {
    background: linear-gradient(135deg, #9ec2de, #7aa8d0);
}
.admin-shell .product-card-shell:nth-child(4n+3) .product-card-tile {
    background: linear-gradient(135deg, #a7d6bc, #76be99);
}
.admin-shell .product-card-shell:nth-child(4n+4) .product-card-tile {
    background: linear-gradient(135deg, #f3d38b, #e8b45c);
    color: #6e5210;
}
.admin-shell .product-card-id {
    min-width: 0;
    flex: 1;
    display: grid;
    gap: 0.2rem;
}
.admin-shell .product-card-id strong {
    color: var(--bk-ink);
    font-weight: 600;
    font-size: 1.02rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-shell .product-card-id small {
    color: var(--bk-muted);
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-shell .product-card-foot {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.admin-shell .vat-chip {
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: var(--bk-line-soft);
    color: var(--bk-sec);
    font-size: 0.74rem;
    font-weight: 600;
}
.admin-shell .stock-chip {
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: #eef3ee;
    color: var(--bk-sec);
    font-size: 0.74rem;
    font-weight: 600;
}
.admin-shell .stock-count-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 0.8rem 1rem;
    margin-top: 0.8rem;
    padding: 1rem;
    border: 1px solid var(--bk-line);
    border-radius: var(--bk-radius);
    background: var(--bk-line-soft);
}
.admin-shell .stock-count-box > div:first-child,
.admin-shell .stock-count-box .form-help {
    grid-column: 1 / -1;
}
.admin-shell .stock-count-box p {
    margin: 0.2rem 0 0;
    color: var(--bk-muted);
}
.admin-shell .stock-count-box label {
    margin: 0;
}
.admin-shell .product-card-price {
    margin-left: auto;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
    color: var(--bk-ink);
}
.admin-shell .product-card-edit {
    color: var(--bk-coral);
    font-weight: 600;
    font-size: 0.82rem;
}
.admin-shell .product-order-controls {
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0 1.2rem 1rem;
}
.admin-shell .product-order-controls button {
    width: 2.25rem;
    height: 2.25rem;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgb(30 36 43 / 15%);
    border-radius: 10px;
    background: rgb(255 255 255 / 64%);
    color: var(--bk-ink);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}
.admin-shell .product-order-controls button:hover:not(:disabled) {
    border-color: var(--bk-coral);
    color: var(--bk-coral);
}
.admin-shell .product-order-controls button:focus-visible {
    outline: 3px solid var(--bk-coral);
    outline-offset: 2px;
}
.admin-shell .product-order-controls button:disabled {
    opacity: 0.35;
    cursor: default;
}
/* --- product art: one picker holding the built-in set and the upload --- */
.admin-shell .product-art-field {
    display: grid;
    gap: 0.55rem;
    margin-bottom: 1rem;
}
.admin-shell .product-art-label {
    color: var(--bk-sec);
    font-size: 0.82rem;
    font-weight: 600;
}
.admin-shell .product-art-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 11rem;
    gap: 1.1rem;
    align-items: start;
}
.admin-shell .product-art-picks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(5.2rem, 1fr));
    /* Without start the cells stretch to the tallest in the row and each
       drawing gets an empty strip under it. */
    align-items: start;
    gap: 0.5rem;
}
.admin-shell .product-art-pick,
.admin-shell .product-art-upload {
    aspect-ratio: 4 / 3;
    padding: 0;
    border: 2px solid var(--bk-line);
    border-radius: 12px;
    background: var(--bk-surface);
    line-height: 0;
    overflow: hidden;
    cursor: pointer;
}
.admin-shell .product-art-pick svg {
    width: 100%;
    height: 100%;
    display: block;
}
.admin-shell .product-art-pick:hover,
.admin-shell .product-art-upload:hover {
    border-color: var(--bk-coral);
}
.admin-shell .product-art-pick:focus-visible,
.admin-shell .product-art-upload:focus-within {
    outline: 3px solid var(--bk-coral);
    outline-offset: 2px;
}
.admin-shell .product-art-pick[aria-pressed="true"] {
    border-color: var(--bk-coral);
    box-shadow: 0 0 0 3px rgb(200 68 76 / 18%);
}
.admin-shell .product-art-upload {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.25rem;
    padding: 0.4rem;
    border-style: dashed;
    color: var(--bk-coral);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
}
.admin-shell .product-art-upload span:first-of-type {
    font-size: 1.3rem;
}
/* The file input stays in the layout for keyboard and screen readers, but the
   whole dashed cell is the visible control. */
.admin-shell .product-art-upload input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}
.admin-shell .product-art-upload.is-busy {
    cursor: progress;
    opacity: 0.7;
}
.admin-shell .product-art-preview {
    display: grid;
    gap: 0.4rem;
}
.admin-shell .product-art-preview-label {
    color: var(--bk-sec);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.admin-shell .product-art-preview-media {
    width: 100%;
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: transparent;
    color: var(--bk-sec);
    font-size: 2.2rem;
    object-fit: cover;
    overflow: hidden;
}
.admin-shell .product-art-preview-tile {
    display: grid;
    gap: 0.35rem;
    padding: 0.65rem;
    border-radius: 16px;
    background: var(--product-tile-color, #ffe4d6);
    color: var(--bk-ink);
}
.admin-shell .product-art-preview-tile strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9rem;
}
.admin-shell .product-art-preview-tile > span {
    color: var(--bk-coral);
    font-size: 0.82rem;
    font-weight: 700;
}
.admin-shell .product-art-preview .form-help {
    margin: 0;
}
.admin-shell .product-color-field {
    display: grid;
    gap: 0.55rem;
    margin-bottom: 1rem;
}
.admin-shell .product-color-picks {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
}
.admin-shell .product-color-pick {
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 2.25rem;
    display: grid;
    place-items: center;
    padding: 0;
    border: 2px solid var(--bk-line);
    border-radius: 10px;
    background: var(--bk-surface);
    cursor: pointer;
}
.admin-shell .product-color-pick > span {
    width: 1.45rem;
    height: 1.45rem;
    border: 1px solid rgb(30 36 43 / 12%);
    border-radius: 50%;
    background: var(--product-tile-color);
}
.admin-shell .product-color-pick:hover {
    border-color: var(--bk-coral);
}
.admin-shell .product-color-pick:focus-visible {
    outline: 3px solid var(--bk-coral);
    outline-offset: 2px;
}
.admin-shell .product-color-pick[aria-pressed="true"] {
    border-color: var(--bk-coral);
    box-shadow: 0 0 0 3px rgb(200 68 76 / 18%);
}
.admin-shell .form-error {
    margin: 0;
    color: #a12222;
    font-size: 0.85rem;
    font-weight: 600;
}

/* --- product create/edit dialog --- */
.admin-shell .product-modal {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 2.5rem 1.5rem 1.5rem;
}
.admin-shell .product-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgb(20 28 38 / 58%);
    backdrop-filter: blur(3px);
}
.admin-shell .product-modal-card .form-actions {
    position: sticky;
    bottom: calc(-1 * clamp(1.1rem, 3vw, 1.7rem));
    margin: 1.2rem calc(-1 * clamp(1.1rem, 3vw, 1.7rem)) calc(-1 * clamp(1.1rem, 3vw, 1.7rem));
    padding: 1rem clamp(1.1rem, 3vw, 1.7rem);
    background: #fff;
    border-top: 1px solid #e4e9e4;
}

.admin-shell .form-card.product-modal-card {
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    width: min(720px, 100%);
    max-height: calc(100dvh - 4.5rem);
    margin: 0;
    overflow-y: auto;
    box-shadow: 0 24px 70px rgb(16 25 38 / 28%);
}
.admin-shell .form-card.product-modal-card:focus {
    outline: none;
}

/* Deleting sits apart from saving, below the fields and above Lagre, so it is
   never the button a hurried hand lands on. */
.admin-shell .product-delete {
    margin-top: 1.4rem;
    padding-top: 1rem;
    border-top: 1px solid var(--bk-line);
}

.admin-shell .product-delete .inline-actions {
    align-items: center;
    margin: 0;
}

.admin-shell .product-delete .inline-actions span {
    flex: 1 1 14rem;
    color: var(--bk-muted);
    font-size: 0.84rem;
}

@media (max-width: 720px) {
    .admin-shell .product-modal {
        padding: 0.75rem;
    }

    .admin-shell .form-card.product-modal-card {
        max-height: calc(100dvh - 1.5rem);
    }

    .admin-shell .product-art-split {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-shell .product-art-preview-media {
        max-width: 12rem;
    }

}

/* --- combobox (Gruppe): looks like a select, accepts free text --- */
.admin-shell .combo-field {
    display: grid;
    gap: 0.45rem;
    color: var(--bk-sec);
    font-size: 0.82rem;
    font-weight: 600;
}
.admin-shell .combo {
    position: relative;
}
.admin-shell .combo-input {
    position: relative;
    z-index: 42;
    width: 100%;
    min-height: 50px;
    box-sizing: border-box;
    padding: 0 2.6rem 0 0.85rem;
    border: 1px solid var(--bk-line);
    border-radius: 12px;
    background: var(--bk-surface-2);
    color: var(--bk-ink);
    font: inherit;
}
.admin-shell .combo-input:focus {
    border-color: var(--bk-coral);
    box-shadow: 0 0 0 3px rgba(168, 69, 42, 0.16);
    outline: none;
}
.admin-shell .combo-toggle {
    position: absolute;
    z-index: 43;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--bk-muted);
    font-size: 0.8rem;
    cursor: pointer;
}
.admin-shell .combo-toggle:hover {
    background: var(--bk-line-soft);
    color: var(--bk-coral);
}
.admin-shell .combo-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
}
.admin-shell .combo-panel {
    position: absolute;
    z-index: 41;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 220px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--bk-line);
    border-radius: 14px;
    background: var(--bk-surface);
    box-shadow: var(--bk-shadow);
}
.admin-shell .combo-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 40px;
    padding: 0 0.7rem;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--bk-ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.admin-shell .combo-option:hover {
    background: var(--bk-line-soft);
    color: var(--bk-coral);
}
.admin-shell .combo-empty {
    display: block;
    padding: 0.5rem 0.7rem;
    color: var(--bk-muted);
    font-size: 0.85rem;
}
@media (max-width: 760px) {
    .user-access-modal {
        place-items: stretch;
        padding: 0.5rem;
    }

    .user-access-modal .user-access-form {
        max-height: calc(100dvh - 1rem);
        padding: 1rem;
        border-radius: 14px;
    }

    .admin-shell .product-cards {
        grid-template-columns: 1fr;
    }
}

/* Hall-first administration. */
.admin-shell .hall-name {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    min-height: 44px;
    padding: 0.35rem 0.8rem;
    line-height: 1.2;
}

.admin-shell .hall-name small {
    color: var(--bk-sec);
    font-size: 0.7rem;
    font-weight: 500;
}

.admin-shell .hall-switch {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    color: var(--bk-coral);
    font-weight: 650;
}

.hall-picker-topbar {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem clamp(1rem, 3vw, 2.5rem);
    border-bottom: 1px solid var(--bk-line);
    background: rgba(255, 251, 245, 0.9);
}

.hall-picker-main {
    width: min(100% - 3rem, 1040px);
    margin: 0 auto;
    padding: clamp(2.5rem, 6vw, 5rem) 0;
}

.hall-picker-main h1 {
    margin: 0.2rem 0 0.5rem;
    font-size: clamp(2.25rem, 5vw, 3.75rem);
    line-height: 1;
}

.hall-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 1rem;
}

.hall-card-status .status-text {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .18rem .6rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
}

.hall-card-status .status-ok {
    background: #e4f5ef;
    color: #145a49;
}

.hall-card-status .status-warn {
    background: #fdf0d7;
    color: #8a5b00;
}

.hall-card-status .status-text::before {
    content: "";
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    background: currentColor;
}

.hall-card {
    min-height: 148px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.15rem;
    padding: 1.1rem;
    border: 1px solid var(--bk-line);
    border-radius: 18px;
    background: var(--bk-surface);
    color: var(--bk-ink);
    text-align: left;
    box-shadow: var(--bk-shadow-sm);
    cursor: pointer;
}

.hall-card:hover,
.hall-card:focus-visible {
    border-color: var(--bk-coral);
    transform: translateY(-2px);
    box-shadow: var(--bk-shadow);
}

.hall-card:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--bk-coral) 28%, transparent);
    outline-offset: 2px;
}

.hall-card-heading,
.hall-card-status {
    display: flex;
}

.hall-card-heading {
    justify-content: space-between;
    gap: 1rem;
    font-size: 1.1rem;
}

.hall-card-heading > span:first-child {
    display: grid;
    gap: 0.4rem;
}

.hall-card-heading small {
    color: var(--bk-sec);
    font-size: 0.78rem;
    font-weight: 500;
}

.hall-card-status {
    flex-wrap: wrap;
    gap: 0.45rem 0.8rem;
    color: var(--bk-sec);
    font-size: 0.8rem;
}

.hall-card-status .status-text {
    width: 100%;
    color: var(--bk-ink);
    font-weight: 700;
}

.hall-card-status .hall-status-warn {
    color: #8a2929;
    font-weight: 700;
}

.hall-seller-label {
    margin: 1.4rem 0 0;
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--bk-sec);
}

.hall-directory-tools {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.75rem;
}

.hall-search {
    width: min(100%, 420px);
    display: grid;
    gap: 0.4rem;
    color: var(--bk-sec);
    font-size: 0.78rem;
    font-weight: 700;
}

.hall-search input {
    min-height: 46px;
    width: 100%;
    padding: 0 0.9rem;
    border: 1px solid var(--bk-line);
    border-radius: 12px;
    background: var(--bk-surface);
    color: var(--bk-ink);
    font: inherit;
    font-size: 0.95rem;
    font-weight: 500;
}

.hall-search input:focus-visible {
    border-color: var(--bk-coral);
    outline: 3px solid color-mix(in srgb, var(--bk-coral) 28%, transparent);
    outline-offset: 2px;
}

.hall-result-count {
    margin: 0;
    color: var(--bk-sec);
    font-size: 0.85rem;
    white-space: nowrap;
}

.hall-search-empty {
    grid-column: 1 / -1;
    display: grid;
    gap: 0.35rem;
    padding: 2rem;
    border: 1px dashed var(--bk-line);
    border-radius: 18px;
    color: var(--bk-sec);
    text-align: center;
}

.hall-directory-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hall-create-form {
    margin-top: 1.25rem;
    padding: 1.35rem;
    border: 1px solid var(--bk-line);
    border-radius: 16px;
    background: var(--bk-surface-2);
    box-shadow: var(--bk-shadow-sm);
}

.hall-create-form h3 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
}

.hall-create-form label {
    display: grid;
    gap: 0.45rem;
    margin: 0 0 0.9rem;
    color: var(--bk-sec);
    font-size: 0.82rem;
    font-weight: 700;
}

.hall-create-form input,
.hall-create-form select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    min-height: 48px;
    padding: 0 0.9rem;
    border: 1px solid var(--bk-line);
    border-radius: 12px;
    background: var(--bk-surface);
    color: var(--bk-ink);
    font-size: 0.95rem;
    font-weight: 500;
}

.hall-create-form input:focus-visible,
.hall-create-form select:focus-visible {
    border-color: var(--bk-coral);
    outline: 3px solid color-mix(in srgb, var(--bk-coral) 28%, transparent);
    outline-offset: 2px;
}

.hall-create-form .form-help {
    margin: 0 0 0.9rem;
}

.hall-create-form .hall-create-hint {
    margin: 0.2rem 0 0;
    color: var(--bk-sec);
    font-size: 0.84rem;
}

.hall-create-error {
    margin: 0.9rem 0 0;
    color: var(--bk-bad);
    font-weight: 600;
}

.hall-create-form .inline-actions {
    margin-top: 1.1rem;
}

.hall-card-add {
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    border-style: dashed;
    background: transparent;
    color: var(--bk-sec);
    box-shadow: none;
}

.hall-card-add:hover,
.hall-card-add:focus-visible {
    border-color: var(--bk-coral);
    background: var(--bk-coral-tint);
    color: var(--bk-ink);
}

.hall-card-add .hall-card-add-label {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1.5px dashed var(--bk-line);
    border-radius: 50%;
    color: var(--bk-coral);
    font-size: 1.25rem;
    font-weight: 700;
}

.hall-card-add small {
    color: var(--bk-muted);
    font-size: 0.78rem;
}

@media (max-width: 920px) {
    .hall-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .hall-picker-topbar {
        align-items: flex-start;
    }

    .hall-picker-topbar .brand strong {
        display: none;
    }

    .hall-picker-main {
        width: min(100% - 2rem, 1040px);
        padding-top: 2.25rem;
    }

    .hall-card {
        min-height: 148px;
    }

    .hall-grid {
        grid-template-columns: 1fr;
    }

    .hall-directory-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .hall-result-count {
        order: -1;
    }

}

/* --- oppsett: sekvensraille + lerret (T-132) ------------------------------ */
/* A deliberately different composition from the earlier setup cards: a
   numbered sequence rail beside a full-width technical canvas. Status is
   carried by markers (check/number) and text, never color alone. */

.oppsett-main {
    width: min(100% - 3rem, 1120px);
}

.oppsett-head {
    margin-bottom: 1.4rem;
}

/* Tab bar — one concern per tab (kasser / brukere / hallen / integrasjoner / logg). */
.oppsett-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.6rem;
}

.oppsett-tab {
    border: 0;
    border-radius: 999px;
    padding: 0.55rem 1.05rem;
    background: var(--bk-surface-2);
    color: var(--bk-sec);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
}

.oppsett-tab:hover {
    color: var(--bk-ink);
}

.oppsett-tab.is-on {
    background: var(--bk-coral);
    color: #fff;
}

.oppsett-rail {
    position: sticky;
    top: 5.5rem;
}

/* Onboarding rail only renders while the hall is not ready — in the tab
   canvas it reads as a soft aside, not a permanent sidebar. */
.oppsett-canvas .oppsett-rail {
    position: static;
    max-width: 560px;
}

.oppsett-rail-title {
    margin: 0 0 0.9rem;
    color: var(--bk-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.oppsett-rail ol {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: oppsett-step;
}

.oppsett-rail-step {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas: "marker body" "now now";
    column-gap: 0.9rem;
    align-items: start;
    padding: 0 0 1.5rem 0;
}

.oppsett-rail-step:last-child {
    padding-bottom: 0.25rem;
}

.oppsett-rail-step::before {
    content: "";
    position: absolute;
    top: 2rem;
    bottom: -0.3rem;
    left: 17px;
    width: 2px;
    background: var(--bk-line);
}

.oppsett-rail-step:last-child::before {
    display: none;
}

.oppsett-rail-marker {
    grid-area: marker;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 2px solid var(--bk-line);
    border-radius: 50%;
    background: var(--bk-surface);
    color: var(--bk-muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.oppsett-rail-body {
    grid-area: body;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-top: 0.2rem;
}

.oppsett-rail-body strong {
    color: var(--bk-sec);
    font-size: 0.98rem;
}

.oppsett-rail-body small {
    color: var(--bk-muted);
    font-size: 0.84rem;
    line-height: 1.35;
}

.oppsett-rail-step.done .oppsett-rail-marker {
    border-color: var(--bk-ok);
    background: var(--bk-ok-tint);
    color: var(--bk-ok);
}

.oppsett-rail-step.done .oppsett-rail-body strong {
    color: var(--bk-ink);
}

.oppsett-rail-step.current .oppsett-rail-marker {
    border-color: var(--bk-coral);
    color: var(--bk-coral);
}

.oppsett-rail-step.current .oppsett-rail-body strong {
    color: var(--bk-coral);
}

.oppsett-rail-now {
    grid-area: now;
    justify-self: start;
    margin: 0.45rem 0 0 3.3rem;
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--bk-coral);
    border-radius: 999px;
    color: var(--bk-coral);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.oppsett-canvas {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    min-width: 0;
}

.oppsett-panel {
    padding: 1.4rem 1.6rem 1.5rem;
    border: 1px solid var(--bk-line);
    border-radius: 12px;
    background: var(--bk-surface);
}

.oppsett-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 1.2rem;
    margin-bottom: 1.1rem;
}

.oppsett-panel-head h2 {
    margin: 0;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}

.oppsett-panel-head p {
    flex: 1 1 14rem;
    margin: 0.1rem 0 0;
    color: var(--bk-muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

/* The action owns the right edge; when the head runs out of room it wraps to
   its own right-aligned row instead of crowding the text. */
.oppsett-panel-head .button {
    flex: 0 0 auto;
    margin-left: auto;
}

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

.oppsett-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    min-height: 60px;
    padding: 0.65rem 0.25rem;
    border-top: 1px solid var(--bk-line-soft);
}

.oppsett-row:first-child {
    border-top: 0;
}

.oppsett-row-main {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.oppsett-row-main strong {
    color: var(--bk-ink);
    font-size: 1rem;
}

.oppsett-row-main small {
    color: var(--bk-muted);
    font-size: 0.84rem;
    overflow-wrap: anywhere;
}

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

a.oppsett-row,
.oppsett-row-link {
    text-decoration: none;
    color: inherit;
}

a.oppsett-row:hover {
    background: var(--bk-surface-2);
}

.oppsett-row-open {
    color: var(--bk-muted);
    font-size: 0.82rem;
    white-space: nowrap;
}

a.oppsett-row:hover .oppsett-row-open,
a.oppsett-row:focus-visible .oppsett-row-open {
    color: var(--bk-coral);
}

.oppsett-row-side .button {
    min-height: 44px;
}

.oppsett-empty {
    margin: 0.25rem 0 0.5rem;
    padding: 0.9rem 1rem;
    border: 1px dashed var(--bk-line);
    border-radius: 10px;
    color: var(--bk-muted);
    font-size: 0.92rem;
}

.oppsett-facts {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin: 0;
    color: var(--bk-sec);
}

.oppsett-facts strong {
    font-size: 1.02rem;
    color: var(--bk-ink);
}

.oppsett-facts small {
    color: var(--bk-muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

.oppsett-facts a {
    color: var(--bk-coral);
    font-weight: 650;
    text-decoration: none;
}

.oppsett-facts a:hover,
.oppsett-facts a:focus-visible {
    text-decoration: underline;
}

.oppsett-form {
    margin-top: 1.1rem;
    padding: 1.25rem 1.35rem 1.35rem;
    border: 1px solid var(--bk-line);
    border-radius: 12px;
    background: var(--bk-surface-2);
}

.user-access-form.oppsett-form {
    background: #fff;
}

.oppsett-form h3 {
    margin: 0 0 1rem;
    font-size: 1.05rem;
}

.oppsett-form .inline-actions {
    margin-top: 1.1rem;
}

.user-access-form {
    display: grid;
    gap: 0.9rem;
}

.user-access-modal {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.user-access-backdrop {
    position: absolute;
    inset: 0;
    background: rgb(20 28 38 / 58%);
    backdrop-filter: blur(3px);
}

.user-access-modal .user-access-form {
    position: relative;
    z-index: 1;
    width: min(700px, 100%);
    max-height: calc(100dvh - 3rem);
    margin: 0;
    overflow-y: auto;
    box-shadow: 0 24px 70px rgb(16 25 38 / 28%);
}

.user-access-form .user-search-field,
.user-access-form .selected-directory-user {
    width: min(100%, 680px);
}

.user-access-form .form-title h3 {
    margin: 0;
}

.user-search-field {
    position: relative;
}

.user-search-field > label,
.user-role-field > span,
.hall-add-field > span {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--bk-ink);
    font-size: 0.88rem;
    font-weight: 700;
}

.user-search-field input,
.user-role-field select,
.hall-add-field select {
    width: 100%;
    min-height: 48px;
}

.user-search-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.6rem;
    color: var(--bk-muted);
    font-size: 0.86rem;
}

.user-search-status.error {
    color: var(--bk-bad);
    font-weight: 600;
}

.user-search-status .spinner {
    width: 18px;
    height: 18px;
}

.user-search-results {
    position: absolute;
    z-index: 4;
    top: calc(100% + 0.35rem);
    right: 0;
    left: 0;
    max-height: 320px;
    margin: 0;
    padding: 0.35rem;
    overflow-y: auto;
    list-style: none;
    border: 1px solid var(--bk-line);
    border-radius: 12px;
    background: var(--bk-surface);
    box-shadow: var(--bk-shadow);
}

.user-search-results button {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    min-height: 56px;
    padding: 0.55rem 0.65rem;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--bk-ink);
    text-align: left;
    cursor: pointer;
}

.user-search-results button:hover,
.user-search-results button:focus-visible {
    background: var(--bk-coral-tint);
    outline: 2px solid var(--bk-coral);
    outline-offset: -2px;
}

.user-search-results button > span:last-child,
.selected-directory-user > span:nth-child(2) {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.user-search-results small,
.selected-directory-user small,
.selected-directory-user span span {
    color: var(--bk-muted);
    overflow-wrap: anywhere;
}

.user-avatar {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    background: var(--bk-coral-tint);
    color: var(--bk-coral);
    font-size: 0.78rem;
    font-weight: 800;
}

.selected-directory-user {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    border: 1px solid var(--bk-ok-border);
    border-radius: 11px;
    background: var(--bk-ok-tint);
}

.assignment-access-controls {
    display: grid;
    grid-template-columns: minmax(150px, 0.65fr) minmax(260px, 1.35fr);
    gap: 0.75rem;
}

.user-role-field,
.hall-add-field {
    margin: 0;
}

.selected-hall-access {
    display: grid;
    min-width: 0;
    min-height: 48px;
    overflow: hidden;
    border: 1px solid var(--bk-line);
    border-radius: 10px;
    background: var(--bk-surface);
}

.selected-hall-count {
    padding: 0.55rem 0.75rem;
    background: var(--bk-surface-2);
    color: var(--bk-muted);
    font-size: 0.84rem;
}

.selected-hall-count strong {
    color: var(--bk-ink);
}

.selected-hall-empty {
    padding: 0.7rem 0.75rem;
    border-top: 1px solid var(--bk-line-soft);
    color: var(--bk-muted);
    font-size: 0.84rem;
}

.selected-hall-list {
    display: grid;
    min-width: 0;
    max-height: 220px;
    overflow-y: auto;
    overscroll-behavior-block: contain;
    scrollbar-color: var(--bk-line) transparent;
    scrollbar-width: thin;
}

.selected-hall-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    min-height: 44px;
    padding: 0.3rem 0.45rem 0.3rem 0.75rem;
    border-top: 1px solid var(--bk-line-soft);
    background: var(--bk-surface);
    font-size: 0.86rem;
}

.selected-hall-row button {
    min-height: 32px;
    padding: 0.2rem 0.65rem;
    border: 1px solid var(--bk-line);
    border-radius: 7px;
    background: var(--bk-surface-2);
    color: var(--bk-muted);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.selected-hall-row button:hover,
.selected-hall-row button:focus-visible {
    border-color: var(--bk-bad);
    background: var(--bk-bad-tint);
    color: var(--bk-bad);
    outline: 2px solid var(--bk-coral);
    outline-offset: 1px;
}

.oppsett-field-error {
    display: block;
    margin-top: 0.3rem;
    color: var(--bk-bad);
    font-size: 0.84rem;
    font-weight: 600;
}

.oppsett-field-error:empty {
    display: none;
}

.oppsett-secondary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.4rem;
    margin-top: 2.75rem;
}

/* kasse detail: back link, device panels, credential disclosure */

.oppsett-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    color: var(--bk-sec);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.oppsett-back:hover {
    color: var(--bk-coral);
}

.oppsett-detail-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 1.1rem;
    margin-bottom: 2rem;
}

.oppsett-detail-head h1 {
    margin: 0;
}

.oppsett-detail-head .status {
    margin-left: auto;
}

.oppsett-detail-sub {
    flex-basis: 100%;
    margin: 0;
    color: var(--bk-muted);
    font-size: 0.95rem;
}

.oppsett-device {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 1.25rem 2rem;
    padding: 1.4rem 1.6rem 1.5rem;
    border: 1px solid var(--bk-line);
    border-left: 4px solid var(--bk-line-soft);
    border-radius: 12px;
    background: var(--bk-surface);
}

.oppsett-device + .oppsett-device {
    margin-top: 1.4rem;
}

.oppsett-device-ok {
    border-left-color: var(--bk-ok);
}

.oppsett-device-warn {
    border-left-color: var(--bk-warn);
}

.oppsett-device-label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.oppsett-device-label h2 {
    margin: 0;
    font-size: 1.1rem;
}

.oppsett-device-label small {
    color: var(--bk-muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.oppsett-device-body {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    min-width: 0;
}

.oppsett-device-body .inline-actions {
    margin-top: 0.2rem;
}

.agent-log-panel {
    min-width: 0;
}

.agent-log-lines {
    box-sizing: border-box;
    width: 100%;
    max-height: 22rem;
    overflow-x: auto;
    overflow-y: auto;
    margin: 0.7rem 0 0;
    padding: 0.85rem;
    border-radius: 0.5rem;
    background: #18212c;
    color: #f4f7fb;
    font: 0.78rem/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
    white-space: pre;
}

.agent-log-modal .agent-log-lines {
    min-height: 10rem;
    max-height: min(55dvh, 30rem);
}

.agent-log-modal .pos-modal-heading h1 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.agent-log-modal .pos-modal-close {
    width: 46px;
    height: 46px;
}

.printer-choice {
    display: grid;
    gap: 0.4rem;
    max-width: 34rem;
}

.printer-choice > span {
    font-size: 0.88rem;
    font-weight: 700;
}

.printer-choice select {
    width: 100%;
    min-height: 46px;
}

.printer-choice small {
    color: var(--bk-muted);
}

.oppsett-led {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--bk-ink);
    font-weight: 650;
}

.oppsett-led::before {
    content: "";
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bk-muted);
}

.oppsett-led.ok::before {
    background: var(--bk-ok);
}

.oppsett-led.warn::before {
    background: var(--bk-warn);
}

.oppsett-led.bad::before {
    background: var(--bk-bad);
}

.oppsett-sub {
    margin: 0;
    color: var(--bk-muted);
    font-size: 0.88rem;
}

.oppsett-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.86rem;
    color: var(--bk-sec);
    overflow-wrap: anywhere;
}

.oppsett-facts-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.4rem;
    margin: 0;
    color: var(--bk-sec);
    font-size: 0.9rem;
}

.oppsett-facts-line dt {
    color: var(--bk-muted);
    font-weight: 600;
}

.oppsett-facts-line dd {
    margin: 0;
}

.oppsett-blocked {
    margin: 0;
    color: var(--bk-warn);
    font-size: 0.88rem;
}

/* one-time enrollment credential */

.oppsett-device-wide {
    grid-template-columns: 1fr;
}

.oppsett-credential {
    padding: 1.2rem 1.4rem 1.3rem;
    border: 2px solid var(--bk-warn);
    border-radius: 12px;
    background: var(--bk-warn-tint);
}

.oppsett-credential h3 {
    margin: 0 0 0.25rem;
    color: var(--bk-warn);
    font-size: 1.1rem;
}

.oppsett-credential > p {
    margin: 0 0 0.8rem;
    color: var(--bk-sec);
    font-size: 0.92rem;
}

/* One selectable snippet: shows exactly what «Kopier» puts on the clipboard.
   pre-wrap keeps every character visible at any width. */
.oppsett-credential-text {
    margin: 0 0 1rem;
    padding: 0.85rem 0.75rem;
    border: 1px solid var(--bk-line);
    border-radius: 8px;
    background: var(--bk-surface);
}

.oppsett-credential-text code {
    display: block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    line-height: 1.8;
    color: var(--bk-ink);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    user-select: all;
}

.oppsett-credential .copied {
    border-color: var(--bk-ok);
    color: var(--bk-ok);
}

.oppsett-credential-steps {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin: 0 0 0.95rem;
    padding: 0 0 0 1.3rem;
    color: var(--bk-sec);
    font-size: 0.92rem;
}

.oppsett-credential-steps li::marker {
    color: var(--bk-coral);
    font-weight: 700;
}

.oppsett-waiting {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--bk-line);
    border-radius: 10px;
    background: var(--bk-surface-2);
    color: var(--bk-sec);
    font-size: 0.92rem;
}

.oppsett-waiting .spinner {
    width: 18px;
    height: 18px;
    border-width: 2.5px;
}

/* test row + effect results */

.oppsett-test {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 1rem 1.15rem;
    border: 1px solid var(--bk-line);
    border-radius: 10px;
    background: var(--bk-surface-2);
}

.admin-shell .oppsett-test-reason {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    color: #59635e;
    font-size: 0.86rem;
}

.oppsett-test-reason button {
    min-height: 44px;
    padding: 0 0.8rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--bk-coral-dark);
    font: inherit;
    font-weight: 650;
    text-decoration: underline;
    cursor: pointer;
}

.oppsett-test-reason label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1 1 16rem;
}

.oppsett-effect {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 1rem 1.15rem;
    border-radius: 10px;
}

.oppsett-effect strong {
    font-size: 0.98rem;
}

.oppsett-effect p {
    margin: 0;
    font-size: 0.9rem;
}

.oppsett-effect.pending {
    border: 1px solid var(--bk-line);
    background: var(--bk-surface-2);
    color: var(--bk-sec);
}

.oppsett-effect.succeeded {
    border: 1px solid var(--bk-ok-border);
    background: var(--bk-ok-tint);
    color: var(--bk-ok);
}

.oppsett-effect.succeeded p {
    color: #56635e;
}

.oppsett-effect.failed {
    border: 1px solid var(--bk-bad-border);
    background: var(--bk-bad-tint);
    color: var(--bk-bad);
}

.oppsett-effect.unknown {
    border: 2px solid var(--bk-bad);
    background: var(--bk-bad-tint);
    color: var(--bk-bad);
}

.oppsett-effect .button {
    align-self: flex-start;
    margin-top: 0.45rem;
}

@media (max-width: 880px) {
    .oppsett-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .oppsett-rail {
        position: static;
    }

    .oppsett-rail ol {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem 1.1rem;
    }

    .oppsett-rail-step,
    .oppsett-rail-step:last-child {
        grid-template-areas: "marker body";
        padding: 0;
    }

    .oppsett-rail-step::before {
        display: none;
    }

    .oppsett-rail-marker {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .oppsett-rail-body {
        flex-direction: row;
        align-items: center;
        gap: 0.4rem;
        padding-top: 0;
    }

    .oppsett-rail-body strong {
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .oppsett-rail-body small,
    .oppsett-rail-now {
        display: none;
    }

    .oppsett-secondary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .oppsett-device {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .oppsett-credential-text code {
        line-height: 1.6;
    }

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

    .oppsett-row-side {
        justify-content: space-between;
    }

    .oppsett-panel,
    .oppsett-device {
        padding: 1.1rem 1.1rem 1.2rem;
    }

    .selected-directory-user {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .selected-directory-user .button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .assignment-access-controls {
        grid-template-columns: 1fr;
    }

}

.settlement-expand {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: 4px;
    padding: 4px 12px;
    border: 1px solid rgba(15, 23, 42, .18);
    border-radius: 999px;
    background: transparent;
    font: inherit;
    font-size: .85rem;
    cursor: pointer;
}

.settlement-expand[aria-expanded="true"] {
    background: rgba(15, 23, 42, .06);
}

.settlement-breakdown {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(15, 23, 42, .2);
}

.settlement-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

/* The deleted-lines table carries a label, a code, a timestamp and a button.
   On a narrow screen that is wider than the panel, so it scrolls inside its
   own box instead of pushing the page sideways. */
.settlement-deleted-scroll {
    overflow-x: auto;
}

.settlement-table caption {
    text-align: left;
    font-weight: 850;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding-bottom: 4px;
}

.settlement-table th,
.settlement-table td {
    text-align: left;
    padding: 3px 8px 3px 0;
}

.settlement-table th.num,
.settlement-table td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Mndjournal (D-022): the Kassejournal month sheet, rebuilt with its own
   palette, lifted from the hall's July workbook — structural gray, green
   SALG headers with money-in/money-out fonts, plain tender headers, blue
   sums, the yellow KONTROLL badge and the pink safe-check chip. */

.journal-sheet {
    display: grid;
    gap: 0.6rem;
    --j-gray: #D9D9D9;
    --j-green: #E2EFDA;
    --j-green-font: #00B050;
    --j-red-font: #FF0000;
    --j-safe-start: #D0CECE;
    --j-sum: #D9E1F2;
    --j-kontroll: #FFFF99;
    --j-pink: #F26083;
    --j-diff: #FCE4D6;
    --j-line: #808080;
    font-family: Calibri, "Carlito", Inter, ui-sans-serif, system-ui, sans-serif;
    color: #000;
}

.journal-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.9rem;
}

.journal-title {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.04em;
    margin-right: 1rem;
}

.journal-chip {
    background: var(--j-green);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.1rem 0.55rem;
    border: 1px solid var(--j-line);
}

.journal-chip-label {
    margin-right: 0.3rem;
}

.journal-head-safe {
    margin-left: auto;
    display: inline-flex;
    gap: 0.45rem;
    align-items: baseline;
    font-size: 0.9rem;
}

.journal-head-label {
    font-weight: 700;
}

.journal-safe-value {
    background: var(--j-safe-start);
    padding: 0.05rem 0.5rem;
    border: 1px solid var(--j-line);
    font-variant-numeric: tabular-nums;
}

.journal-scroll {
    overflow-x: auto;
    background: #fff;
}

.journal-table {
    min-width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.journal-table th,
.journal-table td {
    white-space: nowrap;
    padding: 1px 7px;
    border: 1px solid var(--j-line);
    text-align: left;
    font-weight: 400;
}

.journal-table th.num,
.journal-table td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Structural columns carry the gray fill, like Dato/Safe/«Alltid 0» in the sheet. */
.journal-table .journal-struct {
    background: var(--j-gray);
}

.journal-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--j-gray);
    font-weight: 700;
    text-align: center;
    vertical-align: middle;
    white-space: normal;
    min-width: 5.5rem;
    max-width: 8rem;
}

.journal-table thead .journal-salg-head {
    background: var(--j-green);
}

.journal-table thead .journal-tender-head {
    background: #fff;
}

.journal-table thead .journal-head-in {
    color: var(--j-green-font);
}

.journal-table thead .journal-head-out {
    color: var(--j-red-font);
}

.journal-table tr.journal-groups th {
    border-bottom: none;
    font-weight: 700;
    letter-spacing: 0.06em;
    white-space: nowrap;
    min-width: 0;
    max-width: none;
}

.journal-table .journal-group-betaling {
    font-size: 1rem;
}

/* The sheet's spacer columns between the SALG, BETALING and Safe blocks. */
.journal-table .journal-gap {
    border: none;
    background: transparent;
    padding: 0 0.3rem;
    min-width: 0.6rem;
    max-width: 0.6rem;
    width: 0.6rem;
}

.journal-table tbody th[scope="row"] {
    position: sticky;
    left: 0;
    z-index: 1;
    text-align: center;
}

/* The medium box around the whole grid, thin inside. */
.journal-table thead tr.journal-labels th {
    border-top: 2px solid #000;
}

.journal-table tbody tr:first-child th,
.journal-table tbody tr:first-child td {
    border-top: none;
}

.journal-table tfoot th,
.journal-table tfoot td {
    border-top: 2px solid #000;
    border-bottom: 2px solid #000;
    background: var(--j-sum);
    font-weight: 700;
}

.journal-table .journal-sum-label {
    font-size: 1rem;
}

.journal-table td.journal-neg {
    color: var(--j-red-font);
}

.journal-table td.journal-veskediff,
.journal-table td.journal-diff {
    color: var(--j-red-font);
    font-weight: 700;
}

.journal-table tr.journal-stengt th,
.journal-table tr.journal-stengt td {
    color: #7f7f7f;
}

.journal-table tr.journal-incomplete th,
.journal-table tr.journal-incomplete td {
    color: #8A5700;
}

.journal-kontroll {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
    font-size: 0.88rem;
}

.journal-kontroll-badge {
    background: var(--j-kontroll);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.06em;
    padding: 0.15rem 1.1rem;
    border: 1px solid var(--j-line);
}

.journal-kontroll-hint {
    font-weight: 700;
}

.journal-kontroll-safe {
    background: var(--j-pink);
    font-weight: 700;
    padding: 0.15rem 0.7rem;
    border: 1px solid var(--j-line);
}

.journal-kontroll-note {
    color: #444;
}

/* POS retur flow (T-165): find, select, confirm, drawer */

.pos-return {
    display: grid;
    gap: 1rem;
    justify-items: start;
    max-width: 560px;
}

.pos-return h1 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.1;
}

.pos-return-state {
    margin: 0;
    color: var(--pos-muted);
    font-size: 0.95rem;
}

.pos-return-search {
    display: flex;
    gap: 0.7rem;
    width: 100%;
    flex-wrap: wrap;
}

.pos-return-search input::-webkit-outer-spin-button,
.pos-return-search input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pos-return-search input {
    appearance: textfield;
    -moz-appearance: textfield;
    flex: 1 1 12rem;
    min-height: 56px;
    padding: 0 1rem;
    border: 1px solid var(--pos-line, #d8cfd4);
    border-radius: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    background: #fff;
    color: inherit;
}

.pos-return-primary {
    min-height: 56px;
    padding: 0 1.4rem;
    border: 0;
    border-radius: 12px;
    background: #17211b;
    color: #FBF3E9;
    font: inherit;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
}

.pos-return-primary:disabled {
    background: #d8cfd4;
    color: #fff;
    cursor: not-allowed;
}

.pos-return button:not(.pos-return-primary):not(.pos-quantity button):not(.pos-back-action) {
    min-height: 56px;
    padding: 0 1.2rem;
    border: 1px solid var(--pos-line, #d8cfd4);
    border-radius: 12px;
    background: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.pos-return-empty {
    display: grid;
    gap: 0.3rem;
    padding: 1.4rem;
    border: 1px dashed var(--pos-line, #d8cfd4);
    border-radius: 14px;
    color: var(--pos-muted);
}

.pos-return-candidates {
    display: grid;
    gap: 0.6rem;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pos-return-candidates button {
    display: grid;
    gap: 0.25rem;
    width: 100%;
    text-align: left;
}

.pos-return-lines {
    display: grid;
    gap: 0.6rem;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pos-return-lines li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    border: 1px solid var(--pos-line, #d8cfd4);
    border-radius: 14px;
    background: #fff;
}

.pos-return-lines .pos-quantity {
    grid-column: auto;
}

.pos-return-line-main {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.pos-return-line-main small {
    color: var(--pos-muted);
    font-size: 0.8rem;
}

.pos-return-reason {
    display: grid;
    gap: 0.4rem;
    width: 100%;
    color: var(--pos-muted);
    font-size: 0.85rem;
    font-weight: 700;
}

.pos-return-reason input {
    min-height: 52px;
    padding: 0 0.9rem;
    border: 1px solid var(--pos-line, #d8cfd4);
    border-radius: 12px;
    font: inherit;
    background: #fff;
    color: inherit;
}

.pos-return-restock {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--pos-muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.pos-return-restock input {
    width: 20px;
    height: 20px;
    accent-color: #185d3e;
}

.pos-return-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: #f4eef1;
    font-size: 1rem;
}

.pos-return-total strong {
    font-size: 1.5rem;
}

.pos-return-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.pos-return-summary {
    display: grid;
    gap: 0.2rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: #f4eef1;
    font-size: 0.95rem;
}

.pos-return-summary strong {
    font-size: 1.4rem;
}

.pos-return-summary small {
    color: var(--pos-muted);
}

.pos-return-card {
    display: grid;
    gap: 0.8rem;
    width: 100%;
    padding: 1rem 1.1rem;
    border: 1px solid var(--pos-line, #d8cfd4);
    border-radius: 14px;
    background: #fff;
}

.pos-return-card p {
    margin: 0;
    color: var(--pos-muted);
}

.pos-return-message {
    margin: 0;
    color: var(--pos-muted);
    font-weight: 600;
}

.pos-return-message.error {
    color: #8a2929;
}

.pos-receipt-row {
    box-sizing: border-box;
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--pos-line, #d8cfd4);
    border-radius: 14px;
    background: #fff;
}

.pos-stock-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pos-stock-count input {
    width: 5.5rem;
    min-height: 48px;
    padding: 0 0.5rem;
    border: 1px solid var(--pos-line, #d8cfd4);
    border-radius: 10px;
    font: inherit;
    font-weight: 700;
    text-align: right;
}

/* 2026 interface system -----------------------------------------------------
   One calm visual language across the operator and administration surfaces.
   Product colours remain data-driven; navigation and actions use stable roles. */
:root {
    --ui-bg: #f4f6f8;
    --ui-surface: #ffffff;
    --ui-surface-soft: #f8fafb;
    --ui-ink: #17201d;
    --ui-muted: #68736e;
    --ui-line: #dce3df;
    --ui-line-strong: #c9d3ce;
    --ui-primary: #3657d6;
    --ui-primary-dark: #2945ad;
    --ui-primary-soft: #eef1ff;
    --ui-positive: #16705a;
    --ui-warning: #9a5b08;
    --ui-danger: #a83c45;
    --ui-radius-sm: 12px;
    --ui-radius: 18px;
    --ui-radius-lg: 26px;
    --ui-shadow-sm: 0 1px 2px rgb(20 32 27 / 5%), 0 8px 24px rgb(20 32 27 / 5%);
    --ui-shadow: 0 2px 5px rgb(20 32 27 / 5%), 0 22px 55px rgb(20 32 27 / 8%);
    color: var(--ui-ink);
    background: var(--ui-bg);
    font-family: Inter, "Avenir Next", "Segoe UI", system-ui, sans-serif;
}

body {
    background: var(--ui-bg);
    color: var(--ui-ink);
}

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

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

:where(button, a, input, select, textarea):focus-visible {
    outline: 3px solid rgb(54 87 214 / 28%);
    outline-offset: 2px;
}

.pos-shell {
    --pos-coral: var(--ui-primary);
    --pos-coral-dark: var(--ui-primary-dark);
    --pos-ink: var(--ui-ink);
    --pos-muted: var(--ui-muted);
    --pos-line: var(--ui-line);
    color: var(--ui-ink);
    background:
        radial-gradient(circle at 12% -12%, rgb(86 109 220 / 10%), transparent 30rem),
        linear-gradient(180deg, #fbfcfd 0, var(--ui-bg) 42rem);
    font-family: inherit;
}

.pos-secondary-action,
.session-logout-button{
    border-color: var(--ui-line);
    background: rgb(255 255 255 / 94%);
    color: var(--ui-ink);
    box-shadow: var(--ui-shadow-sm);
}

.workspace-account-panel,
.pos-device-modal {
    border-color: var(--ui-line);
    border-radius: var(--ui-radius);
    box-shadow: var(--ui-shadow);
}

.workspace-account-item:hover,
.workspace-account-item:focus-visible {
    background: var(--ui-primary-soft);
}

.pos-workspace {
    gap: clamp(1rem, 2vw, 1.75rem);
}

.pos-cart h2,
.pos-focus-state h1,
.admin-shell h1,
.admin-shell h2,
.entry-panel h1 {
    color: var(--ui-ink);
    letter-spacing: -0.035em;
}

.pos-eyebrow,
.entry-kicker,
.page-kicker {
    color: var(--ui-primary-dark);
    letter-spacing: .105em;
}

.pos-search input,
.pos-text-input,
.pos-money-input,
.pos-focus-state > select,
.admin-shell input:not([type=checkbox]),
.admin-shell select,
.admin-shell textarea {
    border: 1px solid var(--ui-line);
    background: var(--ui-surface);
    box-shadow: 0 1px 2px rgb(20 32 27 / 3%);
}

.pos-search input {
    border-radius: 14px;
}

.pos-search input:focus,
.pos-money-input:focus-within,
.pos-focus-state .pos-text-input:focus,
.admin-shell input:focus,
.admin-shell select:focus,
.admin-shell textarea:focus {
    border-color: var(--ui-primary);
    outline: 3px solid rgb(54 87 214 / 15%);
    box-shadow: none;
}

.pos-category {
    border: 1px solid var(--ui-line);
    border-radius: 12px;
    background: var(--ui-surface);
    color: var(--ui-muted);
    box-shadow: none;
}

.pos-category.is-active {
    border-color: var(--ui-ink);
    background: var(--ui-ink);
    color: #fff;
    box-shadow: none;
}

.pos-product {
    min-height: 184px;
    border: 1px solid rgb(23 32 29 / 5%);
    border-radius: 22px;
    box-shadow: var(--ui-shadow-sm);
}

.pos-product:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgb(20 32 27 / 10%);
}

.pos-product-price {
    color: var(--ui-ink);
}

.pos-cart {
    border: 1px solid var(--ui-line);
    border-radius: var(--ui-radius-lg);
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow);
}

.pos-cart-footer {
    border-top-color: var(--ui-line);
    background: linear-gradient(180deg, rgb(255 255 255 / 70%), #fff 1.25rem);
}

.pos-empty-cart,
.pos-empty-products {
    border-color: var(--ui-line-strong);
    border-radius: var(--ui-radius);
    background: var(--ui-surface-soft);
}
.pos-cart-line,
.pos-payout-line{
    border-color: var(--ui-line);
}

.pos-primary-action {
    border-radius: 14px;
    background: var(--ui-primary);
    box-shadow: 0 10px 24px rgb(54 87 214 / 20%);
}

.pos-primary-action:hover:not(:disabled) {
    background: var(--ui-primary-dark);
}

.pos-secondary-action {
    border-radius: 14px;
}

.pos-focus-state {
    color: var(--ui-ink);
    background:
        radial-gradient(circle at 50% 0, rgb(54 87 214 / 9%), transparent 24rem),
        var(--ui-bg);
}

.pos-focus-state > p:not(.pos-eyebrow):not(.pos-inline-error),
.page-lead,
.admin-shell p {
    color: var(--ui-muted);
}

.pos-state-icon {
    background: var(--ui-primary-soft);
    color: var(--ui-primary-dark);
}

.pos-success-toast {
    border-color: #a6d4c7;
    border-radius: 14px;
    background: #f0faf7;
    color: #145a49;
    box-shadow: var(--ui-shadow);
}

.pos-error-banner,
.pos-focus-error .pos-stop-note {
    border-color: #e1b5b9;
    background: #fff5f5;
    color: #862f38;
}

.pos-actions-launcher {
    width: 100%;
    min-height: 60px;
    display: grid;
    grid-template-columns: 2.25rem minmax(0, 1fr) auto;
    align-items: center;
    gap: .7rem;
    padding: .6rem .8rem;
    text-align: left;
}

.pos-actions-launcher > span:first-child {
    width: 2.25rem;
    height: 2.25rem;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--ui-primary-soft);
    color: var(--ui-primary-dark);
    font-size: 1.3rem;
    line-height: 1;
}

.pos-actions-launcher > span:nth-child(2) {
    min-width: 0;
    display: grid;
    gap: .12rem;
}

.pos-actions-launcher strong,
.pos-actions-launcher small {
    display: block;
}

.pos-actions-launcher small {
    overflow: hidden;
    color: var(--ui-muted);
    font-size: .75rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pos-action-grid {
    display: grid;
    gap: .65rem;
}

.pos-action-grid button {
    width: 100%;
    min-height: 76px;
    display: grid;
    grid-template-columns: 2.8rem minmax(0, 1fr) auto;
    align-items: center;
    gap: .8rem;
    padding: .75rem .85rem;
    border: 1px solid var(--ui-line);
    border-radius: 16px;
    background: var(--ui-surface);
    color: var(--ui-ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.pos-action-grid button:hover:not(:disabled),
.pos-action-grid button:focus-visible {
    border-color: #aebbe9;
    background: var(--ui-primary-soft);
}

.pos-action-grid button:disabled {
    background: #f4f6f5;
    color: #66706b;
    cursor: not-allowed;
}

.pos-action-grid button:disabled small {
    color: #4f5a55;
}

.pos-action-grid button > span:nth-child(2) {
    min-width: 0;
    display: grid;
    gap: .18rem;
}

.pos-action-grid strong,
.pos-action-grid small {
    display: block;
}

.pos-action-grid small {
    color: var(--ui-muted);
    font-size: .78rem;
    line-height: 1.3;
}

.pos-action-symbol {
    width: 2.8rem;
    height: 2.8rem;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--ui-primary-soft);
    color: var(--ui-primary-dark);
    font-weight: 850;
}

.entry-panel,
.access-denied-panel,
.admin-state > *,
.pos-entry-group,
.pos-entry-state {
    border-color: var(--ui-line);
    border-radius: var(--ui-radius-lg);
    box-shadow: var(--ui-shadow);
}

@media (max-width: 720px) {
    .pos-action-grid button {
        min-height: 72px;
    }
.pos-cart{
        border-radius: 20px;
    }

    .pos-actions-launcher small {
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}/* Keep ordinary controls tactile and pill-shaped after all component rules. */
.workspace-account-trigger,
.pos-primary-action,
.pos-secondary-action,
.pos-category,
.pos-cart-close,
.admin-shell .button,
.session-logout-button{
    border-radius: 999px;
}

/* Final scoped overrides: settlement cards and every POS action modal share one hierarchy. */
.pos-workflow-backdrop {
    position: fixed;
    z-index: 70;
    inset: 0;
    background: rgb(20 27 24 / 44%);
    backdrop-filter: blur(5px);
    animation: pos-modal-fade 130ms ease-out;
}

/* Keep only the operator's Driftsavvik entry reachable while a cash step owns
   the rest of the screen. The device dialog itself remains above this menu. */
.pos-shell.is-workflow-active .pos-topbar .workspace-account {
    z-index: 90;
}

.pos-focus-state.pos-workflow-modal,
.pos-modal-panel {
    scrollbar-width: thin;
    scrollbar-color: rgb(23 32 29 / 22%) transparent;
    position: fixed;
    z-index: 71;
    top: 50%;
    left: 50%;
    width: min(calc(100% - 2rem), 43rem);
    box-sizing: border-box;
    min-height: 0;
    /* Border box + clearance for the sticky dev banner above every layer. */
    max-height: calc(100dvh - 6rem);
    overflow: auto;
    align-content: start;
    margin: 0;
    padding: clamp(1.25rem, 3.5vw, 2rem);
    border: 1px solid rgb(255 255 255 / 75%);
    border-radius: 30px;
    background: var(--ui-surface);
    box-shadow: 0 30px 90px rgb(14 22 18 / 30%);
    transform: translate(-50%, -50%);
    animation: pos-workflow-modal-rise 160ms ease-out;
}

.pos-modal-panel::-webkit-scrollbar {
    width: 10px;
}

.pos-modal-panel::-webkit-scrollbar-thumb {
    background: rgb(23 32 29 / 22%);
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: content-box;
}

.pos-focus-state.pos-workflow-modal h1,
.pos-modal-panel > .pos-focus-state {
    min-height: 0;
    padding: .25rem;
}

/* A wrapped headline breaks balanced — "Sett inn / kundens kort", never an
   orphaned last word — matching how the pay screen's longer titles wrap. */
.pos-workflow-modal h1 {
    text-wrap: balance;
}

.pos-modal-panel > .pos-focus-state > h1 {
    max-width: calc(100% - 5rem);
    margin: .15rem auto 0;
    font-size: clamp(1.7rem, 4vw, 2.4rem);
}

.pos-workflow-modal .pos-state-icon {
    width: 58px;
    height: 58px;
    margin: 0 0 .8rem;
    border-radius: 20px;
    font-size: 1.5rem;
}

.pos-workflow-modal .pos-workflow-close,
.pos-modal-panel > .pos-workflow-close {
    position: absolute;
    z-index: 1;
    top: 1.2rem;
    right: 1.2rem;
    display: grid;
    place-items: center;
    padding: 0 0 2px;
}

.pos-workflow-modal.pos-cash-entry {
    width: min(calc(100% - 2rem), 36rem);
    padding-top: clamp(1.5rem, 4vw, 2.4rem);
}

.pos-workflow-modal.pos-paper-entry {
    width: min(calc(100% - 2rem), 28.75rem);
    padding: 30px;
}

.pos-workflow-modal.pos-drawer-open-modal {
    width: min(calc(100% - 2rem), 34rem);
    align-content: center;
}

.pos-workflow-modal.pos-drawer-open-modal .pos-secondary-action {
    width: min(100%, 22rem);
}

.pos-workflow-modal .pos-terminal-amount {
    margin-top: 1rem;
}

.pos-workflow-modal .pos-card-steps {
    margin-block: .85rem;
}

@keyframes pos-workflow-modal-rise {
    from { transform: translate(-50%, calc(-50% + 10px)) scale(.985); }
}

/* The Dagen pages were written as standalone pages. Inside a modal card they drop
   their own page frame — the card owns width, padding and scrolling. */
.pos-modal-panel.is-wide { width: min(calc(100% - 2rem), 62rem); }

.pos-modal-panel.is-narrow { width: min(calc(100% - 2rem), 34rem); }

.pos-modal-panel > .pos-focus-state,
.pos-modal-panel > .pos-return,
.pos-modal-panel > .day-close-workspace {
    width: 100%;
    max-width: none;
    min-height: 0;
    margin: 0;
    padding: 0;
    background: none;
}

.pos-modal-panel > .pos-focus-state {
    align-content: start;
}

.pos-modal-panel h1 {
    max-width: calc(100% - 4rem);
}

/* White tiles on a white card disappear, so inside the modal they take the
   page background they used to sit on. */
.pos-modal-panel .day-actions button,
.pos-modal-panel .purchase-reminder,
.pos-modal-panel .pos-return-candidates li {
    border-color: var(--ui-line);
    background: var(--ui-bg);
}

.pos-modal-panel .pos-back-action {
    justify-self: start;
    margin-right: 3rem;
}

@media (max-width: 720px) {
    .pos-focus-state.pos-workflow-modal,
    .pos-modal-panel {
        top: auto;
        right: .55rem;
        bottom: .55rem;
        left: .55rem;
        width: auto;
        max-height: calc(100dvh - 1.1rem);
        padding: 1.35rem;
        border-radius: 28px;
        transform: none;
        animation: pos-workflow-sheet-rise 160ms ease-out;
    }

    .pos-focus-state.pos-workflow-modal h1,
    .pos-modal-panel > .pos-focus-state > h1 {
        font-size: clamp(1.85rem, 9vw, 2.5rem);
    }

    .pos-workflow-modal .pos-card-outcomes {
        grid-template-columns: 1fr;
    }

    .pos-workflow-modal .pos-card-outcomes button {
        min-height: 64px;
    }
}

@keyframes pos-workflow-sheet-rise {
    from { transform: translateY(10px) scale(.985); }
}

.pos-empty-cart {
    flex: 1;
    min-height: 12rem;
    justify-items: start;
    align-content: start;
    padding: 1rem 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: var(--ui-muted);
    text-align: left;
}

.pos-empty-cart > span {
    width: auto;
    height: auto;
    display: block;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font-size: .8rem;
    font-weight: 650;
}

.pos-action-modal .pos-modal-heading {
    position: relative;
    min-height: 3.25rem;
    display: grid;
    place-items: center;
    justify-content: center;
    padding-inline: 3.25rem;
    text-align: center;
}

.pos-action-modal .pos-modal-heading > div,
.pos-action-modal .pos-action-heading-copy {
    min-width: 0;
    justify-content: center;
}

.pos-action-modal .pos-modal-heading p:last-child:not(.pos-eyebrow) {
    margin-inline: auto;
}

.pos-action-modal .pos-modal-close {
    position: absolute;
    top: 50%;
    right: 0;
    width: 42px;
    height: 42px;
    box-sizing: border-box;
    display: grid;
    place-items: center;
    padding: 0 0 2px;
    transform: translateY(-50%);
}.pos-action-form-modal {
    width: min(100%, 34rem);
}

@media (max-width: 480px) {
    .pos-action-modal .pos-modal-heading {
        padding-inline: 2.8rem;
    }
}

/* Direction-first settlement: names, amounts, result, action. */
.pos-cart-heading {
    min-height: 2.75rem;
    align-items: center;
}

.pos-cart-heading h2 {
    margin: 0;
}

.pos-settlement-group {
    display: grid;
    gap: .35rem;
    margin-top: 1rem;
}

.pos-settlement-group > h3 {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin: 0;
    color: var(--ui-muted);
    font-size: .7rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.pos-settlement-group > h3 i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d96868;
}

.pos-settlement-group.is-prizes > h3 i {
    background: var(--ui-positive);
}

.pos-settlement-group.is-destinations > h3 i {
    background: #6758d8;
}

.pos-settlement-group.is-transfers > h3 i {
    background: #6758d8;
}

.pos-settlement-group .pos-payout-line.is-wallet > span {
    background: #eceafb;
    color: #6758d8;
}

.pos-settlement-group .pos-payout-line.is-withdrawal > span {
    background: #faf0d8;
    color: #795e13;
}

/* The resolve stage's small captions: one line above each question block. */
.pos-resolve-label {
    width: min(100%, 25rem);
    margin: 1.1rem 0 0;
    color: var(--ui-muted);
    font-size: .82rem;
    font-weight: 650;
    /* Centered on the pills' axis below — the toggle completes the sentence. */
    text-align: center;
}

.pos-settlement-group .pos-cart-lines,
.pos-settlement-group .pos-cart-payouts {
    gap: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.pos-settlement-group .pos-cart-line,
.pos-settlement-group .pos-payout-line {
    border: 0;
    border-bottom: 1px solid var(--ui-line);
    border-radius: 0;
    background: transparent;
}

.pos-settlement-group .pos-payout-line {
    min-height: 54px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto 44px;
    gap: .55rem;
    align-items: center;
    padding: .45rem 0;
}

.pos-settlement-group .pos-payout-line > span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: #e2f3ec;
    color: var(--ui-positive);
    font-size: .82rem;
    font-weight: 900;
}

.pos-settlement-group .pos-payout-line > strong {
    color: var(--ui-ink);
    white-space: nowrap;
}

/* The quiet card line — identity while a card is seated, a readable fault,
   or a searched customer; silence while the reader rests. */
.pos-card-line {
    width: 100%;
    min-height: 48px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    column-gap: .6rem;
    row-gap: .15rem;
    align-items: center;
    margin: .1rem 0 .55rem;
    padding: .25rem .6rem .25rem .35rem;
    border: 1px solid var(--ui-line);
    border-radius: 13px;
    background: var(--ui-surface);
    color: var(--ui-ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.pos-card-line:hover:not(:disabled),
.pos-card-line:focus-visible {
    border-color: #9bacec;
    background: var(--ui-primary-soft);
}

.pos-card-line:disabled {
    cursor: default;
    opacity: .75;
}

.pos-card-line-glyph {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--ui-primary-soft);
    color: var(--ui-primary-dark);
}

.pos-card-line-glyph svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.pos-card-line-copy {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.pos-card-line-copy strong {
    overflow: hidden;
    font-size: .86rem;
    font-weight: 800;
    letter-spacing: -.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pos-card-line-copy small {
    color: var(--ui-muted);
    font-size: .74rem;
    font-weight: 650;
}

.pos-card-line-amount {
    /* Keep the saldo beside the customer name on the first row. */
    color: var(--ui-ink);
    font-size: .78rem;
    font-weight: 800;
    white-space: nowrap;
}

.pos-card-line.is-search .pos-card-line-glyph {
    background: #e6f4ef;
    color: var(--ui-positive);
}

.pos-card-line.is-error {
    border-color: #ecdcab;
    background: #fff3d6;
    color: var(--ui-warning);
}

.pos-card-line.is-error:hover:not(:disabled),
.pos-card-line.is-error:focus-visible {
    border-color: #d9c286;
    background: #ffeec2;
}

.pos-card-line.is-error .pos-card-line-glyph {
    background: #ffe9b8;
}

.pos-card-line.is-error .pos-card-line-copy strong {
    color: var(--ui-warning);
}

.pos-card-line-limit {
    grid-column: 2 / -1;
    color: var(--ui-muted);
    font-size: .74rem;
    font-weight: 650;
    line-height: 1.25;
}

/* The identify step's reader half: a live slot that waits, in the house's
   dashed-gate language. */
.pos-reader-slot {
    width: min(100%, 25rem);
    box-sizing: border-box;
    display: grid;
    justify-items: center;
    gap: .6rem;
    margin-top: 1.2rem;
    padding: 1.5rem 1rem 1.3rem;
    border: 2px dashed var(--ui-line-strong);
    border-radius: 22px;
    background: var(--ui-surface-soft);
}

.pos-reader-slot.is-idle {
    border-style: solid;
}

.pos-reader-glyph {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border: 1px solid var(--ui-line);
    border-radius: 17px;
    background: var(--ui-surface);
    color: var(--ui-primary-dark);
}

.pos-reader-glyph svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
}

.pos-reader-slot strong {
    font-size: .95rem;
    font-weight: 800;
    letter-spacing: -.01em;
}

.pos-reader-slot small {
    color: var(--ui-muted);
    font-size: .8rem;
    font-weight: 650;
}

.pos-reader-pulse {
    width: 8px;
    height: 8px;
    margin-top: .2rem;
    border-radius: 50%;
    background: var(--ui-primary);
    animation: pos-reader-breathe 1.6s ease-in-out infinite;
}

@keyframes pos-reader-breathe {
    0%, 100% { opacity: .25; }
    50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .pos-reader-pulse { animation: none; opacity: .6; }
}

.pos-card-inline-error {
    width: min(100%, 24rem);
    box-sizing: border-box;
    margin-top: 1.2rem;
    padding: .9rem 1rem;
    border: 1.5px solid #f0cfd2;
    border-radius: 16px;
    background: #fdeeee;
    color: var(--ui-danger);
    font-size: .88rem;
    font-weight: 750;
}

/* "eller søk" — the search is an equal door in, not a fallback. */
.pos-or {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: .8rem;
    width: min(100%, 25rem);
    margin: 1.1rem 0 1rem;
    color: var(--ui-muted);
    font-size: .74rem;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.pos-or::before,
.pos-or::after {
    content: "";
    border-top: 1px solid var(--ui-line);
}

/* The search label already gets the divider's bottom margin above it; its own
   1.05rem top margin would double the gap on one side of the divider. */
.pos-or + label {
    margin-top: .2rem;
}

/* The amount-first Til wallet dialog's one hint: why no name is asked. */
.pos-wallet-load-hint {
    display: block;
    margin-top: .45rem;
    color: var(--ui-muted);
}

/* Confirm: where the identity came from, and the whole movement on one line. */
.pos-wallet-source {
    margin: .55rem 0 0;
    color: var(--ui-muted);
    font-size: .92rem;
    font-weight: 650;
}

.pos-wallet-saldo {
    display: block;
    margin-top: .45rem;
    color: var(--ui-muted);
    font-size: .8rem;
    font-weight: 700;
}

.pos-terminal-amount small {
    margin-top: .2rem;
    color: var(--ui-muted);
    font-size: .8rem;
    font-weight: 700;
}

/* Gold and unmissable: money moved, hand the card back. */
.pos-card-eject {
    /* Matches the status card it stacks under on the wallet result screen
       (.pos-win-result, 28rem); the cash-wallet context widens it below. */
    width: min(100%, 28rem);
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 22px;
    gap: .6rem;
    align-items: center;
    min-height: 56px;
    margin: 1.2rem auto 0;
    padding: 0 .8rem 0 .7rem;
    border: 1.5px solid #ecdcab;
    border-radius: 16px;
    background: #fff3d6;
    color: var(--ui-warning);
    text-align: left;
}

.pos-card-eject-glyph {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: #ffe9b8;
}

/* The cash-wallet completion stacks the strip under a 34rem confirm card. */
.pos-cash-state .pos-card-eject {
    width: min(100%, 34rem);
}

.pos-card-eject-glyph svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.pos-card-eject strong {
    font-size: .95rem;
    font-weight: 850;
    letter-spacing: -.01em;
}

.pos-card-eject-dir {
    font-size: 1.1rem;
    font-weight: 850;
}

.pos-cart-footer {
    gap: .75rem;
}

.pos-balance-breakdown {
    gap: .22rem;
    padding: .45rem 0 .6rem;
    border: 0;
    border-top: 2px dashed var(--ui-line-strong);
    font-size: .78rem;
}

/* Managed Agent setup uses the same full-size controls as other admin forms. */
.agent-settings-form,
.agent-pairing-form {
    display: grid;
    gap: 1rem;
    min-width: 0;
}
.agent-settings-form > p {
    color: #59635e;
}
.agent-settings-form label,
.agent-pairing-form label {
    display: grid;
    gap: .45rem;
    min-width: 0;
    font-size: .9rem;
}
.agent-settings-form input:not([type=checkbox]),
.agent-settings-form select,
.agent-pairing-form input {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: .65rem .8rem;
    border: 1px solid var(--bk-line);
    border-radius: 8px;
    background: white;
    color: var(--bk-ink);
    font: inherit;
}
.agent-settings-form label.check-row {
    display: flex;
    align-items: center;
    min-height: 44px;
    gap: .6rem;
}
.agent-settings-form .check-row input {
    width: 1.2rem;
    height: 1.2rem;
}
.agent-pairing-form .button,
.agent-settings-form > .button {
    justify-self: start;
}
.oppsett-device-body > details > summary {
    min-height: 44px;
    padding-block: .7rem;
    cursor: pointer;
}

.agent-installer-link {
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    text-decoration: none;
}


/* The Oppgjør payment screen: one CTA in the cart footer, methods and split
   parts in one centered modal. Same roles as the settlement tile: indigo when
   the customer pays, green when the hall pays. */
.pos-settlement-cta {
    width: 100%;
    min-height: 74px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: .8rem;
    align-items: center;
    padding: .6rem .95rem .6rem .7rem;
    border: 0;
    border-radius: 17px;
    background: var(--ui-primary);
    color: #fff;
    font: inherit;
    cursor: pointer;
    box-shadow: 0 12px 26px rgb(54 87 214 / 22%);
}

.pos-settlement-cta:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.pos-settlement-cta-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgb(255 255 255 / 16%);
    font-size: 1.25rem;
}

.pos-settlement-cta-copy {
    display: grid;
    gap: .12rem;
    text-align: left;
    line-height: 1.12;
}

.pos-settlement-cta-copy strong {
    font-size: 1.05rem;
    letter-spacing: -.01em;
}

.pos-settlement-cta-copy small {
    opacity: .82;
    font-weight: 650;
}

.pos-settlement-cta-amount {
    font-size: clamp(1.35rem, 2.2vw, 1.7rem);
    letter-spacing: -.045em;
    white-space: nowrap;
}

.pos-workflow-modal.pos-pay-screen {
    width: min(calc(100% - 2rem), 41rem);
}

.pos-pay-hero {
    min-width: min(100%, 22rem);
    margin: 1.1rem 0 0;
    padding: .95rem 1.5rem;
    border-radius: 20px;
    color: #fff;
    background: var(--ui-primary);
    box-shadow: 0 14px 30px rgb(54 87 214 / 20%);
}


.pos-pay-hero strong {
    font-size: clamp(2.4rem, 8vw, 3.4rem);
    line-height: 1.05;
    letter-spacing: -.05em;
    white-space: nowrap;
}

.pos-pay-parts {
    width: min(100%, 25rem);
    display: grid;
    gap: .45rem;
    margin: .9rem 0 0;
}

.pos-pay-part {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 34px;
    gap: .5rem;
    align-items: center;
    padding: .35rem .45rem .35rem .35rem;
    border: 1px solid var(--ui-line);
    border-radius: 14px;
    background: var(--ui-surface-soft);
    text-align: left;
}

.pos-pay-part-copy {
    min-height: 44px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: .55rem;
    align-items: center;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: none;
    font: inherit;
    cursor: pointer;
}

.pos-pay-part-copy:focus-visible {
    outline: 3px solid rgb(54 87 214 / 25%);
}

.pos-pay-part-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: #fff1e0;
    color: #7c4a00;
    font-size: .8rem;
    font-weight: 850;
}

.pos-pay-part.is-wallet .pos-pay-part-icon {
    background: #eeeafe;
    color: #473a9e;
}

.pos-pay-part-text {
    display: grid;
    gap: .05rem;
    line-height: 1.15;
}

.pos-pay-part-text strong {
    font-size: .92rem;
}

.pos-pay-part-text small {
    color: var(--ui-muted);
    font-weight: 650;
}

.pos-pay-part-amount {
    font-size: 1.05rem;
    letter-spacing: -.03em;
    white-space: nowrap;
}

.pos-pay-part-remove {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid var(--ui-line);
    border-radius: 50%;
    background: var(--ui-surface);
    color: var(--ui-danger);
    cursor: pointer;
}

.pos-pay-part-remove svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.pos-pay-remaining {
    width: min(100%, 25rem);
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .8rem;
    margin: .55rem 0 0;
    padding: .5rem .95rem;
    border-radius: 14px;
    background: var(--ui-primary-soft);
}

.pos-pay-remaining small {
    color: var(--ui-primary-dark);
    font-weight: 750;
}

.pos-pay-remaining strong {
    font-size: 1.3rem;
    letter-spacing: -.04em;
    white-space: nowrap;
}

.pos-pay-methods {
    width: min(100%, 31rem);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
    gap: .75rem;
    margin: 1.1rem 0 0;
}

.pos-pay-method {
    min-height: 86px;
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: .7rem;
    align-items: center;
    padding: .7rem .8rem;
    border: 1px solid var(--ui-line);
    border-radius: 18px;
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow-sm);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.pos-pay-method:hover:not(:disabled),
.pos-pay-method:focus-visible:not(:disabled) {
    border-color: var(--ui-primary);
    outline: none;
}

.pos-pay-method:disabled {
    cursor: not-allowed;
    opacity: .5;
}

.pos-pay-method-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 15px;
}

.pos-pay-method-icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

.pos-pay-method-card .pos-pay-method-icon {
    background: #e8edff;
    color: var(--ui-primary);
}

.pos-pay-method-cash .pos-pay-method-icon {
    background: #fff1e0;
    color: #7c4a00;
}

.pos-pay-method-wallet .pos-pay-method-icon {
    background: #eeeafe;
    color: #473a9e;
    font-size: 1.3rem;
    font-weight: 850;
}

.pos-pay-method-copy {
    display: grid;
    gap: .1rem;
    line-height: 1.15;
}

.pos-pay-method-copy strong {
    font-size: 1.02rem;
    letter-spacing: -.01em;
}

.pos-pay-method-copy small {
    color: var(--ui-muted);
    font-weight: 700;
}

.pos-pay-note {
    max-width: 26rem;
    margin: .85rem 0 0;
    color: var(--ui-muted);
    font-size: .95rem;
    font-weight: 650;
}

.pos-pay-storage {
    width: min(100%, 25rem);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem;
    margin: 1rem 0 0;
}

.pos-destination-choice {
    grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
}

.pos-pay-storage-choice {
    min-height: 50px;
    border: 1px solid var(--ui-line);
    border-radius: 999px;
    background: var(--ui-surface);
    font: inherit;
    font-weight: 750;
    cursor: pointer;
}

.pos-pay-storage-choice.is-active {
    border-color: var(--ui-primary);
    background: var(--ui-primary-soft);
    color: var(--ui-primary-dark);
    box-shadow: inset 0 0 0 1px var(--ui-primary);
}

.pos-pay-storage-choice:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.pos-pay-screen label {
    /* Share the input's centred 25rem column so the caption text lines up
       with the field below it instead of the modal edge. */
    width: min(100%, 25rem);
    justify-self: center;
    margin: 1.05rem 0 0;
    font-weight: 800;
    text-align: left;
}

.pos-pay-screen .pos-money-input,
.pos-pay-screen .pos-cash-presets,
.pos-pay-screen .pos-settlement-review,
.pos-pay-screen #pay-cash-help,
.pos-pay-screen .pos-pay-complete {
    width: min(100%, 25rem);
}

.pos-pay-screen .pos-money-input {
    margin-top: .45rem;
}

.pos-pay-screen #pay-cash-help {
    margin-top: .45rem;
    color: var(--ui-muted);
    font-weight: 650;
    text-align: left;
}

.pos-pay-complete {
    min-width: min(100%, 25rem);
}

@media (max-width: 480px) {
    .pos-pay-methods {
        grid-template-columns: 1fr;
    }

    .pos-settlement-cta {
        grid-template-columns: 40px minmax(0, 1fr) auto;
        min-height: 66px;
    }
}

/* Papirbong-paritet (docs/design/grid-salg-runde): these three must win over
   the generic workflow-modal h1 block above, which is why they live here. */
.pos-focus-state.pos-workflow-modal.pos-paper-entry h1 {
    padding: 0;
    font-size: 2.3rem;
    letter-spacing: -1.66px;
    line-height: 1.05;
}

/* D-023: the landed tender-leg chip — what has been paid so far sits above
   the method tiles, with its way out one × away (the money is still in the
   customer's hand, so removing the leg is just an edit). */
.pos-paid-leg {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    width: 100%;
    padding: .55rem .9rem;
    border-radius: 999px;
    background: #fff1e0;
    color: #7c4a00;
    font-weight: 700;
}

.pos-paid-leg-copy {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: .25rem .4rem;
    min-width: 0;
}

/* The amount is one unit — "Kontant 50,00 kr" must never break mid-token
   (the orphaned "kr" the vision pass caught); a narrow chip wraps the
   "registrert" word below instead, left-aligned beside the ×. */
.pos-paid-leg-copy strong {
    white-space: nowrap;
}

.pos-paid-leg-copy small {
    color: inherit;
    opacity: .85;
}

.pos-paid-leg-remove {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.pos-paid-leg-remove:hover:not(:disabled),
.pos-paid-leg-remove:focus-visible:not(:disabled) {
    background: rgb(0 0 0 / .08);
}

.pos-paid-leg.is-wallet {
    background: #eeeafe;
    color: #473a9e;
}

/* Cash entry stays under the same remaining balance and method choices. */
.pos-inline-cash {
    width: 100%;
    display: grid;
    justify-items: center;
    gap: .6rem;
    border-top: 1px solid var(--ui-line);
    padding-top: .75rem;
}

.pos-inline-cash h2 { margin: 0; font-size: 1.1rem; }
.pos-paid-leg-remove {
    width: auto;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: .5rem .75rem;
    border-radius: .5rem;
    font-size: .95rem;
}

.pos-pay-screen:has(.pos-inline-cash) .pos-pay-methods {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .5rem;
}

.pos-pay-screen:has(.pos-inline-cash) .pos-pay-method {
    flex: 1;
    min-height: 44px;
    display: block;
    padding: .75rem;
    text-align: center;
    border-radius: 12px;
}

.pos-pay-method[aria-pressed="true"] {
    border: 2px solid var(--ui-primary);
    background: var(--ui-primary-soft);
}

.pos-pay-screen:has(.pos-inline-cash) .pos-pay-method small,
.pos-pay-screen:has(.pos-inline-cash) .pos-pay-method-icon,
.pos-pay-screen:has(.pos-inline-cash) .pos-state-icon { display: none; }

.pos-pay-screen:has(.pos-inline-cash) .pos-pay-hero { margin-top: .5rem; padding: .65rem 1rem; }
.pos-pay-screen:has(.pos-inline-cash) .pos-pay-hero strong { font-size: 2.25rem; }
.pos-inline-cash .pos-pay-storage,
.pos-inline-cash label,
.pos-inline-cash .pos-money-input,
.pos-inline-cash .pos-cash-presets,
.pos-inline-cash .pos-settlement-review,
.pos-inline-cash #pay-cash-help { margin: 0; }
.pos-inline-cash .pos-pay-storage-choice { min-height: 44px; }
.pos-inline-cash .pos-cash-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; }
.pos-inline-cash .pos-cash-presets button { min-height: 44px; min-width: 0; padding: .5rem .15rem; font-size: .85rem; }
.pos-inline-cash .pos-primary-action { width: min(100%, 25rem); margin-top: .15rem; min-height: 50px; }

@media (max-width: 600px) {
    .pos-focus-state.pos-workflow-modal.pos-pay-screen:has(.pos-inline-cash) {
        gap: .5rem;
        padding: 1.25rem;
        max-height: calc(100dvh - 1rem);
    }
    .pos-focus-state.pos-workflow-modal.pos-pay-screen:has(.pos-inline-cash) h1 { font-size: 1.65rem; margin: 0; }
    .pos-inline-cash .pos-money-input input { min-height: 50px; padding-top: .5rem; padding-bottom: .5rem; }
    .pos-inline-cash #pay-cash-help { font-size: .8rem; }
}

#cash-correction-reason,
#actual-cash-received,
#actual-cash-change,
#actual-cash-reason {
    width: min(100%, 25rem);
    min-height: 48px;
    box-sizing: border-box;
    padding: .65rem .85rem;
    border: 1px solid var(--ui-line);
    border-radius: 14px;
    font: inherit;
    background: var(--ui-surface);
    color: var(--ui-text);
}

/* Manual returns reuse the existing POS controls and colors. */
.pos-return-controls { display: grid; gap: 1rem; width: 100%; border: 0; padding: 0; margin: 0; min-width: 0; }
.pos-refund-methods { border: 1px solid var(--ui-line); border-radius: 14px; padding: 1rem; margin: 1rem 0; min-width: 0; }
.pos-refund-methods legend { font-weight: 700; padding: 0 .35rem; }
.pos-return .pos-refund-methods .pos-return-actions button[aria-pressed="true"]:not(.pos-return-primary) { background: var(--ui-primary); color: white; }

.pos-return .pos-return-primary:not(:disabled) { background: var(--ui-primary); color: white; }

.pos-return-total, .pos-return-summary, .pos-return-card, .pos-return-reason input { box-sizing: border-box; min-width: 0; }

/* A day set aside for its reports: named on the Start dagen screen and in the
   topbar until its Z is taken. */
.pos-focus-state.pos-day-start > p.pos-day-start-waiting {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
    max-width: 28rem;
    margin: 1rem 0 0;
    padding: 0.75rem 1rem;
    border: 1px solid #d49a28;
    border-radius: 0.9rem;
    background: #fff3cf;
    color: #714800;
    font-weight: 700;
    text-align: left;
}

/* The morning after a day that was never closed. */
.pos-earlier-day {
    width: min(calc(100% - 2rem), 40rem);
}

.pos-earlier-day h1 {
    font-size: clamp(1.9rem, 5.5vw, 3rem);
}

.earlier-day-choices {
    grid-template-columns: 1fr;
    margin-top: 1.6rem;
}

.earlier-day-choices button {
    min-height: 88px;
}

.earlier-day-choices button strong {
    font-size: 1.15rem;
}

.earlier-day-loading {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    margin-top: 1.6rem;
    color: var(--pos-muted);
}

.earlier-day-later {
    width: 100%;
    display: grid;
    gap: 0.6rem;
    margin-top: 1.4rem;
    text-align: left;
}

.earlier-day-later h2 {
    margin: 0.4rem 0 0;
    font-size: 1.35rem;
}

.earlier-day-later label {
    margin-top: 0.4rem;
    font-weight: 800;
}

.earlier-day-hint,
.earlier-day-reminder {
    margin: 0;
    color: var(--pos-muted);
}

.earlier-day-reminder {
    padding-top: 0.4rem;
    border-top: 1px solid var(--pos-line);
}

.earlier-day-blockers {
    display: grid;
    gap: 0.6rem;
    padding: 1rem;
    border: 2px solid #a93434;
    border-radius: 1rem;
    background: #fff0ee;
    color: #7d2020;
}

.earlier-day-blockers ul {
    display: grid;
    gap: 0.7rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.earlier-day-blockers li {
    display: grid;
    gap: 0.2rem;
}

.earlier-day-blockers li span:first-child {
    font-weight: 800;
}

.earlier-day-later .pos-primary-action {
    width: 100%;
    margin-top: 0.4rem;
}

.earlier-day-later .pos-back-action {
    justify-self: start;
    min-height: 44px;
    margin-bottom: 0;
}

/* The waiting-day chip keeps its date on a narrow topbar, where the other
   chips shrink to an icon: a lone tick would not say what is waiting. */
.pos-waiting-day-banner small {
    display: none;
}

@media (max-width: 54rem) {
    .pos-reserve-banner.pos-waiting-day-banner {
        width: auto;
        padding: 0 0.7rem;
        border-radius: 0.9rem;
        gap: 0.3rem;
    }

    .pos-waiting-day-banner small {
        display: inline;
        font-weight: 800;
    }
}

/* Minimal dagsoppgjør: one row per observed figure, one reconciliation table. */
.day-close-modal {
    font-family: Inter, "Avenir Next", "Segoe UI", system-ui, sans-serif;
    color: var(--ui-ink);
}

/* Admin's general page rules must not restyle the shared close dialog. */
.day-close-modal .day-close-heading h1 {
    margin: 4px 0 8px;
    font-weight: 700;
    letter-spacing: -.055em;
    color: var(--ui-ink);
}

.day-close-modal .day-close-entry-heading h2,
.day-close-modal .day-close-reconcile-heading h2 {
    letter-spacing: -.03em;
}

.admin-shell .day-close-modal .pos-eyebrow {
    color: var(--ui-primary-dark);
}

.day-close-modal .day-close-amount input,
.day-close-modal .day-close-reference input,
.day-close-modal .day-close-missing-reason input,
.day-close-modal .day-close-explanation textarea {
    border-color: var(--ui-line-strong);
    background: #fff;
    color: var(--ui-ink);
}

.day-close-workspace {
    width: min(920px, calc(100% - 32px));
    margin: 0 auto;
    padding-top: 28px;
    padding-bottom: 72px;
}

.day-close-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin: 12px 0 22px;
}

.day-close-heading h1 {
    font-size: clamp(2rem, 4vw, 2.65rem);
    letter-spacing: -.055em;
}

.day-close-heading .pos-secondary-action {
    flex: none;
}

.day-close-sheet {
    display: grid;
    gap: 18px;
}

.day-close-note {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    padding: 14px 18px;
    border: 1px solid var(--ui-line);
    border-radius: 14px;
    background: #e8f5ef;
    color: var(--ui-positive);
}

.day-close-blockers {
    display: grid;
    gap: 10px;
    padding: 18px 22px;
    border: 1px solid #e8c77f;
    border-radius: 18px;
    background: #fff8e8;
}

.day-close-blockers h3 {
    margin: 0;
    font-size: 1rem;
}

.day-close-blockers > div {
    display: grid;
    gap: 3px;
    padding-top: 10px;
    border-top: 1px solid #ead8af;
}

.day-close-complete {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 44px 28px;
    border: 1px solid var(--ui-line);
    border-radius: 22px;
    background: #fff;
    text-align: center;
}

.day-close-complete h2,
.day-close-complete p {
    margin: 0;
}

.day-close-complete p {
    max-width: 540px;
}

.day-close-entry,
.day-close-reconciliation {
    overflow: hidden;
    border: 1px solid var(--ui-line);
    border-radius: 22px;
    background: var(--ui-surface);
    box-shadow: var(--ui-shadow-sm);
}

.day-close-entry-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 59px;
    padding: 14px 26px;
}

.day-close-entry-heading h2,
.day-close-reconcile-heading h2 {
    margin: 0;
    font-size: 1.15rem;
    letter-spacing: -.03em;
}

.day-close-entry-heading > span {
    color: var(--ui-muted);
    font-size: .8rem;
}

.day-close-entry-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 200px 165px;
    align-items: center;
    gap: 8px 14px;
    min-height: 70px;
    padding: 10px 26px;
    border-top: 1px solid #edf0ee;
}

.day-close-entry-row > label:first-child {
    font-weight: 720;
    line-height: 1.25;
}

.day-close-entry-row > label:first-child small {
    display: block;
    margin-top: 4px;
    color: var(--ui-muted);
    font-size: .76rem;
    font-weight: 500;
}

.day-close-amount {
    position: relative;
    width: 100%;
}

.day-close-amount input,
.day-close-reference input,
.day-close-missing-reason input,
.day-close-explanation textarea {
    box-sizing: border-box;
    width: 100%;
    border: 1px solid var(--ui-line-strong);
    border-radius: 10px;
    background: #fff;
    color: var(--ui-ink);
    font: inherit;
}

.day-close-amount input {
    min-height: 46px;
    padding: 9px 34px 9px 11px;
    text-align: right;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
}

.day-close-amount span {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    color: var(--ui-muted);
    font-size: .76rem;
    font-weight: 700;
    pointer-events: none;
}

.day-close-reference {
    position: relative;
    display: block;
}

.day-close-reference span {
    position: absolute;
    top: 5px;
    left: 12px;
    color: var(--ui-muted);
    font-size: .64rem;
    font-weight: 700;
    pointer-events: none;
}

.day-close-reference input {
    min-height: 46px;
    padding: 17px 12px 3px;
    font-size: .83rem;
}

.day-close-amount input:focus,
.day-close-reference input:focus,
.day-close-missing-reason input:focus,
.day-close-explanation textarea:focus {
    border-color: var(--ui-primary);
    outline: 3px solid rgb(54 87 214 / 15%);
}

.day-close-locked-count {
    box-sizing: border-box;
    min-height: 46px;
    padding: 12px;
    border-radius: 10px;
    background: var(--ui-surface-soft);
    font-weight: 750;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.day-close-locked-hint {
    color: var(--ui-muted);
    font-size: .78rem;
}

.day-close-nt-check {
    box-sizing: border-box;
    grid-column: 2 / -1;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--ui-muted);
    font-size: .76rem;
}

.day-close-nt-confirm {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 24px;
    font-size: inherit;
    font-weight: 500;
}

.day-close-nt-confirm input {
    flex: none;
    width: 18px;
    height: 18px;
    accent-color: var(--ui-primary);
}

.day-close-nt-check strong {
    color: var(--ui-ink);
    font-size: inherit;
}

.day-close-row-note,
.day-close-missing-reason {
    grid-column: 2 / -1;
    margin: 0;
    font-size: .78rem;
}

.day-close-row-note[role="alert"] {
    color: var(--ui-danger);
}

.day-close-missing-reason {
    display: grid;
    gap: 5px;
}

.day-close-missing-reason input {
    min-height: 42px;
    padding: 8px 11px;
}

.day-close-report-recovery,
.day-close-fetch-retry {
    padding: 11px 26px;
    border-top: 1px solid #edf0ee;
}

.day-close-report-recovery button,
.day-close-fetch-retry button {
    min-height: 34px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ui-primary-dark);
    font-size: .8rem;
    font-weight: 700;
}

.day-close-reconciliation {
    padding: 22px 26px 24px;
}

.day-close-reconcile-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.day-close-reconcile-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 750;
}

.day-close-reconcile-status::before {
    content: "!";
    display: grid;
    place-items: center;
    width: 17px;
    height: 17px;
    border: 1.5px solid currentColor;
    border-radius: 50%;
    font-size: .66rem;
}

.day-close-reconcile-status.good {
    background: #e8f5ef;
    color: var(--ui-positive);
}

.day-close-reconcile-status.good::before {
    content: "✓";
    border: 0;
}

.day-close-reconcile-status.attention {
    background: #fff4df;
    color: #875107;
}

.day-close-reconcile-status.pending {
    background: var(--ui-primary-soft);
    color: var(--ui-primary-dark);
}

.day-close-reconciliation table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.day-close-reconciliation th,
.day-close-reconciliation td {
    padding: 11px 9px;
    border-bottom: 1px solid #edf0ee;
}

.day-close-reconciliation tr > :first-child {
    width: 28%;
    padding-left: 0;
    text-align: left;
}

.day-close-reconciliation thead th {
    color: var(--ui-muted);
    font-size: .7rem;
    font-weight: 750;
    text-align: right;
}

.day-close-reconciliation tbody th {
    font-weight: 720;
}

.day-close-reconciliation tbody td {
    text-align: right;
    white-space: nowrap;
    font-weight: 660;
    font-variant-numeric: tabular-nums;
}

.day-close-reconciliation td.attention {
    color: #875107;
    font-weight: 800;
}

.day-close-reconciliation td.ok {
    color: var(--ui-positive);
}

.day-close-reconciliation td.pending {
    color: var(--ui-muted);
}

.day-close-reconciliation .day-close-total > * {
    padding-top: 16px;
    padding-bottom: 4px;
    border: 0;
    font-size: 1.15rem;
    font-weight: 830;
}

.day-close-explanation {
    display: grid;
    gap: 8px;
    margin-top: 22px;
}

.day-close-explanation label {
    font-weight: 730;
}

.day-close-explanation textarea {
    min-height: 55px;
    padding: 12px 13px;
    resize: vertical;
}

.day-close-final-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.day-close-final-action .pos-primary-action,
.day-close-final-action .pos-secondary-action {
    width: auto;
    min-height: 48px;
    margin: 0;
}

.day-close-final-action .pos-inline-error,
.day-close-final-action .form-success,
.day-close-save-hint {
    flex-basis: 100%;
    margin: 0;
    text-align: right;
}

.day-close-save-hint {
    color: var(--ui-muted);
    font-size: .78rem;
}

@media (max-width: 690px) {
    .day-close-workspace {
        width: min(100% - 24px, 920px);
        padding-top: 20px;
    }
    .day-close-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }
    .day-close-entry-heading {
        padding: 15px 17px;
    }
    .day-close-entry-row {
        grid-template-columns: minmax(0, 1fr) 132px;
        gap: 8px 12px;
        padding: 11px 17px;
    }
    .day-close-entry-row .day-close-reference,
    .day-close-entry-row .day-close-locked-hint {
        grid-column: 2;
    }
    .day-close-entry-row > label:first-child small {
        font-size: .7rem;
    }
    .day-close-nt-check,
    .day-close-row-note,
    .day-close-missing-reason {
        grid-column: 1 / -1;
    }
    .day-close-report-recovery,
    .day-close-fetch-retry {
        padding: 10px 17px;
    }
    .day-close-reconciliation {
        padding: 19px 16px 21px;
    }
    .day-close-reconcile-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
    .day-close-reconciliation tr > :first-child {
        width: 70px;
    }
    .day-close-reconciliation th,
    .day-close-reconciliation td {
        padding: 9px 2px;
    }
    .day-close-reconciliation thead th {
        font-size: .59rem;
        line-height: 1.2;
    }
    .day-close-reconciliation tbody th {
        font-size: .76rem;
    }
    .day-close-reconciliation tbody td {
        font-size: .7rem;
    }
    .day-close-reconciliation .day-close-total > * {
        font-size: .82rem;
    }
    .day-close-final-action {
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
    }
    .day-close-final-action .pos-primary-action,
    .day-close-final-action .pos-secondary-action {
        width: 100%;
    }
    .day-close-final-action .pos-primary-action {
        order: 0;
    }
    .day-close-final-action .pos-secondary-action {
        order: 1;
    }
    .day-close-final-action .pos-inline-error,
    .day-close-final-action .form-success,
    .day-close-save-hint {
        flex-basis: auto;
        text-align: left;
    }
}

/* Monthly report: the approved Admin daily table (T-444). */
.monthly-report { color: #3B2E3A; min-width: 0; }
.monthly-controls { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; padding-bottom: 20px; }
.monthly-controls label { display: grid; gap: 6px; font-size: 12px; font-weight: 700; }
.monthly-period { display: grid; grid-template-columns: 44px minmax(120px, 1fr) 88px 44px; align-items: end; gap: 6px; }
.monthly-period-step { width: 44px; min-height: 44px; padding: 0; border: 1px solid #E8D5C9; border-radius: 12px; background: #FFFAF6; color: #554653; font-size: 26px; cursor: pointer; }
.monthly-period-step:hover:not(:disabled) { background: #FAF0E6; }
.monthly-period-step:disabled { opacity: .45; cursor: default; }
.monthly-controls input, .monthly-controls select { min-height: 44px; padding: 10px 14px; border: 1px solid #F4EBE3; border-radius: 12px; background: #FFFAF6; color: #554653; font: inherit; }
.monthly-controls .monthly-download { margin-left: auto; min-height: 44px; }
.monthly-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; border-top: 1px solid #F4EBE3; padding: 14px 0; font-size: 12px; }
.monthly-meta > span { color: #746576; font-size: 11px; }
.monthly-warning { color: #8A5700; }
.monthly-scroll { overflow: auto; max-height: max(360px, calc(100vh - 380px)); border: 1px solid #F4EBE3; border-radius: 12px; }
.monthly-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 1050px; font-size: 12px; font-variant-numeric: tabular-nums; }
.monthly-table th, .monthly-table td { padding: 7px 10px; border-bottom: 1px solid #F4EBE3; text-align: right; white-space: nowrap; background: #fff; }
.monthly-table thead th { position: sticky; top: 0; z-index: 2; background: #FAF3EC; font-size: 11px; font-weight: 700; white-space: normal; min-width: 100px; height: 52px; }
.monthly-table small { display: block; color: #746576; font-size: 10px; font-weight: 400; margin-top: 3px; }
.monthly-table th:first-child { position: sticky; left: 0; z-index: 1; min-width: 76px; text-align: left; }
.monthly-table thead th:first-child { z-index: 3; }
.monthly-table tfoot th, .monthly-table tfoot td { position: sticky; bottom: 0; z-index: 2; background: #FAF0E6; font-weight: 800; border-top: 1px solid #E8D5C9; border-bottom: 0; height: 40px; }
.monthly-table tfoot th:first-child { z-index: 3; }
.monthly-day { display: inline-flex; gap: 6px; align-items: center; padding: 0; border: 0; border-bottom: 1px solid #D9BBB0; background: transparent; color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.monthly-day span { color: #8A5700; }
.monthly-table td.monthly-diff, .monthly-diff { color: #8D252B; font-weight: 800; background: #FDEFEA; }
.monthly-partial th, .monthly-partial td { color: #796578; background: #FFFAF6; }
.monthly-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 12px 0; font-size: 11px; color: #746576; }
.monthly-foot span:last-child { color: #8A5700; }
.monthly-scroll-hint { display: none; }
.monthly-state { display: grid; place-items: center; gap: 12px; padding: 48px 24px; text-align: center; }
.monthly-state h3 { margin: 0; }
.monthly-state p { margin: 0; max-width: 500px; }
.monthly-export-error { padding: 14px; border-radius: 12px; background: #FBEBEB; color: #8D252B; }
.monthly-definitions { display: flex; flex-wrap: wrap; gap: 16px; align-items: baseline; justify-content: space-between; font-size: 11px; color: #746576; }
.monthly-definitions details { max-width: 720px; }
.monthly-definitions summary { cursor: pointer; color: #8F2828; text-align: right; }
.monthly-definitions dt { font-weight: 800; color: #3B2E3A; }
.monthly-definitions dd { margin: 4px 0 12px; }
.monthly-day-dialog { max-width: 720px; width: calc(100% - 32px); max-height: calc(100dvh - 32px); overflow: auto; background: #fff; color: #3B2E3A; }
.monthly-day-status { background: #FBF0DE; padding: 12px; border-radius: 10px; color: #8A5700; font-size: 12px; }
.monthly-register-detail { padding: 14px 0; border-bottom: 1px solid #F4EBE3; font-size: 12px; }
.monthly-register-detail table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; margin: 10px 0; }
.monthly-register-detail th, .monthly-register-detail td { padding: 8px 6px; text-align: right; border-bottom: 1px solid #F4EBE3; }
.monthly-register-detail th:first-child { text-align: left; }
.monthly-register-detail thead { background: #FAF3EC; font-size: 11px; }
.monthly-source { display: block; color: #746576; margin-top: 4px; }
@media (max-width: 700px) {
    .monthly-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 10px; }
    .monthly-controls label { min-width: 0; }
    .monthly-controls .monthly-period, .monthly-controls .monthly-download { grid-column: 1 / -1; width: 100%; }
    .monthly-period { grid-template-columns: 44px minmax(0, 1fr) 76px 44px; }
    .monthly-controls input, .monthly-controls select { width: 100%; min-width: 0; }
    .monthly-scroll-hint { display: block; font-size: 11px; color: #746576; margin: 4px 0 10px; }
    .monthly-day { min-height: 44px; min-width: 48px; }
    .monthly-table th, .monthly-table td { padding-top: 2px; padding-bottom: 2px; }
    .monthly-table tbody tr { height: 48px; }
    .monthly-definitions { display: block; }
    .monthly-definitions details { margin-top: 10px; }
    .monthly-day-dialog { padding: 16px; }
    .monthly-register-detail th, .monthly-register-detail td { padding: 8px 3px; font-size: 10.5px; }
}
/* Report-specific width and compact rows; other Admin sections keep their width. */
.admin-shell .admin-main.admin-main-reports { width: calc(100% - 64px); }
.monthly-report { padding: 20px; box-sizing: border-box; }
.monthly-table thead th { min-width: 80px; }
.monthly-report .monthly-day { min-height: 20px; }
.monthly-day-dialog .monthly-day-status { color: #8A5700; }
.monthly-day-dialog h2 { margin: 0; font-size: 24px; }
@media (max-width: 700px) {
    .admin-shell .admin-main.admin-main-reports { width: calc(100% - 24px); }
    .monthly-report { padding: 14px; }
    .monthly-report .monthly-day { min-height: 44px; min-width: 48px; }
}
.monthly-controls input, .monthly-controls select { box-sizing: border-box; }
.admin-shell .admin-main p.monthly-export-error { color: #8D252B; }
.monthly-day-dialog h2 { color: #3B2E3A; }

.pos-paper-first-edit { display: grid; gap: .55rem; width: 100%; margin: 1rem 0; text-align: left; }
.pos-paper-first-edit label { font-weight: 700; }
.pos-paper-first-edit input { width: 100%; box-sizing: border-box; padding: .75rem; font: inherit; border: 1px solid #818ba4; border-radius: .6rem; }
.pos-paper-first-edit small { color: #535e72; }
.pos-paper-first-edit > div { display: flex; flex-wrap: wrap; gap: .5rem; }

@media (max-width: 480px) {
    .pos-paper-controls { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
    .pos-paper-stepper { grid-template-columns: 44px minmax(0, 1fr) 44px; }
    .pos-paper-scan-field { gap: 6px; padding: 0 8px; }
    .pos-paper-scan-field svg { width: 16px; height: 16px; }
}
