/* ROK Staff Portal: a clean, light working app. Calm surfaces, one ROK blue for actions, clear figures. */
:root {
    /* Surfaces */
    --bg: #F6F8FA;
    --surface: #FFFFFF;
    --surface-2: #F9FAFB;
    --border: #E3E8EE;
    --border-strong: #CDD5DF;

    /* Text */
    --text: #1A2233;
    --text-2: #556072;
    --text-3: #687385;

    /* ROK blue: actions, links, focus. Navy stays as the brand's darkest tone. */
    --primary: #0072B1;
    --primary-hover: #005E92;
    --primary-soft: #E8F3FA;
    --primary-ring: rgba(0, 114, 177, 0.25);
    --brand-navy: #0B2545;

    /* States */
    --success: #1A7F37; --success-bg: #E7F5EC;
    --warning: #8A5300; --warning-bg: #FFF4DA;
    --danger: #C0262D;  --danger-bg: #FDECEC;

    /* Supplier colours: used only as a small dot, never as a bar */
    --tab-0: #3B82C4; --tab-1: #3E9E6A; --tab-2: #D08A3E; --tab-3: #8A6BC1;
    --tab-4: #C9604C; --tab-5: #3AA6A0; --tab-6: #C5A23F; --tab-7: #7B8794;

    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --radius: 10px;
    --radius-sm: 8px;
    --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
    --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.07), 0 1px 2px rgba(16, 24, 40, 0.04);
    --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.14);
    --header-h: 60px;
    --tap: 44px;

    /* Names older markup and page stylesheets still use */
    --navy: var(--text);
    --navy-2: var(--text-2);
    --navy-ink: var(--text-2);
    --ink: var(--text);
    --ink-2: var(--text-2);
    --ink-3: var(--text-3);
    --ground: var(--bg);
    --page: var(--surface);
    --page-alt: var(--surface-2);
    --rule: var(--border);
    --rule-strong: var(--border-strong);
    --electric: var(--primary);
    --electric-soft: var(--primary-soft);
    --link: var(--primary);
    --good: var(--success); --good-bg: var(--success-bg);
    --warn: var(--warning); --warn-bg: var(--warning-bg);
    --bad: var(--danger);   --bad-bg: var(--danger-bg);
    --good-fg: var(--success); --warn-fg: var(--warning); --bad-fg: var(--danger);
    --font-text: var(--font);
    --font-cond: var(--font);
    --navy-deep: var(--text);
    --navy-med: var(--text-2);
    --electric-blue: var(--primary);
    --primary-blue: var(--primary);
    --heading-blue: var(--text);
    --muted: var(--text-2);
    --panel: var(--surface);
    --panel-alt: var(--surface-2);
    --line: var(--border);
    --line-strong: var(--border-strong);

    --bs-body-font-family: var(--font);
    --bs-body-color: var(--text);
    --bs-body-bg: var(--bg);
    --bs-border-color: var(--border);
    --bs-border-radius: var(--radius-sm);
    --bs-link-color-rgb: 0, 114, 177;
    --bs-link-hover-color-rgb: 0, 94, 146;
}

/* --- Base --- */
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--border-strong) var(--bg); }
body {
    font-family: var(--font);
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
::selection { background: var(--primary-soft); color: var(--text); }
main { flex: 1 0 auto; padding-bottom: 48px; }
main:focus { outline: none; }

h1, .h1 {
    font-weight: 650; font-size: 1.625rem; line-height: 1.2; letter-spacing: -0.015em;
    color: var(--text); margin: 0; text-wrap: balance; overflow-wrap: anywhere;
}
h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 { font-weight: 600; color: var(--text); letter-spacing: -0.005em; line-height: 1.3; }
h2, .h2 { font-size: 1.0625rem; }
h3, .h3, .h4, .h5, h5 { font-size: 1rem; }
.h6, h6 { font-size: 0.9375rem; }
@media (max-width: 575.98px) { h1, .h1 { font-size: 1.375rem; } }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; text-underline-offset: 3px; }
.text-muted { color: var(--text-2) !important; }
.text-electric { color: var(--primary); }
.text-danger { color: var(--danger) !important; }
.small, small { font-size: 0.8125rem; }

/* Part numbers: the same face, slightly heavier, so they're easy to pick out. */
.code { font-weight: 600; color: var(--text); white-space: nowrap; letter-spacing: 0; }
a.code, .code a { color: var(--primary); }

.skip-link {
    position: absolute; left: 16px; top: -80px; z-index: 2000;
    padding: 10px 18px; border-radius: var(--radius-sm);
    background: var(--primary); color: #fff; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn:focus-visible, .form-control:focus-visible, .form-select:focus-visible, .form-check-input:focus-visible, .page-link:focus-visible {
    outline: none; box-shadow: 0 0 0 3px var(--primary-ring);
}

/* --- Header: a white bar --- */
.portal-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 1030;
}
.portal-header .navbar { min-height: var(--header-h); padding: 6px 0; }
.portal-header .navbar-brand img { height: 36px; width: auto; display: block; }
.portal-badge {
    color: var(--text-2); font-weight: 500; font-size: 0.875rem; white-space: nowrap;
    padding-left: 12px; border-left: 1px solid var(--border);
}
.portal-header .navbar-toggler {
    width: var(--tap); height: var(--tap);
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text); background: var(--surface);
}
@media (min-width: 1200px) { .portal-header .navbar-toggler { display: none; } }

