:root {
    --ink: #14231c;
    --muted: #68776f;
    --line: #dde5e0;
    --canvas: #f2f6f3;
    --green-950: #0b2e24;
    --green-900: #123d30;
    --green-800: #17523e;
    --green-700: #1d6a4e;
    --green-600: #25835f;
    --green-50: #edf7f1;
    --gold: #d9ad4e;
    --gold-soft: #fff7e4;
    --danger: #b9473f;
    --shadow: 0 14px 42px rgba(17, 57, 43, .075);
    --sidebar-width: 276px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--canvas); }
body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: 'Inter', 'Roboto', sans-serif;
    font-size: 18px;
    line-height: 1.75;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
    outline: 3px solid rgba(37, 131, 95, .24);
    outline-offset: 2px;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-shell { min-height: 100vh; }
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    padding: 24px 20px 18px;
    overflow-y: auto;
    color: white;
    background:
        radial-gradient(circle at 0 0, rgba(217,173,78,.12), transparent 31%),
        linear-gradient(165deg, rgba(255,255,255,.035), transparent 48%),
        var(--green-950);
}
.sidebar::after {
    position: absolute;
    right: -95px;
    bottom: 12%;
    width: 210px;
    height: 210px;
    border: 1px solid rgba(255,255,255,.045);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}
