:root {
  --bg: #f4f5f7;
  --card: #fff;
  --text: #1f2430;
  --muted: #6b7280;
  --line: #e3e5ea;
  /* ElectricalOM brand (the eom logo): red accent on charcoal. */
  --primary: #a00304;
  --primary-text: #fff;
  --primary-soft: #fbeeee; --primary-line: #f0cfcf;
  --danger: #c0392b;
  --success-bg: #e7f6ec; --success: #1e7b3c;
  --error-bg: #fdecea; --error: #a8281b;
  --top: #2c2a2b; --top-text: #f2f0f0;
  --radius: 8px;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--primary); }
h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.05rem; margin: 1.25rem 0 .75rem; }
.card > h2:first-child, .card-head h2 { margin-top: 0; }
code { background: var(--line); padding: 0 .3em; border-radius: 4px; }

/* Top bar */
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; padding: .6rem 1.25rem; background: var(--top); color: var(--top-text); }
.topbar a, .topbar summary { color: var(--top-text); text-decoration: none; }
.brand { font-weight: 600; margin-right: .5rem; }
.mainnav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; flex: 1; }
.mainnav > a, .mainnav summary, .mainnav .planned { padding: .35rem .65rem; border-radius: 6px; }
.mainnav > a:hover, .mainnav summary:hover, .mainnav .active { background: rgba(255,255,255,.12); }
.mainnav .planned { opacity: .4; cursor: default; }
.menu { position: relative; }
.menu summary { cursor: pointer; list-style: none; }
.menu summary::after { content: " ▾"; font-size: .8em; }
.menu > div { position: absolute; z-index: 10; top: 2.2rem; left: 0; min-width: 200px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 20px rgba(0,0,0,.12); padding: .35rem 0; }
.menu > div a { display: block; padding: .4rem 1rem; color: var(--text); }
.menu > div a:hover { background: var(--bg); }
.menu > div a.current { color: var(--primary); font-weight: 600; }
.menu-group { padding: .5rem 1rem .15rem; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.menu-col > .menu-group ~ .menu-group, .menu > div > .menu-group ~ .menu-group { border-top: 1px solid var(--line); margin-top: .35rem; padding-top: .6rem; }
.menu-wide > div { display: grid; grid-template-columns: repeat(3, minmax(190px, 1fr)); width: 640px; max-width: calc(100vw - 1rem); }
.menu .badge { margin-left: .25rem; }
@media (max-width: 760px) { .menu-wide > div { grid-template-columns: 1fr; min-width: 220px; } }
/* Tabs: one section of a long page at a time */
.tabs-nav { display: flex; flex-wrap: wrap; gap: .15rem; border-bottom: 1px solid var(--line); margin: 0 0 1rem; }
.tabs-nav a { padding: .5rem .9rem; border: 1px solid transparent; border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; margin-bottom: -1px; color: var(--muted); text-decoration: none; }
.tabs-nav a:hover { color: var(--text); background: rgba(0,0,0,.03); }
.tabs-nav a[aria-selected="true"] { background: var(--card); border-color: var(--line); color: var(--text); font-weight: 600; }
.tabs-nav .count { display: inline-block; min-width: 1.4em; padding: 0 .35em; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); font-size: .75rem; text-align: center; color: var(--muted); font-weight: 400; }
.tab-panel[hidden] { display: none; }
.card .tab-panel > h2:first-child { margin-top: 0; }
.usernav { display: flex; align-items: center; gap: .75rem; }
.usernav .linkbtn { color: var(--top-text); }

