/* ============================================================
   TQC FinCore Admin Web - styles
   Uses Tennessee Quick Cash's colors, as in their other web applications:
     Primary orange : #C8501C    Dark orange  : #A3400F    Light orange : #E8652E
     Charcoal       : #1E1E1E    Charcoal 2   : #2E2E2E
     Page           : #F4F4F4    Text         : #333333
   Telerik controls use the Bootstrap skin (Web.config); the overrides near the end
   recolor its buttons, inputs, grid and menu to match.
   ============================================================ */

:root {
    --brand: #c8501c;
    --brand-dark: #a3400f;
    --brand-light: #e8652e;
    --brand-tint: #fbf3ee;
    --brand-focus: rgba(200, 80, 28, 0.18);
    --charcoal: #1e1e1e;
    --charcoal-2: #2e2e2e;
    --text: #333333;
    --muted: #666666;
    --border: #dddddd;
    --border-light: #eeeeee;
    --surface: #ffffff;
    --surface-alt: #fafafa;
    --background: #f4f4f4;
    --ok: #1e8449;
    --ok-bg: #eafaf1;
    --ok-line: #27ae60;
    --bad: #7b241c;
    --bad-bg: #fdecea;
    --bad-line: #c0392b;
    --warn: #7d6608;
    --warn-bg: #fef9e7;
    --warn-line: #f39c12;
    --info: #1a5276;
    --info-bg: #ebf5fb;
    --info-line: #2980b9;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--background);
    accent-color: var(--brand);
}

a {
    color: var(--brand);
}

a:hover,
a:focus {
    color: var(--brand-dark);
}

/* ── Header: white with the TQC logo, orange rule (as in TQC's other apps) ── */
.site-header {
    background: var(--surface);
    padding: 10px 24px;
    border-bottom: 3px solid var(--brand);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 24px;
}

.site-header .brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--text);
    text-decoration: none;
}

.site-header .brand-logo {
    height: 48px;
    width: auto;
    display: block;
}

.site-header .brand-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    padding-left: 14px;
    border-left: 1px solid var(--border);
}

.site-header .brand-sub {
    font-weight: 400;
    color: var(--brand);
}

.user-area {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--muted);
    font-size: 13px;
}

.user-area .user-name {
    color: var(--text);
    font-weight: 600;
}

.user-area .user-link {
    color: var(--muted);
    text-decoration: none;
}

.user-area .user-link:hover,
.user-area .user-link:focus {
    color: var(--brand);
    text-decoration: underline;
}

/* ── Menu bar: charcoal, orange marker on the current page ── */
.site-nav {
    background: var(--charcoal);
}

.site-nav .nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.site-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.site-footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px 32px;
    color: #888888;
    font-size: 12px;
}

h1 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 16px;
    color: var(--text);
}

h2 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
}

.card {
    background: var(--surface);
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    padding: 16px 20px;
    margin-bottom: 20px;
}

.card h2 {
    color: var(--brand);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-light);
}

/* ── System status ── */
.status-table {
    border-collapse: collapse;
    width: 100%;
}

.status-table th,
.status-table td {
    text-align: left;
    padding: 7px 0;
    border-bottom: 1px solid var(--border-light);
    vertical-align: top;
}

.status-table tr:last-child th,
.status-table tr:last-child td {
    border-bottom: none;
}

.status-table th {
    width: 200px;
    font-weight: 600;
    color: var(--muted);
}

.status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 11px;
}

.status-ok {
    color: var(--ok);
    background: var(--ok-bg);
}

.status-bad {
    color: var(--bad);
    background: var(--bad-bg);
}

.status-muted {
    color: var(--muted);
    background: #eeeeee;
}

/* ── Messages ── */
.message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    border-left: 4px solid transparent;
}

.message-info {
    color: var(--info);
    background: var(--info-bg);
    border-left-color: var(--info-line);
}

.message-success {
    color: var(--ok);
    background: var(--ok-bg);
    border-left-color: var(--ok-line);
}

.message-error {
    color: var(--bad);
    background: var(--bad-bg);
    border-left-color: var(--bad-line);
}

.message-warning {
    color: var(--warn);
    background: var(--warn-bg);
    border-left-color: var(--warn-line);
}

/* ── Sign-in and account pages ── */
.auth-card {
    max-width: 440px;
    margin: 32px auto;
    background: var(--surface);
    border-radius: 8px;
    border-top: 4px solid var(--brand);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.12);
    padding: 24px 28px;
}

.auth-card h1 {
    font-size: 22px;
    font-weight: 700;
}

.auth-card-wide {
    max-width: 560px;
}

.auth-intro {
    color: #888888;
    margin: 0 0 16px;
    line-height: 1.5;
}

.auth-links {
    margin: 20px 0 0;
    color: var(--muted);
    font-size: 13px;
}

/* ── Forms ── */
.form-row {
    margin-bottom: 14px;
}

.form-row label,
.field-label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #444444;
    margin-bottom: 5px;
}

.form-actions {
    margin-top: 20px;
}

.text-input {
    width: 100%;
    padding: 7px 10px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: #ffffff;
    border: 1px solid #cccccc;
    border-radius: 4px;
}

.text-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 2px var(--brand-focus);
}

.text-input-short {
    width: auto;
    min-width: 100px;
}

.code-input {
    max-width: 220px;
    font-size: 20px;
    letter-spacing: 3px;
    font-family: Consolas, "Courier New", monospace;
}

.help-text {
    color: #888888;
    font-size: 12px;
    margin-top: 4px;
    line-height: 1.4;
}

.help-warning {
    color: var(--warn);
}