.portal-nav .nav-link {
    position: relative;
    display: flex; align-items: center; gap: 10px;
    min-height: 40px;
    padding: 8px 12px !important;
    font-weight: 500; font-size: 0.9375rem;
    color: var(--text-2) !important;
    white-space: nowrap;
    border-radius: var(--radius-sm);
}
.portal-nav .nav-link i { width: 18px; text-align: center; color: var(--text-3); }
.portal-nav .nav-link:hover { color: var(--text) !important; background: var(--surface-2); text-decoration: none; }
.portal-nav .nav-link.active { color: var(--text) !important; font-weight: 600; background: var(--surface-2); }
@media (min-width: 1200px) {
    .portal-nav { gap: 2px; }
    .portal-nav .nav-link i { display: none; }
}

.portal-user-btn {
    display: inline-flex; align-items: center; gap: 8px;
    min-height: 40px; padding: 6px 12px;
    color: var(--text); background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-weight: 500; white-space: nowrap;
}
.portal-user-btn:hover, .portal-user-btn[aria-expanded="true"] { background: var(--surface-2); color: var(--text); }
.portal-user-btn .fa-user-circle { color: var(--text-3); font-size: 1.1rem; }
.portal-role {
    display: inline-block; padding: 1px 8px; border-radius: 999px;
    background: var(--primary-soft); color: var(--primary);
    font-size: 0.75rem; font-weight: 600;
}
.portal-user-menu .dropdown-menu { border-radius: var(--radius); border-color: var(--border); box-shadow: var(--shadow-lg); padding: 6px; }
.dropdown-item { border-radius: 6px; }
.dropdown-item.active, .dropdown-item:active { background: var(--primary-soft); color: var(--text); }

@media (max-width: 1199.98px) {
    .portal-drawer.offcanvas-xl { background: var(--surface); color: var(--text); width: min(320px, 86vw); }
    .portal-drawer .offcanvas-header { min-height: var(--header-h); border-bottom: 1px solid var(--border); }
    .portal-drawer .offcanvas-header .portal-badge { border-left: 0; padding-left: 0; }
    .portal-drawer .btn-close { width: var(--tap); height: var(--tap); }
    .portal-drawer .offcanvas-body { display: flex; flex-direction: column; gap: 2px; padding: 12px; }
    .portal-nav .nav-link { min-height: var(--tap); }
    .portal-nav .nav-link.active { background: var(--primary-soft); color: var(--primary) !important; }
    .portal-nav .nav-link.active i { color: var(--primary); }
    .portal-drawer-section { color: var(--text-3); font-size: 0.8125rem; font-weight: 600; padding: 16px 12px 4px; }
    .portal-drawer-user { margin-top: auto; padding: 14px 12px; border-top: 1px solid var(--border); }
}

/* --- Page head and breadcrumbs --- */
.page-head {
    display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
    gap: 12px 24px; padding: 28px 0 20px;
}
.page-head > div:first-child { min-width: 0; flex: 1 1 320px; }
.page-head p { margin: 6px 0 0; color: var(--text-2); max-width: 72ch; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 575.98px) {
    .page-head { padding: 18px 0 14px; }
    .page-actions { width: 100%; }
    .page-actions > .btn, .page-actions > a.btn { flex: 1 1 auto; }
}
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0 0; padding: 0; list-style: none; font-size: 0.8125rem; color: var(--text-3); }
.page-head .crumbs { margin-top: 0; margin-bottom: 6px; }
.crumbs + .page-head { padding-top: 8px; }
.crumbs li + li::before { content: '/'; margin-right: 6px; color: var(--border-strong); }
.crumbs a { color: var(--text-2); }

/* --- Cards --- */
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
}
.panel-pad { padding: 20px 22px; }
@media (max-width: 575.98px) { .panel-pad { padding: 16px; } }
.panel-title { font-size: 1rem; font-weight: 600; color: var(--text); margin: 0 0 14px; }
.panel + .panel { margin-top: 16px; }
.portal-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-xs); }
.panel-title-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; margin: 0 0 12px; }
.panel-title-row .panel-title { margin: 0; }

