/* ArchiSHOTS Client Management Portal — admin styles */

:root {
    --ink:        #1c1b19;
    --ink-soft:   #4a4843;
    --muted:      #8b877e;
    --line:       #e4e1da;
    --line-soft:  #efece6;
    --paper:      #f6f5f2;
    --card:       #ffffff;
    --accent:     #1f7a45;
    --accent-bg:  #eaf7ef;
    --danger:     #b23b2e;
    --danger-bg:  #fbeceb;
    --warn:       #9a6b12;
    --warn-bg:    #fdf3e0;
    --info-bg:    #eef2f8;
    --radius:     3px;
    --shadow:     0 1px 2px rgba(28, 27, 25, .05), 0 8px 24px -12px rgba(28, 27, 25, .12);
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 24px; }
h2 { font-size: 17px; }
h3 { font-size: 14px; }

/* ── Layout ─────────────────────────────────────────────────────────── */

.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: 216px;
    flex: none;
    background: var(--card);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 30;
    transition: width .16s ease;
}

/* min-width:0 is load-bearing: without it a 3000px-wide Gantt or a long table
   pushes the flex row wider than the viewport and shoves the sidebar off
   screen. The cap keeps text readable on a wide monitor; centring it stops the
   leftover space collecting on one side. */
.page {
    flex: 1;
    min-width: 0;
    max-width: 1360px;
    margin: 0 auto;
    padding: 28px 32px 72px;
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 16px 14px 12px;
    min-height: 60px;
}

.wordmark {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
}
.wordmark img { height: 24px; width: auto; display: block; }
.wordmark-text { font-size: 15px; font-weight: 700; letter-spacing: .05em; white-space: nowrap; }
.wordmark:hover { text-decoration: none; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 4px 10px 12px; }

.nav-group-label {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 18px 8px 7px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 10px;
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--ink-soft);
    margin-bottom: 1px;
    white-space: nowrap;
}
.nav-item:hover { background: var(--paper); text-decoration: none; color: var(--ink); }
.nav-item.is-active { background: var(--ink); color: #fff; }
.nav-item.is-active .nav-icon { opacity: 1; }

.nav-icon { width: 19px; height: 19px; flex: none; opacity: .75; }
.nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.nav-badge {
    flex: none;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    line-height: 19px;
    text-align: center;
    background: var(--line);
    color: var(--ink-soft);
}
.nav-badge-danger { background: var(--danger); color: #fff; }
.nav-item.is-active .nav-badge-danger { background: #fff; color: var(--danger); }

.sidebar-foot { border-top: 1px solid var(--line-soft); padding: 10px; }

.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 10px;
    font-size: 13px;
    color: var(--muted);
}
.nav-signout { display: flex; color: var(--muted); flex: none; }
.nav-signout svg { width: 17px; height: 17px; }
.nav-signout:hover { color: var(--danger); }

.nav-collapse {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: var(--radius);
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}
.nav-collapse:hover { background: var(--paper); color: var(--ink); }
.nav-collapse svg { width: 19px; height: 19px; flex: none; transition: transform .16s ease; }

.nav-burger { display: none; }
.sidebar-scrim { display: none; }

/* ── Collapsed to an icon rail ──────────────────────────────────────── */

.nav-collapsed .sidebar { width: 60px; }
.nav-collapsed .nav-label,
.nav-collapsed .nav-group-label,
.nav-collapsed .wordmark-text { display: none; }
.nav-collapsed .nav-item { justify-content: center; padding: 10px; gap: 0; }
.nav-collapsed .nav-collapse { justify-content: center; }
.nav-collapsed .nav-collapse svg { transform: rotate(180deg); }
.nav-collapsed .nav-user { justify-content: center; padding: 6px 0 10px; }
.nav-collapsed .sidebar-head { justify-content: center; padding: 16px 8px 12px; }
.nav-collapsed .wordmark img { height: 22px; }

/* A count still has to be visible when there is no room for a label. */
.nav-collapsed .nav-item { position: relative; }
.nav-collapsed .nav-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    padding: 0 4px;
    font-size: 10px;
}

/* ── Page header ────────────────────────────────────────────────────── */

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.page-head p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.breadcrumb a { color: var(--muted); }

/* Tabs, used inside pages rather than for top-level navigation. */
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
    padding: 7px 12px;
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--ink-soft);
}
.nav a:hover { background: var(--paper); text-decoration: none; }
.nav a.is-active { background: var(--ink); color: #fff; }

/* ── Narrow screens: the rail becomes a drawer ──────────────────────── */

@media (max-width: 1080px) {
    .sidebar { width: 60px; }
    .sidebar .nav-label,
    .sidebar .nav-group-label,
    .sidebar .wordmark-text { display: none; }
    .nav-item { justify-content: center; padding: 10px; gap: 0; position: relative; }
    .nav-collapse, .nav-user { justify-content: center; }
    .nav-badge { position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px;
                 line-height: 16px; padding: 0 4px; font-size: 10px; }
    .page { padding: 24px 20px 64px; }
}

@media (max-width: 720px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 232px;
        transform: translateX(-100%);
        transition: transform .18s ease;
        box-shadow: 0 0 40px rgba(28, 27, 25, .18);
    }
    .nav-open .sidebar { transform: translateX(0); }
    .nav-open .sidebar .nav-label,
    .nav-open .sidebar .nav-group-label,
    .nav-open .sidebar .wordmark-text { display: block; }
    .nav-open .nav-item { justify-content: flex-start; padding: 9px 10px; gap: 11px; }
    .nav-open .nav-badge { position: static; }

    /* The burger rides with the page, since the bar it used to sit in is gone. */
    .nav-burger {
        display: flex;
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 40;
        width: 38px;
        height: 38px;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--card);
        color: var(--ink);
        cursor: pointer;
        box-shadow: var(--shadow);
    }
    .nav-burger svg { width: 20px; height: 20px; }
    .nav-open .nav-burger { left: 244px; }

    .sidebar-scrim {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(28, 27, 25, .35);
        z-index: 25;
    }

    .page { padding: 60px 16px 60px; }

    /* Collapsing to a rail is a desktop affordance — on a phone the drawer is
       either open or it is not. */
    .nav-collapse { display: none; }
}