.divider {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 20px 0;
}

.inline-check label {
    margin-left: 6px;
    font-weight: 400;
    display: inline;
}

/* Step 3.13b: a report's option under the stores (Checks Awaiting Deposit: Summary only). */
.report-option {
    margin: 4px 0 14px;
}

/* ── Two-step verification ── */
.steps {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    counter-reset: step;
}

.steps li {
    flex: 1;
    padding: 6px 10px;
    border-radius: 4px;
    background: var(--background);
    color: var(--muted);
    font-size: 13px;
    counter-increment: step;
}

.steps li::before {
    content: counter(step) ". ";
}

.steps li.is-current {
    background: var(--brand);
    color: #ffffff;
    font-weight: 600;
}

.steps li.is-done {
    background: var(--ok-bg);
    color: var(--ok);
}

.qr-wrap {
    text-align: center;
    margin: 12px 0 16px;
}

.qr-code {
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #ffffff;
}

.setup-key {
    display: block;
    font-family: Consolas, "Courier New", monospace;
    font-size: 16px;
    letter-spacing: 1px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 8px 12px;
    word-break: break-all;
}

.recovery-codes {
    columns: 2;
    font-family: Consolas, "Courier New", monospace;
    font-size: 15px;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 12px 12px 12px 36px;
    margin: 12px 0;
}

.recovery-codes li {
    padding: 2px 0;
}

.codes-text {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
}

/* ── Plain buttons (links styled as buttons) ── */
.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.btn {
    display: inline-block;
    padding: 7px 16px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    border: 2px solid var(--brand);
    border-radius: 4px;
    background: transparent;
    color: var(--brand);
    text-decoration: none;
    cursor: pointer;
}

.btn:hover,
.btn:focus {
    background: var(--brand);
    color: #ffffff;
    text-decoration: none;
}

.btn-primary {
    background: var(--brand);
    color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    color: #ffffff;
}

/* ── Setup pages ── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 8px;
}

.page-header h1 {
    margin: 0;
}

.page-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 16px;
}

.page-intro {
    color: var(--muted);
    line-height: 1.5;
    margin: 0 0 16px;
    max-width: 860px;
}

.card-flush {
    padding: 0;
    overflow: hidden;
}

.cell-actions {
    text-align: right;
    white-space: nowrap;
}

.cell-code {
    font-family: Consolas, "Courier New", monospace;
    font-weight: 700;
}

.cell-title {
    font-weight: 600;
}

.cell-sub {
    color: #888888;
    font-size: 12px;
    margin-top: 2px;
    line-height: 1.4;
}

/* Step 3.72: the setting's key under its description (the Settings search finds it) */
.setting-key {
    font-family: Consolas, "Courier New", monospace;
    font-size: 11px;
}

.setting-value {
    font-weight: 600;
}

.value-default {
    display: inline-block;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 8px;
    background: #eeeeee;
    color: var(--muted);
    font-size: 11px;
}

.empty-note {
    color: #888888;
    font-size: 13px;
    padding: 8px 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 8px;
}

.data-table th {
    background: #f0f0f0;
    padding: 8px 10px;
    text-align: left;
    font-weight: 700;
    color: #444444;
    border-bottom: 2px solid var(--border);
}

.data-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-light);
}

.data-table tbody tr:hover {
    background: var(--brand-tint);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ── Modal dialogs: a panel shown by the server, laid over the whole page ──
   The z-index is above Telerik's menu (7000) so the dialog covers the menu bar too. */
body.has-dialog {
    overflow: hidden;
}

.modal-backdrop {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 16px;
    overflow-y: auto;
}

.modal {
    width: 100%;
    max-width: 640px;
    background: var(--surface);
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    padding: 0 24px 20px;
    overflow: hidden;
    animation: modal-in 0.2s ease;
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-wide {
    max-width: 760px;
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 -24px 16px;
    padding: 16px 24px;
    background: var(--surface-alt);
    border-bottom: 1px solid var(--border-light);
    border-top: 4px solid var(--brand);
}

.modal-intro {
    color: var(--muted);
    margin: -4px 0 16px;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin: 20px -24px -20px;
    padding: 14px 24px;
    background: var(--surface-alt);
    border-top: 1px solid var(--border-light);
}

.section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--brand);
    margin: 0 0 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
}

.form-row-wide {
    grid-column: 1 / -1;
}

.form-row-split {
    display: flex;
    gap: 16px;
}

.inline-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 16px;
    margin-top: 12px;
    padding: 12px;
    background: var(--background);
    border-radius: 6px;
}

.inline-field label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #444444;
    margin-bottom: 5px;
}

.inline-field .text-input {
    width: auto;
    min-width: 220px;
}

.inline-field-button {
    padding-bottom: 1px;
}

.status-info {
    color: var(--info);
    background: var(--info-bg);
}

.status-warn {
    color: var(--warn);
    background: var(--warn-bg);
}

/* ── Users and security groups ── */
.section-title-spaced {
    margin-top: 18px;
}

.check-list {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
}

.check-list li {
    padding: 3px 0;
    break-inside: avoid;
}

.check-list label {
    margin-left: 6px;
}

/* Step 3.80: in a form row (Workstations' Types), each check box with its name beside it,
   not under it (.form-row label makes field labels a line of their own). */
.form-row .check-list label {
    display: inline;
    font-weight: normal;
    font-size: 14px;
    color: inherit;
    margin: 0 0 0 6px;
}

.form-row .check-list input[type="checkbox"] {
    vertical-align: middle;
}

.check-list-columns {
    columns: 3 180px;
    column-gap: 20px;
}