/* --- Buttons --- */
.btn {
    border-radius: var(--radius-sm); font-weight: 600; font-size: 0.9375rem;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    white-space: nowrap; min-height: 38px; padding: 7px 14px;
    transition: background-color 0.12s ease-out, border-color 0.12s ease-out, color 0.12s ease-out, box-shadow 0.12s ease-out;
}
.btn-sm { min-height: 32px; padding: 4px 10px; font-size: 0.875rem; }
.btn-lg { min-height: 48px; padding: 10px 20px; font-size: 1rem; }
/* Primary: the main action on screen, in ROK blue. */
.btn-premium { background: var(--primary); color: #fff; border: 1px solid var(--primary); box-shadow: var(--shadow-xs); }
.btn-premium:hover, .btn-premium:focus { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-premium:disabled { background: var(--border); border-color: var(--border); color: var(--text-3); box-shadow: none; }
/* Secondary: everything else. */
.btn-outline-premium, .btn-navy {
    background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); box-shadow: var(--shadow-xs);
}
.btn-outline-premium:hover, .btn-navy:hover, .btn-navy:focus { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); }
.btn-navy:disabled { background: var(--surface-2); color: var(--text-3); }
.btn-on-navy { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); }
.btn-on-navy:hover, .btn-on-navy:focus { background: var(--surface-2); color: var(--text); }
.btn-quiet { background: transparent; border: 1px solid transparent; color: var(--primary); box-shadow: none; }
.btn-quiet:hover { background: var(--primary-soft); color: var(--primary-hover); }
.btn-danger-quiet, .btn-outline-danger { background: var(--surface); border: 1px solid var(--border-strong); color: var(--danger); box-shadow: var(--shadow-xs); }
.btn-danger-quiet:hover, .btn-outline-danger:hover { background: var(--danger-bg); border-color: #F2B8BB; color: var(--danger); }

@media (pointer: coarse) {
    .btn, .form-control, .form-select { min-height: var(--tap); }
    .btn-sm { min-height: 40px; padding-left: 12px; padding-right: 12px; }
    .form-check-input { width: 1.35em; height: 1.35em; }
    .page-link { min-width: var(--tap); min-height: var(--tap); display: flex; align-items: center; justify-content: center; }
}

/* --- Forms --- */
.form-label, legend.form-label { color: var(--text); font-weight: 600; font-size: 0.875rem; margin-bottom: 6px; }
.form-text { color: var(--text-2); font-size: 0.8125rem; }
.form-control, .form-select {
    border-color: var(--border-strong); border-radius: var(--radius-sm);
    font-size: 0.9375rem; color: var(--text); background-color: var(--surface);
    min-height: 40px; box-shadow: var(--shadow-xs);
}
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.form-control::placeholder { color: var(--text-3); }
.form-control-lg { font-size: 1.0625rem; min-height: 52px; }
.form-check-input { border-color: var(--text-2); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.input-group-text { background: var(--surface-2); border-color: var(--border-strong); color: var(--text-2); }
.form-section + .form-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.invalid-feedback { font-size: 0.8125rem; color: var(--danger); }
.form-control.is-invalid, .form-select.is-invalid { border-color: var(--danger); }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 20px; }
@media (max-width: 575.98px) { .form-actions > .btn { flex: 1 1 100%; } }
.d-flex > .form-control, .d-flex > .form-select, .input-group > .form-control { min-width: 0; }

/* --- Filter bar --- */
.filter-bar { padding: 16px; margin-bottom: 16px; }
.filter-bar .row { --bs-gutter-y: 10px; }
.filter-toggle { display: none; }
@media (max-width: 767.98px) {
    .filter-toggle { display: inline-flex; }
    .filter-extra:not(.show) { display: none; }
}

/* --- Badges --- */
.badge-soft {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 9px; border-radius: 999px;
    font-size: 0.75rem; font-weight: 600; line-height: 1.5; white-space: nowrap;
    background: #EEF1F5; color: var(--text-2);
}
.badge-soft.is-good { background: var(--success-bg); color: var(--success); }
.badge-soft.is-warn { background: var(--warning-bg); color: var(--warning); }
.badge-soft.is-bad { background: var(--danger-bg); color: var(--danger); }

/* --- Stock: a simple status pill whose words say the state --- */
.stock-mark {
    display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
    padding: 2px 9px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600;
    background: var(--success-bg); color: var(--success);
}
.stock-mark::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.stock-mark.is-low { background: var(--warning-bg); color: var(--warning); }
.stock-mark.is-out { background: var(--danger-bg); color: var(--danger); }
.stock-mark.is-unknown { background: #EEF1F5; color: var(--text-2); }

/* --- Tables --- */
.table-card { overflow: hidden; }
.portal-table { margin: 0; font-size: 0.9375rem; --bs-table-bg: transparent; --bs-table-color: var(--text); }
.portal-table thead th {
    background: var(--surface-2);
    color: var(--text-2);
    font-weight: 600; font-size: 0.8125rem;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
    padding: 10px 14px;
    position: sticky; top: 0; z-index: 1;
}
.portal-table td { vertical-align: middle; padding: 12px 14px; border-color: var(--border); }
.portal-table tbody tr:last-child td { border-bottom: 0; }
.portal-table .num, .portal-table td.text-end, .portal-table th.text-end { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.portal-table .col-desc { min-width: 220px; }
.portal-table .sub { display: block; font-size: 0.8125rem; color: var(--text-2); }
.portal-table tr.is-inactive td { color: var(--text-2); }
.portal-table tfoot th, .portal-table tfoot td { border-bottom: 0; padding-top: 8px; padding-bottom: 8px; }
.portal-table tfoot tr:first-child th, .portal-table tfoot tr:first-child td { border-top: 1px solid var(--border); }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: var(--surface-2); }
.table-warning { --bs-table-bg: #FFFBF0; }
.table-scroll { max-height: 480px; overflow: auto; }

/* Supplier: a small coloured dot beside the name. No bars on rows. */
.tabbed { position: relative; }
.tab-0 { --tab: var(--tab-0); } .tab-1 { --tab: var(--tab-1); } .tab-2 { --tab: var(--tab-2); } .tab-3 { --tab: var(--tab-3); }
.tab-4 { --tab: var(--tab-4); } .tab-5 { --tab: var(--tab-5); } .tab-6 { --tab: var(--tab-6); } .tab-7 { --tab: var(--tab-7); }
.tab-label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8125rem; color: var(--text-2); }
.tab-label::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--tab, var(--border-strong)); flex: 0 0 auto; }

