/* The marketing site's palette, brought to the console: same white, the same
   warm band, the same gold. What is deliberately NOT brought across is the
   site's proportions - that is an editorial layout, one idea per screen, and
   this is a tool somebody reads all day. Density stays; only the materials
   change. Playfair appears on page titles and nowhere else, because a table of
   fourteen rows set in a display serif is a poster, not a list. */
:root {
    --bg: #f7f5f1;          /* the page: warm off-white, so white cards lift off it */
    --surface: #ffffff;     /* cards */
    --surface-2: #f3f0ea;   /* inputs, insets, row hover */
    --border: #e7e2d8;
    --text: #14141a;
    --muted: #5f5f6b;
    --accent: #a9833c;      /* the brand gold, darkened to carry on white */
    --accent-2: #2f6bb3;    /* informational states only, never the brand */
    --danger: #bf4d38;
    --ok: #2f7a55;
    --warn: #8a6516;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(20, 20, 26, .04), 0 10px 28px -20px rgba(20, 20, 26, .22);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

.muted { color: var(--muted); }

/* ── App bar ───────────────────────────────────────────────────────────── */
.appbar {
    display: flex; align-items: center; gap: 20px;
    padding: 10px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 30;
}
/* The mark alone. The full lockup carries a tagline that is unreadable at any
   size a top bar can give it, and a wordmark with an illegible line under it
   reads as a mistake rather than as branding. */
.appbar-logo { font-weight: 600; font-size: 15px; color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.appbar-logo-img { height: 30px; width: 30px; display: block; border-radius: 8px; }
.signin-logo { height: 56px; width: 56px; border-radius: 14px; display: block; margin: 0 auto 18px; }
.topnav { display: flex; gap: 6px; align-items: center; }
.topnav a, .nav-soon {
    padding: 7px 14px; border-radius: 999px; text-decoration: none;
    color: var(--muted); font-size: 14px;
}
.topnav a { transition: background .18s, color .18s; }
.topnav a:hover { color: var(--text); background: var(--surface-2); }
/* The page you are on is named in gold rather than merely shaded, so it reads
   at a glance instead of being found by elimination. */
.topnav a.active { color: var(--accent); background: rgba(169, 131, 60, .1); font-weight: 600; }
.nav-soon { color: #4C597C; cursor: default; }
.appbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.appbar-right .btn { padding: 8px 17px; font-size: 14px; }
/* The nav is the thing that may give way on a narrow window, not the person's
   name or the way out. */
@media (max-width: 1000px) {
    .appbar { gap: 12px; }
    .topnav { overflow-x: auto; scrollbar-width: none; }
    .topnav::-webkit-scrollbar { display: none; }
    .topnav a { white-space: nowrap; }
}

/* ── Auth screens ──────────────────────────────────────────────────────── */
.auth-wrap {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    padding: 24px;
}
.auth-card {
    width: 100%; max-width: 380px;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 28px;
}
.auth-card { text-align: center; box-shadow: var(--shadow); }
.auth-card h1 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    margin: 0 0 6px; font-size: 27px; font-weight: 600; letter-spacing: -.015em;
}
.auth-card .sub { color: var(--muted); font-size: 14.5px; margin: 0 0 22px; }
/* The fields read left-to-right even though the brand block above is centred. */
.auth-card label, .auth-card input, .auth-card .msg { text-align: left; }
.brand { font-weight: 800; letter-spacing: .5px; }
.brand .dot { color: var(--accent); }

/* ── Forms ─────────────────────────────────────────────────────────────── */
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password] {
    width: 100%; padding: 11px 12px; font-size: 15px;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: 10px; outline: none;
    transition: border-color .18s, box-shadow .18s;
}
/* The browser's own blue is the one colour on these pages that belongs to
   nobody. */
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
input:focus, select:focus, textarea:focus {
    border-color: var(--accent); box-shadow: 0 0 0 3px rgba(169, 131, 60, .14);
}

/* Pills, like the website's. Several of these are <a> rather than <button>,
   so the underline has to be turned off here or they arrive wearing one. */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 24px; font-size: 15px; font-weight: 600; line-height: 1.1;
    border: none; border-radius: 999px; cursor: pointer; text-decoration: none;
    background: var(--accent); color: #fff;
    transition: background .18s, border-color .18s, transform .1s;
}
.btn:hover { background: #8e6c30; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-block { width: 100%; margin-top: 20px; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); border-color: var(--accent); }

.linkrow { margin-top: 16px; display: flex; justify-content: space-between; font-size: 13px; }
.linkrow a { color: var(--accent); text-decoration: none; }
.linkrow a:hover { text-decoration: underline; }

.msg { margin-top: 16px; padding: 10px 12px; border-radius: 9px; font-size: 13px; display: none; }
.msg.error { display: block; background: rgba(191, 77, 56, .08); color: var(--danger); border: 1px solid rgba(191, 77, 56, .28); }
.msg.ok { display: block; background: rgba(47, 122, 85, .08); color: var(--ok); border: 1px solid rgba(47, 122, 85, .28); }

/* ── Content / cards ───────────────────────────────────────────────────── */
.page { max-width: 1000px; margin: 0 auto; padding: 24px 20px; }
/* The one place the display serif appears. */
.page h1 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 30px; font-weight: 600; letter-spacing: -.015em; margin: 0 0 4px;
}
.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px; margin-top: 16px;
    box-shadow: var(--shadow);
}
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; transition: border-color .18s, transform .12s, box-shadow .18s; }
.stat .num { font-size: 28px; font-weight: 700; }
.stat .lbl { color: var(--muted); font-size: 13px; margin-top: 4px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
th { color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; }
/* A numbered list answers "how far down is it" and "how many are left" without
   anybody counting rows with a finger down the screen. */
/* The ticket number: an identifier people say out loud, so it keeps its size. */
td.ticketno { font-variant-numeric: tabular-nums; white-space: nowrap; }
th.rownum, td.rownum {
    width: 1%; text-align: right; padding-right: 4px; white-space: nowrap;
    color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums;
}
.pill {
    display: inline-block; padding: 3px 11px; border-radius: 999px;
    font-size: 12px; font-weight: 600; letter-spacing: .01em;
    background: var(--surface-2); color: var(--muted);
}
/* Four meanings, one set of colours, used everywhere a state is shown: good,
   waiting, bad, and informational. The old file had eleven tints mixed for a
   dark surface, several of them the same colour under different names. */
.pill.have, .pill.paid, .pill.won, .pill.converted, .pill.live, .pill.Open, .pill.install
    { color: var(--ok); background: rgba(47, 122, 85, .11); }
.pill.reserved, .pill.qualified, .pill.quiet, .pill.Waiting, .pill.no_answer, .pill.reconnect, .pill.wait
    { color: var(--warn); background: rgba(138, 101, 22, .12); }
.pill.lost, .pill.offline, .pill.overdue
    { color: var(--danger); background: rgba(191, 77, 56, .1); }
.pill.new, .pill.meeting, .pill.call, .pill.contacted, .pill.service
    { color: var(--accent-2); background: rgba(47, 107, 179, .1); }
.pill.zero, .pill.cancelled, .pill.active, .pill.inactive, .pill.Closed, .pill.not_fit
    { color: var(--muted); }

/* Toolbar + small buttons */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.toolbar h1 { margin: 0; }
.toolbar .spacer { margin-left: auto; }
.btn-sm { padding: 9px 18px; font-size: 13px; border-radius: 999px; }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); background: var(--surface-2); }
.btn-danger { background: rgba(191, 77, 56, .08); color: var(--danger); border: 1px solid rgba(191, 77, 56, .3); }
.btn-link {
    background: none; border: none; color: var(--accent); cursor: pointer;
    font-size: 13px; padding: 7px 13px; border-radius: 999px;
    transition: background .15s;
}
.btn-link:hover { background: rgba(169, 131, 60, .1); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
select {
    width: 100%; padding: 11px 12px; font-size: 15px;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: 10px; outline: none;
    transition: border-color .18s, box-shadow .18s;
}
textarea {
    width: 100%; padding: 11px 12px; font-size: 15px; font-family: inherit;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: 10px; outline: none;
    transition: border-color .18s, box-shadow .18s; resize: vertical;
}

/* Modal */
.modal-backdrop {
    position: fixed; inset: 0; background: rgba(20, 20, 26, .4); backdrop-filter: blur(3px);
    display: none; align-items: center; justify-content: center; padding: 20px; z-index: 50;
}
.modal-backdrop.open { display: flex; }
.modal {
    width: 100%; max-width: 440px; background: var(--surface); box-shadow: 0 30px 80px -30px rgba(20, 20, 26, .4);
    border: 1px solid var(--border); border-radius: var(--radius); padding: 22px;
    max-height: 90vh; overflow-y: auto;
}
.modal h2 { margin: 0 0 14px; font-size: 19px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.empty { color: var(--muted); padding: 28px; text-align: center; }

/* ── Support site (2026-11-14) ─────────────────────────────────────────── */
.page.wide { max-width: 1200px; }
input[type=search], input[type=date] {
    width: 100%; padding: 11px 12px; font-size: 15px;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: 10px; outline: none;
    transition: border-color .18s, box-shadow .18s;
}
.search-row { display: flex; gap: 10px; margin-top: 16px; }
.search-row input { flex: 1; font-size: 17px; padding: 13px 14px; }

/* ── Help: tag filters, and the new-article row ────────────────────────────
   Search used to be the only way in. The tags were already written on every
   article and already being searched - they just were not clickable. A row of
   them turns a wall of titles into something you can browse without first
   knowing the word to type for it. */
.tagbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 10px; }
.tagbar--sep { width: 1px; height: 20px; background: var(--border); margin: 0 6px; }
.tagbar:empty { display: none; }
.tag, .filter {
    font: 500 12.5px/1 'Inter', system-ui, sans-serif;
    padding: 7px 11px; border-radius: 999px; cursor: pointer;
    background: var(--surface); border: 1px solid var(--border); color: var(--muted);
    transition: border-color .15s, color .15s, background .15s;
}
.tag:hover, .filter:hover { border-color: var(--accent); color: var(--text); }
.tag.on, .filter.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.tag .n, .filter .n { margin-left: 6px; opacity: .55; font-variant-numeric: tabular-nums; }
.tag.on .n, .filter.on .n { opacity: .75; }
.tag--more { border-style: dashed; }
.tag--clear { border-style: dashed; color: var(--accent); }

/* Attached to the list it adds to, rather than stranded in the page's far
   corner - and at the top, so a long list never scrolls it out of reach. */
.addrow {
    display: block; width: 100%; text-align: left; cursor: pointer;
    background: none; border: 0; border-bottom: 1px solid var(--border);
    border-radius: 0; padding: 10px 12px;
    font: 600 13.5px/1.4 'Inter', system-ui, sans-serif; color: var(--accent);
    transition: background .15s;
}
.addrow:hover { background: var(--surface-2); }
tr.click { cursor: pointer; }
tr.click:hover td { background: var(--surface-2); }
/* The row whose article is open in the reader beside it. */
tr.sel td { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
/* Done or cancelled: kept on the day so its picture stays whole, but faded
   out of the way of the work still to do. */
tr.settled { opacity: .55; }
.card h2 { font-size: 16px; margin: 0 0 12px; }
.card .card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card .card-head h2 { margin: 0; }
.card .card-head .spacer { margin-left: auto; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-2 > .card { margin-top: 0; }
@media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 14px; }
.kv .k { color: var(--muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.banner {
    margin-top: 16px; padding: 14px 16px; border-radius: var(--radius); display: flex; align-items: center; gap: 12px;
    background: rgba(169, 131, 60, .08); border: 1px solid rgba(169, 131, 60, .3);
}
.banner .spacer { margin-left: auto; }
.note { border-top: 1px solid var(--border); padding: 12px 0; }
.note:first-child { border-top: none; padding-top: 0; }
.note .meta { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.note .text { white-space: pre-wrap; font-size: 14px; line-height: 1.45; }
.note.summary .text { border-left: 3px solid var(--accent); padding-left: 10px; }
.log { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--muted); white-space: pre-wrap; word-break: break-all; }
.modal.wide { max-width: 640px; }
.back { color: var(--muted); text-decoration: none; font-size: 13px; }
.back:hover { color: var(--text); }
a.plain { color: var(--accent); text-decoration: none; }
a.plain:hover { text-decoration: underline; }
/* A display rule beats the hidden attribute: these are the elements the pages hide and show. */
.appbar[hidden], .banner[hidden], .btn[hidden], .btn-link[hidden], label[hidden], .topnav a[hidden] { display: none !important; }
#newForm[hidden], #newDone[hidden], a.btn[hidden] { display: none !important; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); padding: 2px 6px; border-radius: 5px; }

/* The e-mail preview is white because the customer's e-mail is white. On the
   old dark modal that was enough to read as a separate sheet; on a white one it
   needs an edge, or it dissolves into the card behind it. */
.mailpreview {
    background: #fff; border: 1px solid var(--border);
    border-radius: 10px; padding: 14px; min-height: 120px;
    color: #222;
}
.mailpreview a { color: #1a55c4; }

/* ── Support assistant ─────────────────────────────────────────────────── */
.assist-fab {
    position: fixed; right: 20px; bottom: 20px; z-index: 40;
    padding: 12px 18px; border: none; border-radius: 999px; cursor: pointer;
    background: var(--accent); color: #fff; font-size: 15px; font-weight: 600;
    box-shadow: 0 8px 24px -8px rgba(169, 131, 60, .5);
}
.assist-fab[hidden] { display: none !important; }
.assist {
    position: fixed; right: 20px; bottom: 76px; z-index: 45;
    width: 420px; max-width: calc(100vw - 32px); height: 560px; max-height: calc(100vh - 110px);
    display: none; flex-direction: column;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: 0 20px 60px -24px rgba(20, 20, 26, .3);
}
.assist.open { display: flex; }
.assist-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.assist-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.25; }
.assist-title span { font-size: 12px; color: var(--muted); }
/* A proper button, like everywhere else. It fits because the title and its
   line of reassurance stack rather than sitting side by side. */
.assist-head .btn { padding: 7px 15px; font-size: 13px; white-space: nowrap; }
.assist-close {
    flex: none; width: 30px; height: 30px; margin-right: -4px;
    display: inline-flex; align-items: center; justify-content: center;
    background: none; border: 0; border-radius: 999px; cursor: pointer;
    color: var(--muted); font-size: 20px; line-height: 1;
    transition: background .15s, color .15s;
}
.assist-close:hover { background: var(--surface-2); color: var(--text); }
.assist-head .spacer { margin-left: auto; }
.assist-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.assist-hint { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.assist-hint__lead { margin: 0 2px 2px; color: var(--muted); font-size: 13px; line-height: 1.5; }
/* Each example is the question itself, pressable. */
.assist-chip {
    text-align: left; cursor: pointer; max-width: 100%;
    font: 500 13px/1.45 'Inter', system-ui, sans-serif; color: var(--text);
    background: var(--surface-2); border: 1px solid var(--border);
    border-radius: 14px; padding: 9px 13px;
    transition: border-color .15s, background .15s;
}
.assist-chip:hover { border-color: var(--accent); background: var(--surface); }
/* The corner nearest the speaker is clipped, so who said what reads before
   the colours do. */
.assist-msg { max-width: 92%; padding: 10px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.assist-msg.user { align-self: flex-end; background: rgba(169, 131, 60, .12); border-radius: 14px 14px 4px 14px; }
.assist-msg.assistant { align-self: flex-start; background: var(--surface-2); border-radius: 14px 14px 14px 4px; }
.assist-msg.wait { color: var(--muted); }
.assist-msg.error { color: var(--danger); }
.assist-msg .btn-link { display: block; margin: 6px 0 -2px -9px; padding: 4px 9px; font-size: 12px; }
/* What the answer was built from, set apart from the answer itself. */
.assist-tools { margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.assist-foot { display: flex; gap: 8px; align-items: flex-end; padding: 12px 14px; border-top: 1px solid var(--border); }
.assist-foot textarea { flex: 1; font-size: 14px; padding: 9px 10px; resize: none; }
.note[hidden] { display: none !important; }
/* Wide tables scroll inside their card on a narrow window instead of being cut off. */
.card { overflow-x: auto; }
input[type=datetime-local] {
    width: 100%; padding: 11px 12px; font-size: 15px;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: 10px; outline: none;
    transition: border-color .18s, box-shadow .18s;
}
#followRow[hidden], #f_withBox[hidden], #p_withBox[hidden] { display: none !important; }
/* A short list of people to tick (who goes to a meeting). */
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; }
.checks .check { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 14px; color: var(--text); cursor: pointer; }
.checks .check input { width: auto; margin: 0; }
.pick { margin-top: 4px; display: flex; flex-direction: column; gap: 2px; }
.pick-row { text-align: left; padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 7px; color: var(--text); cursor: pointer; font-size: 14px; }
.pick-row:hover { border-color: var(--accent); background: #fff; }
#v_closeBox[hidden] { display: none !important; }
/* A card section that folds (the onboarding checklists). */
.card-head.fold { cursor: pointer; user-select: none; }
/* A folded body needs the !important: display:grid or :flex on the element
   itself beats the browser's own rule for [hidden]. */
#onboarding[hidden], #steps[hidden], .fold-body[hidden] { display: none !important; }
/* Home */
a.stat.link { display: block; text-decoration: none; color: var(--text); }
a.stat.link:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.banner { flex-wrap: wrap; }