.check-note {
    color: #888888;
    font-size: 12px;
}

.location-list {
    margin-top: 8px;
    max-height: 220px;
    overflow-y: auto;
    padding: 8px 10px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
}

/* Step 4.38: the permissions' section and search in the security group dialog. */
.permission-filter {
    margin: 0 0 4px;
    padding: 10px 12px;
}

.permission-filter .inline-field-grow {
    flex: 1 1 200px;
}

.permission-filter .inline-field-grow .text-input {
    width: 100%;
    min-width: 0;
}

.permission-filter .inline-field .text-input {
    min-width: 0;
}

.permission-no-match {
    margin: 4px 0 12px;
}

.permission-category {
    margin-bottom: 12px;
}

.permission-category-title {
    font-size: 13px;
    font-weight: 700;
    color: #444444;
    margin: 0 0 6px;
}

.permission-list li {
    display: flex;
    align-items: flex-start;
    padding: 5px 0;
    border-bottom: 1px solid var(--border-light);
}

.permission-list li:last-child {
    border-bottom: none;
}

.permission-list input {
    margin-top: 3px;
}

.permission-list label {
    margin-left: 8px;
}

.perm-name {
    display: block;
    font-weight: 600;
}

.perm-desc {
    display: block;
    color: #888888;
    font-size: 12px;
}

.member-list {
    line-height: 1.6;
    margin: 0 0 4px;
}

.account-actions {
    margin: 12px 0 6px;
}

.confirm-box {
    margin: 12px 0;
    padding: 14px 16px;
    border-radius: 4px;
    background: var(--warn-bg);
    border-left: 4px solid var(--warn-line);
    color: var(--text);
}

.confirm-box p {
    margin: 0 0 10px;
}

.setup-code-box {
    margin: 0 0 16px;
    padding: 14px 16px;
    border-radius: 6px;
    background: var(--brand-tint);
    border: 1px solid #f0cdb9;
}

.setup-code-label {
    font-weight: 600;
    color: var(--brand-dark);
    margin-bottom: 6px;
}

.setup-code-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.setup-code-value {
    font-family: Consolas, "Courier New", monospace;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text);
}

.modal-actions .action-left {
    margin-right: auto;
}

/* ============================================================
   Telerik (Bootstrap skin) recolored to TQC's colors
   ============================================================ */

