/*
 * Compliance desk for hospitality conventions. Bootstrap supplies the reset and the
 * DataTables skin; the identity lives here.
 */
:root {
    --ink: #16211f;
    --quiet: #5b6966;
    --paper: #f5f6f3;
    --surface: #fff;
    --line: #dce1dd;
    --brand: #0f3d3e;
    --alert: #b3261e;
    --alert-bg: #fbecea;
    --ok: #1f7a4d;
    --ok-bg: #e7f3ec;
    --check: #8a5a00;
    --check-bg: #fbf2dc;

    --bs-body-font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
    --bs-body-font-size: 0.9375rem;
    --bs-body-color: var(--ink);
    --bs-body-bg: var(--paper);
    --bs-link-color-rgb: 15, 61, 62;
    --bs-link-hover-color-rgb: 9, 38, 39;
    --bs-border-color: var(--line);
}

.app-width { max-width: 1320px; margin: 0 auto; padding: 0 24px; }
.app-main { padding-top: 28px; padding-bottom: 64px; }

.app-header { background: var(--brand); color: #fff; }
.app-header .app-width { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 20px; padding-top: 14px; padding-bottom: 14px; }
.app-name { color: #fff; font-weight: 600; font-size: 1.0625rem; text-decoration: none; }
.app-name:hover { color: #fff; text-decoration: underline; }
.app-scope { color: #b9cfcd; font-size: 0.875rem; }
.app-user { margin-left: auto; color: #b9cfcd; font-size: 0.875rem; }
.app-user a { color: #fff; margin-left: 12px; }

.login { max-width: 400px; margin: 48px auto 0; display: grid; gap: 6px; }
.login h1 { margin-bottom: 12px; }
.login .form-label { margin: 8px 0 0; }
.login .btn { margin-top: 16px; }

.notices { position: fixed; top: 64px; right: 24px; z-index: 1050; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 48px)); }
.notice { text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--quiet); border-radius: 4px; padding: 12px 16px; box-shadow: 0 6px 20px rgba(22, 33, 31, 0.16); cursor: pointer; }
.notice-success { border-left-color: var(--ok); }
.notice-warning { border-left-color: var(--check); }
.notice-danger { border-left-color: var(--alert); }

h1 { font-size: 1.625rem; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 4px; }
h2 { font-size: 1.0625rem; font-weight: 600; margin: 0 0 12px; }
h3 { font-size: 0.9375rem; font-weight: 600; margin: 24px 0 8px; }

.page-head { margin-bottom: 20px; }
.page-head-actions { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.btn-brand { --bs-btn-color: #fff; --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #0a2c2d; --bs-btn-hover-border-color: #0a2c2d; --bs-btn-active-color: #fff; --bs-btn-active-bg: #0a2c2d; --bs-btn-disabled-color: #fff; --bs-btn-disabled-bg: var(--quiet); --bs-btn-disabled-border-color: var(--quiet); font-weight: 600; }
/* Above the stretched row link, so that the button stays clickable. */
.processed-form { position: relative; z-index: 2; margin: 0; }
.processed-form .btn { white-space: nowrap; }
.page-head .sender { overflow-wrap: anywhere; }
.summary { color: var(--quiet); margin: 0; }
.summary .status { margin-left: 8px; }
.back { margin: 0 0 12px; }
.back a::before { content: "‹ "; }
.quiet { color: var(--quiet); margin: 0; }
.text-alert { color: var(--alert); font-weight: 600; }
.text-ok { color: var(--ok); font-weight: 600; }
.num { font-variant-numeric: tabular-nums; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 20px; }

/* Status: one vocabulary, used in the list and on the detail page. */
.status { display: inline-block; font-size: 0.8125rem; font-weight: 600; line-height: 1.5; padding: 1px 10px; border-radius: 3px; white-space: nowrap; }
.status-alert { background: var(--alert-bg); color: var(--alert); }
.status-ok { background: var(--ok-bg); color: var(--ok); }
.status-pending { background: var(--check-bg); color: var(--check); }
.status-none { background: #eceeeb; color: var(--quiet); }

/* List */
table.js-datatable { margin: 0 !important; --bs-table-bg: transparent; }
table.js-datatable thead th { color: var(--quiet); font-weight: 500; font-size: 0.8125rem; border-bottom-color: var(--line); }
table.js-datatable tbody td { vertical-align: middle; padding-top: 11px; padding-bottom: 11px; }
table.js-datatable tbody tr:hover > * { background: #f0f4f1; box-shadow: none; }
.row-title { font-weight: 600; text-decoration: none; }
.row-title:hover { text-decoration: underline; }
/* DataTables right-aligns the columns sorted on a numeric data-order. */
table.dataTable th.dt-type-numeric, table.dataTable td.dt-type-numeric { text-align: left; }
.page-link { color: var(--brand); }
.active > .page-link { background: var(--brand); border-color: var(--brand); }

/* Detail: findings on the left, the document itself on the right. */
.mail { margin-bottom: 20px; }
.subject { font-weight: 600; margin: 0 0 4px; }
.mail-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; max-width: 75ch; }

.convention { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; margin-bottom: 20px; }
.convention .findings { padding: 20px; min-width: 0; }
.convention h2 { overflow-wrap: anywhere; }

.document { background: #e9ece9; border-radius: 0 6px 6px 0; }
.document iframe { display: block; width: 100%; height: 70vh; border: 0; }

@media (min-width: 1000px) {
    .convention.with-document { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .document { border-left: 1px solid var(--line); }
    .document iframe { position: sticky; top: 0; height: 100vh; }
}

.verdict { border-left: 4px solid; border-radius: 0 4px 4px 0; padding: 12px 16px; margin-bottom: 12px; }
.verdict h3 { margin: 0 0 6px; }
.verdict p, .verdict ul { margin: 0; }
.verdict-alert { background: var(--alert-bg); border-color: var(--alert); }
.verdict-alert h3 { color: var(--alert); }
.verdict-ok { background: var(--ok-bg); border-color: var(--ok); }
.verdict-ok h3 { color: var(--ok); }
.verdict-check { background: var(--check-bg); border-color: var(--check); }
.verdict-check h3 { color: var(--check); }
.alerts { padding-left: 18px; }
.alerts li + li { margin-top: 4px; }
.note { overflow-wrap: anywhere; }

dl { display: grid; grid-template-columns: minmax(120px, 190px) minmax(0, 1fr); gap: 6px 16px; margin: 0; }
dt { color: var(--quiet); font-weight: 400; }
dd { margin: 0; }
.reason { display: block; color: var(--quiet); font-size: 0.875rem; }

.expenses { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.expenses th { color: var(--quiet); font-weight: 500; font-size: 0.8125rem; }
.expenses th, .expenses td { padding: 7px 0 7px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.expenses th:first-child, .expenses td:first-child { padding-left: 0; }
.expenses .num { text-align: right; white-space: nowrap; }
.expenses tfoot td { font-weight: 600; border-bottom: 0; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