/* ── Cards ──────────────────────────────────────────────────────────── */

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}
.card-head {
    padding: 14px 18px;
    border-bottom: 1px solid var(--line-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}
.card-body { padding: 18px; }
.card-body.tight { padding: 0; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

/* ── Stats ──────────────────────────────────────────────────────────── */

.stat {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow);
}
.stat-label {
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}
.stat-value { font-size: 27px; font-weight: 600; margin-top: 6px; letter-spacing: -.02em; }
.stat-note { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.stat.is-alert .stat-value { color: var(--danger); }

/* ── Tables ─────────────────────────────────────────────────────────── */

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th {
    text-align: left;
    padding: 10px 16px;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    border-bottom: 1px solid var(--line);
    background: #fbfaf8;
    white-space: nowrap;
}
table.data td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #fcfbf9; }
table.data .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.data .actions { text-align: right; white-space: nowrap; }
table.data tr.is-overdue td { background: var(--danger-bg); }
table.data tr.is-overdue:hover td { background: #f8e2e0; }

.cell-title { font-weight: 600; }
.cell-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.empty { padding: 40px 18px; text-align: center; color: var(--muted); font-size: 14px; }

/* ── Badges ─────────────────────────────────────────────────────────── */

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: var(--paper);
    color: var(--ink-soft);
    border: 1px solid var(--line);
    white-space: nowrap;
}
.badge-green  { background: var(--accent-bg); color: var(--accent); border-color: #cfe8da; }
.badge-red    { background: var(--danger-bg); color: var(--danger); border-color: #f0cfcb; }
.badge-amber  { background: var(--warn-bg);   color: var(--warn);   border-color: #eddcb8; }
.badge-blue   { background: var(--info-bg);   color: #3b5b8c;       border-color: #d3ddec; }

/* ── Buttons ────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    line-height: 1.3;
}
.btn:hover { background: var(--paper); text-decoration: none; }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-success { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-success:hover { background: #17663a; }
.btn-danger  { color: var(--danger); border-color: #e8cbc7; }
.btn-danger:hover { background: var(--danger-bg); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.link-muted { color: var(--muted); font-size: 13px; }

/* ── Forms ──────────────────────────────────────────────────────────── */

.field { margin-bottom: 16px; }
.field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 5px;
}
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=url], select, textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    font: inherit;
    font-size: 14px;
    color: var(--ink);
}
input:focus, select:focus, textarea:focus {
    outline: 2px solid rgba(28, 27, 25, .12);
    outline-offset: 1px;
    border-color: var(--ink-soft);
}
textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
select { appearance: none; background-image: none; }

.check { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; }
.check input { margin-top: 3px; flex: none; }
.check label { text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); font-weight: 400; margin: 0; }

.form-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    padding-top: 6px;
    border-top: 1px solid var(--line-soft);
    margin-top: 20px;
    padding-top: 18px;
}

.section-title {
    font-size: 11px;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    margin: 26px 0 12px;
    padding-bottom: 7px;
    border-bottom: 1px solid var(--line-soft);
}
.section-title:first-child { margin-top: 0; }

/* Repeating email / mobile rows */
.repeat-row { display: flex; gap: 8px; margin-bottom: 8px; }
.repeat-row input { flex: 1; }
.repeat-remove {
    flex: none;
    width: 36px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: var(--radius);
    color: var(--muted);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}
.repeat-remove:hover { color: var(--danger); border-color: #e8cbc7; }

/* ── Filters ────────────────────────────────────────────────────────── */

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filters .field { margin: 0; min-width: 160px; }
.filters .field label { font-size: 11px; }

/* ── Flash ──────────────────────────────────────────────────────────── */

.flash {
    padding: 11px 16px;
    border-radius: var(--radius);
    margin-bottom: 14px;
    font-size: 14px;
    border: 1px solid;
}
.flash-success { background: var(--accent-bg); border-color: #cfe8da; color: #175c34; }
.flash-error   { background: var(--danger-bg); border-color: #f0cfcb; color: #8c2b20; }
.flash-info    { background: var(--info-bg);   border-color: #d3ddec; color: #33507d; }
.flash-warning { background: var(--warn-bg);   border-color: #eddcb8; color: #7d560d; }

/* ── Notes (admin only) ─────────────────────────────────────────────── */

.notes-box {
    background: #fffdf5;
    border: 1px solid #ecdfb8;
    border-radius: var(--radius);
    padding: 14px 16px;
    font-size: 14px;
    white-space: pre-wrap;
    line-height: 1.6;
}
.notes-label {
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--warn);
    font-weight: 600;
    margin-bottom: 6px;
}

/* ── Definition lists ───────────────────────────────────────────────── */

dl.detail { margin: 0; display: grid; grid-template-columns: 150px 1fr; gap: 9px 16px; font-size: 14px; }
dl.detail dt { color: var(--muted); font-size: 13px; }
dl.detail dd { margin: 0; }

/* ── Login ──────────────────────────────────────────────────────────── */

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.login-card {
    width: 100%;
    max-width: 372px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 34px 32px;
}
.login-brand { text-align: center; margin-bottom: 26px; }
.login-brand img { max-width: 220px; height: auto; margin: 0 auto 10px; display: block; }
.login-brand .name { font-size: 22px; font-weight: 700; letter-spacing: .08em; }
.login-brand .tag {
    font-size: 10px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 4px;
}

/* ── Invoice preview ────────────────────────────────────────────────── */

.pdf-frame {
    width: 100%;
    height: 860px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}

.totals-list { font-size: 14px; }
.totals-list div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 7px 0;
    border-bottom: 1px solid var(--line-soft);
}
.totals-list div:last-child { border-bottom: 0; }
.totals-list .grand { font-weight: 700; font-size: 17px; padding-top: 12px; }
.totals-list .label { color: var(--muted); }

@media (max-width: 640px) {
    dl.detail { grid-template-columns: 1fr; gap: 2px 0; }
    dl.detail dd { margin-bottom: 10px; }
    table.data { font-size: 13px; }
    table.data th, table.data td { padding: 10px 12px; }
}

/* ── Projects ───────────────────────────────────────────────────────── */

.meter {
    height: 6px;
    background: var(--line-soft);
    border-radius: 3px;
    overflow: hidden;
}
.meter span {
    display: block;
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
}

.nav.tabs a.tab-link { cursor: pointer; }

.task-check {
    width: 22px;
    height: 22px;
    border: 1.5px solid var(--line);
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    color: transparent;
    padding: 0;
}
.task-check:hover { border-color: var(--accent); }
.task-check.is-done {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.gantt-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12.5px;
    color: var(--muted);
    padding-bottom: 14px;
}
.gantt-legend i {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 6px;
    vertical-align: -1px;
}

/* The chart is wider than the page on any real project, so it scrolls
   inside its own box rather than stretching the layout. */
.gantt-scroll { overflow-x: auto; }
.gantt-scroll .gantt .bar-wrapper { cursor: pointer; }
.gantt-scroll .bar-milestone .bar { rx: 3; }

.gantt-tip { padding: 10px 12px; font-size: 13px; line-height: 1.5; }
.gantt-tip strong { display: block; margin-bottom: 3px; }
.gantt-tip div { color: #d8d8d8; font-size: 12px; }

/* ── Split billing rows ─────────────────────────────────────────────── */

.split-row {
    display: grid;
    grid-template-columns: 1fr 150px 170px 46px 36px;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}
.split-row-head {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 4px;
}
.split-total {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    align-items: baseline;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line-soft);
    font-size: 14px;
}
.split-total strong { font-variant-numeric: tabular-nums; }

@media (max-width: 720px) {
    .split-row { grid-template-columns: 1fr 46px 36px; }
    .split-row-head { display: none; }
}

/* ── Clients accordion ─────────────────────────────────────────────────── */

.client-row { border-bottom: 1px solid var(--line-soft); }
.client-row:last-child { border-bottom: 0; }

.client-summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    cursor: pointer;
    list-style: none;
}
.client-summary::-webkit-details-marker { display: none; }
.client-summary::marker { content: ''; }

.client-summary .chevron {
    flex: none;
    font-size: 11px;
    color: var(--muted);
    transition: transform .12s ease;
}
.client-row[open] > .client-summary .chevron { transform: rotate(90deg); }

.client-summary-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.client-summary-main .cell-sub { margin-top: 0; }

/* A submit button as a switch — real form control, not decoration. */
.client-switch-form { flex: none; }
.switch {
    position: relative;
    width: 38px;
    height: 22px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--paper);
    cursor: pointer;
}
.switch.is-on { background: var(--accent); border-color: var(--accent); }
.switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(28, 27, 25, .25);
    transition: left .12s ease;
}
.switch.is-on .switch-thumb { left: 19px; }

.client-row-body { padding: 0 18px 18px; }
.client-contact { font-size: 13.5px; color: var(--ink-soft); padding-bottom: 12px; }

table.client-services { font-size: 13.5px; }
table.client-services th,
table.client-services td { padding: 8px 12px; }
table.client-services tr.is-muted-row td { color: var(--muted); }
table.client-services tr.is-muted-row .cell-title { font-weight: 500; color: var(--muted); }

.client-row-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 14px;
}