/* Menu bar */
.site-nav .RadMenu,
.site-nav .RadMenu .rmRootGroup {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.site-nav .RadMenu .rmRootGroup .rmItem .rmLink {
    color: #c8c8c8 !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 3px solid transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 12px 18px 9px !important;
    font-weight: 500;
}

.site-nav .RadMenu .rmRootGroup .rmItem .rmLink:hover,
.site-nav .RadMenu .rmRootGroup .rmItem .rmLink:focus,
.site-nav .RadMenu .rmRootGroup .rmItem .rmLink.rmFocused {
    color: #ffffff !important;
    background: var(--charcoal-2) !important;
    border-bottom-color: var(--brand) !important;
}

.site-nav .RadMenu .rmRootGroup .rmItem .rmLink.rmSelected,
.site-nav .RadMenu .rmRootGroup .rmItem .rmSelected {
    color: #ffffff !important;
    background: var(--charcoal-2) !important;
    border-bottom-color: var(--brand) !important;
}

/* Drop-down menus (Setup, Security, Customers, Logs) */
.site-nav .RadMenu .rmRootGroup .rmGroup,
.site-nav .RadMenu .rmRootGroup .rmSlide .rmGroup {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 0 0 4px 4px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    padding: 4px 0 !important;
    min-width: 190px;
}

.site-nav .RadMenu .rmRootGroup .rmGroup .rmItem .rmLink {
    color: var(--text) !important;
    background: transparent !important;
    border-bottom: none !important;
    padding: 8px 16px !important;
    font-weight: 500;
}

.site-nav .RadMenu .rmRootGroup .rmGroup .rmItem .rmLink:hover,
.site-nav .RadMenu .rmRootGroup .rmGroup .rmItem .rmLink:focus,
.site-nav .RadMenu .rmRootGroup .rmGroup .rmItem .rmLink.rmFocused {
    color: var(--brand-dark) !important;
    background: var(--brand-tint) !important;
}

/* Buttons: primary is solid orange; the others are outlined in orange */
.RadButton.rbButton {
    border-radius: 4px !important;
    font-weight: 600 !important;
}

.RadButton.rbButton.rbPrimaryButton,
.RadButton.rbButton.rbPrimary {
    background: var(--brand) !important;
    border-color: var(--brand) !important;
    color: #ffffff !important;
}

.RadButton.rbButton.rbPrimaryButton:hover,
.RadButton.rbButton.rbPrimaryButton:focus,
.RadButton.rbButton.rbPrimaryButton.rbHovered,
.RadButton.rbButton.rbPrimary:hover,
.RadButton.rbButton.rbPrimary:focus {
    background: var(--brand-dark) !important;
    border-color: var(--brand-dark) !important;
    color: #ffffff !important;
}

.RadButton.rbButton:not(.rbPrimaryButton):not(.rbPrimary) {
    background: #ffffff !important;
    border-color: #cccccc !important;
    color: var(--text) !important;
}

.RadButton.rbButton:not(.rbPrimaryButton):not(.rbPrimary):hover,
.RadButton.rbButton:not(.rbPrimaryButton):not(.rbPrimary):focus {
    background: var(--brand-tint) !important;
    border-color: var(--brand) !important;
    color: var(--brand-dark) !important;
}

.RadButton.rbButton:focus,
.RadButton.rbButton.rbFocused {
    box-shadow: 0 0 0 3px var(--brand-focus) !important;
}

/* Text boxes */
.RadInput .riTextBox:focus,
.RadInput .riTextBox.riFocused,
.RadInput.riFocused .riTextBox {
    border-color: var(--brand) !important;
    box-shadow: 0 0 0 2px var(--brand-focus) !important;
}

/* Grids */
.card-flush .RadGrid {
    border: none !important;
}

.RadGrid .rgHeader,
.RadGrid th.rgHeader {
    background: #f0f0f0 !important;
    color: #444444 !important;
    font-weight: 700 !important;
    border-bottom: 2px solid var(--border) !important;
}

.RadGrid .rgHeader a {
    color: #444444 !important;
}

.RadGrid .rgMasterTable > tbody > tr > td {
    border-bottom: 1px solid var(--border-light);
}

.RadGrid .rgMasterTable > tbody > tr.rgRow:hover > td,
.RadGrid .rgMasterTable > tbody > tr.rgAltRow:hover > td {
    background: var(--brand-tint) !important;
}

.RadGrid .rgGroupHeader td,
.RadGrid .rgGroupHeader td p {
    background: var(--surface-alt) !important;
    color: var(--brand) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.RadGrid a {
    color: var(--brand);
}

.RadGrid a:hover {
    color: var(--brand-dark);
}

@media (max-width: 600px) {
    .site-main {
        padding: 16px;
    }

    .site-header .brand-logo {
        height: 38px;
    }

    .site-header .brand-text {
        font-size: 17px;
    }

    .status-table th {
        width: 45%;
    }

    .auth-card {
        margin: 16px auto;
        padding: 20px 16px;
    }

    .recovery-codes {
        columns: 1;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .modal-backdrop {
        padding: 16px 8px;
    }

    .modal {
        padding: 0 16px 16px;
    }

    .modal-title {
        margin: 0 -16px 16px;
        padding: 14px 16px;
    }

    .modal-actions {
        margin: 20px -16px -16px;
        padding: 12px 16px;
    }
}

/* ── Audit log and error log ── */
.filter-card {
    padding: 4px 12px;
}

.filter-card .inline-form {
    margin-top: 0;
    background: transparent;
    padding: 8px 0;
}

.filter-card .inline-field .text-input {
    min-width: 160px;
}

.result-count {
    color: var(--muted);
    font-size: 13px;
    margin: 12px 0 8px;
    min-height: 1em;
}

.cell-nowrap {
    white-space: nowrap;
}

.audit-details {
    margin-top: 18px;
}

.change-table td {
    vertical-align: top;
    word-break: break-word;
}

.change-table td:first-child {
    width: 30%;
    font-weight: 600;
    color: #444444;
}

.change-table tr.change-row-changed td {
    background: var(--warn-bg);
}

.value-none {
    color: #999999;
    font-style: italic;
}

.log-pre {
    margin: 0;
    padding: 10px 12px;
    background: var(--surface-alt);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 200px;
    overflow: auto;
}

.log-pre-tall {
    max-height: 360px;
}

/* ── Lists, customer fields and bank routing ── */
.list-description {
    color: var(--muted);
    font-size: 13px;
    max-width: 520px;
    padding-bottom: 8px;
}

.move-link {
    display: inline-block;
    margin-right: 10px;
    font-size: 12px;
    white-space: nowrap;
}

.field-table td {
    vertical-align: middle;
}

.field-table .col-company {
    width: 160px;
    color: var(--muted);
}

.field-table .col-value {
    width: 280px;
}

.field-table .col-value .text-input {
    width: 100%;
    min-width: 0;
}

/* ── Customer lookup ── */
.customer-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 12px;
}

.back-link {
    font-weight: 600;
}

.customer-head h2 {
    color: var(--text);
    font-size: 20px;
    text-transform: none;
    letter-spacing: 0;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 4px;
}

.customer-head-sub {
    color: var(--muted);
    font-size: 13px;
}

.customer-flags {
    margin-top: 8px;
}

.customer-flags .status {
    margin-right: 6px;
}

.tab-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.tab-bar .tab {
    display: inline-block;
    padding: 9px 16px;
    margin-bottom: -2px;
    color: var(--muted);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 3px solid transparent;
}

.tab-bar .tab:hover,
.tab-bar .tab:focus {
    color: var(--brand-dark);
}

.tab-bar .tab.is-current {
    color: var(--brand);
    border-bottom-color: var(--brand);
}

.detail-card .status-table th {
    width: 220px;
}

.detail-card .data-table {
    margin-bottom: 0;
}

.detail-note {
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.5;
}

.table-scroll {
    overflow-x: auto;
}

@media (max-width: 600px) {
    .detail-card .status-table th {
        width: 40%;
    }

    .field-table .col-company {
        display: none;
    }

    .field-table .col-value {
        width: 55%;
    }
}

/* A hint under a filter row, kept out of the fields so labels and boxes line up */
.filter-help {
    flex-basis: 100%;
    margin-top: -4px;
}
/* ── Reports (Step 3.8b): the Reports page, choosing stores and the report viewer ── */
.link-button {
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: var(--brand);
    cursor: pointer;
}

.link-button:hover,
.link-button:focus {
    color: var(--brand-dark);
    text-decoration: underline;
}

.report-search {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.report-search-label {
    font-weight: 700;
}

.report-search-input {
    flex: 1 1 320px;
    max-width: 560px;
}

.report-browser {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 16px;
    align-items: start;
}

.report-browser .card {
    margin-bottom: 0;
}

.report-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.report-category,
.report-item {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border: none;
    border-left: 3px solid transparent;
    border-radius: 0 4px 4px 0;
    background: none;
    font: inherit;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.report-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.report-category:hover,
.report-item:hover {
    background: var(--surface-alt);
}

.report-category:focus-visible,
.report-item:focus-visible {
    outline: 2px solid var(--brand-focus);
}

.report-category.is-current,
.report-item.is-current {
    background: var(--brand-tint);
    border-left-color: var(--brand);
    font-weight: 600;
}

.report-count {
    min-width: 24px;
    padding: 1px 7px;
    border-radius: 10px;
    background: var(--background);
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.report-item-name {
    font-weight: 600;
}

.report-item-sub {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

.report-details-name {
    margin: 0 0 6px;
    font-size: 20px;
}

.report-details-description {
    font-size: 15px;
    margin: 12px 0 0;
}

.report-details-text,
.report-details-tlm,
.report-details-last {
    line-height: 1.5;
    margin: 0 0 10px;
}

.report-details-tlm,
.report-details-last {
    color: var(--muted);
}

.report-details .button-row {
    margin: 16px 0 8px;
}

.report-stores-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 16px;
    margin-bottom: 8px;
}

.report-stores-head .section-title {
    margin: 0;
}

.report-store-count {
    color: var(--muted);
}

.report-store-links {
    display: inline-flex;
    gap: 14px;
}

/* Step 3.18: a closed store in a report's store list. */
.report-store-list .report-store-closed {
    margin-left: 6px;
    padding: 0 8px;
}

.report-store-list {
    max-height: 260px;
    overflow-y: auto;
    padding: 8px 10px;
    border: 1px solid var(--border-light);
    border-radius: 4px;
}

.report-result {
    margin-top: 16px;
}

.report-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
}

.report-toolbar-summary {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.report-summary {
    font-weight: 600;
    white-space: pre-wrap;
}

.report-status {
    color: var(--muted);
    font-size: 13px;
}

.report-status-error {
    color: var(--bad);
    font-weight: 600;
}

.report-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.report-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    padding: 8px 16px;
    background: var(--surface-alt);
    border-bottom: 1px solid var(--border-light);
}

.report-nav-label {
    font-size: 13px;
    color: var(--muted);
}

.report-nav .text-input.report-zoom {
    width: auto;
    padding: 4px 8px;
}

.report-nav-pages {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.report-nav-button {
    padding: 2px 10px;
    font-size: 16px;
    line-height: 1.2;
}

.report-nav-button:disabled {
    opacity: 0.4;
    cursor: default;
    background: transparent;
    color: var(--brand);
}

.report-nav .text-input.report-page-box {
    width: 70px;
    padding: 4px 6px;
}

/* The pages: grey like a PDF viewer; their width follows the zoom (--page-width). */
.report-viewer {
    --page-width: 816px;
    position: relative;
    height: calc(100vh - 220px);
    min-height: 420px;
    overflow: auto;
    padding: 16px 12px;
    background: #6b6b6b;
}

.report-viewer:focus {
    outline: none;
}

.report-page {
    width: var(--page-width);
    aspect-ratio: 612 / 792;
    margin: 0 auto 16px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

/* Step 3.40: a report printed across the paper. */
.report-page.report-page-landscape {
    aspect-ratio: 792 / 612;
}

.report-page svg {
    display: block;
    width: 100%;
    height: 100%;
}

.report-page-loading,
.report-page-error {
    padding: 24px;
    color: #999999;
}

.report-page-error {
    color: var(--bad);
}

.report-print-frame {
    position: fixed;
    right: 0;
    bottom: 0;
    width: 0;
    height: 0;
    border: 0;
}

.report-format label {
    margin: 0 18px 0 6px;
}

.report-print-note {
    display: none;
}

/* Printing the page itself (File > Print) leaves the report out: the Print button prints it, and records it. */
@media print {
    .report-result .report-nav,
    .report-result .report-viewer,
    .report-print-frame {
        display: none !important;
    }

    .report-print-note {
        display: block;
        padding: 12px 16px;
        font-weight: 600;
    }
}

@media (max-width: 1000px) {
    .report-browser {
        grid-template-columns: 200px minmax(0, 1fr);
    }

    .report-details {
        grid-column: 1 / -1;
    }
}

@media (max-width: 600px) {
    .report-browser {
        grid-template-columns: minmax(0, 1fr);
    }

    .report-viewer {
        height: 70vh;
        padding: 8px 4px;
    }
}

/* ------------------------------------------------------------
   Cash Balances and Cash Movements (Step 3.10)
   ------------------------------------------------------------ */
.cell-money {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.cash-totals {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 4px 0 20px;
}

.cash-total {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cash-total-label {
    color: var(--muted);
    font-size: 13px;
}

.cash-total-value {
    font-size: 22px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text);
}

.cash-total-all {
    border-color: var(--brand);
    background: var(--brand-tint);
}

.page-actions .btn {
    vertical-align: middle;
}

/* A list of radio buttons inside a form row: each choice on its own line, label beside it. */
.form-row .radio-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.form-row .radio-list li {
    padding: 3px 0;
}

.form-row .radio-list label {
    display: inline;
    font-weight: 400;
    font-size: 14px;
    margin: 0 0 0 6px;
}

@media (max-width: 700px) {
    .cash-totals {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Step 3.14: Setup > Banks. */
.bank-current {
    font-size: 15px;
    margin: 0 0 12px;
}

.card-title-padded {
    padding: 16px 16px 0;
}

.bank-numbers {
    max-height: 420px;
    overflow-y: auto;
}

.bank-number-col {
    width: 190px;
}

.bank-number-input {
    width: 150px;
    font-variant-numeric: tabular-nums;
}

/* Step 3.20: View as (impersonation): on every page while a system administrator views Admin Web as another user. */
.view-as-banner {
    background: #b42318;
    color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.view-as-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 24px;
    font-weight: 600;
}

.view-as-stop,
.view-as-stop:visited {
    color: #b42318;
    background: #ffffff;
    border-radius: 4px;
    padding: 6px 14px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.view-as-stop:hover,
.view-as-stop:focus {
    background: #fde8e6;
}

.view-as-link {
    margin-left: 12px;
}

/* Step 3.23: Setup > Document Wording */
.button-row-spaced {
    margin-top: 16px;
}

.inline-label {
    margin-right: 6px;
    font-weight: 600;
}

.wording-toolbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin: 8px 0 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.wording-tool {
    min-width: 34px;
    height: 30px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 15px;
}

.wording-tool:hover {
    background: var(--brand-tint);
}

.wording-u {
    text-decoration: underline;
}

.wording-field {
    max-width: 420px;
}

.wording-slot {
    margin-top: 14px;
}

.wording-slot-title {
    margin: 0 0 4px;
    font-size: 16px;
}

.wording-item {
    margin-top: 10px;
}

.wording-text {
    width: 100%;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    resize: vertical;
}

.wording-text[readonly] {
    background: #f7f7f7;
    color: #333;
}

.wording-notes {
    width: 100%;
    box-sizing: border-box;
}

.wording-item-actions a {
    margin-right: 14px;
    font-size: 13px;
}

.doc-preview {
    background: #7a7a7a;
    padding: 18px;
    border-radius: 6px;
}

.doc-preview-page {
    max-width: 816px;
    margin: 0 auto 18px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.doc-preview-page svg {
    display: block;
    width: 100%;
    height: auto;
}

/* Step 3.24: Setup > Desktop Releases */
.steps-list {
    margin: 0 0 16px 20px;
    padding: 0;
}

.steps-list li {
    margin-bottom: 6px;
}

.details-box {
    margin-top: 18px;
    border-top: 1px solid #ddd;
    padding-top: 12px;
}

.details-box summary {
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 10px;
}

.picture-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 10px 0 4px 0;
}

.picture-row label {
    font-weight: 600;
}

.notes-editor {
    margin-top: 16px;
}

/* ── Dashboard (Step 3.35): the home page ──────────────────────────────── */
.dash {
    --series-1: #2a78d6;
    --series-2: #eb6834;
    --grid: #ececec;
    --ink-2: #555555;
    font-variant-numeric: normal;
}

.dash.is-loading {
    opacity: 0.55;
    transition: opacity 0.15s;
}

.dash-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-bottom: 16px;
}

.dash-head h1 {
    margin-bottom: 2px;
}

.dash-sub {
    margin: 0;
    color: var(--muted);
}

.dash-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dash-filter label {
    font-weight: 600;
    color: var(--ink-2);
}

.dash-filter select {
    width: auto;
    min-width: 280px;
}

/* Headline figures: the hero on the left, eight tiles beside it */
.dash-figures {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.dash-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.dash-tile {
    background: var(--surface);
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    padding: 14px 16px;
    min-width: 0;
}

.dash-hero {
    border-top: 4px solid var(--brand);
    display: flex;
    flex-direction: column;
}

.tile-label {
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 600;
}

.tile-hero {
    font-size: 48px;
    font-weight: 600;
    line-height: 1.1;
    color: var(--charcoal);
    margin: 10px 0 6px;
    letter-spacing: -0.5px;
}

.tile-value {
    font-size: 26px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--charcoal);
    margin: 6px 0 4px;
}

.tile-sub,
.tile-note {
    color: var(--muted);
    font-size: 12.5px;
}

.tile-note {
    margin-top: 4px;
}

.spark {
    margin-top: 14px;
}

.spark svg {
    display: block;
    width: 100%;
    height: 70px;
}

.spark-line {
    fill: none;
    stroke: #9a9a9a;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.spark .dot {
    stroke: #ffffff;
    stroke-width: 2;
}

.spark-caption {
    color: var(--muted);
    font-size: 12px;
    margin-top: 4px;
}

.tile-split {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.tile-split div {
    display: flex;
    flex-direction: column;
}

.tile-split span {
    color: var(--muted);
    font-size: 12px;
}

.tile-split strong {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.tile-delta {
    margin-top: 6px;
    font-size: 12.5px;
    font-weight: 600;
}

.delta-good {
    color: var(--ok);
}

.delta-bad {
    color: var(--bad-line);
}

.delta-flat {
    color: var(--muted);
    font-weight: 400;
}

.meter {
    height: 8px;
    border-radius: 4px;
    background: #d6e6fa;
    margin-top: 10px;
    overflow: hidden;
}

.meter span {
    display: block;
    height: 100%;
    border-radius: 4px;
    background: var(--series-1);
}

/* Needs attention: one strip under the figures */
.dash-attention {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 18px;
    background: var(--warn-bg);
    border-left: 4px solid var(--warn-line);
    border-radius: 6px;
    padding: 10px 16px;
    margin-bottom: 20px;
}

.dash-attention.is-clear {
    background: var(--ok-bg);
    border-left-color: var(--ok-line);
}

.attention-title {
    font-weight: 700;
    color: var(--warn);
}

.dash-attention.is-clear .attention-title {
    color: var(--ok);
}

.attention-item {
    color: var(--text);
}

.attention-item + .attention-item::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 2px;
    background: #b7a35a;
    margin: 0 14px 3px -8px;
}

/* Cards */
.dash-grid {
    display: grid;
    gap: 20px;
}

.dash-grid > .card {
    margin-bottom: 0;
}

.dash-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 20px;
}

.dash-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 20px;
}

.dash-grid-2 + .card,
.dash-grid-3 + .card {
    margin-top: 0;
}

.dash-card {
    min-width: 0;
    overflow-x: auto;
}

.chart-sub {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 12.5px;
}

.chart-note {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.chart-legend {
    display: flex;
    gap: 18px;
    font-size: 12.5px;
    color: var(--ink-2);
    margin-bottom: 4px;
}

.chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.key-bar {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.chart svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.chart .grid {
    stroke: var(--grid);
    stroke-width: 1;
}

.chart .axis {
    stroke: #c8c8c8;
    stroke-width: 1;
}

.chart .tick {
    font-size: 11px;
    fill: #767676;
    font-variant-numeric: tabular-nums;
}

.chart .tick-now {
    font-weight: 700;
    fill: var(--text);
}

.chart .line {
    fill: none;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.chart .area {
    opacity: 0.1;
}

.chart .dot {
    stroke: #ffffff;
    stroke-width: 2;
}

.chart .end-label {
    font-size: 12px;
    font-weight: 700;
    fill: var(--text);
}

.chart .hit {
    fill: transparent;
    cursor: default;
    outline: none;
}

.chart .hit.is-hover,
.chart .hit:focus {
    fill: rgba(0, 0, 0, 0.045);
}

.chart-table {
    margin-top: 8px;
    font-size: 12.5px;
}

.chart-table summary,
.dash-notes summary {
    cursor: pointer;
    color: var(--brand);
    font-weight: 600;
}

.chart-table table {
    margin-top: 8px;
}

/* Tables */
.dash-table {
    font-size: 12.5px;
}

.dash-table th,
.dash-table td {
    padding: 7px 8px;
    vertical-align: top;
}

.dash-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.dash-table tfoot tr.total th,
.dash-table tfoot tr.total td {
    font-weight: 700;
    color: var(--text);
    border-top: 2px solid var(--border);
    border-bottom: none;
    background: var(--surface-alt);
}

.dash-h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-2);
    margin: 22px 0 6px;
}

.table-scroll {
    overflow-x: auto;
}

.dash-empty {
    color: var(--muted);
    margin: 0;
}

/* Past due: horizontal bars */
.hbars {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.hbar {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) 128px;
    align-items: center;
    gap: 10px;
    outline: none;
    border-radius: 4px;
    padding: 2px 4px;
}

.hbar.is-hover,
.hbar:focus {
    background: #f4f4f4;
}

.hbar-label {
    color: var(--ink-2);
    font-size: 12.5px;
}

.hbar-track {
    height: 18px;
    position: relative;
}

.hbar-fill {
    display: block;
    height: 100%;
    min-width: 2px;
    border-radius: 0 4px 4px 0;
}

.hbar-value {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

.hbar-value small {
    font-weight: 400;
    color: var(--muted);
}

/* Written off */
.wo-figures {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.wo-figures .tile-value {
    font-size: 21px;
}

/* Stores */
.dash-stores th button.sort {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-weight: 700;
    color: inherit;
    cursor: pointer;
    text-align: inherit;
}

.dash-stores th[aria-sort="ascending"] button.sort::after {
    content: " \25B2";
    font-size: 9px;
}

.dash-stores th[aria-sort="descending"] button.sort::after {
    content: " \25BC";
    font-size: 9px;
}

.dash-stores thead th {
    vertical-align: bottom;
    line-height: 1.25;
}

.dash-stores th,
.dash-stores td {
    padding: 7px 6px;
}

.dash-stores td:first-child {
    white-space: nowrap;
}

.dash-stores .databar {
    width: 90px;
    margin-left: auto;
}

.dash-stores tr.is-chosen td {
    background: var(--brand-tint);
}

.dash-stores td a {
    font-weight: 600;
}

.databar {
    height: 6px;
    border-radius: 3px;
    background: #eef4fc;
    margin-bottom: 4px;
}

.databar span {
    display: block;
    height: 100%;
    border-radius: 3px;
    background: var(--series-1);
}

.dash-notes {
    font-size: 13px;
    color: var(--ink-2);
}

.dash-notes ul {
    margin: 10px 0 0;
    padding-left: 20px;
}

.dash-notes li {
    margin-bottom: 4px;
}

/* The hover readout (dashboard.js) */
.dash-tip {
    position: fixed;
    z-index: 1000;
    display: none;
    pointer-events: none;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
    padding: 8px 10px;
    font-size: 12.5px;
    min-width: 170px;
}

.dash-tip-title {
    color: var(--muted);
    margin-bottom: 4px;
}

.dash-tip-row {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.dash-tip-row strong {
    color: var(--charcoal);
    font-variant-numeric: tabular-nums;
}

.dash-tip-label {
    color: var(--ink-2);
}

.dash-tip-key {
    width: 12px;
    height: 2px;
    border-radius: 1px;
    flex: none;
}

.dash-tip-key.is-blank {
    background: transparent;
}

@media (max-width: 1100px) {
    .dash-figures {
        grid-template-columns: 1fr;
    }

    .dash-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dash-grid-2,
    .dash-grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .dash-tiles,
    .wo-figures {
        grid-template-columns: 1fr;
    }

    .dash-filter select {
        min-width: 0;
        width: 100%;
    }
}

/* Title loans (Step 3.42) */
.tl-figures {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-bottom: 8px;
}

.tl-figures > div {
    min-width: 0;
}

.tl-grid {
    margin-bottom: 0;
}

.tl-part {
    min-width: 0;
}

.tl-part .dash-h3 {
    margin-top: 12px;
}

.dash-table tr.is-zero td {
    color: var(--muted);
}

@media (max-width: 1100px) {
    .tl-figures {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .tl-figures {
        grid-template-columns: 1fr;
    }
}

/* ------------------------------------------------------------
   Payments Lookup (Step 3.36)
   ------------------------------------------------------------ */
.lookup-totals {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 20px;
    margin: 14px 0 10px;
    font-size: 14px;
}

.lookup-total-main {
    font-weight: 600;
}

.lookup-by-tender {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 13px;
}

.lookup-by-tender strong {
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.lookup-by-tender .cell-sub {
    display: inline;
}

.amount-returned {
    color: var(--bad-line);
}

.cell-money .cell-sub {
    white-space: nowrap;
}

/* ── Step 4.10: support tickets ── */
.ticket-layout {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.ticket-main {
    flex: 1 1 62%;
    min-width: 0;
}

.ticket-side {
    flex: 1 1 38%;
    min-width: 280px;
}

.ticket-message {
    border: 1px solid var(--border-light);
    border-left: 4px solid #999999;
    border-radius: 4px;
    padding: 10px 12px;
    margin-bottom: 10px;
    background: var(--surface);
}

.ticket-message-staff {
    border-left-color: var(--brand);
    background: var(--surface-alt);
}

.ticket-message-note {
    border-left-color: #B7950B;
    background: #FEF9E7;
}

.ticket-meta {
    margin-bottom: 6px;
}

.ticket-reply-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin: 10px 0 6px;
}

.ticket-picture img {
    display: block;
    max-width: 100%;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    margin-top: 6px;
}

@media (max-width: 900px) {
    .ticket-layout {
        flex-direction: column;
    }

    .ticket-side {
        min-width: 0;
        width: 100%;
    }
}

/* ── Step 4.48 (Joe): the sign-in pages beside the TQC brand panel, as in FinCore Desktop:
      a charcoal gradient, lighter behind the logo; the logo, name and tagline centred; an
      orange edge. On a phone the panel sits above the card, smaller. ── */
.site-content {
    min-width: 0;
}

.site-main.signin-layout {
    max-width: none;
    padding: 0;
    display: flex;
    min-height: calc(100vh - 71px);
}

.signin-layout .signin-brand {
    flex: 0 0 clamp(300px, 30vw, 440px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 28px 20px;
    background: radial-gradient(ellipse 120% 70% at 50% 45%, #3a3a3a 0%, #262626 45%, #1a1a1a 100%);
    border-right: 5px solid var(--brand);
    color: #ffffff;
    text-align: center;
}

.signin-brand-block {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.signin-brand-logo {
    display: block;
    width: 260px;
    max-width: 100%;
    height: auto;
}

.signin-brand-title {
    margin-top: 26px;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
}

/* "Admin Hub" on its own line, in orange (as in the header). */
.signin-brand-sub {
    display: block;
    color: var(--brand-light);
}

.signin-brand-tagline {
    margin-top: 12px;
    font-size: 17px;
    color: #dddddd;
}

.signin-brand-version {
    margin-top: 24px;
    font-size: 12px;
    color: #8a8a8a;
}

.signin-layout .site-content {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.signin-layout .auth-card {
    width: 100%;
    margin: 24px auto;
}

@media (max-width: 760px) {
    .site-main.signin-layout {
        flex-direction: column;
        min-height: 0;
    }

    .signin-layout .signin-brand {
        flex: 0 0 auto;
        padding: 24px 16px 16px;
        border-right: none;
        border-bottom: 5px solid var(--brand);
    }

    .signin-brand-logo {
        width: 160px;
    }

    .signin-brand-title {
        margin-top: 14px;
        font-size: 22px;
    }

    .signin-brand-tagline {
        font-size: 14px;
    }

    .signin-brand-version {
        display: none;
    }

    .signin-layout .site-content {
        padding: 8px 16px 24px;
    }
}

/* Step 4.65: Security > Signed-In Users. */
.signed-in-tiles {
    margin-bottom: 16px;
}

.signed-in-tile-ok {
    border-top: 4px solid #2e7d32;
}

.signed-in-tile-warn {
    border-top: 4px solid #c77700;
}

.signed-in-tile-bad {
    border-top: 4px solid #b3261e;
}

.signed-in-auto {
    margin-right: 10px;
    color: var(--ink-2);
    font-size: 13px;
}

.signed-in-filter .inline-field-grow,
.inline-form .inline-field-grow {
    flex: 1 1 220px;
}


.signed-in-details {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 6px 14px;
    margin: 4px 0 14px;
}

.signed-in-details dt {
    color: var(--ink-2);
    font-weight: 600;
}

.signed-in-details dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.signed-in-recent {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.signed-in-recent th,
.signed-in-recent td {
    text-align: left;
    padding: 6px 8px;
    border-bottom: 1px solid #e6e6e6;
    vertical-align: top;
}

.signed-in-recent th {
    color: var(--ink-2);
    font-weight: 600;
}

.signed-in-effects {
    margin: 6px 0 10px 18px;
    padding: 0;
}

@media (max-width: 1100px) {
    .signed-in-tiles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .signed-in-tiles {
        grid-template-columns: 1fr;
    }

    .signed-in-details {
        grid-template-columns: 1fr;
    }
}
