/* =========================
   LUSH WMS website version 2: same look as the tablet app (app/app.css).
   Phone: < 700px, one column. Wide screens: split screen (form left, list right).
========================= */

:root {
    --ink: #111;
    --muted: #6b6b6b;
    --line: #e4e4e4;
    --paper: #fff;
    --bg: #f4f4f2;
    --accent: #000;
    --good: #1a7f37;
    --bad: #b00020;
    --warn-bg: #fff6dd;
    --radius: 14px;
    --tap: 48px;
    font-family: "Helvetica Neue", Arial, "PingFang TC", "Noto Sans TC", sans-serif;
    color: var(--ink);
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: var(--bg); }
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }

button, input, select, textarea { font: inherit; color: inherit; }
/* Our display rules must never win over the hidden attribute. */
[hidden] { display: none !important; }

/* Same drop-down look in Safari and Chrome: no native gradient, our own arrow. */
select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 40px;
    background-color: var(--paper);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23111' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}
button { cursor: pointer; }
a { color: inherit; }

/* ---------- Header: logo, back, title; language and account on the right ---------- */

.v2-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 8px 16px;
    background: var(--accent);
    color: #fff;
}
.v2-logo { display: block; height: 34px; width: auto; flex: none; margin-right: 6px; }
.v2-title {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.v2-back {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: #fff;
}
.v2-back:hover { background: rgba(255, 255, 255, .28); }

.v2-lang { display: flex; gap: 4px; flex: none; }
.v2-lang a {
    padding: 6px 10px;
    border-radius: 16px;
    color: rgba(255, 255, 255, .7);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}
.v2-lang a.on { background: rgba(255, 255, 255, .18); color: #fff; }

.v2-account { position: relative; flex: none; }
.v2-account summary {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    color: var(--ink);
    font-weight: 800;
    list-style: none;
    cursor: pointer;
}
.v2-account summary::-webkit-details-marker { display: none; }
.v2-menu {
    position: absolute;
    right: 0;
    top: 48px;
    min-width: 200px;
    padding: 8px;
    border-radius: 12px;
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
}
.v2-menu-name { margin: 6px 10px 8px; font-weight: 700; }
.v2-menu form { margin: 0; }
.v2-menu button, .v2-menu a {
    display: block;
    width: 100%;
    padding: 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    text-align: left;
    text-decoration: none;
}
.v2-menu button:hover, .v2-menu a:hover { background: var(--bg); }

.v2-preview {
    padding: 10px 16px;
    background: var(--warn-bg);
    border-bottom: 1px solid #f0dca0;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

/* ---------- Layout ---------- */

.v2-main {
    flex: 1;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px 16px 40px;
}

.v2-card {
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

/* Split screen: form on the left, list on the right; stacked on phones. */
.v2-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
/* minmax(0, …) and min-width: 0 stop a wide table from pushing its column off the page (Safari). */
.v2-split > * { min-width: 0; }
.v2-split > .v2-card { padding: 20px; }

.v2-muted { color: var(--muted); }
.v2-small { font-size: 14px; }
.v2-hello { margin: 0 0 4px; font-size: 18px; }
.v2-stores { margin: 0 0 18px; font-size: 14px; }

/* ---------- Forms and buttons ---------- */

.v2-field { display: block; margin-bottom: 16px; }
.v2-field span { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; color: var(--muted); }
.v2-field input, .v2-field select, .v2-field textarea {
    width: 100%;
    min-height: var(--tap);
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background-color: var(--paper);
    font-size: 17px;
}
.v2-field select { padding-right: 40px; }
.v2-field input:focus, .v2-field select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.v2-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--tap);
    padding: 0 22px;
    border: 0;
    border-radius: calc(var(--tap) / 2);
    background: var(--accent);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}
.v2-btn.secondary { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.v2-btn:disabled { opacity: .4; }
.v2-wide { width: 100%; }

.v2-error { min-height: 1.4em; margin: 0 0 12px; color: var(--bad); font-weight: 700; }

/* ---------- Tables ---------- */

.v2-table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: var(--radius); overflow: hidden; }
.v2-table th, .v2-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.v2-table th { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.v2-table td.num, .v2-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.v2-table tbody tr:hover { background: #fafafa; }

/* ---------- Toolbars, messages, lists ---------- */

.v2-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.v2-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.v2-toolbar .v2-btn { margin-left: auto; }
.v2-store-picker { margin: 0; }
.v2-store-picker select {
    min-width: 220px; min-height: 44px; padding: 0 40px 0 16px; border: 1px solid var(--line); border-radius: 22px;
    background-color: var(--paper); font-size: 16px; font-weight: 700;
}
.v2-month { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.v2-month span:not(.v2-round) { min-width: 9em; text-align: center; }
.v2-round {
    display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
    background: rgba(45, 45, 55, .82); color: #fff; text-decoration: none;
}
.v2-round svg { display: block; }
.v2-round.off { opacity: .3; }

.v2-flash { margin-bottom: 16px; padding: 14px 18px; border-radius: 12px; font-weight: 700; }
.v2-flash.good { background: #e6f4ea; color: var(--good); }
.v2-flash.bad { background: #fde7e9; color: var(--bad); }
.v2-notice { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: var(--warn-bg); font-weight: 700; }
.v2-empty { padding: 40px 16px; text-align: center; color: var(--muted); }
.v2-h2 { margin: 0 0 12px; font-size: 18px; }

.v2-search {
    width: 100%; min-height: var(--tap); margin-bottom: 12px; padding: 0 18px;
    border: 1px solid var(--line); border-radius: calc(var(--tap) / 2); background: var(--paper); font-size: 16px;
}
.v2-table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.v2-table.compact th, .v2-table.compact td { padding: 8px 6px; }
.v2-table.dense th, .v2-table.dense td { padding: 10px 8px; font-size: 15px; }
.v2-table.dense th { font-size: 12px; }
.v2-table tfoot td { font-weight: 800; border-bottom: 0; }
.v2-table .nowrap { white-space: nowrap; }
.v2-table form { margin: 0; }
.v2-sub { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.v2-pill { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.v2-pill.good { background: #e6f4ea; color: var(--good); }
.v2-pill.wait { background: var(--warn-bg); color: #7a5a00; }
.v2-icon-btn { width: 36px; height: 36px; border: 0; border-radius: 50%; background: #eee; font-size: 14px; }
.v2-icon-btn:hover { background: #fde7e9; color: var(--bad); }

.v2-hint { display: block; min-height: 1.3em; margin-top: 6px; font-size: 14px; font-weight: 700; color: var(--good); }
.v2-hint.bad { color: var(--bad); }
.v2-line { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.v2-line > div { flex: 1; min-width: 0; }
.v2-line b { display: block; }
.v2-line small { color: var(--muted); }
.v2-line-qty { font-size: 18px; font-weight: 800; }
#submit-form .v2-btn { margin-top: 16px; }
.v2-rule { margin: 6px 0 18px; border: 0; border-top: 1px solid var(--line); }

/* Toolbar of three: left / centre / right, the middle always centred. */
.v2-toolbar.three { display: grid; grid-template-columns: 1fr auto 1fr; }
.v2-toolbar.three > :last-child { justify-self: end; }
.v2-toolbar.three .v2-btn { margin-left: 0; }
.v2-month.big { gap: 14px; font-size: 22px; }
.v2-month.big .v2-round { width: 52px; height: 52px; }
.v2-month.big span:not(.v2-round) { min-width: 8.5em; }

/*
 * Two panes of the same height that scroll on their own (wide screens), filling
 * the screen below the toolbar (v2.js sets --pane-h); headings stay in view.
 * Both tables use the same cell padding, flush with their box.
 */
.v2-split.panes { align-items: stretch; }
.v2-split.panes > .v2-card {
    display: flex; flex-direction: column; min-width: 0; padding: 0; overflow: hidden;
}
.v2-pane-head { flex: none; padding: 14px 14px 10px; }
.v2-pane-head .v2-h2 { margin: 0 0 2px; }
.v2-pane-head p { margin: 0; }
.v2-pane-head .v2-search { margin: 0; }
.v2-pane-head .v2-chip { margin: 10px 0 0; }
.v2-pane-head .v2-notice { margin: 10px 0 0; }
.v2-scroll { flex: 1; min-height: 0; overflow: auto; }
.v2-scroll .v2-table { border-radius: 0; }
.v2-scroll .v2-table th, .v2-scroll .v2-table td { padding: 10px 14px; }
.v2-scroll thead th { position: sticky; top: 0; z-index: 1; background: var(--paper); }
@media (min-width: 701px) {
    .v2-split.panes > .v2-card { height: var(--pane-h, calc(100vh - 300px)); min-height: 360px; }
}

/* Received / Sent switch, facts row, foot of a pane, rows that open something. */
.v2-segmented { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; justify-self: start; padding: 4px; border-radius: 24px; background: #e7e7e5; }
.v2-segmented a { padding: 10px 18px; white-space: nowrap; border-radius: 20px; text-align: center; font-weight: 700; text-decoration: none; color: var(--muted); }
.v2-segmented a.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.v2-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin: 0 0 12px; }
.v2-facts div { padding: 8px 10px; border-radius: 10px; background: var(--bg); }
.v2-facts small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.v2-facts b { font-size: 16px; }
.v2-pane-foot { position: sticky; bottom: 0; padding: 12px 14px; background: var(--paper); border-top: 1px solid var(--line); }
.v2-link-row { cursor: pointer; }
.v2-link-row a { text-decoration: none; }
.v2-link-row.on td { background: #6b6b6b; color: #fff; }
.v2-link-row.on .v2-sub, .v2-link-row.on a { color: #fff; }
.v2-link-row.on .v2-pill { background: #fff; color: #333; }
.v2-h2 .v2-pill { margin-left: 8px; vertical-align: middle; }
.v2-qty-input { width: 90px; min-height: 40px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; text-align: right; font-size: 16px; }
.v2-qty-input[readonly] { background: var(--bg); color: var(--muted); }
.v2-bad { color: var(--bad); font-weight: 800; }
.v2-only-phone { display: none; }

/* Stock Check lines. */
.v2-toolbar-title { text-align: center; }
.v2-toolbar-title b { display: block; font-size: 20px; }
.v2-count { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.v2-count-main { flex: 1 1 220px; min-width: 0; }
.v2-count-act { flex: 0 1 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.v2-count-msg { margin: 6px 0 0; font-weight: 700; }
.v2-count-msg:empty { display: none; }
.v2-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.v2-row .v2-btn { min-height: 40px; padding: 0 16px; font-size: 15px; }
.v2-input { min-height: 40px; min-width: 160px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 16px; }

/* A single centred box (Staff Check, Change password). */
.v2-narrow { max-width: 480px; margin: 4vh auto 0; padding: 24px; }
.v2-code { margin-top: 20px; padding: 18px; border-radius: 12px; background: var(--bg); text-align: center; }
.v2-code small { display: block; color: var(--muted); font-weight: 700; }
.v2-code b { display: block; margin-top: 6px; font-size: 56px; letter-spacing: 12px; }

/* Users & Tablets form. */
.v2-user-form { display: flex; flex-direction: column; }
.v2-form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; margin: 0; padding: 0 14px; border: 0; }
.v2-block { margin: 0 14px 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.v2-block legend { padding: 0 6px; font-weight: 800; }
.v2-block p { margin: 0 0 10px; }
.v2-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.v2-check { display: inline-flex; align-items: center; gap: 6px; padding: 4px 0; cursor: pointer; }
.v2-check input { width: 18px; height: 18px; }
.v2-matrix { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 18px; }
.v2-matrix > div { display: flex; flex-direction: column; min-width: 0; }
.v2-env-perm { padding: 4px 0; min-width: 0; }
.v2-env-perm small { display: block; overflow-wrap: anywhere; }
.v2-matrix b { margin-bottom: 2px; font-size: 13px; color: var(--muted); text-transform: uppercase; }
.v2-templates { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.v2-chip.light { margin: 0; background: var(--bg); color: var(--ink); border: 1px solid var(--line); cursor: pointer; }
.v2-chip.light:hover { background: #111; color: #fff; }
.v2-pane-foot.v2-row { justify-content: space-between; }
.v2-btn.danger { color: var(--bad); border-color: #f3c3c9; }
.v2-pill.bad { background: #fde7e9; color: var(--bad); }
fieldset[disabled] { opacity: .7; }

/* Recipes and manufacturing records. */
.v2-h3 { margin: 18px 14px 6px; font-size: 15px; color: var(--muted); text-transform: uppercase; }
#submit-form .v2-h3 { margin: 18px 0 6px; }
.v2-pad { padding: 0 14px; }
.v2-row.v2-left { justify-content: flex-start; align-items: center; }
.v2-inline { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.v2-total { margin-bottom: 8px; padding: 12px 14px; border-radius: 10px; background: #fde7e9; color: var(--bad); font-weight: 800; }
.v2-total.good { background: #e6f4ea; color: var(--good); }
.v2-form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.v2-top-gap { margin-top: 16px; }
.v2-field textarea { min-height: 70px; padding: 10px 14px; }
.v2-lot { display: inline-block; margin: 0 6px 4px 0; padding: 2px 8px; border-radius: 8px; background: var(--bg); font-size: 13px; white-space: nowrap; }
.v2-print-only { display: none; }
@media print {
    .v2-header, .v2-preview, .v2-ai, .v2-no-print, .v2-flash { display: none !important; }
    body, .v2-main { background: #fff; padding: 0; max-width: none; }
    .v2-split.panes { display: block; }
    .v2-split.panes > .v2-card { height: auto !important; box-shadow: none; overflow: visible; }
    .v2-scroll { overflow: visible; max-height: none; }
    .v2-print-only { display: block; }
}

/* New batch and sign-off steps. */
.v2-batch-pick { margin-bottom: 16px; padding: 14px 14px 0; }
.v2-batch-pick .v2-field { min-width: 180px; flex: 1 1 180px; }
.v2-batch-pick .v2-btn { margin-bottom: 16px; }
.v2-batch-pick > p { margin: 0 0 16px; }
.v2-batch-weigh { overflow: hidden; }
.v2-lot-row { display: flex; gap: 6px; margin-bottom: 6px; }
.v2-lot-row .v2-input { min-width: 0; flex: 1; }
.v2-link-btn { padding: 4px 0; border: 0; background: none; color: var(--ink); font-weight: 700; text-decoration: underline; cursor: pointer; }
.v2-note-input { width: 100%; margin-top: 6px; }
.v2-note-input.need { border-color: var(--bad); background: #fff6f7; }
.v2-pin { width: 120px; letter-spacing: 8px; text-align: center; }
.v2-grow { flex: 1 1 260px; }
.v2-step { margin: 16px 14px; padding: 12px 14px; border: 2px solid #111; border-radius: 12px; }
.v2-step .v2-h3 { margin: 0 0 10px; color: var(--ink); }

/* Clickable summary rows (filter the list) and the "showing: …" chip. */
.v2-pick { cursor: pointer; }
.v2-pick:hover td { background: #f6f6f4; }
.v2-pick.on td { background: #111; color: #fff; }
.v2-chip {
    display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 8px 14px;
    border: 0; border-radius: 18px; background: #111; color: #fff; font-weight: 700;
}

/* Sortable headings. */
th[data-sort] { cursor: pointer; user-select: none; white-space: nowrap; }
th[data-sort]::after { content: ' ↕'; opacity: .35; }
th[aria-sort="ascending"]::after { content: ' ▲'; opacity: .8; }
th[aria-sort="descending"]::after { content: ' ▼'; opacity: .8; }
.v2-table .v2-col-reason { min-width: 170px; }
/* Narrower columns, so a list fits half the screen (Order History). */
.v2-scroll .v2-table.tight th, .v2-scroll .v2-table.tight td { padding: 10px 8px; }
.v2-scroll .v2-table.tight th:first-child, .v2-scroll .v2-table.tight td:first-child { padding-left: 14px; }
.v2-table.tight .v2-pill { padding: 3px 8px; }

/* ---------- Sign-in page, over the bath art like the app's PIN screen ---------- */

body.login-bg { background: #1b2b3a url("../app/bath-art.jpg") center / cover no-repeat fixed; }
body.login-bg .v2-header {
    background: rgba(0, 0, 0, .28);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}
.v2-login { max-width: 420px; margin: 8vh auto 0; padding: 28px; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
.v2-login h2 { margin: 0 0 18px; font-size: 26px; }
.v2-login .v2-small { margin: 16px 0 0; }

.v2-message { max-width: 480px; margin: 8vh auto 0; padding: 28px; text-align: center; }
.v2-message h2 { margin: 0 0 8px; }
.v2-message p { margin: 0 0 20px; }

.v2-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
           margin-bottom: 18px; padding: 16px 20px; }
.v2-note p { margin: 0; }

/* ---------- Home tiles ---------- */

.v2-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.v2-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 170px;
    padding: 24px 18px 20px;
    border-radius: var(--radius);
    background: var(--paper);
    text-align: center;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}
a.v2-tile:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, .12); }
.v2-tile .ico { display: flex; align-items: center; justify-content: center; height: 52px; font-size: 42px; line-height: 1; }
.v2-tile b { display: block; margin-top: 12px; font-size: 20px; }
.v2-tile small { margin-top: 4px; color: var(--muted); }
.v2-tile.soon { opacity: .45; }
.v2-tile .soon-tag {
    position: absolute; top: 14px; right: 14px;
    padding: 3px 9px; border-radius: 10px;
    background: #eee; font-size: 12px; font-weight: 700;
}

/* ---------- "Made with the help of AI" strip ---------- */

.v2-ai {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 8px 16px; background: #000;
    color: #a3a3a3; font-size: 11px; font-weight: 700; text-align: center;
}
.v2-ai img { height: 20px; width: auto; opacity: .8; flex: none; }
body.login-bg .v2-ai { background: rgba(0, 0, 0, .55); }

/* ---------- Phones ---------- */

@media (max-width: 700px) {
    .v2-header { gap: 8px; padding: 8px 10px; }
    .v2-logo { height: 26px; margin-right: 0; }
    .v2-title { font-size: 17px; }
    .v2-split { grid-template-columns: 1fr; }
    .v2-tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
    .v2-tile { min-height: 120px; padding: 14px; }
    .v2-tile b { font-size: 16px; }
    .v2-login { margin-top: 4vh; padding: 22px; }
    .v2-toolbar .v2-btn { margin-left: 0; width: 100%; }
    .v2-toolbar.three { grid-template-columns: 1fr; }
    .v2-toolbar.three > * { justify-self: stretch; }
    .v2-store-picker select { width: 100%; }
    .v2-month.big { font-size: 18px; }
    .v2-only-phone { display: inline-block; margin-bottom: 8px; }
    .v2-split.has-detail > :first-child { display: none; }
    .v2-segmented { width: 100%; }
    .v2-segmented a { flex: 1; min-width: 0; }
    .v2-month { width: 100%; justify-content: space-between; }
}

/* Digital Orders */
.v2-toolbar .v2-segmented a { min-width: 0; }
.v2-segmented .count { margin-left: 6px; color: var(--muted); font-weight: 400; }
.v2-toolbar .v2-store-picker { margin-left: auto; }
.v2-issue { margin: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.v2-issue h3 { margin: 0 0 4px; font-size: 16px; }
.v2-issue p { margin: 0 0 10px; }
.v2-issue details { margin-top: 8px; }
.v2-issue summary { font-weight: 700; cursor: pointer; }
.v2-issue form { margin-top: 8px; }

/* Product Audit and purchase orders */
.v2-flagged { background: var(--warn-bg); }
.v2-pad-card { padding: 20px; }
.v2-top-gap { margin-top: 16px; }
.v2-statement { max-width: 640px; }
.v2-indent { padding-left: 28px !important; }

/* Access matrix */
.v2-access-scroll { overflow: auto; max-height: calc(100vh - 340px); min-height: 320px; }
.v2-access .v2-table { width: auto; overflow: visible; border-collapse: separate; border-spacing: 0; }
.v2-access .v2-table th, .v2-access .v2-table td { padding: 8px 6px; text-align: center; }
.v2-access thead { position: sticky; top: 0; z-index: 2; background: var(--paper); }
.v2-access thead th { background: var(--paper); }
.v2-access tr.areas th { height: 30px; border-left: 1px solid var(--line); white-space: nowrap; text-transform: uppercase; }
.v2-access tr.perms th { vertical-align: bottom; text-transform: none; letter-spacing: 0; }
.v2-access tr.perms th span { display: block; margin: 0 auto 6px; max-height: 150px; writing-mode: vertical-rl; transform: rotate(180deg); font-weight: 700; }
.v2-access th:first-child, .v2-access td:first-child { position: sticky; left: 0; z-index: 1; min-width: 180px; background: var(--paper); text-align: left; }
.v2-access thead th:first-child { z-index: 3; }
.v2-access td input[type="checkbox"], .v2-access th input[type="checkbox"] { width: 18px; height: 18px; }
.v2-access td.differs, .v2-access-key { background: var(--warn-bg); }
.v2-access td.changed { outline: 2px solid #111; outline-offset: -2px; }
.v2-access-key { display: inline-block; width: 14px; height: 14px; border: 1px solid var(--line); vertical-align: middle; }

/* A month selector that does not apply to this tab. */
.v2-month-off { opacity: .35; }
.v2-scroll { padding-bottom: 20px; }
@media (max-width: 700px) {
    .v2-segmented { display: flex; flex-wrap: wrap; }
    .v2-segmented a { flex: 1 1 auto; }
}
.v2-narrow { max-width: 480px; margin: 0 auto; }