/* A <select> that reads as a coloured badge rather than a plain form field. */
.status-select {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 3px 22px 3px 8px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238b877e'/%3E%3C/svg%3E") no-repeat right 8px center;
    color: var(--ink-soft);
    appearance: none;
    cursor: pointer;
}
.status-select.is-ongoing   { background-color: var(--accent-bg); color: var(--accent); border-color: #cfe8da; }
.status-select.is-on_hold   { background-color: var(--warn-bg);   color: var(--warn);   border-color: #eddcb8; }
.status-select.is-abandoned { background-color: var(--danger-bg); color: var(--danger); border-color: #f0cfcb; }

@media (max-width: 720px) {
    .client-summary { flex-wrap: wrap; }
    .client-summary-main { order: 3; flex-basis: 100%; }
}

/* ── Create Invoice — hand-picked items ─────────────────────────────────── */

.pick-service { margin-bottom: 16px; }
.pick-service:last-of-type { margin-bottom: 0; }
.pick-service-name {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line-soft);
    margin-bottom: 6px;
}
.pick-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 4px;
    font-size: 14px;
    cursor: pointer;
}
.pick-row:hover { background: #fcfbf9; }
.pick-row input { flex: none; }
.pick-desc { flex: 1; min-width: 0; }
.pick-due { flex: none; width: 110px; color: var(--muted); font-size: 13px; }
.pick-amount { flex: none; width: 100px; text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 600px) {
    .pick-row { flex-wrap: wrap; }
    .pick-due, .pick-amount { width: auto; }
}


/* ---------------------------------------------------------------------------
   Overall analysis
   --------------------------------------------------------------------------- */
table.data tr.is-highlight td { background: var(--info-bg); }
.rev-bar { position: relative; height: 16px; }
.rev-bar span { position: absolute; left: 0; border-radius: 3px; }
.rev-bar-billed { top: 0; height: 16px; background: var(--line); }
.rev-bar-received { top: 4px; height: 8px; background: var(--accent); }
.rev-legend { display: flex; gap: 18px; padding: 10px 18px 14px; font-size: 12.5px; color: var(--muted); }
.rev-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.rev-key-billed { background: var(--line); }
.rev-key-received { background: var(--accent); }
.rev-summary-figures { display: flex; gap: 22px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.rev-summary-figures > span { display: flex; flex-direction: column; }
.rev-summary-figures .cell-sub { font-weight: 400; margin: 0; }
.rev-summary-figures .is-owing { color: var(--danger); }
.table-scroll { overflow-x: auto; }
@media (max-width: 760px) {
    .rev-summary-figures { order: 4; flex-basis: 100%; justify-content: flex-start; text-align: left; }
}

/* GST page — quarter tabs and totals row */
.qtabs { display: flex; flex-wrap: wrap; gap: 6px; }
.qtabs a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); text-decoration: none; font-size: 13.5px; }
.qtabs a.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
table.data tr.is-total td { border-top: 2px solid var(--line); background: var(--line-soft); }