/* Layout */
.page { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.page-wide { max-width: none; padding-left: 1.25rem; padding-right: 1.25rem; } /* admin area: the full window */
.page.narrow { max-width: 820px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; overflow-x: auto; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0 1rem; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.spacer { flex: 1; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.stat { display: flex; flex-direction: column; margin: 0; }
.stat-value { font-size: 1.9rem; font-weight: 600; }
a.stat-link { color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
a.stat-link:hover, a.stat-link:focus-visible { border-color: var(--primary); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
a.stat-link:hover .stat-value { color: var(--primary); }
.muted { color: var(--muted); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

/* Tables and lists */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; }
.table tbody tr:hover { background: #fafbfc; }
.table td.right, .table th.right { text-align: right; }
.table tfoot th { text-transform: none; letter-spacing: 0; font-size: .95rem; color: var(--text); border-top: 2px solid var(--line); }
.details { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 0; }
.details dt { color: var(--muted); }
.details dd { margin: 0; }
.pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin-top: 1rem; }
.tag { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .85em; background: color-mix(in srgb, var(--tag) 15%, white); color: color-mix(in srgb, var(--tag) 75%, black); border: 1px solid color-mix(in srgb, var(--tag) 40%, white); }
.status { display: inline-block; padding: .05rem .55rem; border-radius: 999px; font-size: .85em; background: var(--line); }
.status-active { background: var(--success-bg); color: var(--success); }
.status-inactive { background: #fff4e0; color: #8a5300; }
.status-closed { background: #eceef1; color: var(--muted); }
.note { border-left: 3px solid var(--line); padding: .5rem .75rem; margin: .75rem 0; background: #fafbfc; }
.note.sticky { border-color: #e0a100; background: #fffbea; }
.note-meta { font-size: .85em; color: var(--muted); margin-bottom: .25rem; }
.note-form textarea { width: 100%; }

/* Forms */
.form .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .75rem 1rem; }
.field { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .5rem; }
.field span { font-size: .85rem; color: var(--muted); }
input, select, textarea { font: inherit; color: inherit; padding: .45rem .6rem; border: 1px solid #cfd3da; border-radius: 6px; background: #fff; max-width: 100%; }
input[type=color] { padding: .1rem; height: 2.3rem; width: 4rem; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--primary) 40%, transparent); border-color: var(--primary); }
.checks { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; margin: .5rem 0 1rem; }
.check { display: inline-flex; align-items: center; gap: .4rem; }
.perms { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.perms fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem 1rem 1rem; margin: 0; }
.perms legend { font-weight: 600; padding: 0 .3rem; }
.perms .check { display: flex; margin: .2rem 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 1rem; }
/* The Website forms' Save button: stays at the top of the window while scrolling (under the editor's pop-ups and the menus). */
.website-page-top { position: sticky; top: 0; z-index: 5; margin: 0 0 1rem; padding: .6rem 0; background: var(--bg); border-bottom: 1px solid var(--line); }
.card > .website-page-top { margin-top: -.25rem; background: var(--card); }
.search { display: flex; flex-wrap: wrap; gap: .5rem; }
.search input[type=search] { min-width: 260px; }
form.inline { display: inline; }

.small { font-size: .85rem; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.choice { border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem; margin: 0 0 1rem; min-width: 0; }
fieldset.choice.new { border-style: dashed; }
/* Revenue split: asked for when an invoice becomes paid or payment pending, never on a proforma */
fieldset.split-fields { border: 1px solid var(--primary-line); background: var(--primary-soft); border-radius: var(--radius); padding: .75rem 1rem; margin: .75rem 0; min-width: 0; }
fieldset.split-fields legend { font-weight: 600; padding: 0 .35rem; }
.split-off .split-col { display: none; }
.pricing-wrap { overflow-x: auto; }
.pricing td, .pricing th { white-space: nowrap; }
.pricing input[type=number] { display: block; width: 6.5rem; margin-bottom: .25rem; }
code.key { font-size: 1.05rem; padding: .15rem .45rem; letter-spacing: .03em; user-select: all; }
.status-pending { background: #fff4e0; color: #8a5300; }
.status-suspended, .status-fraud { background: var(--error-bg); color: var(--error); }
.status-terminated, .status-cancelled, .status-expired { background: #eceef1; color: var(--muted); }

.lines input.wide, .lines textarea.wide { width: 100%; min-width: 220px; }
.lines textarea { resize: vertical; }
.lines input.amount { width: 8rem; text-align: right; }
.lines input.qty { width: 5.5rem; text-align: right; }
.totals { max-width: 360px; margin-left: auto; }
.totals dd { text-align: right; }
.owed { color: var(--error); font-weight: 600; }
details.inline-form { display: inline-block; text-align: left; }
details.inline-form[open] { display: block; background: var(--bg); padding: .75rem; border-radius: var(--radius); margin-top: .25rem; }
.inv-paid, .stage-accepted { background: var(--success-bg); color: var(--success); }
.inv-unpaid, .stage-delivered, .stage-onhold { background: #fff4e0; color: #8a5300; }
.inv-paymentpending { background: #e8eefc; color: #2f4f9e; }
.inv-overdue, .inv-collections { background: var(--error-bg); color: var(--error); }
.inv-cancelled, .inv-refunded, .stage-lost, .stage-dead, .stage-draft { background: #eceef1; color: var(--muted); }

.badge { display: inline-block; min-width: 1.4em; padding: 0 .4em; border-radius: 999px; background: #e0a100; color: #1f2430; font-size: .75rem; font-weight: 700; text-align: center; line-height: 1.5; }
.tabs { display: flex; flex-wrap: wrap; gap: .25rem; }
.tabs a { padding: .35rem .75rem; border-radius: 6px; text-decoration: none; color: var(--text); border: 1px solid var(--line); background: var(--card); }
.tabs a.active { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.table.tickets tr.unread td:first-child a { font-weight: 700; }
.prio { font-size: .85em; }
.prio-high { color: var(--error); font-weight: 600; }
.prio-low { color: var(--muted); }
/* A ticket: the reply and the conversation take the width; the ticket details are a narrow column. */
.ticket-layout { grid-template-columns: minmax(0, 1fr) minmax(260px, 330px); align-items: start; }
@media (max-width: 900px) { .ticket-layout { grid-template-columns: 1fr; } }
.wide-text { width: 100%; }
.thread .msg { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: .75rem; }
.thread .msg-client { border-left-color: #e0a100; }
.thread .msg-staff { border-left-color: var(--primary); background: var(--primary-soft); }
.thread .msg header { margin-bottom: .4rem; }
.thread .msg .body { overflow-wrap: anywhere; line-height: 1.55; }
/* Messages written with the editor (paragraphs, lists, quotes, code, tables). */
.thread .msg .body > :first-child { margin-top: 0; }
.thread .msg .body > :last-child { margin-bottom: 0; }
.thread .msg .body p { margin: 0 0 .6em; }
.thread .msg .body :is(ul, ol) { margin: 0 0 .6em; padding-left: 1.4em; }
.thread .msg .body :is(h2, h3, h4) { font-size: 1.05rem; margin: .8em 0 .4em; }
.thread .msg .body blockquote { margin: 0 0 .6em; padding: .2em .9em; border-left: 3px solid var(--line); color: var(--muted); }
.thread .msg .body pre { background: #1f2430; color: #f3f4f6; padding: .6em .9em; border-radius: 6px; overflow: auto; white-space: pre-wrap; font-size: .88rem; }
.thread .msg .body table { border-collapse: collapse; margin: 0 0 .6em; }
.thread .msg .body :is(th, td) { border: 1px solid var(--line); padding: .25em .5em; }
.attachments { font-size: .9rem; margin: .5rem 0 0; }
ul.log { list-style: none; padding: 0; margin: 0; max-height: 320px; overflow-y: auto; }
ul.log li { padding: .35rem 0; border-bottom: 1px solid var(--line); font-size: .9rem; }

.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.report-card { display: block; text-decoration: none; color: var(--text); margin: 0; }
.report-card:hover { border-color: var(--primary); }
.report-card h2 { color: var(--primary); }
.table.report th.right, .table.report td.right { text-align: right; }
.table.report tfoot th { border-top: 2px solid var(--text); color: var(--text); font-size: .9rem; text-transform: none; letter-spacing: 0; }
@media print {
  .topbar, .toolbar, .alert, .tabs-nav { display: none !important; }
  .tab-panel[hidden] { display: block; }
  body { background: #fff; }
  .card { border: 0; padding: 0; break-inside: avoid; }
}

.log-pre { white-space: pre-wrap; word-break: break-all; max-height: 180px; overflow: auto; margin: 0; font-size: .8rem; }
.email-frame { width: 100%; min-height: 520px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }

/* Buttons */
.btn { display: inline-block; padding: .45rem .95rem; border-radius: 6px; border: 1px solid #cfd3da; background: #fff; color: var(--text); text-decoration: none; cursor: pointer; font: inherit; }
.btn:hover { background: var(--bg); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn-primary:hover { background: color-mix(in srgb, var(--primary) 85%, black); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, white); }
.btn.wide { width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--primary); cursor: pointer; font: inherit; text-decoration: underline; }
.linkbtn.danger { color: var(--danger); }

/* Alerts */
.alert { padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; }
.alert ul { margin: 0; padding-left: 1.2rem; }
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-error { background: var(--error-bg); color: var(--error); }

/* Login */
body.login { display: grid; place-items: center; min-height: 100vh; padding: 1rem; }
.login-card { width: 100%; max-width: 380px; }
.login-card h1 { margin-bottom: .1rem; }

@media (max-width: 640px) {
  .topbar { padding: .6rem 1rem; }
  .search input[type=search] { min-width: 0; flex: 1; }
  .details { grid-template-columns: 1fr; gap: 0; }
  .details dd { margin-bottom: .5rem; }
}

/* Ticket feedback: 1-10 score buttons */
.feedback-staff { border: 1px solid var(--line); border-radius: 8px; padding: .75rem 1rem 1rem; margin: 0 0 1rem; }
.feedback-staff legend { font-weight: 600; padding: 0 .35rem; }
.rating-scale { display: flex; flex-wrap: wrap; gap: .35rem; }
.rating-scale label { position: relative; }
.rating-scale input { position: absolute; opacity: 0; inset: 0; }
.rating-scale span { display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; font-weight: 600; background: var(--card); }
.rating-scale input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.rating-scale input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.rating-ends { display: flex; justify-content: space-between; max-width: 27rem; margin: .25rem 0 .5rem; }
.score { display: inline-block; min-width: 2.2rem; text-align: center; padding: .1rem .4rem; border-radius: 4px; font-weight: 700; }
.score-good { background: #e3f4e5; color: #1b5e20; }
.score-mid { background: #fff4e0; color: #8a5300; }
.score-bad { background: #fdecea; color: #b71c1c; }
.inv-credited { background: #eceef1; color: var(--muted); }
.billto-box { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .9rem; margin: .75rem 0; }
.billto-box summary { cursor: pointer; }
.billto-box[open] summary { margin-bottom: .5rem; }

/* Two-factor setup */
.qr { margin: .75rem 0; min-height: 180px; }
.qr img, .qr canvas { background: #fff; padding: 8px; border-radius: 6px; }
.secret { font-size: 1.05rem; letter-spacing: .05em; }
.steps li { margin-bottom: 1rem; }
.backup-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: .5rem; padding: 0; list-style: none; }
.backup-codes code { font-size: 1.05rem; }
.mail-preview { border: 1px solid var(--line); border-radius: 8px; padding: .75rem 1rem; background: var(--bg); max-height: 30rem; overflow: auto; }

/* Accounting */
.exp-paid { background: #e3f4e5; color: #1b5e20; }
.exp-unpaid, .exp-partpaid { background: #fff4e0; color: #8a5300; }
.exp-overdue { background: #fdecea; color: #b71c1c; }

/* Top search */
.topsearch { position: relative; flex: 0 1 15rem; min-width: 9rem; }
.topsearch input[type="search"] { width: 100%; padding: .4rem .7rem; border-radius: 6px; border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.12); color: var(--top-text); font: inherit; }
.topsearch input[type="search"]::placeholder { color: rgba(255,255,255,.6); }
.topsearch input[type="search"]:focus { outline: none; background: #fff; color: var(--text); border-color: #fff; }
.topsearch input[type="search"]:focus::placeholder { color: var(--muted); }
.topsearch-results { position: absolute; z-index: 50; top: calc(100% + .35rem); right: 0; width: min(34rem, calc(100vw - 1rem)); max-height: 70vh; overflow: auto; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: .35rem 0; }
.topsearch-results .sr-group { padding: .5rem .9rem .2rem; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.topsearch-results a { display: block; padding: .4rem .9rem; color: var(--text); text-decoration: none; }
.topsearch-results a.sr-item:hover, .topsearch-results a.active { background: var(--bg); }
.topsearch-results .sr-title { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topsearch-results .sr-meta { display: block; font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topsearch-results .sr-all { border-top: 1px solid var(--line); margin-top: .35rem; color: var(--primary); font-size: .9rem; }
.topsearch-results .sr-empty { padding: .6rem .9rem; color: var(--muted); }
.search-results { list-style: none; margin: 0; padding: 0; }
.search-results li { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.search-results li:last-child { border-bottom: 0; }
@media (max-width: 700px) { .topsearch { flex: 1 1 100%; order: 3; } }

/* Ticket tabs: recently opened tickets */
.ticket-tabs { display: flex; flex-wrap: wrap; gap: .35rem; margin: -.25rem 0 1rem; }
.ticket-tab { display: inline-flex; align-items: center; max-width: 100%; border: 1px solid var(--line); border-left: 4px solid var(--tag, #888); border-radius: 6px; background: var(--card); font-size: .88rem; }
.ticket-tab a { color: var(--text); text-decoration: none; padding: .3rem .55rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ticket-tab a:first-child:hover { background: var(--bg); }
.ticket-tab.current { background: var(--bg); box-shadow: inset 0 -2px 0 var(--primary); }
.ticket-tab .close { color: var(--muted); padding: .3rem .45rem; border-left: 1px solid var(--line); }
.ticket-tab .close:hover { color: #b71c1c; }
.ticket-tab .dot { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: #d84315; margin-right: .35rem; vertical-align: middle; }.licence-link code { font-size: .85rem; white-space: nowrap; }
.field-with-button { display: flex; align-items: flex-end; gap: .5rem; }
.field-with-button .field { flex: 1; margin-bottom: 0; }
.back-links { margin: 0 0 .5rem; }
.logo-preview { max-width: 240px; max-height: 80px; padding: .5rem; background: #fff; border: 1px solid var(--line); border-radius: 4px; }
/* Live chat: top bar pill, console, transcripts */
.lc-pill { display: inline-flex; align-items: center; gap: .35rem; color: var(--top-text); text-decoration: none; padding: .15rem .55rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); font-size: .9rem; }
.lc-pill-dot { width: .55rem; height: .55rem; border-radius: 50%; background: #9aa3b5; }
.lc-st-online .lc-pill-dot { background: #22c55e; box-shadow: 0 0 0 2px rgba(34,197,94,.3); }
.lc-st-brb .lc-pill-dot, .lc-st-away .lc-pill-dot { background: #f59e0b; }
.lc-st-busy .lc-pill-dot { background: #dc2626; }
.lc-st-hidden .lc-pill-dot { background: transparent; border: 2px solid #9aa3b5; }
.lc-status-pick { display: inline-flex; align-items: center; gap: .45rem; padding: .2rem .3rem .2rem .6rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
.lc-status-pick select { border: 0; background: transparent; font: inherit; font-weight: 600; padding: .25rem; }
.lc-status-help { margin: -.25rem 0 .75rem; }
.logo-preview-dark { background: var(--top); border-color: var(--top); }
.lc-team .lc-item { flex-wrap: nowrap; gap: .5rem; }
.lc-team .lc-pill-dot { flex: none; width: .6rem; height: .6rem; border-radius: 50%; background: #9aa3b5; }
.lc-team .lc-team-name { flex: 1; font-weight: 600; }
.lc-popup-title { font-size: 1.1rem; margin-right: .5rem; }
.page-popup { max-width: none; padding-top: 1rem; }
.lc-console { display: grid; grid-template-columns: minmax(240px, 300px) 1fr; gap: 1rem; align-items: start; }
@media (max-width: 800px) { .lc-console { grid-template-columns: 1fr; } }
.lc-side .card h2 { margin-top: 0; }
.lc-list { list-style: none; margin: 0; padding: 0; }
.lc-item { padding: .45rem .5rem; border-radius: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; }
.lc-item.current { background: var(--bg); }
.lc-item.needs-reply > a { font-weight: 700; }
.lc-item.needs-reply > a::after { content: " •"; color: #d84315; }
.lc-item .btn-small { margin-left: auto; padding: .15rem .6rem; font-size: .85rem; }
.lc-chat { display: flex; flex-direction: column; min-height: 460px; }
.lc-chat-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: .6rem; }
.lc-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.lc-visitor-info { margin: .5rem 0; font-size: .9rem; }
.lc-visitor-info summary { cursor: pointer; color: var(--muted); }
.lc-pages { margin: .25rem 0 0; padding-left: 1.4rem; max-height: 180px; overflow-y: auto; }
.lc-messages { flex: 1; overflow-y: auto; max-height: 420px; min-height: 220px; padding: .5rem; background: var(--bg); border-radius: var(--radius); }
.lc-transcript { max-height: none; }
.lc-msg { margin: 0 0 .6rem; max-width: 80%; }
.lc-msg.lc-staff { margin-left: auto; text-align: right; }
.lc-who { font-size: .75rem; color: var(--muted); }
.lc-text { display: inline-block; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; padding: .45rem .7rem; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.lc-staff .lc-text { background: var(--primary-soft); border-color: var(--primary-line); }
.lc-file a { text-decoration: none; }
.lc-thumb { display: block; max-width: 240px; max-height: 180px; border-radius: 6px; margin-bottom: .3rem; background: #fff; }
.lc-system { text-align: center; font-size: .8rem; color: var(--muted); margin: .4rem 0 .7rem; }
.lc-typing { min-height: 1.3em; margin: .25rem 0; }
.lc-compose textarea { width: 100%; }
.lc-compose-row { display: flex; gap: .5rem; align-items: center; margin-top: .4rem; }
.lc-ref { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-embed { display: block; padding: .5rem .7rem; white-space: pre-wrap; word-break: break-all; user-select: all; }
.lc-status-missed { background: var(--error-bg); color: var(--error); }
.lc-status-active, .lc-status-waiting { background: var(--success-bg); color: var(--success); }
/* Website admin: block editor, menu editor, media library */
.website-nav { flex-wrap: wrap; gap: .4rem; }
.slug-field { display: flex; align-items: center; gap: .25rem; }
.slug-field input { flex: 1; }
.wb-list { display: flex; flex-direction: column; gap: .75rem; margin-bottom: .75rem; }
.wb-block { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: var(--radius); }
.wb-head { display: flex; align-items: center; gap: .4rem; padding: .5rem .75rem; border-bottom: 1px solid var(--line); background: #faf8f8; border-radius: var(--radius) var(--radius) 0 0; }
.wb-body { padding: .75rem; }
/* Collapsed block: only its header (name and a summary) shows. */
.wb-collapsed > .wb-body { display: none; }
.wb-collapsed > .wb-head { border-bottom: 0; border-radius: var(--radius); }
.wb-toggle { min-width: 2rem; padding-left: .3rem; padding-right: .3rem; font-size: 1.05rem; line-height: 1.2; }
.wb-name { cursor: pointer; user-select: none; }
.wb-sum { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-tools { display: flex; justify-content: flex-end; gap: .5rem; margin-bottom: .5rem; }
.wb-rich { width: 100%; font-family: ui-monospace, Consolas, monospace; }
.wb-add { display: flex; gap: .5rem; align-items: center; padding: .75rem; border: 2px dashed var(--line); border-radius: var(--radius); margin-bottom: 1rem; }
.wb-rows { margin: .5rem 0; }
.wb-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) auto; gap: .5rem; align-items: end; padding: .5rem; border: 1px solid var(--line); border-radius: 6px; margin-bottom: .5rem; background: #fcfcfd; }
.wb-row .field { margin: 0; }
.wb-row .check { align-self: center; }
.wb-media { display: flex; gap: 1rem; align-items: flex-end; flex-wrap: wrap; }
.wb-media-preview { max-height: 90px; max-width: 220px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.wb-media-pick { display: flex; flex-direction: column; gap: .3rem; }
.wb-media-pick .wb-media-preview { max-height: 54px; max-width: 160px; align-self: flex-start; }
.wb-row-tall { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) auto; }
.wb-row-tall .field:has(textarea) { grid-column: 1 / -2; }
.wb-row textarea { width: 100%; }
.wb-row-tools { display: flex; gap: .15rem; align-self: start; }
.wb-row-add { display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-start; }
.wb-many-box { display: flex; flex-direction: column; gap: .4rem; flex-basis: 100%; }
.wb-many { min-width: 280px; max-width: 100%; }
/* No wider than the website's 1140px content (plus about 4rem of editor borders and padding per column), so a
   column's text and pictures show at the size they have on the page. */
.wb-cols { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: .75rem; margin: .5rem 0; max-width: calc(1140px + var(--n, 2) * 4rem); }
.wb-cols[data-n="2"][data-widths="wide-left"] { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.wb-cols[data-n="2"][data-widths="wide-right"] { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.wb-cols[data-n="3"][data-widths="wide-left"] { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); }
.wb-cols[data-n="3"][data-widths="wide-right"] { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2fr); }
.wb-col { border: 1px dashed var(--line); border-radius: var(--radius); padding: .5rem; background: #fbfafa; min-width: 0; }
.wb-col-head { margin-bottom: .4rem; }
.wb-cols.wb-cols-border > .wb-col { border: var(--wb-col-border); } /* the border the columns will have on the page */
.wb-text-frame.wb-text-border { border: var(--wb-text-border); border-radius: 8px; padding: .5rem; } /* the border the text will have on the page */
.wb-col .wb-block { border-left-width: 3px; border-left-color: var(--primary-line, #d99); }
.wb-col .wb-add { padding: .4rem; margin-bottom: 0; flex-wrap: wrap; }
.wb-col .wb-add select { max-width: 100%; }
@media (max-width: 1100px) { .wb-cols, .wb-cols[data-widths] { grid-template-columns: minmax(0, 1fr); } }
.wb-section { margin-top: .75rem; border-top: 1px solid var(--line); padding-top: .4rem; }
.wb-section > summary { cursor: pointer; color: var(--muted); font-size: .88rem; }
.wb-section.wb-section-set > summary { color: var(--primary); font-weight: 600; }
.wb-section .grid { margin-top: .5rem; }
.website-versions > summary { cursor: pointer; }
.website-versions .table { margin-top: .75rem; }
.import-results { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.import-results li { padding: .5rem .75rem; border-radius: 6px; border-left: 4px solid var(--success); background: var(--success-bg); }
.import-results li.failed { border-left-color: var(--danger, #b42318); background: #fdecea; }
.btn-small { padding: .15rem .55rem; font-size: .85rem; }
.wm-list { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .75rem; }
.wm-item { border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem; background: var(--card); }
.wm-row { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.wm-row .wm-label { flex: 1 1 180px; font-weight: 600; }
.wm-row input[type="text"]:not(.wm-label) { flex: 1 1 220px; }
.wm-children { margin: .4rem 0 0 1.75rem; display: flex; flex-direction: column; gap: .4rem; }
.wm-sub { background: #fbfbfc; }
.wm-sub .wm-label { font-weight: 400; }
.wm-add-sub { margin: .35rem 0 0 1.75rem; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; }
.media-item { display: flex; flex-direction: column; gap: .35rem; border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem; }
.media-thumb { display: flex; align-items: center; justify-content: center; height: 120px; background: #f4f4f6; border-radius: 4px; overflow: hidden; text-decoration: none; }
.media-thumb img { max-width: 100%; max-height: 120px; }
.media-thumb span { font-weight: 700; color: var(--muted); }
.media-addr { font-family: ui-monospace, Consolas, monospace; font-size: .8rem; }
/* Website page editor: search engines (SEO) */
.website-seo summary { cursor: pointer; }
.seo-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.25rem; margin-top: .75rem; }
.seo-preview { border: 1px solid var(--line); border-radius: 8px; padding: .75rem 1rem; background: #fff; font-family: Arial, sans-serif; }
.seo-preview-url { color: #4d5156; font-size: .82rem; overflow-wrap: anywhere; }
.seo-preview-title { color: #1a0dab; font-size: 1.15rem; line-height: 1.3; margin: .15rem 0; }
.seo-preview-desc { color: #4d5156; font-size: .86rem; line-height: 1.45; }
.seo-checks { list-style: none; padding: 0; margin: .75rem 0 0; display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; }
.seo-checks li { padding-left: 1.4rem; position: relative; }
.seo-checks li::before { position: absolute; left: 0; font-weight: 700; }
.seo-checks .seo-ok::before { content: "✓"; color: var(--success); }
.seo-checks .seo-warn::before { content: "!"; color: #b26a00; }
.seo-checks .seo-bad::before { content: "✕"; color: var(--error); }
@media (max-width: 900px) { .seo-layout { grid-template-columns: 1fr; } }
/* Orders › Add new order: the form, and the summary beside it */
.order-add { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1rem; align-items: start; }
.order-main > .card, .order-lines > .card { margin: 0 0 1rem; }
.order-checks { display: flex; flex-direction: column; gap: .35rem; margin-top: .5rem; }
.order-line-head { display: flex; justify-content: space-between; align-items: center; }
.order-line-head h3 { margin: 0; }
.order-line h4 { margin: .75rem 0 .35rem; font-size: .95rem; }
.order-addons { display: flex; flex-direction: column; gap: .3rem; }
.order-summary { position: sticky; top: 1rem; margin: 0; }
.order-summary h2 { margin-top: 0; }
.order-sum-line { padding: .5rem 0; border-bottom: 1px solid var(--line); }
.order-sum-row { display: flex; justify-content: space-between; gap: .5rem; font-variant-numeric: tabular-nums; }
.order-sum-total { display: flex; justify-content: space-between; gap: .5rem; padding: .75rem 0 .25rem; font-size: 1.1rem; }
.order-error { color: var(--error); margin: .25rem 0; font-size: .9rem; }
@media (max-width: 900px) { .order-add { grid-template-columns: 1fr; } .order-summary { position: static; } }
.website-code { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 1rem; align-items: start; }
.website-code > .card { margin: 0; }
.website-code tr.current td { background: var(--primary-soft); }
.code-input { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; line-height: 1.45; tab-size: 2; white-space: pre; overflow-wrap: normal; overflow-x: auto; }
@media (max-width: 960px) { .website-code { grid-template-columns: 1fr; } }
.media-storage { display: flex; flex-direction: column; gap: .5rem; }
.media-storage .alert { margin: 0; }
.media-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: #dfe7df; }
.media-bar-media { background: var(--primary); min-width: 3px; }
.media-bar-other { background: #9aa1ad; }
.media-storage-low .media-bar { background: var(--error-bg); }
.media-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; }
.media-key { display: inline-block; width: .8rem; height: .8rem; border-radius: 3px; background: #dfe7df; }
.media-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 1rem; align-items: start; }
.media-folders h2 { margin-top: 0; }
.media-folders ul { list-style: none; margin: 0; padding: 0; }
.media-folders ul ul { padding-left: 1rem; border-left: 1px solid var(--line); margin-left: .4rem; }
.media-folders a { display: flex; justify-content: space-between; gap: .5rem; padding: .25rem .4rem; border-radius: 4px; text-decoration: none; color: var(--text); overflow-wrap: anywhere; }
.media-folders a:hover { background: var(--bg); }
.media-folders a.current { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.media-newfolder { margin-top: 1rem; display: flex; flex-direction: column; gap: .4rem; align-items: flex-start; }
.media-newfolder .field { width: 100%; }
.media-main { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.media-main > .card { margin: 0; }
.media-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; }
.media-crumbs { margin: 0; font-weight: 600; }
.media-search { display: flex; gap: .4rem; }
.media-search input { min-width: 220px; }
.media-folder-edit summary { cursor: pointer; font-weight: 600; }
.media-folder-edit form { margin-top: .75rem; }
.media-folder-tile { display: flex; flex-direction: column; gap: .2rem; padding: .75rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); text-decoration: none; color: var(--text); }
.media-folder-tile:hover { border-color: var(--primary-line); background: var(--primary-soft); }
.media-folder-icon { width: 2.2rem; height: 1.6rem; border-radius: 3px 6px 4px 4px; background: #e8b84a; position: relative; margin-top: .3rem; }
.media-folder-icon::before { content: ""; position: absolute; left: 0; top: -.3rem; width: 1rem; height: .4rem; border-radius: 3px 3px 0 0; background: #e8b84a; }
.media-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; position: sticky; top: 0; z-index: 2; }
.media-move { display: flex; align-items: center; gap: .4rem; }
.media-item { position: relative; }
.media-tick { position: absolute; top: .7rem; left: .7rem; z-index: 1; background: rgba(255, 255, 255, .9); border-radius: 4px; padding: 2px 4px; line-height: 1; }
.media-queue { display: flex; flex-direction: column; gap: .3rem; }
.media-queue .alert { margin: 0 0 .3rem; }
.media-queue-item { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .9rem; padding: .25rem .5rem; border-radius: 4px; background: var(--bg); overflow-wrap: anywhere; }
.media-queue-item.bad { background: var(--error-bg); color: var(--error); }
.media-queue-item.ok { background: var(--success-bg); color: var(--success); }
.media-queue-item progress { flex: 1 1 120px; }
.media-queue-done { margin: .3rem 0 0; font-weight: 600; }
@media (max-width: 760px) { .media-layout { grid-template-columns: 1fr; } .media-search input { min-width: 0; flex: 1; } }

/* Lists: sortable column headings (App\Sort) and the page-size choice (App\Paginator). */
.table th.sortable a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; }
.table th.sortable a:hover { color: var(--text); }
.table th.sortable.right a { justify-content: flex-end; }
.sort-arrow { font-size: .75em; opacity: .35; }
.table th.sorted { color: var(--text); }
.table th.sorted .sort-arrow { opacity: 1; color: var(--primary); }
.pager { flex-wrap: wrap; }
.pager-size { display: inline-flex; align-items: center; margin: 0; }
.pager-size label { display: inline-flex; align-items: center; gap: .35rem; font-size: .9rem; color: var(--muted); }
.pager-size select { width: auto; padding: .2rem .4rem; }
/* Website page editor: the result of a save made in the background, next to the Save button */
.save-status { align-self: center; font-size: .9rem; color: var(--muted); }
.save-status.save-ok { color: var(--success); font-weight: 600; }
.save-status.save-error { color: var(--danger); font-weight: 600; }
/* Server licence page: tick licences to link or unlink (views/admin/services/form.php) */
.lic-tick { width: 1.5rem; }
.lic-pick .table td { vertical-align: middle; }
.lic-filter { max-width: 340px; }
.lic-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .75rem; padding-top: .75rem; border-top: 1px solid var(--line); }
/* Client pages, WHMCS-style (partials/clienttabs.php, clients/view|form, services/form) */
.client-head { margin-bottom: 0; }
.client-head-top { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; justify-content: space-between; margin-bottom: .6rem; }
.client-head-name { margin: 0; font-size: 1.2rem; }
.client-pick { position: relative; display: flex; align-items: center; gap: .5rem; }
.client-pick label { font-weight: 600; white-space: nowrap; }
.client-pick input { width: 300px; max-width: 60vw; }
.client-pick-list { position: absolute; z-index: 20; top: 100%; right: 0; width: 420px; max-width: 90vw; max-height: 320px; overflow-y: auto; margin: .2rem 0 0; padding: .25rem 0; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.client-pick-list li { padding: .35rem .75rem; cursor: pointer; }
.client-pick-list li.active, .client-pick-list li:hover { background: var(--primary-soft); }
.client-tabs { display: flex; flex-wrap: wrap; gap: .15rem; border-bottom: 2px solid var(--primary); }
.client-tabs a { padding: .45rem .85rem; border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; background: var(--bg); color: var(--text); text-decoration: none; font-size: .92rem; }
.client-tabs a:hover { background: var(--primary-soft); }
.client-tabs a.active { background: var(--primary); border-color: var(--primary); color: var(--primary-text); font-weight: 600; }
.client-sticky { margin: .6rem 0 0; padding: .5rem .75rem; background: #fff8d6; border: 1px solid #ecd98b; border-radius: var(--radius); }
.client-tab-body { padding-top: 1rem; }
.sum-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.sum-col { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.sum-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem 1rem; overflow-x: auto; }
.sum-lists .sum-box, .sum-cols + .sum-box, .sum-lists { margin-top: 1rem; }
.sum-box h3 { margin: -.75rem -1rem .75rem; padding: .5rem 1rem; background: var(--bg); border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; font-size: .95rem; }
.sum-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.sum-table th { width: 42%; text-align: left; font-weight: 600; color: var(--muted); padding: .2rem .5rem .2rem 0; vertical-align: top; }
.sum-table td { padding: .2rem 0; overflow-wrap: anywhere; }
.sum-links { list-style: none; margin: .6rem 0 0; padding: .5rem 0 0; border-top: 1px solid var(--line); font-size: .92rem; }
.sum-links li { padding: .1rem 0; }
.sum-links li::before { content: "\203A  "; color: var(--muted); }
.sum-list { list-style: none; margin: 0; padding: 0; font-size: .92rem; }
.sum-list li { padding: .15rem 0; border-bottom: 1px dashed var(--line); }
.sum-send { display: flex; gap: .5rem; }
.sum-send select { flex: 1; min-width: 0; }
.sum-send option.custom { background: #eee; }
.sum-box textarea { width: 100%; box-sizing: border-box; }
.yn { font-weight: 700; }
.yn-yes { color: var(--success); }
.yn-no { color: var(--error); }
.yn-btn { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.yn-btn:hover .yn { text-decoration: underline; }
.sum-mass { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .75rem; }
.wtable { width: 100%; border-collapse: collapse; }
.wtable > tbody > tr > th, .wtable > tr > th { width: 18%; text-align: right; font-weight: 600; padding: .4rem .75rem; background: var(--bg); border: 1px solid var(--line); vertical-align: middle; font-size: .92rem; }
.wtable > tbody > tr > td, .wtable > tr > td { padding: .35rem .6rem; border: 1px solid var(--line); vertical-align: middle; }
.wtable td input[type="text"], .wtable td input[type="email"], .wtable td input[type="tel"], .wtable td input[type="number"], .wtable td input[type="search"], .wtable td input[type="password"], .wtable td select, .wtable td textarea { width: 100%; max-width: 420px; box-sizing: border-box; }
.wtable td textarea.wide { max-width: none; }
.wtable td input[type="number"].short, .wtable td input.short { max-width: 140px; }
.wtable .check { margin: 0; }
.wtable .inline-note { color: var(--muted); font-size: .85rem; margin-left: .4rem; }
.wform-buttons { display: flex; justify-content: center; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 .25rem; }
.wform-delete { text-align: center; margin: .25rem 0 1rem; }
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal-back[hidden] { display: none !important; }
.modal { background: var(--card); border-radius: var(--radius); padding: 1.25rem; max-width: 460px; width: 100%; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.modal h3 { margin-top: 0; }
@media (max-width: 1100px) { .sum-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .sum-cols { grid-template-columns: minmax(0, 1fr); }
  .wtable, .wtable tbody, .wtable tr, .wtable th, .wtable td { display: block; width: auto; text-align: left; }
  .wtable th { border-bottom: 0; }
  .client-pick input { width: 100%; }
}
.alert-info { background: #eaf2fb; color: #1d4f80; border: 1px solid #c9dcf0; }
.svc-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.svc-pick { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.svc-pick label { font-weight: 600; }
.svc-pick select { max-width: min(560px, 80vw); }
.svc-addons { margin: 0 0 .4rem; font-size: .92rem; }
.svc-send { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem; }
.svc-send .sum-send { align-items: center; flex-wrap: wrap; }
.wtable details summary { cursor: pointer; margin-top: .35rem; }
.svc-filter { width: 240px; max-width: 70vw; }
.sum-filter { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.sum-filter input[type="search"] { width: 280px; max-width: 100%; }
.sum-filter select { max-width: 240px; }
.sum-grid th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.sum-grid th.sortable:hover { color: var(--primary); }
.sum-grid th.sortable::after { content: " \2195"; color: var(--line); font-weight: 400; }
.sum-grid th[aria-sort="ascending"]::after { content: " \25B2"; color: var(--primary); }
.sum-grid th[aria-sort="descending"]::after { content: " \25BC"; color: var(--primary); }
/* Copy buttons after licence keys (assets/copy.js) */
.copy-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-left: .3rem; padding: 0; vertical-align: middle; border: 1px solid var(--line); border-radius: 4px; background: var(--card); color: var(--muted); cursor: pointer; }
.copy-btn:hover, .copy-btn:focus-visible { color: var(--primary); border-color: var(--primary); }
.copy-btn.copied { color: var(--success); border-color: var(--success); }
.copy-btn.copy-failed { color: var(--error); border-color: var(--error); }
.copy-btn[data-tip]::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); padding: .1rem .4rem; border-radius: 4px; background: var(--top); color: var(--top-text); font-size: .75rem; white-space: nowrap; pointer-events: none; }