.sidebar-header { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; min-width: 0; align-items: center; gap: 12px; }
.brand-mark {
    display: block;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 9px 24px rgba(217,173,78,.2);
}
.brand-copy { display: block; min-width: 0; }
.brand strong { display: block; color: white; font-size: 18px; letter-spacing: -.04em; }
.brand strong span { color: var(--gold); }
.brand small {
    display: block;
    margin-top: 3px;
    color: rgba(255,255,255,.42);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
}
.sidebar-close {
    display: none;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 11px;
    background: rgba(255,255,255,.05);
    color: white;
    font-size: 22px;
}
.session-card {
    position: relative;
    z-index: 1;
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
    margin-top: 38px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 17px;
    background: rgba(255,255,255,.055);
}
.session-avatar {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    background: rgba(217,173,78,.16);
    color: #f0c96f !important;
    font-size: 10px !important;
    font-weight: 900;
}
.session-copy { display: grid; min-width: 0; flex: 1; gap: 2px; }
.session-copy small { color: rgba(255,255,255,.38); font-size: 8px; font-weight: 900; letter-spacing: .16em; }
.session-copy strong { overflow: hidden; color: white; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.session-copy > span { color: rgba(255,255,255,.45); font-size: 9px; }
.nav-list { position: relative; z-index: 1; display: grid; gap: 6px; margin-top: 30px; }
.nav-label { margin: 0 12px 6px; color: rgba(255,255,255,.28); font-size: 8px; font-weight: 900; letter-spacing: .18em; }
.nav-list a,
.nav-list .nav-form button,
.logout-form button {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: rgba(255,255,255,.59);
    font-size: 12px;
    font-weight: 750;
    text-align: left;
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
.nav-list a:hover,
.nav-list .nav-form button:hover,
.logout-form button:hover { background: rgba(255,255,255,.07); color: white; }
.nav-list .nav-form { margin: 0; }
.nav-list a.active {
    background: white;
    color: var(--green-900);
    box-shadow: 0 12px 30px rgba(0,0,0,.17);
}
.nav-list a.disabled { cursor: not-allowed; opacity: .45; }
.nav-icon {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: rgba(255,255,255,.055);
}
.nav-list a.active .nav-icon { background: var(--green-50); color: var(--green-700); }
.nav-icon svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-footer { position: relative; z-index: 1; display: grid; gap: 13px; margin-top: auto; padding-top: 28px; }
.logout-form button { border: 1px solid rgba(255,255,255,.09); }
.sidebar-footer > small { color: rgba(255,255,255,.25); font-size: 8px; text-align: center; }
.sidebar-backdrop { display: none; }
.content-shell { min-height: 100vh; padding-left: var(--sidebar-width); }
.topbar {
    position: sticky;
    top: 0;
    z-index: 15;
    display: flex;
    min-height: 94px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 17px clamp(24px, 3vw, 44px);
    border-bottom: 1px solid #e2e8e4;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(16px);
}
.topbar-copy { min-width: 0; }
.topbar-copy > small { color: var(--green-600); font-size: 8px; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.topbar h1 { margin: 3px 0 0; font-size: clamp(24px, 2vw, 28px); letter-spacing: -.045em; }
.topbar-copy p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.topbar-user { display: flex; min-width: 0; align-items: center; gap: 11px; }
.topbar-user-copy { display: grid; min-width: 0; gap: 2px; text-align: right; }
.topbar-user-copy strong { max-width: 190px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.topbar-user-copy small { color: var(--muted); font-size: 9px; }
.avatar {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 13px;
    background: var(--green-900);
    color: white;
    font-size: 10px;
    font-weight: 900;
    box-shadow: 0 8px 22px rgba(18,61,48,.15);
}
.mobile-menu {
    display: none;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
    color: var(--green-900);
}
.mobile-menu svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.page-content { max-width: 1600px; margin: 0 auto; padding: 30px clamp(24px, 3vw, 44px) 64px; }

.dashboard-hero {
    position: relative;
    display: flex;
    min-height: 205px;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 18px;
    padding: 32px;
    overflow: hidden;
    border-radius: 24px;
    color: white;
    background:
        linear-gradient(115deg, rgba(255,255,255,.045), transparent 46%),
        var(--green-900);
    box-shadow: 0 22px 55px rgba(18,61,48,.16);
}
.owner-hero { background: linear-gradient(120deg, #123d30, #17523e); }
.dashboard-hero-copy { position: relative; z-index: 2; max-width: 720px; }
.dashboard-hero h2 { margin: 8px 0 7px; font-size: clamp(28px, 3vw, 42px); line-height: 1.05; letter-spacing: -.055em; }
.dashboard-hero p { max-width: 650px; margin: 0; color: rgba(255,255,255,.62); font-size: 12px; line-height: 1.65; }
.hero-date { display: inline-block; margin-top: 18px; color: rgba(255,255,255,.45); font-size: 9px; font-weight: 700; }
.dashboard-hero-actions { position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.hero-secondary { border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.07); color: white; }
.hero-orbit { position: absolute; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; pointer-events: none; }
.orbit-one { top: -175px; right: 9%; width: 330px; height: 330px; }
.orbit-two { right: -55px; bottom: -95px; width: 230px; height: 230px; border-color: rgba(217,173,78,.14); }
.kicker { color: #b8d6c8; font-size: 8px; font-weight: 900; letter-spacing: .18em; }
.kicker.green { color: var(--green-600); }

.metric-grid { display: grid; gap: 14px; }
.metric-grid-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric {
    position: relative;
    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    overflow: hidden;
    border: 1px solid #e1e8e3;
    border-radius: 18px;
    background: white;
    box-shadow: var(--shadow);
}
.metric::after { position: absolute; inset: auto -28px -38px auto; width: 95px; height: 95px; border-radius: 50%; background: rgba(37,131,95,.035); content: ""; }
.metric-attention { border-color: #eadbb7; background: linear-gradient(135deg, #fff, #fffaf0); }
.metric-icon {
    display: grid;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    background: var(--green-50);
    color: var(--green-700);
}
.metric-icon.success { background: #eaf7ef; color: #228456; }
.metric-icon.attention { background: #fff2d7; color: #9a6b13; }
.metric-icon.neutral { background: #f0f3f1; color: #627168; }
.metric-icon svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.metric-copy { position: relative; z-index: 1; display: grid; min-width: 0; gap: 4px; }
.metric-copy small { color: #7b8982; font-size: 8px; font-weight: 900; letter-spacing: .14em; }
.metric-copy strong { margin-top: 1px; font-size: 29px; line-height: 1; letter-spacing: -.055em; }
.metric-copy strong.metric-status { margin-top: 5px; font-size: 19px; }
.metric-copy span { overflow: hidden; color: #849189; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .72fr); gap: 16px; margin-top: 16px; align-items: start; }
.dashboard-main-column,
.dashboard-side-column { display: grid; gap: 16px; }
.panel {
    margin-top: 22px;
    padding: 22px;
    border: 1px solid #e1e8e3;
    border-radius: 18px;
    background: white;
    box-shadow: var(--shadow);
}
.dashboard-panel { margin-top: 0; padding: 22px; }
.panel-heading { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.panel-heading > div { min-width: 0; }
.panel-heading h2,
.platform-summary h2,
.store-profile h2 { margin: 4px 0 0; font-size: 17px; letter-spacing: -.035em; }
.panel-heading a { flex: 0 0 auto; color: var(--green-700); font-size: 10px; font-weight: 850; }
.panel-kicker { color: var(--green-600); font-size: 7px; font-weight: 900; letter-spacing: .17em; }
.panel-note { color: #92a097; font-size: 8px; }
.count-pill { display: inline-grid; min-width: 28px; height: 28px; padding: 0 8px; place-items: center; border-radius: 99px; background: var(--green-50); color: var(--green-700); font-size: 9px; font-weight: 900; }

.entity-list,
.activity-list,
.attention-list { display: grid; }
.entity-row,
.activity-row,
.attention-row {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
    padding: 13px 0;
    border-top: 1px solid #edf1ee;
}
.entity-row:first-child,
.activity-row:first-child,
.attention-row:first-child { padding-top: 0; border-top: 0; }
.entity-row:last-child,
.activity-row:last-child,
.attention-row:last-child { padding-bottom: 0; }
.entity-avatar {
    display: grid;
    flex: 0 0 39px;
    width: 39px;
    height: 39px;
    place-items: center;
    border-radius: 12px;
    background: #edf4f0;
    color: var(--green-700);
    font-size: 9px;
    font-weight: 900;
}
.entity-copy,
.activity-copy { display: grid; min-width: 0; flex: 1; gap: 3px; }
.entity-copy strong,
.activity-copy strong,
.attention-row strong { overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.entity-copy small,
.activity-copy small,
.attention-row small { overflow: hidden; color: #89968f; font-size: 9px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.entity-meta { display: grid; flex: 0 0 auto; justify-items: end; gap: 5px; }
.entity-meta > small { color: #97a29c; font-size: 8px; }
.activity-icon {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 11px;
    background: var(--green-50);
    color: var(--green-700);
}
.activity-icon svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.activity-row time { flex: 0 0 auto; color: #99a49e; font-size: 8px; }
.attention-symbol {
    display: grid;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 9px;
    background: #fff1d4;
    color: #986810;
    font-size: 10px;
    font-weight: 900;
}
.attention-row > span:last-child { display: grid; min-width: 0; gap: 3px; }
.empty-state { display: grid; justify-items: center; gap: 6px; padding: 22px 10px; color: #849189; text-align: center; }
.empty-state > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; background: #f0f4f1; color: var(--green-700); font-size: 15px; }
.empty-state strong { color: var(--ink); font-size: 11px; }
.empty-state p { max-width: 240px; margin: 0; font-size: 9px; line-height: 1.55; }
.empty-state.positive > span { background: #eaf7ef; color: #25835f; }
.platform-summary { overflow: hidden; background: linear-gradient(150deg, #fff, #f3f8f5); }
.platform-summary > p { margin: 9px 0 17px; color: var(--muted); font-size: 10px; line-height: 1.65; }
.readiness-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.readiness-list li { display: flex; align-items: center; gap: 8px; color: #53645b; font-size: 10px; }
.readiness-list li span { display: grid; width: 19px; height: 19px; place-items: center; border-radius: 50%; background: #e7f5ed; color: #218154; font-size: 9px; font-weight: 900; }
.capacity-value { display: flex; align-items: baseline; gap: 7px; }
.capacity-value strong { font-size: 38px; letter-spacing: -.06em; }
.capacity-value span { color: var(--muted); font-size: 9px; }
.progress-track { width: 100%; height: 8px; margin-top: 12px; overflow: hidden; border-radius: 99px; background: #edf1ee; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green-600), #48a87f); }
.capacity-panel > p { margin: 11px 0 0; color: var(--muted); font-size: 9px; }
.store-profile > h2 { margin-bottom: 15px; }
.store-profile dl { display: grid; gap: 0; margin: 0; }
.store-profile dl > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid #edf1ee; }
.store-profile dt { color: #89968f; font-size: 9px; }
.store-profile dd { margin: 0; color: var(--ink); font-size: 9px; font-weight: 800; text-align: right; }
.shift-card { max-width: 900px; padding: 38px; border-radius: 26px; color: white; background: var(--green-900); box-shadow: 0 22px 60px rgba(18,61,48,.18); }
.shift-card h2 { margin: 16px 0 10px; font-size: 38px; letter-spacing: -.05em; }
.shift-card p { max-width: 650px; margin: 0 0 24px; color: rgba(255,255,255,.62); font-size: 12px; line-height: 1.7; }
.shift-meta { display: grid; max-width: 650px; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px; }
.shift-meta > span { display: grid; gap: 5px; padding: 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 13px; background: rgba(255,255,255,.05); }
.shift-meta small { color: rgba(255,255,255,.4); font-size: 7px; letter-spacing: .15em; }
.shift-meta strong { font-size: 10px; }

.page-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.page-actions p { margin: 0; color: var(--muted); font-size: 13px; }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 17px;
    border: 0;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
}
.button.primary { background: var(--green-900); color: white; box-shadow: 0 9px 24px rgba(18,61,48,.18); }
.button.secondary { border: 1px solid var(--line); background: white; color: var(--ink); }
.button.ghost { border: 1px solid transparent; background: transparent; color: var(--green-700); }
.button.gold { background: var(--gold); color: var(--green-950); }
.button.full { width: 100%; }
.button:disabled { cursor: not-allowed; opacity: .55; }

.table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8e4;
    border-radius: 18px;
    background: white;
    box-shadow: var(--shadow);
}
table { width: 100%; min-width: 700px; border-collapse: collapse; }
th {
    padding: 13px 18px;
    background: #f8faf8;
    color: #78867f;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .14em;
    text-align: left;
}
td { padding: 16px 18px; border-top: 1px solid #edf0ee; color: #506057; font-size: 13px; }
td strong { display: block; color: var(--ink); font-size: 13px; }
td small { display: block; margin-top: 4px; color: #89958f; font-size: 10px; }
.badge { display: inline-flex; padding: 5px 9px; border-radius: 99px; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.badge.active { background: var(--green-50); color: var(--green-700); }
.badge.inactive { background: #f4f1e9; color: #846c38; }
.link-button { padding: 0; border: 0; background: transparent; color: var(--green-700); font-size: 11px; font-weight: 800; }
.link-button.muted { color: #78867f; }
.actions-cell { display: flex; gap: 14px; }
.empty { padding: 30px !important; color: #89958f; text-align: center; }

.form-card {
    max-width: 930px;
    border: 1px solid #e2e8e4;
    border-radius: 22px;
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow);
}
.form-section {
    display: grid;
    grid-template-columns: .65fr 1.35fr;
    gap: 34px;
    padding: 28px;
    border-bottom: 1px solid #edf0ee;
}
.form-section > div:first-child > span { color: var(--green-600); font-size: 10px; font-weight: 900; }
.form-section h2 { margin: 7px 0 5px; font-size: 20px; }
.form-section p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.form-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 7px; }
.field > span { color: #293b32; font-size: 14px; font-weight: 800; }
.field input,
.field select {
    width: 100%;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid #d8e0db;
    border-radius: 11px;
    background: white;
    color: var(--ink);
    font-size: 16px;
}
.field input:focus,
.field select:focus { border-color: var(--green-600); outline: 0; }
.form-submit { display: flex; justify-content: flex-end; gap: 10px; padding: 20px 28px; background: #fafbfa; }
.split-layout { display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: start; }
.compact-panel { margin-top: 0; }
.compact-panel .field { margin-bottom: 15px; }
.form-note { margin: 14px 0 17px; color: var(--muted); font-size: 11px; line-height: 1.6; }

.product-layout {
    display: grid;
    grid-template-columns: minmax(330px, .78fr) minmax(0, 1.7fr);
    gap: 22px;
    align-items: start;
}
.product-form { position: sticky; top: 105px; }
.form-grid { display: grid; gap: 13px; }
.form-grid.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-two { grid-column: 1 / -1; }
.product-list-column { min-width: 0; }
.product-toolbar { align-items: flex-end; }
.filter-form { display: flex; min-width: 0; align-items: center; gap: 9px; }
.filter-form input,
.filter-form select {
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: white;
    color: var(--ink);
}
.filter-form input { width: min(320px, 42vw); }
td code { font-size: 11px; overflow-wrap: anywhere; }
.stock-warning { color: var(--danger); font-weight: 800; }

.barcode-page { display: grid; gap: 18px; }
.barcode-search { justify-content: flex-end; }
.barcode-options {
    display: grid;
    grid-template-columns: minmax(210px, 1.35fr) repeat(2, minmax(130px, .7fr)) auto auto auto;
    align-items: end;
    gap: 16px;
}
.barcode-options h2 { margin: 5px 0 4px; }
.barcode-options p { margin: 0; color: var(--muted); font-size: 11px; }
.compact-field { min-width: 0; }
.check-option { display: flex; align-items: center; gap: 7px; padding-bottom: 12px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.check-option input,
.checkbox-column input { width: 16px; height: 16px; accent-color: var(--green-700); }
.checkbox-column { width: 44px; padding-right: 6px; text-align: center; }
.barcode-table table { min-width: 760px; }

.alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 12px;
    line-height: 1.6;
}
.alert.success { border: 1px solid #c6e6d5; background: var(--green-50); color: var(--green-700); }
.alert.danger { border: 1px solid #efd1cd; background: #fff3f1; color: #943931; }
.alert.compact { margin-top: 18px; margin-bottom: 0; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.credential-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
    padding: 16px 18px;
    border: 1px solid #e7d6ae;
    border-radius: 14px;
    background: #fff9eb;
}
.credential-alert div { display: grid; gap: 4px; }
.credential-alert small { color: #796539; font-weight: 700; }
.credential-alert strong { font-family: ui-monospace, SFMono-Regular, monospace; font-size: 18px; }
.credential-alert p { margin: 0; color: #8e7b50; font-size: 10px; }
.credential-alert button { padding: 9px 14px; border: 0; border-radius: 9px; background: #6e592c; color: white; font-size: 11px; font-weight: 800; }

.login-shell {
    display: grid;
    min-height: 100vh;
    min-height: 100svh;
    grid-template-columns: minmax(0, 1.05fr) minmax(520px, .95fr);
    background: white;
}
.login-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
    padding: clamp(32px, 3.6vw, 58px) clamp(34px, 4.4vw, 72px);
    overflow: hidden;
    color: white;
    background-color: var(--green-950);
    background-image:
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 34px 34px;
}
.login-brand::after {
    position: absolute;
    top: 19%;
    right: -15%;
    width: min(42vw, 620px);
    height: min(42vw, 620px);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 50%;
    content: "";
}
.login-brand::before {
    position: absolute;
    right: 12%;
    bottom: -20%;
    width: min(30vw, 440px);
    height: min(30vw, 440px);
    border: 1px solid rgba(214,169,74,.17);
    border-radius: 50%;
    content: "";
}
.login-brand .brand { position: relative; z-index: 2; }
.login-message {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    max-width: 760px;
    padding: clamp(38px, 6vh, 82px) 0;
}
.login-message h1 {
    margin: 16px 0 18px;
    font-size: clamp(45px, 5vw, 76px);
    line-height: .94;
    letter-spacing: -.065em;
}
.login-message h1 span { color: #f0c96f; }
.login-message > p {
    max-width: 650px;
    margin: 0;
    color: #c1d6cc;
    font-size: clamp(14px, 1.15vw, 17px);
    line-height: 1.7;
}
.login-benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: clamp(24px, 4vh, 38px) 0 0;
    padding: 0;
    list-style: none;
}
.login-benefits li {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 11px;
    padding: 13px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 15px;
    background: rgba(255,255,255,.05);
    backdrop-filter: blur(8px);
}
.benefit-icon {
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: rgba(214,169,74,.14);
    color: #f0c96f;
}
.benefit-icon svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.login-benefits li > span:last-child { display: grid; min-width: 0; gap: 3px; }
.login-benefits strong { font-size: 12px; }
.login-benefits small { color: rgba(255,255,255,.48); font-size: 9px; line-height: 1.35; white-space: normal; }
.login-brand-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 9px;
    color: rgba(255,255,255,.45);
    font-size: 10px;
}
.status-indicator {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #79d6a7;
    box-shadow: 0 0 0 4px rgba(121,214,167,.1);
}
.login-form-wrap {
    display: grid;
    min-width: 0;
    min-height: 100vh;
    min-height: 100svh;
    place-items: center;
    padding: clamp(24px, 4vw, 58px);
    background:
        radial-gradient(circle at 100% 0, rgba(214,169,74,.08), transparent 28%),
        #f7f9f7;
}
.login-panel { width: 100%; max-width: 560px; }
.login-mobile-brand { display: none; margin-bottom: 34px; }
.login-mobile-brand strong { color: var(--ink); }
.login-mobile-brand small { color: var(--muted); }
.login-form { width: 100%; }
.login-heading { margin-bottom: 22px; }
.login-heading h2 { margin: 7px 0 6px; font-size: clamp(32px, 3vw, 43px); line-height: 1.04; letter-spacing: -.052em; }
.login-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.login-alert { margin: -5px 0 17px; }
.login-type {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 0 0 18px;
    padding: 0;
    border: 0;
}
.login-type label {
    position: relative;
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: white;
    cursor: pointer;
    transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.login-type label:hover { border-color: #b9ccc2; transform: translateY(-1px); }
.login-type label:focus-within { outline: 3px solid rgba(37,131,95,.18); outline-offset: 2px; }
.login-type label:has(input:checked) {
    border-color: var(--green-600);
    background: var(--green-50);
    box-shadow: 0 0 0 3px rgba(37,131,95,.07);
}
.login-type input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.login-type-icon {
    display: grid;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 11px;
    background: #f2f5f3;
    color: #607068;
}
.login-type label:has(input:checked) .login-type-icon { background: var(--green-900); color: white; }
.login-type-icon svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.login-type-copy { display: grid; min-width: 0; flex: 1; gap: 2px; }
.login-type-copy strong { font-size: 12px; }
.login-type-copy small { color: var(--muted); font-size: 9px; line-height: 1.35; white-space: normal; }
.login-type-check {
    display: grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border: 1px solid #d6dfda;
    border-radius: 50%;
    color: transparent;
    font-size: 10px;
    font-weight: 900;
}
.login-type label:has(input:checked) .login-type-check { border-color: var(--green-600); background: var(--green-600); color: white; }
.login-fields { animation: login-fields-in .2s ease both; }
@keyframes login-fields-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.login-form .field { margin-bottom: 13px; }
.login-form .field > span:first-child { font-size: 11px; }
.field-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 11px; }
.input-control { position: relative; display: block; }
.login-form .input-control input {
    min-height: 50px;
    padding: 13px 46px 13px 42px;
    border-radius: 13px;
    background: white;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.login-form .input-control input::placeholder { color: #9aa59f; }
.login-form .input-control input:hover { border-color: #c5d1ca; }
.login-form .input-control input:focus { border-color: var(--green-600); box-shadow: 0 0 0 4px rgba(37,131,95,.08); outline: 0; }
.login-form .input-control input[aria-invalid="true"] { border-color: #cf6c65; }
.login-form input:-webkit-autofill,
.login-form input:-webkit-autofill:hover,
.login-form input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--ink);
    box-shadow: 0 0 0 1000px white inset;
    transition: background-color 9999s ease-out;
}
.input-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    z-index: 1;
    display: grid;
    width: 18px;
    height: 18px;
    place-items: center;
    color: #839089;
    transform: translateY(-50%);
    pointer-events: none;
}
.input-icon svg,
.password-toggle svg,
.login-security svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #78867f;
    transform: translateY(-50%);
}
.password-toggle:hover { background: #f0f4f1; color: var(--green-700); }
.field-error { margin-top: -2px; color: var(--danger); font-size: 10px; line-height: 1.35; }
.login-options { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 1px 0 17px; }
.remember { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; cursor: pointer; }
.remember input { accent-color: var(--green-700); }
.login-help { color: #7b8982; font-size: 10px; text-align: right; }
.login-submit { min-height: 50px; gap: 11px; border-radius: 14px; transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease; }
.login-submit:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 13px 30px rgba(18,61,48,.24); }
.button-arrow { font-size: 17px; transition: transform .18s ease; }
.login-submit:hover .button-arrow { transform: translateX(3px); }
.login-form.is-submitting .button-arrow { animation: submitting-arrow .8s ease-in-out infinite alternate; }
@keyframes submitting-arrow { to { transform: translateX(5px); } }
.login-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 14px 0 0;
    color: #89958f;
    font-size: 9px;
    text-align: center;
}
.login-security svg { width: 14px; height: 14px; color: var(--green-600); }

.admin-login-shell {
    display: grid;
    min-height: 100vh;
    min-height: 100svh;
    place-items: center;
    padding: 28px;
    background:
        radial-gradient(circle at 18% 10%, rgba(217,173,78,.16), transparent 30%),
        radial-gradient(circle at 85% 90%, rgba(255,255,255,.06), transparent 26%),
        var(--green-950);
}
.admin-login-panel {
    width: min(100%, 480px);
    padding: 38px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(0,0,0,.24);
}
.admin-brand { margin-bottom: 34px; }
.admin-brand strong { color: var(--ink); }
.admin-brand small { color: var(--muted); }
.admin-login-panel .login-heading h1 { margin: 7px 0 7px; font-size: clamp(30px, 5vw, 42px); line-height: 1.05; letter-spacing: -.05em; }
.admin-login-panel .field { margin-bottom: 15px; }
.admin-remember { margin: 2px 0 18px; }
.admin-back-link { display: block; margin-top: 18px; color: var(--green-700); font-size: 11px; font-weight: 800; text-align: center; }

@media (max-height: 760px) and (min-width: 901px) {
    .login-brand { padding-top: 28px; padding-bottom: 28px; }
    .login-message { padding: 24px 0; }
    .login-message h1 { font-size: clamp(42px, 4.5vw, 62px); }
    .login-benefits { margin-top: 22px; }
    .login-form-wrap { padding-top: 24px; padding-bottom: 24px; }
    .login-heading { margin-bottom: 16px; }
    .login-heading h2 { font-size: 34px; }
    .login-type { margin-bottom: 13px; }
    .login-form .field { margin-bottom: 10px; }
    .login-options { margin-bottom: 13px; }
}

@media (max-width: 1200px) {
    .metric-grid-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-columns { grid-template-columns: 1fr; }
    .dashboard-side-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .product-layout { grid-template-columns: 1fr; }
    .product-form { position: static; }
    .barcode-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .barcode-options > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
    body.sidebar-open { overflow: hidden; }
    .sidebar { width: min(86vw, var(--sidebar-width)); transform: translateX(-100%); transition: transform .22s ease; }
    .sidebar.open { transform: translateX(0); }
    .sidebar-close { display: grid; place-items: center; }
    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 25;
        display: block;
        border: 0;
        background: rgba(7,30,23,.48);
        opacity: 0;
        visibility: hidden;
        transition: opacity .2s ease, visibility .2s ease;
    }
    .sidebar-backdrop.open { opacity: 1; visibility: visible; }
    .content-shell { padding-left: 0; }
    .mobile-menu { display: grid; }
    .topbar { min-height: 86px; padding: 14px 22px; }
    .topbar-copy { flex: 1; }
    .page-content { padding: 24px 22px 50px; }
    .split-layout { grid-template-columns: 1fr; }
    .product-toolbar { align-items: stretch; flex-direction: column; }
    .filter-form { width: 100%; }
    .filter-form input { width: 100%; flex: 1; }
    .barcode-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .login-shell { grid-template-columns: minmax(0, 1fr); }
    .login-brand { display: none; }
    .login-form-wrap { padding: 34px 24px; }
    .login-mobile-brand { display: inline-flex; }
}

@media (max-width: 600px) {
    .topbar { gap: 11px; padding: 12px 15px; }
    .topbar h1 { font-size: 19px; }
    .topbar-copy p { display: none; }
    .topbar-user-copy { display: none; }
    .avatar { flex-basis: 38px; width: 38px; height: 38px; }
    .page-content { padding: 20px 15px 40px; }
    .dashboard-hero { min-height: 0; align-items: flex-start; flex-direction: column; padding: 24px 21px; }
    .dashboard-hero h2 { font-size: 30px; }
    .dashboard-hero-actions { width: 100%; justify-content: flex-start; }
    .metric-grid-four { grid-template-columns: 1fr; }
    .dashboard-side-column { grid-template-columns: 1fr; }
    .entity-meta { max-width: 120px; }
    .activity-row time { display: none; }
    .panel-heading { align-items: flex-start; }
    .shift-card { padding: 26px 22px; }
    .shift-card h2 { font-size: 30px; }
    .shift-meta { grid-template-columns: 1fr; }
    .page-actions { align-items: stretch; flex-direction: column; }
    .form-grid.two-columns { grid-template-columns: 1fr; }
    .form-grid .span-two { grid-column: auto; }
    .filter-form { align-items: stretch; flex-direction: column; }
    .barcode-search { align-items: stretch; }
    .barcode-options { grid-template-columns: 1fr; }
    .barcode-options > div:first-child { grid-column: auto; }
    .check-option { padding-bottom: 0; }
    .form-section { grid-template-columns: 1fr; gap: 18px; padding: 22px; }
    .form-fields { grid-template-columns: 1fr; }
    .form-submit { flex-direction: column-reverse; }
    .button { width: 100%; }
    .credential-alert { align-items: flex-start; flex-direction: column; }
    .login-form-wrap { align-items: start; padding: 24px 18px; }
    .login-mobile-brand { margin-bottom: 38px; }
    .login-heading h2 { font-size: 34px; }
    .login-options { align-items: flex-start; flex-direction: column; gap: 9px; }
    .login-help { text-align: left; }
}

@media (max-width: 430px) {
    .brand-copy { display: block; }
    .metric { padding: 17px; }
    .entity-meta > small { display: none; }
    .dashboard-panel { padding: 19px; }
    .login-type { grid-template-columns: 1fr; }
    .field-grid { grid-template-columns: 1fr; gap: 0; }
    .admin-login-shell { padding: 14px; }
    .admin-login-panel { padding: 27px 22px; border-radius: 21px; }
}

/* Sistem Kasir v0.3 — professional retail UI */
:root {
    --ink: #17221d;
    --muted: #66756d;
    --line: #dfe7e2;
    --canvas: #f5f7f5;
    --green-950: #06382b;
    --green-900: #084532;
    --green-800: #0b5a40;
    --green-700: #087d50;
    --green-600: #16a36a;
    --green-50: #ecf8f2;
    --gold: #f0c96f;
    --danger: #c44842;
    --shadow: 0 8px 28px rgba(21, 55, 40, .065);
    --sidebar-width: 248px;
}

body {
    font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar {
    padding: 20px 16px 16px;
    background:
        radial-gradient(circle at 10% 2%, rgba(43, 191, 126, .16), transparent 27%),
        linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 38%),
        var(--green-950);
}
.sidebar::after { display: none; }
.sidebar-header { min-height: 46px; padding: 0 5px; }
.brand { gap: 11px; }
.brand-mark {
    flex-basis: 40px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .16);
}
.brand strong { font-size: 18px; letter-spacing: -.035em; }
.brand strong span { color: #73d8aa; }
.brand small { margin-top: 1px; color: rgba(255,255,255,.48); font-size: 9px; letter-spacing: .11em; }
.sidebar-close .icon { width: 18px; height: 18px; }

.store-chip {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    margin: 25px 4px 8px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 14px;
    background: rgba(255,255,255,.055);
}
.store-chip-mark {
    display: grid;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    place-items: center;
    overflow: hidden;
    border-radius: 10px;
    background: rgba(103, 217, 166, .14);
    color: #8fe3ba;
    font-size: 10px;
    font-weight: 800;
}
.store-chip-mark img { width: 100%; height: 100%; object-fit: cover; }
.store-chip-fallback { display: grid; width: 100%; height: 100%; place-items: center; }
.store-chip-fallback[hidden] { display: none; }
.store-chip > span:last-child { display: grid; min-width: 0; flex: 1; gap: 1px; }
.store-chip small { color: rgba(255,255,255,.38); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.store-chip strong {
    display: -webkit-box;
    overflow: hidden;
    color: #fff;
    font-size: 11px;
    line-height: 1.25;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.store-chip em { color: rgba(255,255,255,.48); font-size: 9px; font-style: normal; }

.nav-list { gap: 3px; margin-top: 20px; }
.nav-label { margin: 0 12px 7px; font-size: 8px; }
.nav-list a,
.nav-list .nav-form button,
.nav-settings,
.logout-form button {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: rgba(255,255,255,.64);
    font-size: 13px;
    font-weight: 650;
    text-align: left;
    transition: background-color .16s ease, color .16s ease, transform .16s ease;
}
.nav-list a:hover,
.nav-list .nav-form button:hover,
.nav-settings:hover,
.logout-form button:hover { background: rgba(255,255,255,.075); color: #fff; }
.nav-list a.active,
.nav-settings.active {
    background: rgba(255,255,255,.13);
    color: #fff;
    box-shadow: none;
}
.nav-list a.active::before,
.nav-settings.active::before {
    position: absolute;
    left: 0;
    width: 3px;
    height: 24px;
    border-radius: 0 5px 5px 0;
    background: #57d49b;
    content: "";
}
.nav-icon {
    flex-basis: 32px;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: transparent;
}
.nav-list a.active .nav-icon { background: rgba(89,214,158,.14); color: #77e0b1; }
.nav-icon .icon,
.nav-icon svg { width: 19px; height: 19px; }
.sidebar-footer { gap: 4px; padding-top: 18px; }
.sidebar-footer .nav-settings { position: relative; }
.logout-form button { border: 0; }
.version-copy { margin-top: 10px; font-size: 8px !important; }

.topbar {
    min-height: 72px;
    padding: 11px clamp(24px, 2.8vw, 42px);
    border-color: #e5ebe7;
    background: rgba(255,255,255,.96);
}
.topbar-copy > small { font-size: 8px; letter-spacing: .14em; }
.topbar h1 { margin-top: 1px; font-size: clamp(22px, 2vw, 26px); }
.topbar-copy p { margin-top: 0; font-size: 11px; }
.topbar-tools { display: flex; align-items: center; gap: 13px; }
.header-sync-control {
    display: inline-flex;
    min-width: 146px;
    min-height: 42px;
    align-items: center;
    gap: 9px;
    padding: 6px 10px;
    border: 1px solid #d7e2dc;
    border-radius: 12px;
    background: #f8faf9;
    color: #53635a;
    text-align: left;
    transition: border-color .16s ease, background-color .16s ease, color .16s ease;
}
.header-sync-control:hover { border-color: #b7d1c3; background: var(--green-50); color: var(--green-700); }
.header-sync-control:disabled { cursor: wait; opacity: .78; }
.header-sync-icon { display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; border-radius: 8px; background: #e9f1ed; }
.header-sync-icon .icon { width: 15px; height: 15px; }
.header-sync-copy { display: grid; min-width: 0; flex: 1; gap: 1px; }
.header-sync-copy small { color: #78867f; font-size: 7px; font-weight: 850; letter-spacing: .1em; }
.header-sync-copy strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.header-sync-dot { flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; background: #e1b24d; box-shadow: 0 0 0 3px rgba(225,178,77,.12); }
.header-sync-control.synced { border-color: #cce5d7; background: #f1faf5; color: #28734e; }
.header-sync-control.synced .header-sync-dot { background: #42a76f; box-shadow: 0 0 0 3px rgba(66,167,111,.12); }
.header-sync-control.syncing .header-sync-icon .icon { animation: sync-spin 1s linear infinite; }
.header-sync-control.syncing .header-sync-dot,
.header-sync-control.pending .header-sync-dot,
.header-sync-control.busy .header-sync-dot,
.header-sync-control.sync-pending .header-sync-dot { animation: sync-pulse 1s ease-in-out infinite; background: #e1b24d; }
.header-sync-control.offline { border-color: #dfe4e1; background: #f6f7f6; color: #6c7671; }
.header-sync-control.offline .header-sync-dot { background: #909b95; box-shadow: 0 0 0 3px rgba(144,155,149,.12); }
.header-sync-control.sync-error { border-color: #efd0cb; background: #fff5f3; color: #9a352b; }
.header-sync-control.sync-error .header-sync-dot { background: #d96053; box-shadow: 0 0 0 3px rgba(217,96,83,.12); }
.header-sync-control.compact { min-width: 128px; min-height: 38px; padding: 5px 8px; border-radius: 10px; }
.header-sync-control.compact .header-sync-icon { flex-basis: 25px; width: 25px; height: 25px; }
@keyframes sync-spin { to { transform: rotate(360deg); } }
.icon-button {
    position: relative;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: white;
    color: #607068;
}
.icon-button:hover { border-color: #c8d8cf; color: var(--green-700); }
.icon-button .icon { width: 18px; height: 18px; }
.notification-dot { position: absolute; top: 8px; right: 8px; width: 6px; height: 6px; border: 2px solid white; border-radius: 50%; background: #ed8c4c; }
.topbar-user { padding-left: 3px; }
.topbar-user-copy { text-align: left; }
.topbar-user-copy strong { font-size: 12px; }
.topbar-user-copy small { font-size: 9px; }
.topbar-user > .icon { width: 15px; height: 15px; color: #839087; }
.avatar { flex-basis: 38px; width: 38px; height: 38px; border-radius: 11px; background: #e8f5ee; color: var(--green-700); box-shadow: none; }
.page-content { max-width: 1720px; padding: 26px clamp(24px, 2.8vw, 42px) 56px; }

.dashboard-hero { min-height: 180px; margin-bottom: 16px; padding: 28px 30px; border-radius: 18px; box-shadow: 0 15px 40px rgba(8,69,50,.14); }
.dashboard-hero h2 { margin: 7px 0 6px; font-size: clamp(27px, 2.8vw, 38px); }
.dashboard-hero p { font-size: 12px; }
.hero-date { margin-top: 14px; font-size: 9px; }
.kicker { font-size: 8px; }
.metric { padding: 18px; border-radius: 15px; }
.metric-icon { flex-basis: 40px; width: 40px; height: 40px; }
.metric-copy small { font-size: 8px; }
.metric-copy strong { font-size: 28px; }
.metric-copy span { font-size: 10px; }
.panel { margin-top: 18px; padding: 21px; border-radius: 16px; }
.dashboard-panel { margin-top: 0; }
.panel-heading h2, .platform-summary h2, .store-profile h2 { font-size: 17px; }
.panel-heading a { font-size: 11px; }
.panel-kicker { font-size: 8px; }
.panel-note { font-size: 9px; }
.entity-copy strong, .activity-copy strong, .attention-row strong { font-size: 12px; }
.entity-copy small, .activity-copy small, .attention-row small { font-size: 10px; }
.activity-row time { font-size: 9px; }

.button {
    min-height: 40px;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 12px;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button.primary { background: var(--green-700); box-shadow: 0 8px 20px rgba(8,125,80,.18); }
.button.primary:hover { background: #076b45; }
.button .icon { width: 17px; height: 17px; }
.page-action-group { display: flex; align-items: center; gap: 9px; }
.page-tabs {
    display: inline-flex;
    gap: 4px;
    margin-bottom: 17px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    max-width: 100%;
    overflow-x: auto;
}
.page-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 8px; color: var(--muted); font-size: 11px; font-weight: 750; white-space: nowrap; }
.page-tabs a.active { background: var(--green-50); color: var(--green-700); }
.page-tabs .icon { width: 17px; height: 17px; }
.page-tabs em { display: inline-grid; min-width: 21px; height: 21px; place-items: center; padding: 0 5px; border-radius: 999px; background: #e4ece8; color: #4f6259; font-size: 10px; font-style: normal; }
.page-tabs a.active em { background: #cce8da; color: var(--green-700); }
nav[role="navigation"] { margin-top: 15px; }
nav[role="navigation"] > div:first-child { color: var(--muted); font-size: 10px; }
nav[role="navigation"] > div:last-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
nav[role="navigation"] a,
nav[role="navigation"] span[aria-current="page"] span,
nav[role="navigation"] span[aria-disabled="true"] span {
    display: inline-grid;
    min-width: 32px;
    height: 32px;
    place-items: center;
    padding: 0 8px;
    border: 1px solid var(--line) !important;
    background: #fff !important;
    color: var(--muted) !important;
    font-size: 10px;
}
nav[role="navigation"] span[aria-current="page"] span { border-color: var(--green-700) !important; background: var(--green-700) !important; color: #fff !important; }

.table-wrap { border-radius: 14px; }
th { padding: 12px 16px; font-size: 9px; }
td { padding: 14px 16px; font-size: 12px; }
td strong { font-size: 12px; }
td small { font-size: 10px; }
.badge { font-size: 8px; }
.actions-cell { align-items: center; }
.action-icon {
    display: inline-grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: white;
    color: #66766d;
}
.action-icon:hover { border-color: #bcd1c5; color: var(--green-700); }
.action-icon .icon { width: 16px; height: 16px; }

.field { gap: 6px; }
.field > span { font-size: 12px; }
.field input,
.field select,
.field textarea {
    min-height: 43px;
    padding: 10px 12px;
    border: 1px solid #d8e2dc;
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 13px;
}
.field textarea { min-height: 90px; resize: vertical; }
.filter-form input,
.filter-form select { min-height: 40px; padding: 9px 12px; font-size: 12px; }
.product-layout { grid-template-columns: minmax(320px, .73fr) minmax(0, 1.65fr); gap: 18px; }
.product-form { top: 90px; }
.form-note { font-size: 10px; }
.form-card { border-radius: 16px; }
.settings-stack { display: grid; gap: 18px; }
.settings-form { max-width: 1080px; }
.form-section h2 { font-size: 18px; }
.form-section p { font-size: 12px; }

.alert { display: flex; align-items: flex-start; gap: 10px; font-size: 12px; }
.alert > .icon { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; }

/* Three-step barcode workspace */
.barcode-workspace { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr); gap: 18px; align-items: start; }
.barcode-main { display: grid; gap: 16px; }
.step-card { margin: 0; padding: 0; overflow: hidden; }
.step-heading { display: flex; align-items: center; gap: 12px; padding: 17px 19px; border-bottom: 1px solid #e8eeea; }
.step-number { display: grid; flex: 0 0 29px; width: 29px; height: 29px; place-items: center; border-radius: 9px; background: var(--green-700); color: #fff; font-size: 11px; font-weight: 850; }
.step-heading > div { min-width: 0; flex: 1; }
.step-heading h2 { margin: 0; font-size: 15px; }
.step-heading p { margin: 2px 0 0; color: var(--muted); font-size: 10px; }
.step-body { padding: 17px 19px 19px; }
.barcode-select-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.barcode-select-tools .search-control { flex: 1; }
.search-control { position: relative; }
.search-control .icon { position: absolute; top: 50%; left: 12px; width: 17px; height: 17px; color: #89968f; transform: translateY(-50%); }
.search-control input { width: 100%; min-height: 40px; padding: 9px 12px 9px 38px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 12px; }
.barcode-product-list { display: grid; max-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: 11px; }
.barcode-product-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 13px; border-top: 1px solid #edf1ee; }
.barcode-product-row:first-child { border-top: 0; }
.barcode-product-row:hover { background: #f8fbf9; }
.barcode-product-row input { width: 16px; height: 16px; accent-color: var(--green-700); }
.barcode-product-copy { display: grid; min-width: 0; gap: 2px; }
.barcode-product-copy strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.barcode-product-copy small { color: var(--muted); font-size: 9px; }
.barcode-product-meta { display: grid; justify-items: end; gap: 2px; font-size: 11px; }
.barcode-product-meta small { color: var(--muted); font-size: 9px; }
.label-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.toggle-stack { display: grid; align-content: start; gap: 9px; }
.toggle-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 43px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; color: #34463c; font-size: 11px; }
.toggle-option input { width: 16px; height: 16px; accent-color: var(--green-700); }
.barcode-preview-card { position: sticky; top: 90px; margin: 0; padding: 19px; }
.barcode-preview-card .panel-heading { margin-bottom: 14px; }
.label-preview-stage { display: grid; min-height: 285px; place-items: center; padding: 24px; border: 1px dashed #cbd9d1; border-radius: 13px; background: #f6f8f6; }
.label-preview { display: flex; width: 250px; min-height: 150px; flex-direction: column; justify-content: center; overflow: hidden; padding: 14px; border: 1px solid #d5dcd8; background: #fff; color: #111; text-align: center; box-shadow: 0 9px 24px rgba(0,0,0,.08); }
.label-preview-store { margin-bottom: 5px; font-size: 10px; font-weight: 850; text-transform: uppercase; }
.label-preview-name { overflow: hidden; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.label-preview svg { display: block; width: 100%; height: 58px; margin: 6px 0 2px; }
.label-preview-code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; }
.label-preview-price { margin-top: 3px; font-size: 13px; font-weight: 900; }
.preview-placeholder { display: grid; justify-items: center; gap: 7px; color: #849188; text-align: center; }
.preview-placeholder .icon { width: 34px; height: 34px; color: #a4b1aa; }
.preview-placeholder strong { color: #3b4b43; font-size: 12px; }
.preview-placeholder small { max-width: 220px; font-size: 10px; }
.barcode-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 0; padding: 11px 12px; border-radius: 10px; background: var(--green-50); color: var(--green-800); font-size: 11px; }

/* Stock and reports */
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 17px; }
.summary-card { display: flex; align-items: center; gap: 13px; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.summary-card-icon { display: grid; flex: 0 0 39px; width: 39px; height: 39px; place-items: center; border-radius: 11px; background: var(--green-50); color: var(--green-700); }
.summary-card > span:last-child { display: grid; gap: 2px; }
.summary-card small { color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.summary-card strong { font-size: 21px; letter-spacing: -.035em; }
.stock-layout, .report-layout { display: grid; gap: 18px; }
.stock-toolbar, .report-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 13px; }
.movement-list { display: grid; }
.movement-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 12px 0; border-top: 1px solid #edf1ee; }
.movement-row:first-child { border-top: 0; }
.movement-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: var(--green-50); color: var(--green-700); font-weight: 850; }
.movement-icon.negative { background: #fff1ef; color: var(--danger); }
.movement-copy { display: grid; min-width: 0; gap: 2px; }
.movement-copy strong { font-size: 11px; }
.movement-copy small, .movement-row time { color: var(--muted); font-size: 9px; }
.payment-bars { display: grid; gap: 12px; }
.payment-bar-header { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 5px; font-size: 11px; }
.payment-bar-track { height: 7px; overflow: hidden; border-radius: 99px; background: #edf2ef; }
.payment-bar-track span { display: block; height: 100%; border-radius: inherit; background: var(--green-600); }

/* Dialogs */
.dialog {
    width: min(92vw, 500px);
    padding: 0;
    border: 0;
    border-radius: 18px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 28px 90px rgba(5, 35, 25, .28);
}
.dialog::backdrop { background: rgba(5, 28, 21, .58); backdrop-filter: blur(3px); }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 20px 21px 14px; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 0; font-size: 18px; }
.dialog-header p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.dialog-close { display: grid; width: 34px; height: 34px; place-items: center; border: 0; border-radius: 9px; background: #f1f4f2; color: #65746c; }
.dialog-close .icon { width: 17px; height: 17px; }
.dialog-body { display: grid; gap: 13px; padding: 18px 21px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 15px 21px 20px; }

/* POS workstation */
.pos-shell { --sidebar-width: 80px; }
.pos-shell .sidebar { align-items: center; padding: 15px 11px 12px; overflow: visible; }
.pos-shell .sidebar-header { padding: 0; }
.pos-shell .brand-copy, .pos-shell .nav-text, .pos-shell .nav-label, .pos-shell .version-copy { display: none; }
.pos-shell .brand-mark { width: 43px; height: 43px; flex-basis: 43px; }
.pos-shell .nav-list { width: 100%; margin-top: 29px; }
.pos-shell .nav-list a, .pos-shell .nav-settings, .pos-shell .logout-form button { justify-content: center; padding: 9px; }
.pos-shell .nav-list a.active::before, .pos-shell .nav-settings.active::before { left: -11px; }
.pos-shell .nav-icon { flex-basis: 38px; width: 38px; height: 38px; }
.pos-shell [data-tooltip] { position: relative; }
.pos-shell [data-tooltip]:hover::after {
    position: absolute;
    z-index: 80;
    top: 50%;
    left: calc(100% + 14px);
    padding: 7px 9px;
    border-radius: 7px;
    background: #17271f;
    color: #fff;
    content: attr(data-tooltip);
    font-size: 10px;
    white-space: nowrap;
    transform: translateY(-50%);
    box-shadow: 0 8px 20px rgba(0,0,0,.2);
}
.pos-shell .page-content { max-width: none; height: 100vh; padding: 0; overflow: hidden; }
.pos-app { display: grid; height: 100vh; grid-template-rows: 67px minmax(0, 1fr); background: #f4f6f4; }
.pos-topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 18px; border-bottom: 1px solid var(--line); background: #fff; }
.pos-topbar-left, .pos-topbar-right { display: flex; align-items: center; gap: 12px; }
.pos-mobile-menu { display: none; }
.pos-title { display: grid; gap: 1px; }
.pos-title strong { font-size: 15px; }
.pos-title small { color: var(--muted); font-size: 9px; }
.shift-badge { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 9px; background: var(--green-50); color: var(--green-700); font-size: 9px; font-weight: 800; }
.shift-badge::before { width: 6px; height: 6px; border-radius: 50%; background: #25b878; content: ""; box-shadow: 0 0 0 3px rgba(37,184,120,.11); }
.pos-operator { display: flex; align-items: center; gap: 9px; }
.pos-operator-copy { display: grid; gap: 1px; text-align: right; }
.pos-operator-copy strong { font-size: 10px; }
.pos-operator-copy small { color: var(--muted); font-size: 8px; }
.pos-workspace { display: grid; min-height: 0; grid-template-columns: minmax(520px, 1fr) 360px; }
.pos-catalog { display: grid; min-width: 0; min-height: 0; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 13px; padding: 16px; }
.pos-search { position: relative; display: flex; gap: 9px; }
.pos-search .search-control { flex: 1; }
.pos-search input { min-height: 48px; padding-left: 43px; border-radius: 12px; background: #fff; font-size: 13px; box-shadow: 0 4px 16px rgba(20,53,39,.04); }
.pos-search .icon { left: 14px; width: 19px; height: 19px; }
.keyboard-hint { position: absolute; top: 50%; right: 11px; padding: 3px 6px; border: 1px solid #dce5df; border-radius: 6px; background: #f7f9f7; color: #7d8a83; font-size: 8px; transform: translateY(-50%); }
.product-suggestions { display: none; max-height: 230px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 14px 36px rgba(12,54,38,.14); }
.product-suggestions.open { display: block; }
.product-suggestion { display: grid; width: 100%; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 10px 13px; border: 0; border-top: 1px solid #edf1ee; background: #fff; color: var(--ink); text-align: left; }
.product-suggestion:first-child { border-top: 0; }
.product-suggestion:hover { background: #f4faf7; }
.product-suggestion span { display: grid; gap: 2px; }
.product-suggestion strong { font-size: 11px; }
.product-suggestion small { color: var(--muted); font-size: 9px; }
.product-suggestion em { align-self: center; color: var(--green-700); font-size: 11px; font-style: normal; font-weight: 800; }
.cart-card { display: grid; min-height: 0; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.cart-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.cart-heading h2 { margin: 0; font-size: 13px; }
.cart-heading span { color: var(--muted); font-size: 9px; }
.cart-table-wrap { min-height: 0; overflow: auto; }
.cart-table { min-width: 610px; }
.cart-table th { position: sticky; top: 0; z-index: 2; }
.cart-table td { padding: 11px 14px; }
.quantity-control { display: inline-flex; align-items: center; gap: 5px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; }
.quantity-control button { display: grid; width: 25px; height: 25px; place-items: center; border: 0; border-radius: 6px; background: #f1f5f2; color: #506159; }
.quantity-control button:hover { background: var(--green-50); color: var(--green-700); }
.quantity-control .icon { width: 13px; height: 13px; }
.quantity-control span { min-width: 24px; font-size: 11px; font-weight: 800; text-align: center; }
.remove-item { display: grid; width: 28px; height: 28px; place-items: center; border: 0; border-radius: 7px; background: #fff2f0; color: var(--danger); }
.remove-item .icon { width: 14px; height: 14px; }
.cart-empty { display: grid; min-height: 290px; place-items: center; padding: 35px; color: var(--muted); text-align: center; }
.cart-empty > div { display: grid; justify-items: center; gap: 7px; }
.cart-empty .icon { width: 37px; height: 37px; color: #9aaba2; }
.cart-empty strong { color: #415047; font-size: 12px; }
.cart-empty small { max-width: 280px; font-size: 10px; }
.pos-shortcuts { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 9px; }
.pos-shortcuts kbd { padding: 3px 6px; border: 1px solid #d8e1dc; border-bottom-width: 2px; border-radius: 6px; background: #fff; color: #506159; font: inherit; font-weight: 800; }
.payment-panel { display: flex; min-height: 0; flex-direction: column; padding: 18px; overflow-y: auto; border-left: 1px solid var(--line); background: #fff; }
.payment-panel h2 { margin: 0 0 15px; font-size: 15px; }
.payment-lines { display: grid; gap: 9px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.payment-line { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.payment-line strong { color: var(--ink); }
.payment-total { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 16px 0; }
.payment-total span { color: var(--muted); font-size: 10px; }
.payment-total strong { color: var(--green-700); font-size: 25px; letter-spacing: -.045em; }
.payment-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.payment-option { position: relative; cursor: pointer; }
.payment-option input { position: absolute; opacity: 0; pointer-events: none; }
.payment-option span { display: grid; min-height: 70px; place-items: center; align-content: center; gap: 6px; border: 1px solid var(--line); border-radius: 11px; color: #68776f; font-size: 9px; font-weight: 750; }
.payment-option .icon { width: 20px; height: 20px; }
.payment-option input:checked + span { border-color: var(--green-600); background: var(--green-50); color: var(--green-700); box-shadow: 0 0 0 2px rgba(22,163,106,.08); }
.cash-payment { display: grid; gap: 10px; margin-top: 14px; }
.cash-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cash-preset { min-height: 34px; padding: 6px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #53635a; font-size: 9px; font-weight: 750; }
.cash-preset:hover { border-color: #b7d1c3; background: var(--green-50); color: var(--green-700); }
.change-box { display: flex; justify-content: space-between; gap: 10px; padding: 10px 11px; border-radius: 9px; background: #f4f7f5; color: var(--muted); font-size: 10px; }
.change-box strong { color: var(--ink); }
.payment-actions { display: grid; gap: 8px; margin-top: auto; padding-top: 17px; }
.checkout-button { min-height: 51px; font-size: 13px; }
.hold-button { min-height: 40px; }
.pos-feedback { min-height: 18px; margin: 7px 0 0; color: var(--danger); font-size: 10px; line-height: 1.45; }

.shift-gate { display: grid; height: 100vh; grid-template-rows: 67px 1fr; background: #f5f7f5; }
.shift-gate-body { display: grid; place-items: center; padding: 25px; }
.shift-gate-card { width: min(92vw, 470px); margin: 0; padding: 30px; text-align: center; }
.shift-gate-icon { display: grid; width: 60px; height: 60px; margin: 0 auto 15px; place-items: center; border-radius: 18px; background: var(--green-50); color: var(--green-700); }
.shift-gate-icon .icon { width: 29px; height: 29px; }
.shift-gate-card h1 { margin: 0; font-size: 25px; letter-spacing: -.04em; }
.shift-gate-card > p { margin: 7px auto 20px; color: var(--muted); font-size: 11px; }
.shift-gate-card .field { text-align: left; }

/* Receipt */
.receipt-page { min-height: 100vh; padding: 28px; background: #eef2ef; }
.receipt-actions { display: flex; max-width: var(--receipt-width, 80mm); justify-content: flex-end; gap: 8px; margin: 0 auto 13px; }
.receipt-paper { width: min(100%, var(--receipt-width, 80mm)); margin: 0 auto; padding: 25px 22px; background: #fff; color: #111; box-shadow: 0 16px 45px rgba(0,0,0,.13); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.receipt-header { text-align: center; }
.receipt-header img { width: 42px; height: 42px; margin-bottom: 7px; }
.receipt-header h1 { margin: 0; font-family: Inter, "Segoe UI", sans-serif; font-size: 17px; }
.receipt-header p, .receipt-footer p { margin: 3px 0; }
.receipt-divider { margin: 13px 0; border: 0; border-top: 1px dashed #777; }
.receipt-meta { display: grid; gap: 3px; }
.receipt-meta div, .receipt-total div { display: flex; justify-content: space-between; gap: 12px; }
.receipt-items { display: grid; gap: 9px; }
.receipt-item { display: grid; gap: 2px; }
.receipt-item > div { display: flex; justify-content: space-between; gap: 12px; }
.receipt-total { display: grid; gap: 4px; }
.receipt-total .grand { margin-top: 3px; padding-top: 5px; border-top: 1px solid #111; font-size: 13px; font-weight: 900; }
.receipt-footer { margin-top: 17px; text-align: center; }

@media print {
    .receipt-page { padding: 0; background: #fff; }
    .receipt-actions { display: none; }
    .receipt-paper { width: 100%; box-shadow: none; }
}

@media (max-width: 1180px) {
    .barcode-workspace { grid-template-columns: 1fr; }
    .barcode-preview-card { position: static; }
    .pos-workspace { grid-template-columns: minmax(450px, 1fr) 330px; }
}

@media (max-width: 900px) {
    .topbar-tools .icon-button { display: none; }
    .topbar-tools .header-sync-control { min-width: 42px; padding: 6px; }
    .topbar-tools .header-sync-copy { display: none; }
    .pos-shell { --sidebar-width: 0px; }
    .pos-shell .sidebar { width: min(86vw, 248px); align-items: stretch; overflow-y: auto; }
    .pos-shell .brand-copy, .pos-shell .nav-text, .pos-shell .nav-label, .pos-shell .version-copy { display: block; }
    .pos-shell .nav-list a, .pos-shell .nav-settings, .pos-shell .logout-form button { justify-content: flex-start; }
    .pos-shell .page-content { height: auto; min-height: 100vh; overflow: visible; }
    .pos-app, .shift-gate { height: auto; min-height: 100vh; }
    .pos-mobile-menu { display: grid; }
    .pos-workspace { grid-template-columns: 1fr; }
    .payment-panel { border-top: 1px solid var(--line); border-left: 0; }
    .pos-catalog { min-height: 620px; }
    .summary-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    .topbar-tools { gap: 6px; }
    .topbar-user > .icon { display: none; }
    .label-settings, .summary-grid { grid-template-columns: 1fr; }
    .barcode-product-row { grid-template-columns: 26px minmax(0, 1fr); }
    .barcode-product-meta { grid-column: 2; justify-items: start; }
    .stock-toolbar, .report-toolbar { align-items: stretch; flex-direction: column; }
    .pos-topbar { padding: 9px 12px; }
    .pos-topbar .header-sync-control { min-width: 36px; padding: 5px; }
    .pos-topbar .header-sync-copy,
    .pos-topbar .header-sync-dot { display: none; }
    .pos-operator-copy { display: none; }
    .pos-catalog, .payment-panel { padding: 12px; }
    .pos-shortcuts { display: none; }
    .payment-methods { grid-template-columns: 1fr; }
    .payment-option span { min-height: 50px; grid-template-columns: auto auto; }
    .dialog-actions { flex-direction: column-reverse; }
    .page-action-group { align-items: stretch; flex-direction: column; }
}

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

/* Sistem Kasir v0.4 — readability, store branding, and reporting */
:root { --sidebar-width: 264px; }

body {
    font-family: "Segoe UI Variable", "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
}

.brand small { font-size: 10px; }
.store-chip { padding: 13px; }
.store-chip-mark { flex-basis: 42px; width: 42px; height: 42px; }
.store-chip-mark img { object-fit: contain; padding: 3px; }
.store-chip small { font-size: 10px; }
.store-chip strong { font-size: 13px; }
.store-chip em { font-size: 11px; }
.nav-label { font-size: 10px; }
.nav-list a,
.nav-list .nav-form button,
.nav-settings,
.logout-form button { min-height: 46px; font-size: 14px; }
.nav-icon { flex-basis: 35px; width: 35px; height: 35px; }
.version-copy { font-size: 10px !important; }

.topbar { min-height: 82px; }
.topbar-copy > small { font-size: 10px; }
.topbar h1 { font-size: clamp(25px, 2vw, 30px); }
.topbar-copy p { margin-top: 2px; font-size: 13px; }
.topbar-user-copy strong { font-size: 14px; }
.topbar-user-copy small { font-size: 11px; }
.avatar { flex-basis: 43px; width: 43px; height: 43px; font-size: 12px; }

.dashboard-hero p { font-size: 14px; }
.hero-date { font-size: 11px; }
.kicker { font-size: 10px; }
.metric-copy small { font-size: 10px; }
.metric-copy span { font-size: 12px; }
.metric-copy strong.metric-status { font-size: 21px; }
.panel-heading h2,
.platform-summary h2,
.store-profile h2 { font-size: 20px; }
.panel-heading a { font-size: 13px; }
.panel-kicker { font-size: 10px; }
.panel-note { font-size: 11px; }
.count-pill { min-width: 32px; height: 32px; font-size: 11px; }
.entity-copy strong,
.activity-copy strong,
.attention-row strong { font-size: 14px; }
.entity-copy small,
.activity-copy small,
.attention-row small { font-size: 12px; }
.entity-meta > small,
.activity-row time { font-size: 11px; }
.empty-state strong { font-size: 14px; }
.empty-state p { font-size: 12px; }
.platform-summary > p,
.readiness-list li,
.capacity-panel > p { font-size: 12px; }
.capacity-value span { font-size: 11px; }
.store-profile dt,
.store-profile dd { font-size: 12px; }
.shift-meta small { font-size: 10px; }
.shift-meta strong { font-size: 13px; }

.button { min-height: 44px; padding: 11px 16px; font-size: 14px; }
.button .icon { width: 19px; height: 19px; }
.page-tabs a { padding: 9px 14px; font-size: 13px; }
.page-actions p { font-size: 14px; }

th { padding: 14px 17px; font-size: 11px; }
td { padding: 15px 17px; font-size: 14px; }
td strong { font-size: 14px; }
td small { font-size: 12px; }
td code { font-size: 13px; }
.badge { font-size: 10px; }
.link-button { font-size: 13px; }
.action-icon { width: 38px; height: 38px; }
.action-icon .icon { width: 18px; height: 18px; }
nav[role="navigation"] > div:first-child { font-size: 12px; }
nav[role="navigation"] a,
nav[role="navigation"] span[aria-current="page"] span,
nav[role="navigation"] span[aria-disabled="true"] span { min-width: 36px; height: 36px; font-size: 12px; }

.field > span,
.field-label { color: #293b32; font-size: 14px; font-weight: 800; }
.field input,
.field select,
.field textarea { min-height: 47px; padding: 11px 13px; font-size: 15px; }
.filter-form input,
.filter-form select { min-height: 44px; font-size: 14px; }
.filter-form { align-items: flex-end; }
.form-section h2 { font-size: 21px; }
.form-section p { font-size: 14px; }
.form-note { font-size: 12px; }
.barcode-options p,
.check-option { font-size: 13px; }
.toggle-option { min-height: 47px; font-size: 13px; }
.alert { font-size: 14px; }
.credential-alert p { font-size: 12px; }
.credential-alert button { font-size: 13px; }
.login-message > p { font-size: 15px; }
.login-benefits strong { font-size: 14px; }
.login-benefits small { font-size: 11px; }
.login-type-copy strong { font-size: 14px; }
.login-type-copy small { font-size: 11px; }
.login-form .field > span:first-child { font-size: 13px; }
.remember { font-size: 13px; }
.login-help { font-size: 12px; }
.login-security,
.admin-back-link { font-size: 13px; }
.login-brand-footer,
.field-error { font-size: 12px; }

.step-number { font-size: 13px; }
.step-heading h2 { font-size: 18px; }
.step-heading p { font-size: 12px; }
.search-control input { min-height: 44px; font-size: 14px; }
.barcode-product-copy strong { font-size: 14px; }
.barcode-product-copy small,
.barcode-product-meta small { font-size: 11px; }
.barcode-product-meta { font-size: 13px; }
.label-preview-store,
.label-preview-name { font-size: 12px; }
.label-preview-code { font-size: 11px; }
.label-preview-price { font-size: 15px; }
.preview-placeholder strong { font-size: 14px; }
.preview-placeholder small { font-size: 12px; }
.barcode-summary { font-size: 13px; }

.summary-grid-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.summary-card { min-height: 92px; padding: 19px; }
.summary-card small { font-size: 11px; }
.summary-card strong { font-size: 23px; }
.summary-card em { color: var(--muted); font-size: 11px; font-style: normal; }
.summary-card.cash-short { border-color: #edcbc8; background: #fff8f7; }
.summary-card.cash-short .summary-card-icon { background: #fff0ee; color: var(--danger); }
.summary-card.cash-over { border-color: #c9e5d6; background: #f8fcfa; }
.summary-card.cash-balanced .summary-card-icon { background: #eef3f0; color: #607068; }
.payment-bar-header { font-size: 13px; }
.payment-bar-track { height: 9px; }
.movement-copy strong { font-size: 14px; }
.movement-copy small,
.movement-row time { font-size: 12px; }
.report-export-group { display: flex; align-items: center; gap: 9px; }
.export-button { min-width: 108px; }
.report-section { display: grid; gap: 14px; }
.report-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; }
.report-section-heading h2 { margin: 4px 0 2px; font-size: 21px; letter-spacing: -.025em; }
.report-section-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.cash-summary-inline { display: flex; flex: 0 0 auto; gap: 26px; padding: 11px 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.cash-summary-inline span { display: grid; gap: 2px; }
.cash-summary-inline small { color: var(--muted); font-size: 11px; }
.cash-summary-inline strong { font-size: 14px; }
.cash-variance-badge { display: inline-flex; min-width: 104px; justify-content: center; padding: 6px 9px; border-radius: 99px; font-size: 12px; font-weight: 850; }
.cash-variance-badge.short { background: #fff0ee; color: #a83933; }
.cash-variance-badge.over { background: #eaf7ef; color: #18734a; }
.cash-variance-badge.balanced { background: #eef3f0; color: #526159; }

.logo-manager,
.admin-logo-field { display: grid; grid-template-columns: 142px minmax(0, 1fr); gap: 20px; align-items: center; }
.admin-logo-field { grid-column: 1 / -1; padding-top: 5px; }
.logo-preview {
    position: relative;
    display: grid;
    width: 142px;
    height: 142px;
    place-items: center;
    overflow: hidden;
    border: 1px solid #d7e2dc;
    border-radius: 20px;
    background: linear-gradient(145deg, #f8faf9, #edf4f0);
}
.logo-preview img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.logo-preview-fallback { color: var(--green-700); font-size: 34px; font-weight: 900; letter-spacing: -.05em; }
.logo-preview.is-marked-for-removal::after { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.88); color: var(--danger); content: "Akan dihapus"; font-size: 13px; font-weight: 850; }
.logo-manager-controls { display: grid; align-content: center; gap: 9px; }
.logo-manager-controls > strong { font-size: 16px; }
.logo-manager-controls > p { margin: 0; color: var(--muted); font-size: 13px; }
.logo-upload-control {
    position: relative;
    display: flex;
    min-height: 62px;
    align-items: center;
    gap: 12px;
    padding: 11px 13px;
    overflow: hidden;
    border: 1px dashed #aac8b8;
    border-radius: 12px;
    background: var(--green-50);
    color: var(--green-800);
    cursor: pointer;
}
.logo-upload-control:hover { border-color: var(--green-600); background: #e4f5ec; }
.logo-upload-control:focus-within { outline: 3px solid rgba(37, 131, 95, .18); outline-offset: 2px; }
.logo-upload-control > .icon { flex: 0 0 24px; width: 24px; height: 24px; }
.logo-upload-control > span { display: grid; gap: 1px; }
.logo-upload-control strong { font-size: 14px; }
.logo-upload-control small { color: #5e7569; font-size: 12px; }
.logo-upload-control input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.remove-logo-option { display: inline-flex; align-items: center; gap: 8px; color: var(--danger); font-size: 13px; font-weight: 700; cursor: pointer; }
.remove-logo-option input { width: 17px; height: 17px; accent-color: var(--danger); }
.danger-text { color: var(--danger); justify-self: start; }
.compact-brand-panel { display: grid; justify-items: center; gap: 13px; text-align: center; }
.compact-brand-panel h2 { margin: 4px 0; font-size: 18px; }
.compact-brand-panel p { margin: 0 0 13px; color: var(--muted); font-size: 12px; }
.compact-brand-preview { display: grid; width: 86px; height: 86px; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--green-50); color: var(--green-700); font-size: 22px; font-weight: 900; }
.compact-brand-preview img { width: 100%; height: 100%; object-fit: contain; padding: 7px; }

.pos-title strong { font-size: 17px; }
.pos-title small { font-size: 11px; }
.shift-badge { font-size: 11px; }
.pos-operator-copy strong { font-size: 13px; }
.pos-operator-copy small { font-size: 10px; }
.pos-search input { min-height: 52px; font-size: 15px; }
.keyboard-hint { font-size: 10px; }
.product-suggestion { padding: 12px 14px; }
.product-suggestion strong { font-size: 14px; }
.product-suggestion small { font-size: 11px; }
.product-suggestion em { font-size: 13px; }
.cart-heading h2 { font-size: 16px; }
.cart-heading span { font-size: 11px; }
.quantity-control span { font-size: 13px; }
.cart-empty strong { font-size: 14px; }
.cart-empty small { font-size: 12px; }
.pos-shortcuts { font-size: 11px; }
.payment-panel h2 { font-size: 18px; }
.payment-line { font-size: 14px; }
.payment-total span { font-size: 12px; }
.payment-total strong { font-size: 29px; }
.payment-option span { min-height: 76px; font-size: 12px; }
.cash-preset { min-height: 39px; font-size: 12px; }
.change-box { font-size: 13px; }
.checkout-button { font-size: 15px; }
.pos-feedback { font-size: 12px; }
.shift-gate-card > p { font-size: 13px; }
.dialog-header p { font-size: 13px; }
.pos-shell [data-tooltip]:hover::after { font-size: 12px; }

.receipt-paper {
    padding: 26px 22px;
    font-size: var(--receipt-font-size, 12px);
    line-height: 1.48;
}
.receipt-header img { width: 54px; height: 54px; margin-bottom: 8px; object-fit: contain; }
.receipt-logo-fallback { display: grid; width: 54px; height: 54px; margin: 0 auto 8px; place-items: center; border-radius: 14px; background: #e8f5ee; color: var(--green-700); font-family: "Segoe UI", sans-serif; font-size: 19px; font-weight: 900; }
.receipt-header h1 { font-size: 19px; }
.receipt-meta { gap: 5px; }
.receipt-items { gap: 11px; }
.receipt-total { gap: 6px; }
.receipt-total .grand { font-size: 14px; }
.receipt-legal { color: #555; font-size: .88em; }

@media (max-width: 1250px) {
    .summary-grid-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .report-toolbar,
    .report-section-heading { align-items: stretch; flex-direction: column; }
    .report-export-group { flex-wrap: wrap; }
    .cash-summary-inline { align-self: flex-start; }
}

@media (max-width: 600px) {
    .topbar h1 { font-size: 22px; }
    .filter-form { align-items: stretch; }
    .summary-grid-four { grid-template-columns: 1fr; }
    .report-export-group { display: grid; grid-template-columns: 1fr 1fr; }
    .report-export-group .panel-note { grid-column: 1 / -1; }
    .logo-manager,
    .admin-logo-field { grid-template-columns: 1fr; }
    .logo-preview { width: 118px; height: 118px; }
    .cash-summary-inline { width: 100%; justify-content: space-between; gap: 12px; }
}

/* Sistem Kasir v0.5 — tidy responsive UI, account CRUD, and print layouts */
html,
body { max-width: 100%; }
body { overflow-x: clip; }
.app-shell,
.content-shell,
.page-content,
.report-layout,
.stock-layout,
.team-layout,
.team-layout > *,
.report-toolbar > *,
.summary-card > span:last-child { min-width: 0; }
.page-content { width: 100%; }
.table-wrap { width: 100%; max-width: 100%; }

/* Reports stay inside the content area at browser zoom and laptop widths. */
.report-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 18px;
}
.report-filter-form {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(170px, 1fr)) auto;
    align-items: end;
    gap: 10px;
}
.report-filter-form .field,
.report-filter-form input { width: 100%; min-width: 0; }
.report-filter-form input { max-width: none; }
.report-export-group { align-self: end; justify-self: end; }
.report-range-note {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: 7px;
    padding: 0 4px;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}
.report-range-note .icon { width: 16px; height: 16px; }
.summary-card { min-width: 0; }
.summary-card strong { line-height: 1.12; white-space: nowrap; }
.report-section,
.report-section-heading > div:first-child { min-width: 0; }

/* Consistent action language: edit, status, password, and delete. */
.actions-cell {
    display: flex;
    min-width: max-content;
    align-items: center;
    flex-wrap: nowrap;
    gap: 7px;
}
.actions-cell form { display: inline-flex; margin: 0; }
.action-icon {
    flex: 0 0 38px;
    border-color: #d9e3dd;
    background: #fff;
    box-shadow: 0 3px 10px rgba(18,61,48,.04);
    transition: transform .15s ease, border-color .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.action-icon:hover {
    transform: translateY(-1px);
    box-shadow: 0 7px 16px rgba(18,61,48,.09);
}
.action-edit { border-color: #c9e2d5; background: #eff8f3; color: #18704d; }
.action-status { border-color: #ecd9aa; background: #fff8e8; color: #966811; }
.action-enable { border-color: #bfe2cf; background: #eaf8f0; color: #177448; }
.action-key { border-color: #cddbea; background: #f1f6fb; color: #3c648a; }
.action-view { border-color: #c9e2d5; background: #eff8f3; color: var(--green-700); }
.action-danger { border-color: #efcfcb; background: #fff3f1; color: #aa3f38; }
.action-edit:hover,
.action-view:hover { border-color: #8fc5aa; background: #e5f5ed; color: #11623f; }
.action-status:hover { border-color: #d8b65d; background: #fff2d1; color: #7d560d; }
.action-enable:hover { border-color: #78bd98; background: #dff4e8; color: #0f663e; }
.action-key:hover { border-color: #93b4d4; background: #e7f0f9; color: #294f74; }
.action-danger:hover { border-color: #dc9992; background: #ffe9e6; color: #93322d; }

/* Team management. */
.team-layout { grid-template-columns: minmax(300px, 340px) minmax(0, 1fr); gap: 24px; }
.team-layout .compact-panel > .panel:first-child { margin-top: 0; }
.team-form-panel { margin-top: 0; }
.team-form-panel .panel-heading { margin-bottom: 20px; }
.section-icon {
    display: grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    background: var(--green-50);
    color: var(--green-700);
}
.section-icon .icon { width: 21px; height: 21px; }
.account-edit-card { max-width: 900px; }
.form-fields > .span-two { grid-column: 1 / -1; }
.account-status-note,
.barcode-guidance,
.label-layout-note {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: 11px;
    padding: 12px 13px;
    border: 1px solid #dce8e1;
    border-radius: 11px;
    background: #f5faf7;
    color: #385247;
}
.account-status-note > .icon,
.barcode-guidance > .icon,
.label-layout-note > .icon { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 1px; color: var(--green-700); }
.account-status-note > span,
.barcode-guidance > span,
.label-layout-note > span { display: grid; min-width: 0; gap: 2px; }
.account-status-note strong,
.barcode-guidance strong,
.label-layout-note strong { color: var(--ink); font-size: 13px; }
.account-status-note small,
.barcode-guidance small,
.label-layout-note small { color: var(--muted); font-size: 12px; line-height: 1.5; }
.field-help { color: var(--muted); font-size: 12px; line-height: 1.45; }

/* Barcode setup supports one, two, or three labels per printed row. */
.label-settings { grid-template-columns: minmax(0, 1fr); }

/* Native desktop first-run setup */
.setup-shell {
    min-height: 100vh;
    min-height: 100svh;
    padding: clamp(22px, 4vw, 56px);
    background:
        radial-gradient(circle at 4% 4%, rgba(33, 151, 98, .15), transparent 28%),
        radial-gradient(circle at 96% 96%, rgba(240, 201, 111, .16), transparent 25%),
        var(--green-950);
}
.setup-panel {
    width: min(100%, 980px);
    margin: 0 auto;
    padding: clamp(24px, 4vw, 46px);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(0,0,0,.25);
}
.setup-heading {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 30px;
    align-items: start;
    margin-bottom: 28px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--line);
}
.setup-heading > div:last-child { grid-column: 1 / -1; }
.setup-brand strong { color: var(--ink); }
.setup-brand small { color: var(--muted); }
.setup-mode {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid #c8e6d5;
    border-radius: 999px;
    background: var(--green-50);
    color: var(--green-700);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .1em;
}
.setup-mode > span { width: 8px; height: 8px; border-radius: 50%; background: var(--green-600); }
.setup-heading h1 { margin: 5px 0 5px; font-size: clamp(34px, 5vw, 52px); line-height: 1.02; letter-spacing: -.055em; }
.setup-heading p { margin: 0; color: var(--muted); font-size: 14px; }
.setup-form { display: grid; gap: 22px; }
.setup-section { margin: 0; padding: 0; border: 0; }
.setup-section legend { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.setup-section legend span {
    display: grid;
    width: 31px;
    height: 31px;
    place-items: center;
    border-radius: 9px;
    background: var(--green-950);
    color: white;
    font-size: 10px;
    font-weight: 900;
}
.setup-section legend strong { font-size: 16px; }
.setup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.setup-span-two { grid-column: 1 / -1; }
.setup-grid .field { margin: 0; }
.setup-grid .field > span:first-child { font-size: 11px; }
.setup-grid input, .setup-grid textarea { background: #fbfcfb; }
.setup-data-note {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px 17px;
    border: 1px solid #cce6d7;
    border-radius: 14px;
    background: var(--green-50);
}
.setup-data-note > div { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: var(--green-700); color: white; font-weight: 900; }
.setup-data-note > span { display: grid; gap: 2px; }
.setup-data-note strong { font-size: 12px; }
.setup-data-note small { color: var(--muted); font-size: 10px; }
.setup-acknowledgement { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: 11px; cursor: pointer; }
.setup-acknowledgement input { width: 17px; height: 17px; margin-top: 1px; accent-color: var(--green-700); }
.setup-submit { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.setup-submit > span { color: var(--muted); font-size: 10px; }
.setup-submit .button { min-width: 210px; }
.activation-panel { width: min(100%, 860px); }
.activation-code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.activation-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.activation-summary > div { display: flex; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #fbfcfb; }
.activation-summary > div > strong { display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; border-radius: 8px; background: var(--green-950); color: white; font-size: 10px; }
.activation-summary span { display: grid; gap: 3px; min-width: 0; }
.activation-summary b { font-size: 11px; }
.activation-summary small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.offline-backup-actions { display: grid; align-content: start; gap: 14px; }
.offline-backup-actions form { margin: 0; }
.offline-backup-actions .button { width: fit-content; }
.offline-runtime-status {
    display: inline-flex;
    justify-self: center;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border: 1px solid rgba(121,214,167,.18);
    border-radius: 999px;
    color: rgba(255,255,255,.62);
    font-size: 9px;
    font-weight: 800;
}
.offline-runtime-status > span { width: 7px; height: 7px; border-radius: 50%; background: #79d6a7; box-shadow: 0 0 0 3px rgba(121,214,167,.09); }
.offline-runtime-status.syncing > span { animation: sync-pulse 1s ease-in-out infinite; background: #f3c96b; }
.offline-runtime-status.synced > span { background: #79d6a7; }
.offline-runtime-status.sync-pending > span,
.offline-runtime-status.pending > span,
.offline-runtime-status.busy > span { background: #f3c96b; }
.offline-runtime-status.offline > span,
.offline-runtime-status.sync-error > span { background: #ff9c91; }
@keyframes sync-pulse { 50% { opacity: .35; transform: scale(.78); } }

.desktop-managed-notice {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid #cfe2d7;
    border-radius: 12px;
    background: #f1f8f4;
    color: var(--green-700);
}
.desktop-managed-notice > .icon { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 1px; }
.desktop-managed-notice > span { display: grid; gap: 2px; }
.desktop-managed-notice strong { font-size: 11px; }
.desktop-managed-notice small { color: #5e7569; font-size: 10px; line-height: 1.45; }

@media (max-width: 700px) {
    .setup-shell { padding: 12px; }
    .setup-panel { padding: 23px 18px; border-radius: 20px; }
    .setup-heading { grid-template-columns: 1fr; gap: 18px; }
    .setup-heading > div:last-child { grid-column: auto; }
    .setup-mode { justify-self: start; grid-row: 2; }
    .setup-grid { grid-template-columns: 1fr; }
    .setup-span-two { grid-column: auto; }
    .setup-submit { align-items: stretch; flex-direction: column; }
    .setup-submit .button { width: 100%; min-width: 0; }
    .activation-summary { grid-template-columns: 1fr; }
    .offline-backup-actions .button { width: 100%; }
}

/* v0.7.0-dev.7.6.18 — focused Android POS flow and visible sync status. */
@media (max-width: 700px) {
    body.android-app .topbar-tools .header-sync-control {
        position: relative;
        display: grid;
        width: 42px;
        min-width: 42px;
        max-width: 42px;
        height: 42px;
        min-height: 42px;
        padding: 0;
        place-items: center;
        border-radius: 12px;
    }
    body.android-app .topbar-tools .header-sync-control .header-sync-copy { display: none; }
    body.android-app .topbar-tools .header-sync-control .header-sync-icon {
        flex-basis: 28px;
        width: 28px;
        height: 28px;
    }
    body.android-app .topbar-tools .header-sync-control .header-sync-dot {
        position: absolute;
        top: 6px;
        right: 6px;
        display: block;
        width: 7px;
        height: 7px;
    }

    body.android-app.pos-page .pos-topbar-left { gap: 8px; }
    body.android-app.pos-page .pos-topbar-right { gap: 4px; }
    body.android-app.pos-page .pos-operator { display: none; }
    body.android-app.pos-page .pos-topbar .header-sync-control {
        position: relative;
        display: grid;
        flex: 0 0 40px;
        width: 40px;
        min-width: 40px;
        max-width: 40px;
        height: 40px;
        min-height: 40px;
        padding: 0;
        place-items: center;
        border-radius: 11px;
    }
    body.android-app.pos-page .pos-topbar .header-sync-copy { display: none; }
    body.android-app.pos-page .pos-topbar .header-sync-icon {
        flex-basis: 27px;
        width: 27px;
        height: 27px;
    }
    body.android-app.pos-page .pos-topbar .header-sync-dot {
        position: absolute;
        top: 5px;
        right: 5px;
        display: block;
        width: 7px;
        height: 7px;
    }
    body.android-app.pos-page .pos-printer-status,
    body.android-app.pos-page .pos-topbar-right > .button.secondary {
        flex: 0 0 40px;
        width: 40px;
        min-width: 40px;
        max-width: 40px;
        min-height: 40px;
    }

    body.android-app.pos-page .cart-card { min-height: 156px; }
    body.android-app.pos-page .cart-empty { min-height: 116px; padding: 18px 14px; }
    body.android-app.pos-page .cart-empty .icon { width: 30px; height: 30px; }
    body.android-app.pos-page .cart-empty > div { gap: 5px; }
    body.android-app.pos-page .cart-empty strong { font-size: 13px; }
    body.android-app.pos-page .cart-empty small { font-size: 10px; }

    body.android-app.pos-page .payment-panel {
        margin: 0 max(12px, env(safe-area-inset-right)) max(24px, calc(14px + env(safe-area-inset-bottom))) max(12px, env(safe-area-inset-left));
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: 15px;
        box-shadow: 0 8px 24px rgba(17,57,43,.055);
    }
    body.android-app.pos-page .payment-empty-state {
        display: none;
        justify-items: center;
        gap: 6px;
        padding: 18px 12px 10px;
        color: var(--muted);
        text-align: center;
    }
    body.android-app.pos-page .payment-empty-state > span {
        display: grid;
        width: 38px;
        height: 38px;
        place-items: center;
        border-radius: 12px;
        color: var(--green-700);
        background: var(--green-50);
    }
    body.android-app.pos-page .payment-empty-state .icon { width: 20px; height: 20px; }
    body.android-app.pos-page .payment-empty-state strong { color: var(--ink); font-size: 14px; }
    body.android-app.pos-page .payment-empty-state small { max-width: 270px; font-size: 11px; line-height: 1.5; }

    body.android-app.pos-page .pos-cart-empty .payment-empty-state { display: grid; }
    body.android-app.pos-page .pos-cart-empty .payment-lines,
    body.android-app.pos-page .pos-cart-empty .payment-total,
    body.android-app.pos-page .pos-cart-empty .payment-methods,
    body.android-app.pos-page .pos-cart-empty .cash-payment,
    body.android-app.pos-page .pos-cart-empty .pos-feedback,
    body.android-app.pos-page .pos-cart-empty .payment-actions,
    body.android-app.pos-page .pos-cart-empty .mobile-payment-jump { display: none; }
}

@media (max-width: 390px) {
    body.android-app.pos-page .pos-title small { display: none; }
    body.android-app.pos-page .pos-topbar-left { gap: 5px; }
    body.android-app.pos-page .pos-topbar-right { gap: 3px; }
    body.android-app.pos-page .pos-topbar .header-sync-control,
    body.android-app.pos-page .pos-printer-status,
    body.android-app.pos-page .pos-topbar-right > .button.secondary {
        flex-basis: 38px;
        width: 38px;
        min-width: 38px;
        max-width: 38px;
        min-height: 38px;
    }
}
.label-config-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.custom-label-size-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(200px, 1.25fr); gap: 12px; align-items: end; }
.field > .input-with-unit { position: relative; display: block; }
.input-with-unit input { padding-right: 42px; }
.input-with-unit small { position: absolute; top: 50%; right: 13px; color: var(--muted); font-size: 12px; font-weight: 700; transform: translateY(-50%); pointer-events: none; }
.label-layout-note { align-items: center; }
.label-size-warning { display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; border: 1px solid #ead8a8; border-radius: 11px; background: #fff9e8; color: #725415; font-size: 12px; line-height: 1.5; }
.label-size-warning[hidden],
.custom-label-size-fields[hidden] { display: none; }
.label-size-warning > .icon { flex: 0 0 19px; width: 19px; height: 19px; margin-top: 1px; }
.toggle-stack { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.label-preview-sku { margin-top: 2px; color: #526159; font-size: 10px; }
.label-preview[data-density="compact"] { padding: 9px 11px; }
.label-preview[data-density="compact"] .label-preview-store { margin-bottom: 2px; font-size: 8px; }
.label-preview[data-density="compact"] .label-preview-name { font-size: 10px; }
.label-preview[data-density="compact"] svg { height: 43px; margin: 3px 0 1px; }
.label-preview[data-density="compact"] .label-preview-code { font-size: 8px; }
.label-preview[data-density="compact"] .label-preview-sku { margin-top: 1px; font-size: 8px; }
.label-preview[data-density="compact"] .label-preview-price { margin-top: 1px; font-size: 12px; }
.label-preview[data-density="tiny"] { padding: 5px 7px; }
.label-preview[data-density="tiny"] .label-preview-store { margin-bottom: 1px; font-size: 7px; line-height: 1; }
.label-preview[data-density="tiny"] .label-preview-name { font-size: 8px; line-height: 1.05; }
.label-preview[data-density="tiny"] svg { height: 32px; margin: 2px 0 0; }
.label-preview[data-density="tiny"] .label-preview-code { font-size: 6.5px; line-height: 1; }
.label-preview[data-density="tiny"] .label-preview-sku { margin-top: 1px; font-size: 6.5px; line-height: 1; }
.label-preview[data-density="tiny"] .label-preview-price { margin-top: 1px; font-size: 10px; line-height: 1; }
.barcode-print-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.barcode-print-summary > span { display: grid; gap: 2px; }
.barcode-print-summary > span:last-child { justify-items: end; text-align: right; }
.barcode-print-summary small { color: #5e7569; font-size: 10px; }
.barcode-print-summary strong { font-size: 13px; }

/* Scanner-focused POS interaction for USB and Bluetooth keyboard scanners. */
.pos-search { align-items: stretch; }
.scan-control { border-radius: 13px; transition: box-shadow .18s ease, transform .18s ease; }
.scan-control:focus-within,
.scanner-focused .scan-control { box-shadow: 0 0 0 4px rgba(37,131,95,.14), 0 8px 24px rgba(20,53,39,.08); }
.pos-search .scan-control > .icon { color: var(--green-700); }
.scan-focus-button {
    display: inline-flex;
    min-width: 128px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    border: 1px solid #b9d5c6;
    border-radius: 12px;
    background: #edf8f2;
    color: var(--green-700);
    font-size: 13px;
    font-weight: 800;
}
.scan-focus-button:hover { border-color: var(--green-600); background: #e3f4eb; }
.scan-focus-button .icon { width: 20px; height: 20px; }
.scanner-focused .scan-focus-button { border-color: var(--green-600); background: var(--green-700); color: #fff; }

/* Receipt previews can switch between the two common thermal widths. */
.receipt-actions {
    width: min(100%, 560px);
    max-width: 560px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}
.receipt-size-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid #d9e2dd;
    border-radius: 11px;
    background: #fff;
}
.receipt-size-switch > span { padding: 0 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.receipt-size-switch a { padding: 7px 10px; border-radius: 8px; color: #607068; font-size: 12px; font-weight: 800; }
.receipt-size-switch a.active { background: var(--green-700); color: #fff; }
.receipt-action-buttons { display: flex; gap: 8px; }
.receipt-print-note { width: min(100%, 560px); margin: -4px auto 13px; color: #617168; font-size: 12px; text-align: center; }
.receipt-paper { padding: var(--receipt-padding, 4mm); }

@media print {
    .receipt-print-note { display: none; }
}

@media (max-width: 1440px) {
    .summary-grid-four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-toolbar { grid-template-columns: minmax(0, 1fr); }
    .report-export-group { justify-self: start; }
}

@media (max-width: 1050px) {
    .team-layout { grid-template-columns: 1fr; }
    .team-form-panel { max-width: 620px; }
    .label-config-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .custom-label-size-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .custom-label-size-fields .field-help { grid-column: 1 / -1; }
    .toggle-stack { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .summary-grid-four { grid-template-columns: 1fr; }
    .report-filter-form { grid-template-columns: 1fr 1fr; }
    .report-filter-form .button { grid-column: 1 / -1; }
    .report-export-group { display: grid; width: 100%; grid-template-columns: 1fr 1fr; }
    .report-range-note { grid-column: 1 / -1; min-height: auto; }
    .report-export-group .button { width: 100%; }
    .label-config-grid { grid-template-columns: 1fr; }
    .custom-label-size-fields { grid-template-columns: 1fr; }
    .custom-label-size-fields .field-help { grid-column: auto; }
    .scan-focus-button { min-width: 50px; padding: 0 13px; }
    .scan-focus-button span { display: none; }
    .receipt-actions { align-items: stretch; flex-direction: column; }
    .receipt-size-switch,
    .receipt-action-buttons { justify-content: center; }
}

@media (max-width: 520px) {
    .summary-grid-four { grid-template-columns: 1fr; }
    .report-filter-form { grid-template-columns: 1fr; }
    .report-filter-form .button { grid-column: auto; }
    .barcode-print-summary { grid-template-columns: 1fr; }
    .barcode-print-summary > span:last-child { justify-items: start; text-align: left; }
    .form-fields > .span-two { grid-column: auto; }
    .receipt-action-buttons { flex-direction: column; }
}

/* v0.6.0 RC — transaction history, void controls, and the cash ledger. */
.button.danger { border-color: #b42318; background: #b42318; color: #fff; }
.button.danger:hover { border-color: #8f1d14; background: #8f1d14; }
.button.success { border-color: #18794e; background: #18794e; color: #fff; }
.button.small { min-height: 34px; padding: 7px 10px; font-size: 12px; }
.badge.danger { border-color: #f2b8b5; background: #fff0ef; color: #a1261c; }
.badge.warning { border-color: #efd18c; background: #fff8df; color: #7a5510; }

.sales-filter-form {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    gap: 12px;
}
.sales-filter-form .field,
.sales-filter-form input,
.sales-filter-form select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}
.sales-filter-form input[type="date"] { inline-size: 100%; }
.filter-actions { display: flex; align-items: center; gap: 8px; }
.sales-filter-form .filter-actions { grid-column: 1 / -1; }
.table-actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.table-actions form { margin: 0; }
.table-actions button { font: inherit; }
.receipt-number-cell { max-width: 190px; }
.receipt-number {
    display: inline-block;
    max-width: 100%;
    color: var(--ink);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.movement-copy strong {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 5px 9px;
}
.movement-quantity {
    display: inline-flex;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 12px;
    font-style: normal;
    font-weight: 850;
    white-space: nowrap;
}
.movement-quantity.positive { background: #e9f7ef; color: #16714a; }
.movement-quantity.negative { background: #fff0ee; color: #a13a32; }

.branch-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.branch-table form { margin: 0; }
.active-store-pill {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 9px;
    background: var(--green-50);
    color: var(--green-700);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}
.active-store-pill .icon { width: 16px; height: 16px; }

.detail-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.detail-toolbar-actions { display: flex; align-items: center; gap: 9px; }
.detail-toolbar-actions form { margin: 0; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.detail-list { display: grid; gap: 0; margin: 0; }
.detail-list > div { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; border-bottom: 1px solid #e8eeeb; }
.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; color: var(--ink); font-weight: 750; text-align: right; overflow-wrap: anywhere; }
.detail-list .detail-total { margin-top: 5px; padding: 14px 0; font-size: 18px; }
.danger-callout { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid #efb7b2; border-radius: 11px; background: #fff4f3; color: #8f1d14; }

.cash-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 16px; }
.form-stack { display: grid; gap: 13px; }
.inline-review-actions { display: grid; gap: 6px; margin-top: 8px; }
.inline-review-actions form { display: flex; align-items: center; gap: 6px; margin: 0; }
.small-input { min-width: 150px; max-width: 240px; padding: 7px 9px; border: 1px solid #ccd9d2; border-radius: 8px; }

.receipt-copy-mark,
.receipt-void-mark {
    margin: 0 0 4mm;
    padding: 2mm;
    border: 2px solid currentColor;
    font-size: calc(var(--receipt-font-size, 12px) * 1.35);
    font-weight: 900;
    letter-spacing: .16em;
    text-align: center;
}
.receipt-copy-mark { color: #3d5148; }
.receipt-void-mark { color: #a1261c; }

@media (max-width: 1440px) {
    .sales-filter-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .cash-layout,
    .detail-grid { grid-template-columns: 1fr; }
    .sales-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .branch-summary { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
    .sales-filter-form { grid-template-columns: 1fr; }
    .sales-filter-form .filter-actions { grid-column: auto; }
    .branch-summary { grid-template-columns: 1fr; }
    .detail-toolbar { align-items: stretch; flex-direction: column; }
    .detail-toolbar-actions { align-items: stretch; flex-direction: column; }
    .detail-toolbar-actions .button { width: 100%; }
    .inline-review-actions form { align-items: stretch; flex-direction: column; }
    .small-input { width: 100%; max-width: none; }
}

.error-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 24px;
    background: #f2f6f4;
}

.error-card {
    width: min(520px, 100%);
    display: grid;
    justify-items: start;
    gap: 16px;
    padding: clamp(28px, 6vw, 56px);
    border: 1px solid #d8e2de;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(8, 60, 46, .12);
}

.error-card .error-code {
    margin-top: 12px;
    color: #b42318;
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .14em;
}

.error-card h1,
.error-card p {
    margin: 0;
}

.error-card small {
    color: #60746d;
}

/* v0.7.0-dev.6: shared desktop and web synchronization UI. */
.store-chip-meta {
    display: flex;
    min-width: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 7px;
    margin-top: 3px;
}
.store-chip-meta em { margin: 0; }
.store-kind-badge {
    display: inline-flex;
    min-height: 19px;
    align-items: center;
    padding: 2px 7px;
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 999px;
    color: rgba(255,255,255,.72);
    background: rgba(255,255,255,.075);
    font-size: 8px;
    font-weight: 850;
    line-height: 1;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.store-kind-badge.branch {
    border-color: rgba(240,201,111,.25);
    color: #f2d184;
    background: rgba(240,201,111,.1);
}

.header-sync-control { min-width: 176px; }
.header-sync-control .header-sync-copy strong { font-size: 10px; }
.header-sync-control.inactive .header-sync-dot {
    background: #a4aea9;
    box-shadow: 0 0 0 3px rgba(164,174,169,.12);
}

.sync-status-dialog { width: min(94vw, 560px); }
.sync-dialog-header small {
    display: block;
    margin-bottom: 3px;
    color: var(--green-700);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .13em;
}
.sync-dialog-header p { max-width: 430px; line-height: 1.45; }
.sync-status-overview {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 21px 0;
    padding: 14px;
    border: 1px solid #d7e3dc;
    border-radius: 14px;
    color: #53635a;
    background: #f8faf9;
}
.sync-status-overview > span:nth-child(2) {
    display: grid;
    min-width: 0;
    flex: 1;
    gap: 1px;
}
.sync-status-overview small {
    color: #74837b;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .1em;
}
.sync-status-overview strong { font-size: 14px; }
.sync-overview-icon {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 11px;
    color: var(--green-700);
    background: #e9f3ed;
}
.sync-overview-icon .icon { width: 19px; height: 19px; }
.sync-status-overview > i {
    flex: 0 0 9px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #a4aea9;
    box-shadow: 0 0 0 4px rgba(164,174,169,.12);
}
.sync-status-overview.synced { border-color: #cce5d7; color: #246c49; background: #f1faf5; }
.sync-status-overview.synced > i { background: #42a76f; box-shadow: 0 0 0 4px rgba(66,167,111,.12); }
.sync-status-overview.pending,
.sync-status-overview.busy { border-color: #ead9aa; color: #856212; background: #fffaf0; }
.sync-status-overview.pending > i,
.sync-status-overview.busy > i { background: #e1b24d; box-shadow: 0 0 0 4px rgba(225,178,77,.12); }
.sync-status-overview.syncing .sync-overview-icon .icon { animation: sync-spin 1s linear infinite; }
.sync-status-overview.offline { color: #68746e; background: #f5f7f6; }
.sync-status-overview.sync-error { border-color: #efd0cb; color: #96382f; background: #fff5f3; }
.sync-status-overview.sync-error > i { background: #d96053; box-shadow: 0 0 0 4px rgba(217,96,83,.12); }

.sync-detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    margin: 16px 21px 0;
    border: 1px solid var(--line);
    border-radius: 13px;
    overflow: hidden;
}
.sync-detail-list > div {
    min-width: 0;
    padding: 13px 14px;
    border-top: 1px solid #e8eeeb;
}
.sync-detail-list > div:nth-child(-n+2) { border-top: 0; }
.sync-detail-list > div:nth-child(even) { border-left: 1px solid #e8eeeb; }
.sync-detail-list dt {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 750;
}
.sync-detail-list dt .icon { width: 15px; height: 15px; }
.sync-detail-list dd {
    margin: 4px 0 0;
    overflow-wrap: anywhere;
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
}
.sync-detail-list dd strong { display: inline; font-size: inherit; }

.sync-error-detail {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 13px 21px 0;
    padding: 11px 12px;
    border: 1px solid #dfe7e2;
    border-radius: 11px;
    color: #52635a;
    background: #f7f9f8;
}
.sync-error-detail > span {
    display: grid;
    flex: 0 0 27px;
    width: 27px;
    height: 27px;
    place-items: center;
    border-radius: 8px;
    color: #718078;
    background: #e9eeeb;
}
.sync-error-detail > span .icon { width: 15px; height: 15px; }
.sync-error-detail > div { min-width: 0; }
.sync-error-detail strong { display: block; font-size: 10px; }
.sync-error-detail p { margin: 2px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.sync-error-detail code {
    display: inline-flex;
    margin-top: 6px;
    padding: 3px 6px;
    border-radius: 5px;
    color: #7d4b45;
    background: rgba(150,56,47,.08);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .04em;
}
.sync-error-detail.has-error { border-color: #efd0cb; color: #96382f; background: #fff6f4; }
.sync-error-detail.has-error > span { color: #b64b40; background: #fee9e6; }
.sync-error-detail.has-error p { color: #8e4d47; }
.sync-dialog-actions { align-items: center; justify-content: flex-start; flex-wrap: wrap; }
.sync-dialog-actions > :last-child { margin-left: auto; }
.sync-dialog-actions > small { max-width: 320px; color: var(--muted); font-size: 10px; line-height: 1.4; }

.product-filter-form {
    display: grid;
    width: min(100%, 690px);
    grid-template-columns: minmax(310px, 1fr) minmax(150px, 180px) auto;
    align-items: end;
}
.product-filter-form .product-search-control { display: block; min-width: 0; }
.product-filter-form .product-search-control input {
    width: 100%;
    max-width: none;
}
.locked-table-action {
    display: inline-flex;
    min-width: max-content;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid #dce3df;
    border-radius: 9px;
    color: #6e7b74;
    background: #f6f8f7;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}
.locked-table-action .icon { width: 15px; height: 15px; }

.action-device { border-color: #cddbea; background: #f1f6fb; color: #3c648a; }
.action-device:hover { border-color: #93b4d4; background: #e7f0f9; color: #294f74; }
.full-width-button { width: 100%; justify-content: center; margin-top: 16px; }

.device-page-actions { align-items: center; }
.device-management-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}
.device-overview-panel,
.device-revoke-panel { margin: 0; }
.device-activation-card {
    max-width: none;
    grid-column: 1 / -1;
}
.device-revoke-panel { grid-column: 1 / -1; }
.device-detail-list { display: grid; margin: 0; }
.device-detail-list > div {
    display: flex;
    min-width: 0;
    justify-content: space-between;
    gap: 20px;
    padding: 11px 0;
    border-bottom: 1px solid #e8eeeb;
}
.device-detail-list > div:last-child { border-bottom: 0; }
.device-detail-list dt { color: var(--muted); font-size: 12px; }
.device-detail-list dd {
    min-width: 0;
    margin: 0;
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
    overflow-wrap: anywhere;
    text-align: right;
}
.device-state-dot {
    flex: 0 0 11px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #a9b4ae;
    box-shadow: 0 0 0 5px rgba(116,132,123,.1);
}
.device-state-dot.online { background: #42a76f; box-shadow: 0 0 0 5px rgba(66,167,111,.12); }
.device-state-dot.waiting { background: #e1b24d; box-shadow: 0 0 0 5px rgba(225,178,77,.13); }
.device-empty-state {
    display: grid;
    min-height: 214px;
    place-items: center;
    align-content: center;
    gap: 8px;
    color: var(--muted);
    text-align: center;
}
.device-empty-state > span {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 15px;
    background: var(--green-50);
    color: var(--green-700);
}
.device-empty-state > span .icon { width: 25px; height: 25px; }
.device-empty-state strong { color: var(--ink); font-size: 14px; }
.device-empty-state p { margin: 0; font-size: 12px; }
.device-form-fields { grid-template-columns: minmax(0, 1fr); }
.device-issue-form {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    align-items: end;
    gap: 12px;
}
.device-issue-form .button { min-height: 50px; }
.account-status-note.pending { border-color: #ead9aa; background: #fffaf0; }
.account-status-note.pending > .icon { color: #a77817; }
.device-revoke-panel .panel-note { margin-bottom: 16px; }
.device-revoke-form {
    display: grid;
    grid-template-columns: minmax(240px, 360px) auto;
    align-items: end;
    gap: 12px;
}
.device-revoke-form .button { min-height: 50px; }

@media (max-width: 1280px) and (min-width: 901px) {
    .topbar-user-copy { display: none; }
    .topbar-tools { gap: 8px; }
}

@media (max-width: 1050px) {
    .product-toolbar { align-items: stretch; flex-direction: column; }
    .product-filter-form { width: 100%; }
    .device-management-grid { grid-template-columns: 1fr; }
    .device-activation-card,
    .device-revoke-panel { grid-column: auto; }
}

@media (max-width: 700px) {
    .sync-detail-list { grid-template-columns: 1fr; }
    .sync-detail-list > div,
    .sync-detail-list > div:nth-child(-n+2) { border-top: 1px solid #e8eeeb; }
    .sync-detail-list > div:first-child { border-top: 0; }
    .sync-detail-list > div:nth-child(even) { border-left: 0; }
    .sync-dialog-actions { align-items: stretch; flex-direction: column; }
    .sync-dialog-actions > small { max-width: none; }
    .sync-dialog-actions > :last-child { margin-left: 0; }
    .sync-dialog-actions .button { width: 100%; }
    .product-filter-form { grid-template-columns: 1fr; }
    .device-issue-form,
    .device-revoke-form { grid-template-columns: 1fr; }
}

/* Device-specific receipt and label printer setup. */
.printer-settings-stack { display: grid; gap: 18px; }
.printer-connection-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 26px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, #073b2e, #0b5b45);
    box-shadow: 0 18px 45px rgba(8,59,46,.18);
}
.printer-connection-hero > div { display: flex; min-width: 0; align-items: center; gap: 17px; }
.printer-hero-icon { display: grid; flex: 0 0 54px; width: 54px; height: 54px; place-items: center; border-radius: 15px; background: rgba(255,255,255,.12); }
.printer-hero-icon .icon { width: 27px; height: 27px; }
.printer-connection-hero small { color: #acd2c3; font-size: 10px; font-weight: 850; letter-spacing: .13em; }
.printer-connection-hero h2 { margin: 3px 0 5px; font-size: 22px; letter-spacing: -.025em; }
.printer-connection-hero p { max-width: 790px; margin: 0; color: #d3e8df; font-size: 12px; line-height: 1.55; }
.printer-runtime-badge { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid rgba(255,255,255,.17); border-radius: 999px; color: #e7f5ef; font-size: 11px; font-weight: 800; }
.printer-runtime-badge > span { width: 8px; height: 8px; border-radius: 50%; background: #6fe0a1; box-shadow: 0 0 0 4px rgba(111,224,161,.13); }
.printer-runtime-badge.browser > span { background: #e7bd58; box-shadow: 0 0 0 4px rgba(231,189,88,.14); }

.printer-pairing-panel { padding: 22px; }
.printer-pairing-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 17px; }
.printer-pairing-steps article { display: flex; min-width: 0; align-items: flex-start; gap: 11px; padding: 15px; border: 1px solid #e0e9e4; border-radius: 12px; background: #f8fbf9; }
.printer-pairing-steps article > span { display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center; border-radius: 9px; background: var(--green-700); color: #fff; font-size: 11px; font-weight: 900; }
.printer-pairing-steps strong { display: block; color: var(--ink); font-size: 12px; }
.printer-pairing-steps p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.printer-system-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 15px; }
.printer-system-actions form { margin: 0; }

.printer-profile-form { display: grid; gap: 16px; }
.printer-profile-card { overflow: hidden; }
.printer-profile-heading { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 19px 21px; border-bottom: 1px solid var(--line); background: #fbfcfb; }
.printer-profile-heading h2 { margin: 2px 0 3px; font-size: 17px; }
.printer-profile-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.printer-profile-icon { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 12px; }
.printer-profile-icon.receipt { background: #e8f5ee; color: var(--green-700); }
.printer-profile-icon.label { background: #fff4d8; color: #8a6517; }
.printer-profile-icon .icon { width: 22px; height: 22px; }
.printer-status-pill { padding: 7px 10px; border-radius: 999px; font-size: 10px; font-weight: 850; white-space: nowrap; }
.printer-status-pill.ready { background: #e4f6ec; color: #166f4b; }
.printer-status-pill.pending { background: #f0f3f1; color: #6d7c74; }
.printer-profile-body { display: grid; gap: 16px; padding: 21px; }
.printer-mode-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.printer-mode-option { position: relative; min-width: 0; cursor: pointer; }
.printer-mode-option input { position: absolute; opacity: 0; pointer-events: none; }
.printer-mode-option > span { display: grid; min-height: 104px; grid-template-columns: auto minmax(0, 1fr); align-content: center; column-gap: 11px; padding: 15px; border: 1px solid #dce5e0; border-radius: 12px; background: #fff; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.printer-mode-option .icon { grid-row: 1 / span 2; width: 21px; height: 21px; margin-top: 1px; color: #697b72; }
.printer-mode-option strong { color: var(--ink); font-size: 12px; }
.printer-mode-option small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.printer-mode-option input:checked + span { border-color: var(--green-600); background: var(--green-50); box-shadow: 0 0 0 3px rgba(22,135,91,.08); }
.printer-mode-option input:checked + span .icon { color: var(--green-700); }
.printer-mode-option input:disabled + span { cursor: not-allowed; opacity: .52; }
.printer-field-row { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(300px, 1fr); align-items: end; gap: 12px; }
.label-defaults-row { grid-template-columns: minmax(230px, 1.35fr) minmax(190px, 1fr) minmax(130px, .55fr) minmax(120px, .5fr); }
.printer-auto-option { min-height: 51px; }
.printer-auto-option > span { display: grid; gap: 2px; }
.printer-auto-option small { color: var(--muted); font-size: 10px; font-weight: 500; }
.printer-test-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid #ebefed; }
.printer-test-row > span { color: var(--muted); font-size: 11px; }
.printer-save-bar { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 18px; border: 1px solid #d8e5de; border-radius: 13px; background: rgba(255,255,255,.96); box-shadow: 0 14px 38px rgba(20,53,39,.14); backdrop-filter: blur(10px); }
.printer-save-bar > div { display: grid; gap: 2px; }
.printer-save-bar strong { color: var(--ink); font-size: 12px; }
.printer-save-bar small { color: var(--muted); font-size: 10px; }
.printer-inline-feedback { margin: 0; padding: 0; color: var(--muted); font-size: 11px; }
.printer-inline-feedback:empty { display: none; }
.printer-inline-feedback.success { display: block; padding: 11px 13px; border: 1px solid #bee1cc; border-radius: 10px; background: #effaf3; color: #176b48; }
.printer-inline-feedback.error { display: block; padding: 11px 13px; border: 1px solid #efc4bd; border-radius: 10px; background: #fff3f1; color: #9d2d22; }
.printer-bluetooth-note { display: flex; align-items: flex-start; gap: 12px; padding: 16px 18px; border: 1px solid #e7d6a9; border-radius: 13px; background: #fff9e9; color: #6e571d; }
.printer-bluetooth-note > .icon { flex: 0 0 21px; width: 21px; height: 21px; margin-top: 1px; }
.printer-bluetooth-note strong { display: block; font-size: 12px; }
.printer-bluetooth-note p { margin: 4px 0 0; font-size: 11px; line-height: 1.55; }

.barcode-printer-status { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid #dfe8e3; border-radius: 11px; background: #f7faf8; }
.barcode-printer-status > .icon { width: 19px; height: 19px; color: #7a8981; }
.barcode-printer-status > span { display: grid; gap: 1px; min-width: 0; }
.barcode-printer-status small { color: var(--muted); font-size: 9px; }
.barcode-printer-status strong { overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.barcode-printer-status a { color: var(--green-700); font-size: 10px; font-weight: 800; }
.barcode-printer-status.ready { border-color: #bfe2cd; background: #eff9f3; }
.barcode-printer-status.ready > .icon { color: var(--green-700); }

.receipt-action-buttons form { margin: 0; }
.pos-printer-status { display: flex; max-width: 180px; min-height: 38px; align-items: center; gap: 8px; padding: 6px 9px; border: 1px solid #dce5e0; border-radius: 10px; color: #65746c; background: #f7f9f8; text-decoration: none; }
.pos-printer-status:hover { border-color: #b8ccc1; color: var(--green-700); background: #f0f7f3; }
.pos-printer-status > .icon { flex: 0 0 17px; width: 17px; height: 17px; }
.pos-printer-status > span { display: grid; min-width: 0; gap: 0; }
.pos-printer-status strong,
.pos-printer-status small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pos-printer-status strong { font-size: 9px; }
.pos-printer-status small { color: var(--muted); font-size: 8px; }
.pos-printer-status.ready { border-color: #bfe1cc; color: #176d4a; background: #eff9f3; }
.receipt-direct-feedback { width: min(100%, 560px); min-height: 0; margin: -5px auto 12px; color: #617168; font-size: 11px; text-align: center; }
.receipt-direct-feedback:empty { display: none; }
.receipt-direct-feedback.success { display: block; color: #176b48; }
.receipt-direct-feedback.error { display: block; color: #a52d22; }

@media (max-width: 1100px) {
    .printer-pairing-steps { grid-template-columns: 1fr; }
    .label-defaults-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .printer-connection-hero { align-items: flex-start; flex-direction: column; }
    .printer-runtime-badge { align-self: flex-start; }
    .printer-profile-heading { grid-template-columns: auto minmax(0, 1fr); }
    .printer-status-pill { grid-column: 1 / -1; justify-self: start; }
    .printer-mode-grid,
    .printer-field-row,
    .label-defaults-row { grid-template-columns: 1fr; }
    .printer-system-actions { align-items: stretch; flex-direction: column; }
    .printer-system-actions form,
    .printer-system-actions .button { width: 100%; }
    .printer-save-bar { position: static; align-items: stretch; flex-direction: column; }
    .printer-save-bar .button { width: 100%; }
    .printer-test-row { align-items: stretch; flex-direction: column; }
    .printer-test-row .button { width: 100%; }
    .pos-printer-status { max-width: 40px; padding: 6px 10px; }
    .pos-printer-status > span { display: none; }
}

/* v0.7.0-dev.7.5 — production web/PWA and Android responsive pass. */
html { min-height: 100%; }
body { min-height: 100vh; min-height: 100dvh; }
button,
a,
input,
select,
textarea { touch-action: manipulation; }
textarea { max-width: 100%; font: inherit; }
.app-shell,
.content-shell { min-height: 100vh; min-height: 100dvh; }
.mobile-payment-jump { display: none; }
.pwa-install-button { color: var(--green-700); background: var(--green-50); }
.pwa-install-button:hover { border-color: #b9d9c8; background: #e2f4ea; }

.network-status {
    position: fixed;
    z-index: 120;
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    display: grid;
    max-width: min(380px, calc(100vw - 28px));
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 10px;
    padding: 13px 15px;
    border: 1px solid #e5c36c;
    border-radius: 14px;
    color: #624910;
    background: #fff8df;
    box-shadow: 0 18px 48px rgba(40, 36, 18, .2);
}
.network-status > span {
    grid-row: 1 / span 2;
    width: 10px;
    height: 10px;
    margin-top: 5px;
    border-radius: 50%;
    background: #d79b20;
    box-shadow: 0 0 0 4px rgba(215,155,32,.14);
}
.network-status strong { font-size: 13px; }
.network-status small { margin-top: 2px; color: #806827; font-size: 11px; line-height: 1.4; }

@supports (padding: max(0px)) {
    .sidebar {
        padding-top: max(18px, env(safe-area-inset-top));
        padding-bottom: max(16px, env(safe-area-inset-bottom));
        padding-left: max(16px, env(safe-area-inset-left));
    }
    .page-content { padding-bottom: max(64px, calc(36px + env(safe-area-inset-bottom))); }
}

@media (max-width: 900px) {
    .sidebar { width: min(88vw, 320px); }
    .topbar { min-height: 76px; }
    .pos-app,
    .shift-gate { min-height: 100vh; min-height: 100dvh; }
}

@media (max-width: 700px) {
    body { line-height: 1.5; }
    .topbar {
        gap: 9px;
        padding-top: max(11px, env(safe-area-inset-top));
        padding-right: max(13px, env(safe-area-inset-right));
        padding-left: max(13px, env(safe-area-inset-left));
    }
    .topbar-tools { gap: 5px; }
    .mobile-menu,
    .icon-button,
    .dialog-close,
    .action-icon { min-width: 44px; min-height: 44px; }
    .field input,
    .field select,
    .field textarea,
    .filter-form input,
    .filter-form select,
    .search-control input { font-size: 16px; }
    .page-content {
        padding-right: max(14px, env(safe-area-inset-right));
        padding-left: max(14px, env(safe-area-inset-left));
    }
    .panel { padding: 18px; border-radius: 16px; }
    .dashboard-hero { border-radius: 18px; }
    .dashboard-hero-actions .button { flex: 1 1 150px; }
    .page-tabs { padding-bottom: 3px; overflow-x: auto; scrollbar-width: thin; }

    /* Data-heavy tables become readable cards instead of forcing a 700px canvas. */
    .table-wrap.responsive-table-wrap {
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }
    .responsive-table { width: 100%; min-width: 0; }
    .responsive-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }
    .responsive-table tbody { display: grid; gap: 12px; }
    .responsive-table tbody tr {
        display: block;
        width: 100%;
        padding: 4px 14px;
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: 15px;
        background: #fff;
        box-shadow: var(--shadow);
    }
    .responsive-table td {
        display: grid;
        width: 100%;
        min-width: 0;
        grid-template-columns: minmax(92px, .65fr) minmax(0, 1fr);
        align-items: center;
        gap: 14px;
        padding: 11px 0;
        border-top: 0;
        border-bottom: 1px solid #edf1ee;
        text-align: right;
        overflow-wrap: anywhere;
    }
    .responsive-table td:last-child { border-bottom: 0; }
    .responsive-table td::before {
        color: #78867f;
        content: attr(data-label);
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .08em;
        text-align: left;
        text-transform: uppercase;
    }
    .responsive-table td > * { min-width: 0; }
    .responsive-table td strong,
    .responsive-table td small { text-align: right; }
    .responsive-table .actions-cell,
    .responsive-table .table-actions { min-width: 0; justify-content: flex-end; white-space: normal; }
    .responsive-table .locked-table-action { min-width: 0; white-space: normal; text-align: left; }
    .responsive-table .responsive-empty-row { padding: 0; }
    .responsive-table .responsive-empty-row td {
        display: block;
        padding: 26px 18px;
        border: 0;
        text-align: center;
    }
    .responsive-table .responsive-empty-row td::before { content: none; }

    .dialog {
        width: 100%;
        max-width: none;
        max-height: calc(100dvh - env(safe-area-inset-top));
        margin: auto 0 0;
        overflow-y: auto;
        border-radius: 22px 22px 0 0;
    }
    .dialog-header { padding-top: 18px; }
    .dialog-actions {
        position: sticky;
        bottom: 0;
        z-index: 2;
        padding-bottom: max(18px, calc(12px + env(safe-area-inset-bottom)));
        background: rgba(255,255,255,.97);
        backdrop-filter: blur(12px);
    }

    /* Android portrait POS: compact top bar, card cart, and a clear payment step. */
    .pos-topbar {
        position: sticky;
        top: 0;
        z-index: 18;
        min-height: 64px;
        gap: 6px;
        padding-top: max(8px, env(safe-area-inset-top));
        padding-right: max(9px, env(safe-area-inset-right));
        padding-left: max(9px, env(safe-area-inset-left));
    }
    .pos-topbar-left { min-width: 0; flex: 1; gap: 7px; }
    .pos-topbar-right { flex: 0 0 auto; gap: 5px; }
    .pos-title { min-width: 0; }
    .pos-title strong,
    .pos-title small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .shift-badge { display: none; }
    .pos-topbar-right > .button.secondary {
        width: 44px;
        min-width: 44px;
        min-height: 44px;
        padding: 0;
        font-size: 0;
    }
    .pos-topbar-right > .button.secondary .icon { width: 20px; height: 20px; }
    .pos-shell .page-content { min-height: 100dvh; }
    .pos-workspace { min-height: 0; }
    .pos-catalog {
        min-height: 0;
        grid-template-rows: auto auto auto auto;
        padding: 12px max(12px, env(safe-area-inset-right)) 14px max(12px, env(safe-area-inset-left));
    }
    .pos-search input { padding-right: 14px; }
    .keyboard-hint { display: none; }
    .product-suggestions { max-height: min(50dvh, 360px); }
    .cart-card { min-height: 300px; overflow: visible; }
    .cart-table-wrap { overflow: visible; }
    .cart-table.responsive-table { min-width: 0; }
    .cart-table.responsive-table tbody { padding: 10px; }
    .cart-table.responsive-table tbody tr { box-shadow: none; }
    .cart-table.responsive-table td { grid-template-columns: minmax(76px, .52fr) minmax(0, 1fr); }
    .cart-table.responsive-table .quantity-control,
    .cart-table.responsive-table .remove-item { justify-self: end; }
    .mobile-payment-jump {
        display: grid;
        width: 100%;
        min-height: 52px;
        grid-template-columns: minmax(0, 1fr) auto auto;
        align-items: center;
        gap: 10px;
        padding: 11px 14px;
        border: 0;
        border-radius: 13px;
        color: #fff;
        background: var(--green-900);
        font-size: 13px;
        font-weight: 850;
        text-align: left;
        box-shadow: 0 12px 28px rgba(8,69,50,.2);
    }
    .mobile-payment-jump strong { color: var(--gold); font-size: 14px; }
    .mobile-payment-jump .icon { width: 18px; height: 18px; }
    .mobile-payment-jump:disabled { cursor: not-allowed; opacity: .5; }
    .payment-panel {
        scroll-margin-top: 68px;
        padding: 18px max(14px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    }
    .payment-methods { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .payment-option span { min-height: 64px; grid-template-columns: 1fr; }
    .payment-actions {
        position: sticky;
        bottom: 0;
        z-index: 4;
        margin-right: -4px;
        margin-left: -4px;
        padding: 13px 4px max(8px, env(safe-area-inset-bottom));
        background: linear-gradient(to bottom, rgba(255,255,255,.88), #fff 22%);
    }
    .network-status {
        right: max(10px, env(safe-area-inset-right));
        bottom: max(10px, env(safe-area-inset-bottom));
        left: max(10px, env(safe-area-inset-left));
        max-width: none;
    }
}

@media (max-width: 430px) {
    .pos-title small { display: none; }
    .pos-operator { display: none; }
    .pos-topbar .header-sync-control,
    .pos-printer-status { width: 40px; min-width: 40px; min-height: 40px; }
    .pos-topbar-right > .button.secondary { width: 40px; min-width: 40px; min-height: 40px; }
    .cart-table.responsive-table td { grid-template-columns: 72px minmax(0, 1fr); gap: 9px; }
    .payment-option span { padding-right: 4px; padding-left: 4px; font-size: 11px; }
}

@media (orientation: landscape) and (min-width: 701px) and (max-width: 900px) and (max-height: 600px) {
    .pos-shell .page-content { height: 100dvh; min-height: 0; overflow: hidden; }
    .pos-app { height: 100dvh; min-height: 0; }
    .pos-workspace { min-height: 0; grid-template-columns: minmax(0, 1fr) minmax(300px, 38vw); }
    .pos-catalog { min-height: 0; }
    .payment-panel { overflow-y: auto; border-top: 0; border-left: 1px solid var(--line); }
    .mobile-payment-jump { display: none; }
}

/* v0.7.0-dev.7.6.16 — compact Android WebView presentation.
   Scoped to the native wrapper User-Agent so desktop remains unchanged. */
@media (max-width: 700px) {
    body.android-app {
        overscroll-behavior-y: none;
        background: #f4f7f5;
        font-size: 15px;
    }

    body.android-app .topbar {
        min-height: 68px;
        padding-top: max(8px, env(safe-area-inset-top));
        padding-right: max(10px, env(safe-area-inset-right));
        padding-bottom: 8px;
        padding-left: max(10px, env(safe-area-inset-left));
        border-bottom-color: #e5ebe7;
        box-shadow: 0 3px 14px rgba(18, 61, 48, .045);
    }
    body.android-app .topbar-copy > small { font-size: 8px; letter-spacing: .14em; }
    body.android-app .topbar h1 { margin-top: 1px; font-size: 20px; line-height: 1.12; }
    body.android-app .mobile-menu,
    body.android-app .avatar,
    body.android-app .topbar-tools .header-sync-control {
        width: 40px;
        min-width: 40px;
        height: 40px;
        min-height: 40px;
        border-radius: 12px;
    }
    body.android-app .topbar-user > .icon { display: none; }
    body.android-app .topbar-tools { gap: 4px; }

    body.android-app .page-content {
        padding-top: 14px;
        padding-right: max(12px, env(safe-area-inset-right));
        padding-bottom: max(34px, calc(20px + env(safe-area-inset-bottom)));
        padding-left: max(12px, env(safe-area-inset-left));
    }
    body.android-app .alert,
    body.android-app .desktop-managed-notice { margin-bottom: 12px; padding: 11px 12px; border-radius: 12px; }
    body.android-app .desktop-managed-notice small { line-height: 1.45; }

    body.android-app .dashboard-hero { margin-bottom: 12px; padding: 20px 17px; }
    body.android-app .dashboard-hero h2 { font-size: 26px; }
    body.android-app .dashboard-hero p { font-size: 12px; }
    body.android-app .metric-grid-four { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    body.android-app .metric { min-height: 92px; gap: 10px; padding: 14px; border-radius: 15px; }
    body.android-app .metric-icon { flex-basis: 36px; width: 36px; height: 36px; }
    body.android-app .metric-copy strong { font-size: 24px; }
    body.android-app .metric-copy span { white-space: normal; }

    body.android-app .panel { margin-top: 14px; padding: 15px; border-radius: 15px; box-shadow: 0 8px 26px rgba(17, 57, 43, .055); }
    body.android-app .panel-heading { gap: 10px; margin-bottom: 13px; }
    body.android-app .panel-heading h2 { font-size: 18px; }

    body.android-app .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 2px;
    }
    body.android-app .summary-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
    body.android-app .summary-card {
        min-height: 82px;
        gap: 10px;
        padding: 13px;
        border-radius: 14px;
        box-shadow: 0 7px 22px rgba(17, 57, 43, .045);
    }
    body.android-app .summary-card-icon { flex-basis: 36px; width: 36px; height: 36px; }
    body.android-app .summary-card small { font-size: 9px; letter-spacing: .08em; }
    body.android-app .summary-card strong { font-size: 21px; }

    body.android-app .stock-layout,
    body.android-app .report-layout { gap: 12px; }
    body.android-app .stock-toolbar,
    body.android-app .report-toolbar { gap: 8px; }
    body.android-app .filter-form,
    body.android-app .product-filter-form,
    body.android-app .sales-filter-form {
        gap: 8px;
        padding: 10px;
        border: 1px solid #e1e8e4;
        border-radius: 14px;
        background: #fff;
    }
    body.android-app .filter-form input,
    body.android-app .filter-form select,
    body.android-app .search-control input,
    body.android-app .field input,
    body.android-app .field select,
    body.android-app .field textarea { min-height: 46px; border-radius: 11px; }
    body.android-app .filter-form .button { min-height: 46px; }
    body.android-app .panel-note { line-height: 1.4; }

    body.android-app .responsive-table tbody { gap: 10px; }
    body.android-app .responsive-table tbody tr {
        padding: 3px 12px;
        border-radius: 14px;
        box-shadow: 0 7px 22px rgba(17, 57, 43, .045);
    }
    body.android-app .responsive-table td {
        grid-template-columns: minmax(82px, .58fr) minmax(0, 1fr);
        gap: 10px;
        padding: 9px 0;
    }
    body.android-app .responsive-table td::before { font-size: 8px; letter-spacing: .09em; }
    body.android-app .responsive-table td strong { font-size: 13px; line-height: 1.35; }
    body.android-app .responsive-table td small { font-size: 10px; line-height: 1.4; }
    body.android-app .responsive-table td .button { min-height: 40px; padding: 8px 11px; font-size: 12px; }
    body.android-app .responsive-table .actions-cell { gap: 6px; }
    body.android-app .responsive-table .action-icon { width: 40px; min-width: 40px; height: 40px; min-height: 40px; }

    body.android-app .movement-row {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 9px;
        padding: 11px 0;
    }
    body.android-app .movement-row time { grid-column: 2; justify-self: start; }
    body.android-app .movement-copy strong { font-size: 13px; line-height: 1.45; }
    body.android-app .movement-copy small { font-size: 10px; line-height: 1.45; }

    body.android-app .dialog { max-height: calc(94dvh - env(safe-area-inset-top)); }
    body.android-app .dialog-header,
    body.android-app .dialog-body,
    body.android-app .dialog-actions { padding-right: 16px; padding-left: 16px; }
    body.android-app .dialog-header h2 { font-size: 19px; }
    body.android-app .dialog-actions { gap: 8px; }

    body.android-app .page-tabs { gap: 5px; margin-bottom: 12px; }
    body.android-app .page-tabs a { flex: 0 0 auto; padding: 8px 11px; }
    body.android-app nav[role="navigation"] { margin-top: 14px; }

    body.android-app .sidebar { width: min(84vw, 300px); padding-right: 15px; padding-left: 15px; }
    body.android-app .nav-list { gap: 4px; margin-top: 22px; }
    body.android-app .nav-list a,
    body.android-app .nav-list .nav-form button,
    body.android-app .nav-settings,
    body.android-app .logout-form button { min-height: 44px; }

    body.android-app .login-form-wrap { min-height: 100dvh; padding: max(20px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); }
    body.android-app .login-mobile-brand { margin-bottom: 24px; }
    body.android-app .login-heading h2 { font-size: 29px; }
}

@media (max-width: 380px) {
    body.android-app .metric-grid-four,
    body.android-app .summary-grid { grid-template-columns: 1fr; }
    body.android-app .summary-grid > :last-child:nth-child(odd) { grid-column: auto; }
    body.android-app .topbar-tools .header-sync-control { display: none; }
}

/* v0.7.0-dev.7.6.17 — Android navigation, readable cards, POS, and Bluetooth printer UI. */
.android-only-print { display: none; }

@media (max-width: 700px) {
    body.android-app .topbar {
        position: sticky;
        top: 0;
        z-index: 18;
        display: grid;
        min-height: 64px;
        grid-template-columns: 42px minmax(0, 1fr) auto;
        gap: 10px;
        padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 8px max(12px, env(safe-area-inset-left));
        background: rgba(255,255,255,.97);
        backdrop-filter: blur(14px);
    }
    body.android-app .topbar-copy { overflow: hidden; }
    body.android-app .topbar-copy > small {
        display: block;
        overflow: hidden;
        font-size: 8px;
        letter-spacing: .12em;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    body.android-app .topbar h1 {
        overflow: hidden;
        margin-top: 2px;
        font-size: 18px;
        line-height: 1.15;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    body.android-app .topbar-tools { justify-self: end; gap: 6px; }
    body.android-app .topbar-tools .header-sync-control { display: none; }
    body.android-app .mobile-menu,
    body.android-app .avatar {
        width: 42px;
        min-width: 42px;
        height: 42px;
        min-height: 42px;
    }

    body.android-app .page-content {
        padding: 12px max(12px, env(safe-area-inset-right)) max(32px, calc(18px + env(safe-area-inset-bottom))) max(12px, env(safe-area-inset-left));
    }
    body.android-app .page-actions { gap: 10px; }
    body.android-app .page-actions p { font-size: 13px; line-height: 1.55; }
    body.android-app .page-action-group { display: grid; grid-template-columns: 1fr; gap: 8px; }
    body.android-app .page-action-group .button { width: 100%; min-height: 46px; }

    body.android-app .summary-grid,
    body.android-app .branch-summary { grid-template-columns: 1fr; gap: 10px; }
    body.android-app .summary-card {
        min-height: 84px;
        padding: 14px;
    }
    body.android-app .summary-card > span:last-child { gap: 3px; }
    body.android-app .summary-card small { font-size: 9px; }
    body.android-app .summary-card strong { overflow: hidden; font-size: 20px; text-overflow: ellipsis; }
    body.android-app .summary-card em { font-size: 11px; }

    body.android-app .responsive-table tbody tr { padding: 5px 13px; }
    body.android-app .responsive-table td {
        grid-template-columns: minmax(94px, .68fr) minmax(0, 1fr);
        gap: 12px;
        padding: 10px 0;
    }
    body.android-app .responsive-table td::before {
        align-self: center;
        font-size: 9px;
        line-height: 1.35;
    }
    body.android-app .responsive-table td > strong,
    body.android-app .responsive-table td > code,
    body.android-app .responsive-table td > small,
    body.android-app .responsive-table td > .badge,
    body.android-app .responsive-table td > .active-store-pill,
    body.android-app .responsive-table td > form,
    body.android-app .responsive-table td > .actions-cell,
    body.android-app .responsive-table td > .locked-table-action {
        grid-column: 2;
        justify-self: end;
        max-width: 100%;
        text-align: right;
    }
    body.android-app .responsive-table td > small {
        display: block;
        margin-top: -7px;
        color: #77847d;
        font-size: 11px;
    }
    body.android-app .responsive-table td > strong,
    body.android-app .responsive-table td > code { font-size: 13px; line-height: 1.4; }
    body.android-app .responsive-table .receipt-number {
        display: inline-block;
        overflow-wrap: normal;
        word-break: keep-all;
        white-space: nowrap;
    }
    body.android-app .responsive-table .actions-cell { flex-wrap: nowrap; }

    body.android-app.pos-page .pos-topbar {
        min-height: 60px;
        padding: max(7px, env(safe-area-inset-top)) max(9px, env(safe-area-inset-right)) 7px max(9px, env(safe-area-inset-left));
    }
    body.android-app.pos-page .pos-topbar .header-sync-control { display: none; }
    body.android-app.pos-page .pos-title strong { font-size: 15px; }
    body.android-app.pos-page .pos-title small { font-size: 9px; }
    body.android-app.pos-page .pos-catalog { gap: 10px; padding-top: 10px; }
    body.android-app.pos-page .cart-card { min-height: 220px; }
    body.android-app.pos-page .cart-empty { min-height: 180px; padding: 24px 18px; }
    body.android-app.pos-page .cart-empty small { max-width: 240px; font-size: 11px; line-height: 1.45; }
    body.android-app.pos-page .mobile-payment-jump { min-height: 50px; }
    body.android-app.pos-page .payment-panel { padding-top: 16px; }
    body.android-app.pos-page .payment-panel h2 { font-size: 18px; }

    body.android-app .printer-connection-hero {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
        padding: 18px;
        border-radius: 16px;
    }
    body.android-app .printer-connection-hero > div { align-items: flex-start; gap: 12px; }
    body.android-app .printer-hero-icon { flex-basis: 44px; width: 44px; height: 44px; }
    body.android-app .printer-connection-hero h2 { font-size: 20px; }
    body.android-app .printer-connection-hero p { font-size: 12px; line-height: 1.55; }
    body.android-app .printer-runtime-badge { padding: 7px 10px; }
    body.android-app .android-printer-panel { margin-top: 0; padding: 16px; }
    body.android-app .android-printer-heading { align-items: flex-start; flex-direction: column; }
    body.android-app .android-printer-heading p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
    body.android-app .android-printer-steps { display: grid; gap: 9px; }
    body.android-app .android-printer-steps article {
        display: grid;
        grid-template-columns: 32px minmax(0, 1fr);
        gap: 10px;
        padding: 12px;
        border: 1px solid #e1e9e4;
        border-radius: 12px;
        background: #f8fbf9;
    }
    body.android-app .android-printer-steps article > span {
        display: grid;
        width: 32px;
        height: 32px;
        place-items: center;
        border-radius: 10px;
        color: #fff;
        background: var(--green-700);
        font-weight: 900;
    }
    body.android-app .android-printer-steps strong { display: block; font-size: 13px; }
    body.android-app .android-printer-steps p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
    body.android-app .android-printer-actions,
    body.android-app .android-printer-test-row { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 13px; }
    body.android-app .android-printer-actions .button,
    body.android-app .android-printer-test-row .button { width: 100%; min-height: 46px; }
    body.android-app .android-printer-select { margin-top: 15px; }
    body.android-app .android-printer-feedback { min-height: 20px; margin: 12px 0 0; font-size: 12px; line-height: 1.5; }
    body.android-app .android-printer-feedback.success,
    body.android-app [data-android-print-feedback].success { color: var(--green-700); }
    body.android-app .android-printer-feedback.error,
    body.android-app [data-android-print-feedback].error { color: var(--danger); }
    body.android-app .android-printer-note {
        display: grid;
        grid-template-columns: 20px minmax(0, 1fr);
        gap: 9px;
        margin-top: 14px;
        padding: 11px;
        border-radius: 11px;
        color: #785616;
        background: #fff8e8;
    }
    body.android-app .android-printer-note p { margin: 0; font-size: 11px; line-height: 1.5; }

    body.android-app.android-receipt-page { width: 100%; min-width: 0; padding: 12px; }
    body.android-app.android-receipt-page .receipt-page { width: 100%; min-width: 0; }
    body.android-app.android-receipt-page .receipt-actions { align-items: stretch; flex-direction: column; }
    body.android-app.android-receipt-page .receipt-action-buttons { display: grid; grid-template-columns: 1fr; width: 100%; }
    body.android-app.android-receipt-page .android-only-print { display: inline-flex; }
    body.android-app.android-receipt-page [data-print-page],
    body.android-app.android-receipt-page [data-direct-print-form] { display: none; }
    body.android-app.android-receipt-page .receipt-paper { max-width: 100%; }
    body.android-app.android-receipt-page [data-android-print-feedback] { margin: 10px 0; font-size: 12px; }
}

.payment-empty-state { display: none; }

/* Keep these final overrides after the previous Android pass. */
@media (max-width: 700px) {
    body.android-app .topbar-tools .header-sync-control,
    body.android-app.pos-page .pos-topbar .header-sync-control {
        position: relative;
        display: grid;
        padding: 0;
        place-items: center;
    }
    body.android-app .topbar-tools .header-sync-control {
        width: 42px;
        min-width: 42px;
        max-width: 42px;
        height: 42px;
        min-height: 42px;
        border-radius: 12px;
    }
    body.android-app .topbar-tools .header-sync-copy,
    body.android-app.pos-page .pos-topbar .header-sync-copy { display: none; }
    body.android-app .topbar-tools .header-sync-dot,
    body.android-app.pos-page .pos-topbar .header-sync-dot {
        position: absolute;
        top: 5px;
        right: 5px;
        display: block;
    }
    body.android-app.pos-page .pos-topbar .header-sync-control {
        flex: 0 0 40px;
        width: 40px;
        min-width: 40px;
        max-width: 40px;
        height: 40px;
        min-height: 40px;
        border-radius: 11px;
    }
    body.android-app.pos-page .pos-operator { display: none; }
    body.android-app.pos-page .cart-card { min-height: 156px; }
    body.android-app.pos-page .cart-empty { min-height: 116px; padding: 18px 14px; }
    body.android-app.pos-page .payment-panel {
        margin: 0 max(12px, env(safe-area-inset-right)) max(24px, calc(14px + env(safe-area-inset-bottom))) max(12px, env(safe-area-inset-left));
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: 15px;
        box-shadow: 0 8px 24px rgba(17,57,43,.055);
    }
}

/* Final v0.7.0-dev.7.6.19 overrides: keep POS controls in separate rows. */
.android-sync-label { display: none; }

@media (max-width: 700px) {
    body.android-app.pos-page .pos-app,
    body.android-app.pos-page .shift-gate {
        height: auto;
        min-height: 100dvh;
        grid-template-rows: auto auto;
        align-content: start;
    }
    body.android-app.pos-page .pos-topbar {
        position: sticky;
        top: 0;
        z-index: 20;
        display: grid;
        width: 100%;
        min-height: 0;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 9px max(12px, env(safe-area-inset-left));
        border-bottom: 1px solid var(--line);
        background: rgba(255,255,255,.98);
        box-shadow: 0 4px 14px rgba(17,57,43,.05);
        backdrop-filter: blur(14px);
    }
    body.android-app.pos-page .pos-topbar-left {
        display: grid;
        width: 100%;
        min-width: 0;
        grid-template-columns: 42px minmax(0, 1fr);
        align-items: center;
        gap: 9px;
    }
    body.android-app.pos-page .pos-topbar-left .mobile-menu {
        width: 42px;
        min-width: 42px;
        height: 42px;
        min-height: 42px;
    }
    body.android-app.pos-page .pos-title {
        display: grid;
        min-width: 0;
        gap: 1px;
    }
    body.android-app.pos-page .pos-title strong { font-size: 16px; line-height: 1.2; }
    body.android-app.pos-page .pos-title small {
        display: block;
        overflow: hidden;
        font-size: 10px;
        line-height: 1.25;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    body.android-app.pos-page .shift-badge { display: none; }
    body.android-app.pos-page .pos-topbar-right {
        display: grid;
        width: 100%;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        align-items: stretch;
        gap: 7px;
    }
    body.android-app.pos-page .pos-operator { display: none; }
    body.android-app.pos-page .pos-topbar .header-sync-control,
    body.android-app.pos-page .pos-printer-status,
    body.android-app.pos-page .pos-topbar-right > .button.secondary {
        position: relative;
        display: flex;
        width: 100%;
        min-width: 0;
        max-width: none;
        min-height: 42px;
        height: 42px;
        align-items: center;
        justify-content: center;
        gap: 7px;
        padding: 7px 9px;
        border-radius: 11px;
        font-size: 11px;
        font-weight: 800;
    }
    body.android-app.pos-page .pos-topbar .header-sync-icon {
        flex: 0 0 22px;
        width: 22px;
        height: 22px;
        background: transparent;
    }
    body.android-app.pos-page .pos-topbar .header-sync-icon .icon,
    body.android-app.pos-page .pos-printer-status > .icon,
    body.android-app.pos-page .pos-topbar-right > .button.secondary .icon {
        width: 17px;
        height: 17px;
    }
    body.android-app.pos-page .pos-topbar .header-sync-copy,
    body.android-app.pos-page .pos-topbar .header-sync-dot { display: none; }
    body.android-app.pos-page .android-sync-label { display: inline; }
    body.android-app.pos-page .pos-printer-status > span { display: grid; }
    body.android-app.pos-page .pos-printer-status strong { font-size: 11px; }
    body.android-app.pos-page .pos-printer-status small { display: none; }
    body.android-app.pos-page .pos-topbar-right > .button.secondary { font-size: 11px; }

    body.android-app.pos-page .pos-workspace {
        display: grid;
        min-height: 0;
        grid-template-columns: minmax(0, 1fr);
        grid-auto-rows: max-content;
        align-content: start;
    }
    body.android-app.pos-page .pos-catalog {
        min-height: 0;
        height: auto;
        grid-template-rows: auto auto auto auto;
        align-content: start;
        gap: 10px;
        padding-top: 11px;
    }
    body.android-app.pos-page .pos-search {
        min-height: 46px;
        height: 46px;
        align-items: center;
    }
    body.android-app.pos-page .pos-search .search-control,
    body.android-app.pos-page .pos-search input,
    body.android-app.pos-page .scan-focus-button {
        height: 46px;
        min-height: 46px;
    }
    body.android-app.pos-page .product-suggestions:not(.open) {
        display: none !important;
        height: 0;
        min-height: 0;
        margin: 0;
        padding: 0;
        border: 0;
    }
    body.android-app.pos-page .payment-panel {
        min-height: 0;
        height: auto;
        overflow: visible;
    }
}

@media (max-width: 380px) {
    body.android-app.pos-page .pos-topbar-right { gap: 5px; }
    body.android-app.pos-page .pos-topbar .header-sync-control,
    body.android-app.pos-page .pos-printer-status,
    body.android-app.pos-page .pos-topbar-right > .button.secondary {
        min-height: 40px;
        height: 40px;
        padding-right: 5px;
        padding-left: 5px;
        font-size: 10px;
    }
}