@media (max-width: 767.98px) {
    .table-stack thead { display: none; }
    .table-stack, .table-stack tbody, .table-stack tfoot, .table-stack tr, .table-stack td, .table-stack th { display: block; width: 100%; }
    .table-stack tr { padding: 14px 16px; border-bottom: 1px solid var(--border); }
    .table-stack tbody tr:last-child { border-bottom: 0; }
    .table-stack td, .table-stack th { border: 0; padding: 3px 0; text-align: left !important; display: flex; gap: 12px; justify-content: space-between; align-items: baseline; }
    .table-stack td[data-label]::before { content: attr(data-label); flex: 0 0 auto; color: var(--text-2); font-size: 0.8125rem; font-weight: 600; }
    .table-stack td.stack-main { display: block; font-size: 1rem; padding-bottom: 6px; }
    .table-stack td.stack-block { display: block; }
    .table-stack td.stack-block::before { display: block; margin-bottom: 4px; }
    .table-stack td:empty { display: none; }
    .table-stack .num { white-space: normal; }
}

/* --- Product and account cards --- */
.item-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.item-card { padding: 16px; display: flex; flex-direction: column; gap: 10px; min-width: 0; container-type: inline-size; }
.item-card-head { display: flex; gap: 12px; align-items: flex-start; }
.item-card-head .form-check-input { margin-top: 3px; flex: 0 0 auto; }
.item-card-title { min-width: 0; flex: 1 1 auto; }
.item-card-title a { font-weight: 600; }
.item-card-desc { font-size: 0.9375rem; overflow-wrap: anywhere; margin-top: 2px; }
.item-card-meta { font-size: 0.8125rem; color: var(--text-2); }
.item-card-side { text-align: right; flex: 0 0 auto; font-size: 0.8125rem; color: var(--text-2); line-height: 1.3; }
.item-card-side strong { display: block; font-size: 1.0625rem; color: var(--text); }
.item-card.is-inactive { opacity: 0.72; }
a.item-card { color: inherit; text-decoration: none; transition: box-shadow 0.12s ease-out, border-color 0.12s ease-out; }
a.item-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0; }
@container (min-width: 560px) { .price-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.price-grid > div { padding: 6px 10px; min-width: 0; background: var(--surface-2); border-radius: var(--radius-sm); }
.price-grid dt { font-size: 0.75rem; color: var(--text-2); font-weight: 600; }
.price-grid dd { margin: 0; font-weight: 600; font-size: 0.9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- Bulk action bar --- */
.bulk-bar {
    position: sticky; bottom: 12px; z-index: 1020;
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
    margin-top: 12px; padding: 10px 12px;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}
.bulk-bar[hidden] { display: none; }
.bulk-bar .form-select { width: auto; flex: 1 1 200px; max-width: 280px; }
.bulk-count { font-weight: 600; margin-right: auto; }

/* --- Home --- */
.portal-hero { padding: 32px 0 8px; }
.portal-hero h1 { margin-bottom: 16px; }
.hero-search { max-width: 720px; }
.hero-search .input-group { box-shadow: var(--shadow-sm); border-radius: var(--radius); }
.hero-search .input-group-text { background: var(--surface); border-color: var(--border-strong); border-right: 0; color: var(--text-3); border-radius: var(--radius) 0 0 var(--radius); }
.hero-search .form-control { border-left: 0; min-height: 52px; font-size: 1.0625rem; box-shadow: none; }
.hero-search .btn { border-radius: 0 var(--radius) var(--radius) 0; min-height: 52px; padding: 0 22px; box-shadow: none; }
.task-list { list-style: none; margin: 0; padding: 0; }
.task-list li + li { border-top: 1px solid var(--border); }
.task-list a { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 10px 4px; color: var(--text); text-decoration: none; }
.task-icon { width: 36px; height: 36px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-2); }
.task-name { font-weight: 600; display: block; }
.task-hint { font-size: 0.8125rem; color: var(--text-2); display: block; }
.task-list .fa-chevron-right { margin-left: auto; color: var(--text-3); }

.job-panel { overflow: hidden; }
.job-panel > .panel-title { margin: 0; padding: 18px 22px 10px; }
.job-index { list-style: none; margin: 0; padding: 0 8px 8px; }
.job-index a {
    display: grid; grid-template-columns: minmax(0, 1fr) auto 16px; align-items: center; gap: 4px 16px;
    min-height: 60px; padding: 10px 14px; border-radius: var(--radius-sm);
    color: var(--text); text-decoration: none;
}
.job-index a:hover { background: var(--surface-2); text-decoration: none; }
.job-text { min-width: 0; display: flex; flex-direction: column; }
.job-name { font-weight: 600; font-size: 0.9375rem; color: var(--text); line-height: 1.3; }
.job-hint { font-size: 0.8125rem; color: var(--text-2); }
.job-figure { font-weight: 600; font-size: 1rem; color: var(--text); text-align: right; line-height: 1.2; white-space: nowrap; }
.job-unit { display: block; font-weight: 400; font-size: 0.75rem; color: var(--text-2); }
.job-go { color: var(--text-3); grid-column: 3; }
.job-index a:hover .job-go { color: var(--text); }
/* The first job leads: a soft blue tile. */
.job-index li.is-lead a { background: var(--primary-soft); min-height: 68px; margin-bottom: 4px; }
.job-index li.is-lead a:hover { background: #DCEDF8; }
.job-index li.is-lead .job-name { color: var(--primary-hover); font-size: 1rem; }
.job-index li.is-lead .job-go { color: var(--primary); }
@media (max-width: 575.98px) { .job-index a { padding: 10px 12px; gap: 4px 12px; } .job-panel > .panel-title { padding: 16px 16px 8px; } }

/* --- Tabs: underline tabs --- */
.seg { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.seg a {
    display: inline-flex; align-items: center; min-height: 40px; padding: 8px 2px;
    font-weight: 500; font-size: 0.9375rem; color: var(--text-2); text-decoration: none;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.seg a:hover { color: var(--text); text-decoration: none; }
.seg a.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* --- Pagination --- */
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; color: var(--text-2); font-size: 0.875rem; }
.pagination { margin: 0; --bs-pagination-border-radius: var(--radius-sm); }
.pagination .page-link { color: var(--text); border-color: var(--border); font-weight: 500; }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); color: #fff; }

/* --- Price editor --- */
.price-editor { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .price-editor { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1400px) { .price-editor { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.price-editor .form-label { display: flex; flex-direction: column; gap: 0; line-height: 1.25; }
.price-editor .form-label small { font-weight: 400; color: var(--text-2); font-size: 0.8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price-editor .form-control { text-align: right; }
.price-view { font-size: 1.125rem; font-weight: 600; }
.stock-figure { font-size: 2rem; font-weight: 650; line-height: 1.1; letter-spacing: -0.01em; }

/* --- Definition lists --- */
.facts { display: grid; grid-template-columns: minmax(110px, max-content) 1fr; gap: 8px 16px; margin: 0; }
.facts dt { color: var(--text-2); font-weight: 500; font-size: 0.875rem; }
.facts dd { margin: 0; overflow-wrap: anywhere; }

/* --- Stacked row lists --- */
.row-list { list-style: none; margin: 0; padding: 0; }
.row-list > li { padding: 12px 0; border-top: 1px solid var(--border); }
.row-list > li:first-child { border-top: 0; padding-top: 0; }
.row-list-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.row-list-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }

/* --- Disclosure --- */
details.manage > summary {
    list-style: none; cursor: pointer;
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 36px; padding: 6px 12px;
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    font-weight: 600; font-size: 0.875rem; color: var(--text); background: var(--surface); box-shadow: var(--shadow-xs);
}
details.manage > summary:hover { background: var(--surface-2); }
details.manage > summary::-webkit-details-marker { display: none; }
details.manage > summary::after { content: '\f107'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: 0.75rem; color: var(--text-3); }
details.manage[open] > summary::after { content: '\f106'; }
details.manage > .manage-body { margin-top: 10px; padding: 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); display: grid; gap: 10px; }
@media (pointer: coarse) { details.manage > summary { min-height: var(--tap); } }

/* --- Figures --- */
.stat-row { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; }
@media (min-width: 768px) { .stat-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat-row-2 { max-width: 520px; }
@media (min-width: 768px) { .stat-row.stat-row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { padding: 14px 16px; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-xs); }
.stat-label { display: block; font-size: 0.8125rem; color: var(--text-2); font-weight: 500; }
.stat-value { display: block; font-size: 1.625rem; font-weight: 650; line-height: 1.2; letter-spacing: -0.01em; margin-top: 2px; }

/* --- Auth pages --- */
.auth-card { max-width: 420px; padding: 32px 28px; box-shadow: var(--shadow-sm); }
.auth-card-wide { max-width: 760px; }
.code-input { letter-spacing: 6px; font-size: 1.4rem; text-align: center; }
.mfa-qr { max-width: 220px; border-radius: var(--radius); border: 1px solid var(--border); padding: 8px; background: #fff; }
.mfa-secret { word-break: break-all; }
@media (max-width: 575.98px) { .auth-card { padding: 22px 18px; } }
.portal-bare { background: var(--bg); }

/* --- Footer --- */
.portal-footer { border-top: 1px solid var(--border); background: var(--surface); color: var(--text-3); padding: 14px 0; font-size: 0.8125rem; }

/* --- Alerts --- */
.alert { border-radius: var(--radius); border-width: 1px; font-size: 0.9375rem; }
.alert-warning { background: var(--warning-bg); border-color: #F3D899; color: var(--warning); }
.alert-danger { background: var(--danger-bg); border-color: #F5C2C4; color: var(--danger); }
.alert-success { background: var(--success-bg); border-color: #B7E1C3; color: var(--success); }
.alert-info { background: var(--primary-soft); border-color: #BBDCF0; color: var(--primary-hover); }

/* --- Misc --- */
.empty { padding: 40px 16px; text-align: center; color: var(--text-2); }
.empty i { font-size: 1.5rem; color: var(--border-strong); display: block; margin-bottom: 8px; }
.min-w-0 { min-width: 0; }
.text-prewrap { white-space: pre-line; }

/* Stock availability: the words carry the state; colour backs them up. */
.avail { display: inline-flex; align-items: center; gap: 5px; font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; margin-top: 3px; }
.avail::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.avail.is-in { background: var(--success-bg); color: var(--success); }
.avail.is-low { background: var(--warning-bg); color: var(--warning); }
.avail.is-out { background: var(--danger-bg); color: var(--danger); }
.avail.is-unknown { background: var(--surface-2); color: var(--text-3); border: 1px solid var(--border); }

/* A page embedded in a popup (e.g. a product opened from the Products list): no top bar, tighter top. */
.portal-embed .product-page .crumbs { margin-top: 12px; }

/* A small count beside a heading. */
.count-pill { display: inline-block; min-width: 22px; padding: 1px 7px; margin-left: 4px; border-radius: 999px; background: var(--bg); border: 1px solid var(--border); font-size: 0.8125rem; font-weight: 600; text-align: center; color: var(--text-2); vertical-align: 1px; }
/* Dashboard order cards: red when orders wait to be picked, amber when they wait to be collected, green when none */
.order-card { border-width: 2px; }
.order-card.is-waiting-urgent { border-color: var(--danger); }
.order-card.is-waiting { border-color: var(--warning); }
.order-card.is-clear { border-color: var(--success); }
.order-card.is-waiting-urgent .count-pill { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.order-card.is-waiting .count-pill { background: var(--warning-bg); border-color: var(--warning); color: var(--warning); }
.order-card.is-clear .count-pill { background: var(--success-bg); border-color: var(--success); color: var(--success); }

/* Product suggestions under a search box (product-suggest.js). */
.suggest-wrap { position: relative; min-width: 0; }
.suggest-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 20; max-height: 420px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 4px; min-width: min(560px, 90vw); }
.suggest-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; color: var(--text); }
.suggest-item:hover, .suggest-item[aria-selected="true"] { background: var(--primary-soft); text-decoration: none; color: var(--text); }
.suggest-item .thumb { width: 36px; height: 36px; flex: 0 0 auto; }
.suggest-what { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.suggest-code { font-weight: 650; font-variant-numeric: tabular-nums; }
.suggest-desc { color: var(--text-2); font-size: 0.875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: 0 0 auto; font-size: 0.8125rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.suggest-side .avail { margin: 0; }
.suggest-empty { padding: 10px 12px; color: var(--text-2); font-size: 0.875rem; }

/* Returned items pending inspection (Stock page). */
.inspect-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.inspect-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.inspect-row:last-child { border-bottom: 0; }
.inspect-what { min-width: 0; flex: 1 1 320px; }
.inspect-actions { display: flex; gap: 6px; align-items: center; flex: 0 1 460px; margin: 0; }
.inspect-actions .form-control { min-width: 160px; }
@media (max-width: 575.98px) { .inspect-row { padding: 12px 16px; } .inspect-actions { flex-wrap: wrap; } }

/* Account credit (account page). */
.credit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.credit-grid > div { background: var(--surface); padding: 10px 12px; }
.credit-grid span { display: block; font-size: 0.75rem; color: var(--text-3); }
.credit-grid strong { font-variant-numeric: tabular-nums; font-size: 1.0625rem; }
.credit-grid .is-good strong { color: var(--success); }
.credit-grid .is-bad strong { color: var(--danger); }
.record-payment > summary { list-style: none; display: inline-flex; gap: 6px; }
.record-payment > summary::-webkit-details-marker { display: none; }
.credit-recent { list-style: none; margin: 0; padding: 0; }
.credit-recent li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.is-inactive { opacity: 0.72; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* --- Compact inline edit rows (groups) --- */
.w-code { width: 88px; flex: 0 0 auto; }
.w-sort { width: 76px; flex: 0 0 auto; }
.w-name { flex: 1 1 180px; min-width: 0; max-width: 360px; }
.group-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* --- Product pictures --- */
.thumb {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text-3);
    border: 1px solid var(--border); overflow: hidden;
}
.thumb .pi { width: 62%; height: 62%; }
.thumb.has-photo { background: #fff; }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb-sm { width: 36px; height: 36px; }
.thumb-md { width: 48px; height: 48px; }
.thumb-xl { width: 112px; height: 112px; }

/* --- Group badges --- */
.brand-badge {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
    width: 40px; height: 40px; border-radius: var(--radius-sm);
    background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border);
    font-weight: 600; font-size: 0.8125rem; overflow: hidden;
}
.brand-badge.has-logo { background: #fff; padding: 3px; width: 64px; }
.brand-badge img { width: 100%; height: 100%; object-fit: contain; }

/* --- QR codes and printable labels --- */
.qr-preview { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 4px; flex: 0 0 auto; }
.justify-self-start { justify-self: start; }
.print-label {
    display: flex; align-items: center; gap: 24px;
    max-width: 640px; padding: 24px; margin-top: 8px;
    background: #fff; border: 1px dashed var(--border-strong); border-radius: var(--radius);
}
.print-label-qr { width: 220px; height: 220px; flex: 0 0 auto; }
.print-label-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.print-label-kicker { font-size: 0.8125rem; color: var(--text-2); }
.print-label-title { font-weight: 600; font-size: 1.25rem; line-height: 1.25; overflow-wrap: anywhere; }
.print-label-code { font-size: 1rem; overflow-wrap: anywhere; white-space: normal; }
.print-label-extra { font-weight: 600; }
.print-label-logo { margin-top: 10px; height: 32px; width: auto; align-self: flex-start; }
/* A product label is one image at its real size (100 × 50 mm), so it prints the same as the download. */
.print-label-image { display: block; width: 100mm; max-width: 100%; height: auto; margin-top: 8px; background: #fff; border: 1px dashed var(--border-strong); }
@media (max-width: 575.98px) {
    .print-label { flex-direction: column; align-items: flex-start; }
    .print-label-qr { width: 180px; height: 180px; }
}
@media print {
    .portal-header, .portal-footer, .no-print, .skip-link, .alert { display: none !important; }
    body { background: #fff; }
    main { padding: 0; }
    .print-label { border: 1px solid #000; box-shadow: none; margin: 0; page-break-inside: avoid; }
    .print-label-image { width: 100mm; height: 50mm; max-width: none; margin: 0; border: 0; }
}

/* --- Photo review --- */
.candidate-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.candidate { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.candidate-btn {
    position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 6px;
    background: #fff; border: 2px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer;
    transition: border-color 0.12s ease-out;
}
.candidate-btn img { width: 100%; height: 100%; object-fit: contain; }
.candidate-btn:hover, .candidate-btn:focus-visible { border-color: var(--primary); }
.candidate-use {
    position: absolute; left: 6px; right: 6px; bottom: 6px; padding: 6px; border-radius: var(--radius-sm);
    background: var(--primary); color: #fff; font-weight: 600; font-size: 0.8125rem; opacity: 0; transition: opacity 0.12s ease-out;
}
.candidate-btn:hover .candidate-use, .candidate-btn:focus-visible .candidate-use { opacity: 1; }
@media (hover: none) { .candidate-use { opacity: 1; } }
.candidate-meta { font-size: 0.75rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- Counter sale --- */
.scan-panel { padding: 18px 20px; }
.scan-panel .form-control-lg { min-height: 56px; font-size: 1.125rem; }
.scan-panel .btn { min-height: 56px; padding: 0 24px; }

.total-block { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin: 16px 0 0; }
.total-block dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 0; margin: 0; }
.total-block dd { padding-left: 16px; }
.total-block dt { font-weight: 400; color: var(--text-2); }
.total-block dd { margin: 0; text-align: right; }
.total-block .total-row { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--border); }
.total-block dt.total-row { color: var(--text); font-weight: 600; font-size: 1rem; align-self: end; }
.total-block dd.total-row { font-weight: 700; font-size: 2rem; line-height: 1; letter-spacing: -0.02em; }
.btn-complete { width: 100%; min-height: 56px; font-size: 1.0625rem; }

.sale-line-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 6px; font-size: 0.8125rem; color: var(--text-2); }
.sale-line-desc { overflow-wrap: anywhere; }
.qty-input { width: 5rem; }
.price-input { width: 6.5rem; }
.reason-input { width: 11rem; }
.line-actions { display: inline-flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.line-no { display: inline-block; min-width: 1.6em; margin-right: 4px; font-weight: 500; font-size: 0.8125rem; color: var(--text-3); }

@media (max-width: 767.98px) {
    .sale-table thead { display: none; }
    .sale-table, .sale-table tbody, .sale-table tr, .sale-table td { display: block; width: 100%; }
    .sale-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 12px; padding: 16px; border-bottom: 1px solid var(--border); }
    .sale-table tbody td { padding: 0; border: 0; text-align: left !important; }
    .sale-table td.line-item { grid-column: 1 / -1; }
    .sale-table td.line-qty::before, .sale-table td.line-price::before, .sale-table td.line-total::before {
        content: attr(data-label); display: block; font-size: 0.8125rem; font-weight: 600; color: var(--text-2); margin-bottom: 4px;
    }
    .sale-table td.line-total { grid-column: 2; grid-row: 3; text-align: right !important; font-size: 1.0625rem; align-self: end; }
    .sale-table td.line-actions-cell { grid-column: 1; grid-row: 3; align-self: end; }
    .sale-table .price-input, .sale-table .qty-input, .sale-table .reason-input { width: 100%; }
    .sale-table .line-no { min-width: 0; margin-right: 8px; }
    .line-actions { justify-content: flex-start; }
}

/* Phones: the total and Complete stay within reach at the foot of the screen. */
.sale-bar { display: none; }
@media (max-width: 767.98px) {
    .sale-bar {
        position: sticky; bottom: 0; z-index: 1020;
        display: flex; align-items: center; justify-content: space-between; gap: 12px;
        margin: 16px calc(var(--bs-gutter-x, 1.5rem) * -0.5) -48px;
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        background: var(--surface); color: var(--text);
        border-top: 1px solid var(--border);
        box-shadow: 0 -6px 18px rgba(16, 24, 40, 0.08);
        transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .sale-bar.is-tucked { transform: translateY(110%); }
    .sale-bar-total { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
    .sale-bar-total span { color: var(--text-2); font-size: 0.8125rem; }
    .sale-bar-total strong { font-weight: 700; font-size: 1.5rem; white-space: nowrap; letter-spacing: -0.01em; }
    .sale-bar-go { min-height: 48px; padding: 0 20px; flex: 0 0 auto; }
}

/* --- A trade account waiting for a manager's review --- */
.pending-review { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; border-left: 4px solid var(--warning); background: var(--warning-bg); }
.pending-review strong { color: var(--warning); }
.pending-review.is-info { border-left-color: var(--primary); background: var(--primary-soft); }
.pending-review.is-info strong { color: var(--text); }

/* --- Do not serve: a suspended account staff must be stopped from selling to --- */
.dns-box { padding: 12px 14px; border: 1px solid #F3B8BB; border-radius: var(--radius-sm); background: var(--danger-bg); }
.dns-box .form-check-label { color: var(--danger); }
.dns-banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--radius); background: var(--danger); color: #fff; box-shadow: var(--shadow-sm); }
.dns-banner i { font-size: 1.5rem; }
.dns-banner strong { display: block; font-size: 1.0625rem; text-transform: uppercase; letter-spacing: 0.04em; }
.dns-banner span { display: block; }

/* Trade account page: key facts under the name, the Suspend button, and the suspended banner. */
.acct-head { align-items: flex-end; }
.acct-glance { display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; margin: 12px 0 0; color: var(--text-2); font-size: 0.9375rem; }
.acct-glance li { display: inline-flex; align-items: center; gap: 7px; }
.acct-glance i { color: var(--text-3); font-size: 0.8125rem; }
.acct-head-actions { display: flex; gap: 8px; }
.btn-suspend { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 18px; background: var(--danger); border: 1px solid var(--danger); color: #fff; font-weight: 600; box-shadow: var(--shadow-xs); }
.btn-suspend:hover, .btn-suspend:focus-visible { background: #A11F25; border-color: #A11F25; color: #fff; }
.btn-suspend:focus-visible { box-shadow: 0 0 0 3px rgba(192, 38, 45, 0.3); }
.suspend-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; padding: 16px 20px; border-radius: var(--radius); background: var(--danger); color: #fff; box-shadow: var(--shadow-sm); }
.suspend-banner > i { font-size: 1.75rem; }
.suspend-banner-text { flex: 1 1 280px; min-width: 0; display: grid; gap: 2px; }
.suspend-banner-text strong { font-size: 1.0625rem; text-transform: uppercase; letter-spacing: 0.04em; }
.suspend-banner-text span { font-size: 1rem; overflow-wrap: anywhere; }
.suspend-banner-text small { color: rgba(255, 255, 255, 0.85); }
.btn-unsuspend { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); padding: 0 18px; background: #fff; border: 1px solid #fff; color: var(--danger); font-weight: 600; }
.btn-unsuspend:hover, .btn-unsuspend:focus-visible { background: var(--danger-bg); border-color: var(--danger-bg); color: #A11F25; }
.btn-unsuspend:focus-visible { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.6); }
.suspend-modal .modal-title { display: flex; align-items: center; gap: 10px; color: var(--danger); }
.reason-picks { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.reason-pick { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: 999px; padding: 5px 12px; font-size: 0.875rem; }
.reason-pick:hover { border-color: var(--danger); color: var(--danger); }
.reason-pick[aria-pressed="true"] { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.form-section { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); margin: 8px 0 -4px; padding-top: 12px; border-top: 1px solid var(--border); }
.row > .col-12:first-child > .form-section { border-top: 0; padding-top: 0; margin-top: 0; }
@media (max-width: 575.98px) {
    .acct-head-actions, .acct-head-actions .btn-suspend, .suspend-banner form, .btn-unsuspend { width: 100%; justify-content: center; }
}

/* A trade customer's change request, on their account page */
.change-request { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--warning-bg); }

/* Settings > Emails: one row per email with its switch, who it goes to, Preview and Send a test. */
.email-address { max-width: 460px; }
.email-group-title { margin: 22px 0 2px; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-2); }
.email-list { list-style: none; margin: 0; padding: 0; }
.email-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.email-row-main { flex: 1 1 320px; margin: 0; min-width: 0; }
.email-row-main .form-check-label { line-height: 1.45; }
.email-to { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; background: var(--bg); color: var(--text-2); border: 1px solid var(--border); }
.email-to.is-rok { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.email-row-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
@media (max-width: 575.98px) {
    .email-row-actions { margin-left: 2.5em; }
}
