/* AppenHub — UI system built on Appenzeller Group Brand Standard AG-BIS-001
   Colour ratio 60 Midnight/White · 25 Graphite/Navy · 10 Electric Blue · 5 Cyan
   Type: Manrope (headings/nav) · Inter (body/UI) · IBM Plex Mono (technical labels)
   Spacing: 8-point grid · Radius 4–8px · subtle borders, limited shadows */

:root {
  --midnight: #071521; --deep-navy: #0B2638; --graphite: #202A33; --steel: #66737F;
  --titanium: #BCC5CC; --precision-white: #F7F9FB; --electric: #00A8E8; --cyan: #38D6E8;

  --bg: #F7F9FB; --surface: #FFFFFF; --surface-2: #EEF2F5; --border: #DCE3E8; --border-strong: #BCC5CC;
  --text: #071521; --text-2: #3A4651; --muted: #5D6A76; --link: #00729E;
  --accent: var(--electric); --accent-ink: #071521; --focus: #00A8E8;
  --danger: #C2362B; --danger-bg: #FCECEA; --warn: #8A5A00; --warn-bg: #FFF4DB; --ok: #137A52; --ok-bg: #E4F5EC;
  --shadow: 0 1px 2px rgba(7, 21, 33, .06), 0 4px 16px rgba(7, 21, 33, .05);
  --radius: 6px; --radius-lg: 8px;
  --side: #071521; --side-text: #C9D3DB; --side-muted: #7E8C98; --side-active: #0B2638; --side-border: #13293A;

  --f-head: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #071521; --surface: #0B2638; --surface-2: #102E44; --border: #1C3A50; --border-strong: #2B4A61;
    --text: #F7F9FB; --text-2: #C9D3DB; --muted: #94A2AE; --link: #38D6E8;
    --danger: #FF8A80; --danger-bg: #3A1614; --warn: #FFC861; --warn-bg: #3A2C0B; --ok: #6BDDA8; --ok-bg: #0F3326;
    --shadow: 0 1px 2px rgba(0,0,0,.3); --side: #040E17; --side-active: #0B2638; --side-border: #10222F;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #071521; --surface: #0B2638; --surface-2: #102E44; --border: #1C3A50; --border-strong: #2B4A61;
  --text: #F7F9FB; --text-2: #C9D3DB; --muted: #94A2AE; --link: #38D6E8;
  --danger: #FF8A80; --danger-bg: #3A1614; --warn: #FFC861; --warn-bg: #3A2C0B; --ok: #6BDDA8; --ok-bg: #0F3326;
  --shadow: 0 1px 2px rgba(0,0,0,.3); --side: #040E17; --side-active: #0B2638; --side-border: #10222F;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 400 14px/1.55 var(--f-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--f-head); margin: 0; letter-spacing: -.01em; color: var(--text); }
h1 { font-weight: 800; font-size: 28px; line-height: 1.2; }
h2 { font-weight: 700; font-size: 20px; line-height: 1.3; }
h3 { font-weight: 600; font-size: 16px; line-height: 1.35; }
p { margin: 0 0 12px; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.mono { font-family: var(--f-mono); font-weight: 500; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.app.has-demo { min-height: calc(100vh - 40px); }
.side { background: var(--side); color: var(--side-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--side-border); }
.has-demo .side { top: 40px; height: calc(100vh - 40px); }
.brand { display: flex; align-items: center; gap: 12px; padding: 20px 20px 16px; }
.brand img, .brand svg { width: 36px; height: 36px; flex: none; border-radius: 6px; }
.wordmark { font: 800 19px/1 var(--f-head); color: #F7F9FB; letter-spacing: -.02em; }
.wordmark b { color: var(--electric); font-weight: 800; }
.endorse { font: 500 9.5px/1.2 var(--f-mono); letter-spacing: .12em; color: var(--side-muted); margin-top: 5px; text-transform: uppercase; }
.nav { padding: 8px 12px 24px; flex: 1; }
.nav-label { font: 500 10.5px/1 var(--f-mono); letter-spacing: .12em; color: var(--side-muted); text-transform: uppercase; padding: 16px 12px 8px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: var(--radius); color: var(--side-text); font: 600 13.5px/1.2 var(--f-head); position: relative; }
.nav a:hover { background: rgba(255,255,255,.04); text-decoration: none; color: #fff; }
.nav a.active { background: var(--side-active); color: #fff; }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; background: var(--electric); border-radius: 0 2px 2px 0; }
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.nav a .lock { margin-left: auto; width: 14px; height: 14px; opacity: .55; }
.nav a .count { margin-left: auto; background: var(--electric); color: var(--midnight); font: 700 11px/1 var(--f-body); padding: 3px 7px; border-radius: 10px; }
.side-foot { padding: 16px 20px; border-top: 1px solid var(--side-border); font-size: 12px; color: var(--side-muted); }
.side-foot .tier { display: inline-flex; gap: 8px; align-items: center; color: var(--side-text); font: 600 12px var(--f-head); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--titanium); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 16px; padding: 12px 32px; }
.has-demo .top { top: 40px; }
.top .menu-btn { display: none; }
.search { flex: 1; max-width: 520px; position: relative; }
.search input { width: 100%; height: 38px; border: 1px solid var(--border); background: var(--bg); border-radius: var(--radius); padding: 0 12px 0 38px; }
.search svg { position: absolute; left: 12px; top: 10px; width: 18px; height: 18px; color: var(--muted); }
.search kbd { position: absolute; right: 10px; top: 9px; font: 500 11px var(--f-mono); color: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 1px 6px; background: var(--surface); }
.search-results { position: absolute; top: 44px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); max-height: 420px; overflow: auto; padding: 8px; }
.search-results a { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: var(--radius); color: var(--text); }
.search-results a:hover, .search-results a.sel { background: var(--surface-2); text-decoration: none; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.switcher { position: relative; }
.chip-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); cursor: pointer; font: 600 13px var(--f-head); white-space: nowrap; }
.chip-btn:hover { border-color: var(--border-strong); }
.chip-btn svg { width: 16px; height: 16px; color: var(--muted); }
.menu { position: absolute; right: 0; top: 44px; min-width: 240px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 8px; z-index: 40; }
.menu.left { left: 0; right: auto; }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: 12px; padding: 8px 12px; border: 0; background: none; text-align: left; border-radius: var(--radius); cursor: pointer; color: var(--text); font-size: 13.5px; }
.menu button:hover, .menu a:hover { background: var(--surface-2); text-decoration: none; }
.menu .sep { height: 1px; background: var(--border); margin: 8px 0; }
.menu small { display: block; color: var(--muted); font-size: 12px; }

.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--deep-navy); color: #F7F9FB; display: inline-grid; place-items: center; font: 700 13px var(--f-head); flex: none; overflow: hidden; border: 0; cursor: pointer; padding: 0; }
.avatar.lg { width: 64px; height: 64px; font-size: 20px; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.content { padding: 32px; max-width: 1360px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head .mono { color: var(--muted); display: block; margin-bottom: 8px; }
.page-head p { color: var(--muted); margin: 8px 0 0; max-width: 680px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- demo bar ---------- */
.demo-bar { position: sticky; top: 0; z-index: 50; height: 40px; background: #040E17; color: #C9D3DB; display: flex; align-items: center; gap: 16px; padding: 0 16px; font-size: 12.5px; border-bottom: 1px solid #13293A; }
.demo-bar .mono { color: var(--cyan); }
.demo-bar select { background: #0B2638; color: #F7F9FB; border: 1px solid #1C3A50; border-radius: 4px; height: 28px; padding: 0 8px; font-size: 12.5px; }
.demo-bar button { background: none; border: 1px solid #1C3A50; color: #C9D3DB; border-radius: 4px; height: 28px; padding: 0 10px; cursor: pointer; font-size: 12.5px; }
.demo-bar button:hover { border-color: var(--electric); color: #fff; }
.demo-bar .grow { flex: 1; }
.demo-bar label { display: flex; align-items: center; gap: 8px; white-space: nowrap; }

/* ---------- components ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: var(--radius); border: 1px solid transparent; font: 700 13.5px var(--f-head); cursor: pointer; white-space: nowrap; text-decoration: none !important; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--midnight); color: #F7F9FB; }
.btn-primary:hover { background: var(--deep-navy); }
:root[data-theme="dark"] .btn-primary { background: var(--electric); color: var(--midnight); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { background: var(--electric); color: var(--midnight); } }
.btn-accent { background: var(--electric); color: var(--midnight); }
.btn-accent:hover { background: var(--cyan); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--border-strong); }
.btn-danger { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-icon { width: 38px; padding: 0; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.card-pad { padding: 24px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--border); }
.card-head h3 { font-size: 15px; }
.card-head > svg { width: 18px; height: 18px; color: var(--muted); flex: none; }
.card-head a, .card-head .right { margin-left: auto; font-size: 13px; }
.card-body { padding: 8px 24px 16px; }
.grid { display: grid; gap: 24px; }
.g-3-1 { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-auto { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.g-apps { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; align-items: center; gap: 12px; }
.wrap { flex-wrap: wrap; }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 4px; font: 600 11.5px var(--f-body); background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.badge .dot { width: 6px; height: 6px; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.blue { background: color-mix(in srgb, var(--electric) 14%, transparent); color: var(--link); }
.badge.tier { font-family: var(--f-mono); letter-spacing: .08em; text-transform: uppercase; font-size: 10.5px; }

/* hero with AG Grid */
.hero { position: relative; overflow: hidden; background: var(--midnight); color: #F7F9FB; border-radius: var(--radius-lg); padding: 40px; margin-bottom: 24px; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='104' viewBox='0 0 120 104'%3E%3Cg fill='none' stroke='%2300A8E8' stroke-opacity='.16' stroke-width='1'%3E%3Cpath d='M0 104 60 0l60 104M30 52h60M0 52h0'/%3E%3Cpath d='M-60 104 0 0M120 0l60 104' /%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(100deg, transparent 20%, #000 75%); mask-image: linear-gradient(100deg, transparent 20%, #000 75%); }
.hero h1 { color: #F7F9FB; font-size: 32px; }
.hero .mono { color: var(--cyan); display: block; margin-bottom: 12px; }
.hero p { color: #C9D3DB; max-width: 620px; margin: 12px 0 0; font-size: 15px; }
.hero-pin { margin-top: 24px; display: flex; gap: 16px; align-items: flex-start; background: rgba(11, 38, 56, .85); border: 1px solid #1C3A50; border-radius: var(--radius-lg); padding: 16px 20px; max-width: 760px; cursor: pointer; }
.hero-pin:hover { border-color: var(--electric); }
.hero-pin svg { width: 20px; height: 20px; color: var(--electric); flex: none; margin-top: 2px; }
.hero-pin h3 { color: #F7F9FB; font-size: 15px; }
.hero-pin p { margin: 4px 0 0; font-size: 13.5px; }
.hero-stats { display: flex; gap: 32px; margin-top: 24px; flex-wrap: wrap; }
.hero-stats div { font: 800 24px/1 var(--f-head); }
.hero-stats span { display: block; font: 500 10.5px var(--f-mono); letter-spacing: .1em; color: #94A2AE; margin-top: 6px; text-transform: uppercase; }

/* lists */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 16px 0; border-bottom: 1px solid var(--border); }
.list > li:last-child { border-bottom: 0; }
.item-row { display: flex; gap: 16px; align-items: flex-start; }
.item-row h3 { font-size: 15px; }
.item-row h3 a { color: var(--text); }
.meta { display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: 12.5px; flex-wrap: wrap; margin-top: 6px; }
.clickable { cursor: pointer; }
.clickable:hover h3 { color: var(--link); }

.news-card { display: flex; flex-direction: column; padding: 20px 24px; gap: 8px; cursor: pointer; border-left: 3px solid var(--co, var(--titanium)); }
.news-card:hover { border-color: var(--border-strong); border-left-color: var(--co, var(--electric)); }
.news-card p { color: var(--text-2); margin: 0; }
.news-card .foot { display: flex; align-items: center; gap: 12px; margin-top: 8px; color: var(--muted); font-size: 12.5px; }

.date-tile { width: 52px; flex: none; text-align: center; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.date-tile .m { font: 600 10px var(--f-mono); letter-spacing: .1em; background: var(--midnight); color: var(--cyan); padding: 3px 0; text-transform: uppercase; }
.date-tile .d { font: 800 20px/1.6 var(--f-head); }

.app-tile { display: flex; gap: 12px; align-items: center; padding: 16px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-lg); color: var(--text); position: relative; }
.app-tile:hover { border-color: var(--electric); text-decoration: none; }
.app-tile .ic { width: 40px; height: 40px; border-radius: var(--radius); background: var(--midnight); display: grid; place-items: center; color: var(--electric); flex: none; }
.app-tile .ic svg { width: 20px; height: 20px; }
.app-tile b { font: 700 14px var(--f-head); display: block; }
.app-tile small { color: var(--muted); font-size: 12px; }
.mini-apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 16px 0 8px; }
.mini-apps a { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 4px; border-radius: var(--radius); color: var(--text); font-size: 12px; text-align: center; font-weight: 500; }
.mini-apps a:hover { background: var(--surface-2); text-decoration: none; }
.mini-apps .ic { width: 40px; height: 40px; border-radius: var(--radius); background: var(--midnight); display: grid; place-items: center; color: var(--electric); }
.mini-apps .ic svg { width: 18px; height: 18px; }

.person { padding: 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; cursor: pointer; }
.person:hover { border-color: var(--border-strong); }
.person h3 { font-size: 15px; margin-top: 12px; }
.person .t { color: var(--text-2); font-size: 13px; }
.person .co { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; justify-content: center; }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font: 500 10.5px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface); }
td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
td.code { font: 500 12px var(--f-mono); color: var(--text-2); white-space: nowrap; }
.matrix td, .matrix th { text-align: center; }
.matrix td:first-child, .matrix th:first-child { text-align: left; }
.tick { color: var(--ok); } .cross { color: var(--titanium); }

/* toolbar & filters */
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar input[type=search], .toolbar select { height: 36px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius); padding: 0 12px; }
.toolbar input[type=search] { min-width: 240px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 12px 16px; cursor: pointer; font: 600 13.5px var(--f-head); color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.active { color: var(--text); border-bottom-color: var(--electric); }

/* forms */
.form { display: grid; gap: 16px; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { display: block; font: 600 12.5px var(--f-head); margin-bottom: 6px; color: var(--text-2); }
.field input:not([type=checkbox]):not([type=color]), .field select, .field textarea { width: 100%; height: 40px; border: 1px solid var(--border-strong); background: var(--surface); border-radius: var(--radius); padding: 0 12px; }
.field textarea { height: auto; min-height: 140px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.field input[type=color] { width: 56px; height: 40px; border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 2px; background: var(--surface); }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--electric); }
.multi { display: flex; flex-wrap: wrap; gap: 8px; }
.multi label { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 10px; cursor: pointer; font-size: 13px; }
.multi select { height: 26px; border: 1px solid var(--border); border-radius: 4px; background: var(--surface); font-size: 12px; }

/* toggle */
.toggle { position: relative; width: 40px; height: 22px; flex: none; }
.toggle input { opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; position: relative; z-index: 1; }
.toggle span { position: absolute; inset: 0; background: var(--border-strong); border-radius: 11px; transition: background .15s; }
.toggle span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; background: #fff; border-radius: 50%; transition: transform .15s; }
.toggle input:checked + span { background: var(--electric); }
.toggle input:checked + span::after { transform: translateX(18px); }

/* modal */
.overlay { position: fixed; inset: 0; background: rgba(4, 14, 23, .55); z-index: 100; display: grid; place-items: center; padding: 24px; animation: fade .12s ease-out; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); width: min(640px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; box-shadow: 0 16px 48px rgba(4,14,23,.3); }
.modal.wide { width: min(860px, 100%); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-head .x { margin-left: auto; }
.modal-body { padding: 24px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--border); }
.prose { font-size: 15px; line-height: 1.7; color: var(--text-2); }
.prose p { margin: 0 0 16px; white-space: pre-line; }
@keyframes fade { from { opacity: 0; } }

/* toast */
.toasts { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--midnight); color: #F7F9FB; border-left: 3px solid var(--electric); padding: 12px 16px; border-radius: var(--radius); box-shadow: var(--shadow); font-size: 13.5px; max-width: 420px; animation: fade .15s; }
.toast.err { border-left-color: #FF8A80; }

/* locked / upgrade */
.locked { text-align: center; padding: 64px 24px; }
.locked .ic { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 12px; background: var(--midnight); color: var(--electric); display: grid; place-items: center; }
.locked .ic svg { width: 26px; height: 26px; }
.locked p { color: var(--muted); max-width: 460px; margin: 8px auto 24px; }
.empty { padding: 32px 0; text-align: center; color: var(--muted); }

/* plans */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.plan { padding: 32px; display: flex; flex-direction: column; gap: 16px; position: relative; }
.plan.current { border-color: var(--electric); box-shadow: 0 0 0 1px var(--electric); }
.plan.featured { background: var(--midnight); color: #F7F9FB; border-color: var(--midnight); }
.plan.featured h2, .plan.featured .price { color: #F7F9FB; }
.plan.featured .muted, .plan.featured li { color: #C9D3DB; }
.plan .price { font: 800 32px/1 var(--f-head); }
.plan .price small { font: 500 13px var(--f-body); color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 13.5px; }
.plan li { display: flex; gap: 8px; align-items: flex-start; }
.plan li svg { width: 16px; height: 16px; color: var(--electric); flex: none; margin-top: 2px; }
.plan .btn { margin-top: auto; }

.meter { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.meter i { display: block; height: 100%; background: var(--electric); border-radius: 3px; }
.stat { padding: 20px 24px; }
.stat .v { font: 800 26px/1 var(--f-head); margin-top: 8px; }
.stat .mono { color: var(--muted); }

.int-card { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.int-card .ic { width: 40px; height: 40px; border-radius: var(--radius); background: var(--surface-2); display: grid; place-items: center; font: 800 14px var(--f-head); color: var(--text); }
.int-card.eco .ic { background: var(--midnight); color: var(--electric); }
.int-card p { color: var(--muted); font-size: 13px; margin: 0; flex: 1; }

pre.code { background: var(--midnight); color: #C9D3DB; font: 12.5px/1.6 var(--f-mono); padding: 16px; border-radius: var(--radius); overflow-x: auto; margin: 0; }
pre.code b { color: var(--cyan); font-weight: 500; }
.secret { font: 500 13px var(--f-mono); background: var(--surface-2); padding: 12px; border-radius: var(--radius); word-break: break-all; border: 1px dashed var(--border-strong); }

.kb { display: grid; grid-template-columns: 260px 1fr; gap: 24px; }
.kb-nav { padding: 12px; align-self: start; position: sticky; top: 96px; }
.kb-nav .cat { font: 500 10.5px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 12px 8px 6px; }
.kb-nav button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px; border-radius: var(--radius); cursor: pointer; font-size: 13.5px; color: var(--text-2); }
.kb-nav button:hover { background: var(--surface-2); }
.kb-nav button.active { background: var(--surface-2); color: var(--text); font-weight: 600; }

/* login */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: var(--midnight); color: #F7F9FB; padding: 48px; display: flex; flex-direction: column; position: relative; overflow: hidden; isolation: isolate; }
.login-art::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='104' viewBox='0 0 120 104'%3E%3Cg fill='none' stroke='%2300A8E8' stroke-opacity='.14'%3E%3Cpath d='M0 104 60 0l60 104M30 52h60'/%3E%3Cpath d='M-60 104 0 0M120 0l60 104'/%3E%3C/g%3E%3C/svg%3E"); -webkit-mask-image: linear-gradient(160deg, transparent 10%, #000 80%); mask-image: linear-gradient(160deg, transparent 10%, #000 80%); }
.login-art h1 { color: #F7F9FB; font-size: 44px; line-height: 1.08; margin-top: auto; max-width: 520px; }
.login-art p { color: #C9D3DB; max-width: 460px; font-size: 16px; margin-top: 16px; }
.login-art .mono { color: var(--cyan); }
.login-form { display: grid; place-items: center; padding: 48px 24px; background: var(--bg); }
.login-form .card { width: min(420px, 100%); padding: 40px; }
.login-form h2 { margin-bottom: 4px; }
.error { background: var(--danger-bg); color: var(--danger); padding: 10px 12px; border-radius: var(--radius); font-size: 13px; }
.notice { background: color-mix(in srgb, var(--electric) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--electric) 30%, transparent); padding: 12px 16px; border-radius: var(--radius); font-size: 13px; color: var(--text-2); }

.footer-line { padding: 24px 32px; color: var(--muted); font: 500 10.5px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; border-top: 1px solid var(--border); display: flex; gap: 16px; flex-wrap: wrap; margin-top: auto; }

/* responsive */
@media (max-width: 1100px) { .g-3-1 { grid-template-columns: 1fr; } .plans { grid-template-columns: 1fr; } .g-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; z-index: 60; transform: translateX(-100%); transition: transform .2s; height: 100vh; }
  .has-demo .side { top: 0; height: 100vh; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(4,14,23,.5); }
  .top .menu-btn { display: inline-flex; }
  .top { padding: 12px 16px; gap: 8px; }
  .search kbd, .chip-btn .lbl { display: none; }
  .content { padding: 24px 16px; }
  .hero { padding: 28px 20px; } .hero h1 { font-size: 26px; }
  .g-2, .g-3, .kb, .form .two { grid-template-columns: 1fr; }
  .kb-nav { position: static; }
  .login { grid-template-columns: 1fr; } .login-art { padding: 32px 24px; min-height: 280px; } .login-art h1 { font-size: 30px; }
  .demo-bar { overflow-x: auto; } .demo-bar .hide-sm { display: none; }
  .footer-line { padding: 24px 16px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.list.card-body { padding: 0 24px 8px; }

/* ===== v2: dashboards, charts, boards ===== */
:root { --series: #0089C7; --grid: #E6EBEF; --sev1: #C2362B; --sev2: #C25E12; --sev3: #9A6B00; --sev4: #5D6A76; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --series: #38B8EE; --grid: #17344A; --sev1: #FF8A80; --sev2: #FFAB6B; --sev3: #FFC861; --sev4: #94A2AE; } }
:root[data-theme="dark"] { --series: #38B8EE; --grid: #17344A; --sev1: #FF8A80; --sev2: #FFAB6B; --sev3: #FFC861; --sev4: #94A2AE; }

.dash-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.dash-head h1 { font-size: 26px; }
.dash-head .mono { color: var(--muted); display: block; margin-bottom: 8px; }
.dash-head .actions { margin-left: auto; display: flex; gap: 8px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi { padding: 16px 20px; display: flex; flex-direction: column; gap: 6px; position: relative; min-width: 0; text-decoration: none !important; color: var(--text); }
a.kpi:hover { border-color: var(--electric); }
.kpi .mono { color: var(--muted); font-size: 10px; }
.kpi .v { font: 800 28px/1.1 var(--f-head); font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.kpi .spark { position: absolute; right: 16px; bottom: 14px; }
.kpi.alert { border-left: 3px solid var(--danger); }
.kpi.warnk { border-left: 3px solid var(--warn); }
.widgets { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.w-4 { grid-column: span 4; } .w-6 { grid-column: span 6; } .w-8 { grid-column: span 8; } .w-12 { grid-column: span 12; } /* legacy */
.widget { display: flex; flex-direction: column; min-width: 0; }
.widget .card-body { flex: 1; }
.wtabs { display: flex; gap: 4px; margin-left: auto; }
.wtabs button { border: 0; background: none; padding: 4px 10px; border-radius: 4px; font: 600 12.5px var(--f-head); color: var(--muted); cursor: pointer; }
.wtabs button.active { background: var(--surface-2); color: var(--text); }
.cols { display: grid; grid-template-columns: 28px 1fr; grid-template-rows: auto auto; gap: 4px 8px; padding: 8px 0; }
.cols-grid { display: flex; flex-direction: column; justify-content: space-between; font: 500 10px var(--f-mono); color: var(--muted); text-align: right; }
.cols-plot { display: flex; align-items: flex-end; gap: 2px; border-bottom: 1px solid var(--border-strong); background-image: linear-gradient(var(--grid) 1px, transparent 1px); background-size: 100% 50%; }
.col { height: 100%; display: flex; align-items: flex-end; padding: 0 1px; }
.col i { display: block; width: 100%; background: var(--series); border-radius: 4px 4px 0 0; min-height: 0; }
.col:hover i { filter: brightness(1.15); }
.cols-x { grid-column: 2; display: flex; justify-content: space-between; font: 500 10px var(--f-mono); color: var(--muted); }
.hbars { display: grid; gap: 10px; padding: 8px 0; }
.hbar { display: grid; grid-template-columns: 96px 1fr 64px; gap: 12px; align-items: center; font-size: 13px; }
.hbar .hl { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar .ht { height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; }
.hbar .ht i { display: block; height: 100%; background: var(--series); border-radius: 5px; }
.hbar .hv { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.sevs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sev { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 2px; border-top: 3px solid; }
.sev .sv { font: 800 22px var(--f-head); }
.sev.s1 { border-top-color: var(--sev1); } .sev.s2 { border-top-color: var(--sev2); } .sev.s3 { border-top-color: var(--sev3); } .sev.s4 { border-top-color: var(--sev4); }
.sevb { font-family: var(--f-mono); letter-spacing: .04em; }
.sevb.sev1 { background: var(--danger-bg); color: var(--sev1); } .sevb.sev2 { background: var(--warn-bg); color: var(--sev2); } .sevb.sev3 { background: var(--warn-bg); color: var(--sev3); } .sevb.sev4 { background: var(--surface-2); color: var(--sev4); }
.split { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; }
.mini-stats div b { display: block; font: 800 20px var(--f-head); font-variant-numeric: tabular-nums; }
.mini-stats div span { font: 500 10px var(--f-mono); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.oc { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.oc:last-child { border-bottom: 0; }
.oc .lvl { margin-left: auto; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); flex: none; }

/* boards */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 16px; overflow-x: auto; padding-bottom: 8px; }
.lane { background: var(--surface-2); border-radius: var(--radius-lg); padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 200px; }
.lane.drop { outline: 2px dashed var(--electric); outline-offset: -2px; }
.lane-h { display: flex; align-items: center; gap: 8px; font: 700 13px var(--f-head); padding: 2px 4px; }
.lane-h .n { margin-left: auto; font: 600 11px var(--f-mono); color: var(--muted); }
.tcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 8px; cursor: grab; border-left: 3px solid var(--co, var(--border)); }
.tcard:hover { border-color: var(--border-strong); border-left-color: var(--co, var(--electric)); }
.tcard b { font: 600 13.5px var(--f-head); }
.tcard .meta { margin-top: 0; }
.tcard.dragging { opacity: .5; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 16px 24px; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 4px; bottom: -4px; width: 2px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 1px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--series); }
.timeline li.k-resolved::after { border-color: var(--ok); background: var(--ok); }
.timeline li.k-escalated::after, .timeline li.k-created::after { border-color: var(--danger); }
.statusgrid { display: flex; gap: 2px; }
.statusgrid i { flex: 1; height: 24px; border-radius: 2px; background: var(--ok); opacity: .75; }
.statusgrid i.l1 { background: var(--warn); opacity: 1; } .statusgrid i.l2 { background: var(--danger); opacity: 1; }
.bell { position: relative; }
.bell .dotn { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font: 700 10px/16px var(--f-body); text-align: center; }
.notif { display: flex; gap: 12px; padding: 10px 12px; border-radius: var(--radius); align-items: flex-start; color: var(--text); }
.notif.unread { background: color-mix(in srgb, var(--electric) 8%, transparent); }
.notif:hover { background: var(--surface-2); text-decoration: none; }
.notif small { color: var(--muted); display: block; }
.menu.wide { min-width: 360px; max-height: 480px; overflow: auto; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.checklist li.done { color: var(--muted); }
.checklist li .tick { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border-strong); }
.checklist li.done .tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.checklist li a { margin-left: auto; font-size: 13px; }
.filterbar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.pill { border: 1px solid var(--border); background: var(--surface); border-radius: 16px; padding: 4px 12px; font: 600 12.5px var(--f-head); cursor: pointer; color: var(--text-2); }
.pill.active { background: var(--midnight); color: #F7F9FB; border-color: var(--midnight); }
:root[data-theme="dark"] .pill.active { background: var(--electric); color: var(--midnight); border-color: var(--electric); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.active { background: var(--electric); color: var(--midnight); border-color: var(--electric); } }
.mode { font: 500 10px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; }
.mode.native { background: var(--ok-bg); color: var(--ok); } .mode.automation { background: color-mix(in srgb, var(--electric) 14%, transparent); color: var(--link); } .mode.connector { background: var(--surface-2); color: var(--muted); }
@media (max-width: 1100px) { .w-4, .w-6, .w-8 { grid-column: span 12; } }
@media (max-width: 860px) { .kpis { grid-template-columns: 1fr 1fr; } .kpi .spark { display: none; } .hbar { grid-template-columns: 80px 1fr 56px; } .menu.wide { min-width: 300px; } .split { grid-template-columns: 1fr; justify-items: center; } }
@media (max-width: 860px) {
  .dash-head .actions { margin-left: 0; flex-wrap: wrap; width: 100%; }
  .dash-head .actions .btn { flex: 1 1 auto; }
  .top .search { min-width: 0; }
  .top-right { gap: 4px; }
  #newp .lbl { display: none !important; }
  #newp { width: 38px; padding: 0; }
  .demo-bar label { gap: 4px; } .demo-bar select { max-width: 150px; }
  .page-head .actions { margin-left: 0; width: 100%; }
}

/* ===== v2.1: colour, ticker, calendar, messaging, clock, reports ===== */
/* Categorical palette — brand blue first; validated for CVD separation in light and dark (values always labelled). */
:root { --c1: #0089C7; --c2: #EB6834; --c3: #1BAF7A; --c4: #EDA100; --c5: #E87BA4; --c6: #6250D6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --c1: #2E9FDB; --c2: #D95926; --c3: #199E70; --c4: #C98500; --c5: #D55181; --c6: #9085E9; } }
:root[data-theme="dark"] { --c1: #2E9FDB; --c2: #D95926; --c3: #199E70; --c4: #C98500; --c5: #D55181; --c6: #9085E9; }

/* colourful KPI tiles */
.kpi { --tone: var(--c1); border-top: 3px solid var(--tone); background: linear-gradient(180deg, color-mix(in srgb, var(--tone) 9%, var(--surface)) 0%, var(--surface) 70%); padding-top: 14px; }
.kpi .kic { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--tone) 16%, transparent); color: var(--tone); }
.kpi .kic svg { width: 17px; height: 17px; }
.kpi .ktop { display: flex; align-items: center; gap: 10px; }
.kpi .spark path:last-of-type { stroke: var(--tone); } .kpi .spark path:first-of-type { fill: var(--tone); } .kpi .spark circle { fill: var(--tone); }
.kpi.alert { border-left: 0; --tone: var(--danger); } .kpi.warnk { border-left: 0; }
.t1 { --tone: var(--c1); } .t2 { --tone: var(--c2); } .t3 { --tone: var(--c3); } .t4 { --tone: var(--c4); } .t5 { --tone: var(--c5); } .t6 { --tone: var(--c6); }
.widget .card-head .wic { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: color-mix(in srgb, var(--tone, var(--c1)) 15%, transparent); color: var(--tone, var(--c1)); flex: none; }
.widget .card-head .wic svg { width: 15px; height: 15px; }
.widget { border-top: 3px solid var(--tone, var(--border)); }
.widget .grip { cursor: grab; color: var(--muted); border: 0; background: none; padding: 4px; border-radius: 4px; display: grid; place-items: center; margin-left: 4px; }
.widget .grip:hover { background: var(--surface-2); color: var(--text); }
.widget .grip svg { width: 16px; height: 16px; }
.widget.dragging { opacity: .45; }
.widget.drop-before { box-shadow: -4px 0 0 0 var(--electric); }
.widgets.arranging .widget { outline: 1px dashed var(--border-strong); outline-offset: 4px; }

/* ticker */
.topwrap { position: sticky; top: 0; z-index: 20; }
.has-demo .topwrap { top: 40px; }
.topwrap .top { position: static; }
.ticker { display: flex; align-items: center; height: 36px; background: var(--midnight); color: #F7F9FB; overflow: hidden; border-bottom: 1px solid #13293A; }
.ticker .tlabel { flex: none; height: 100%; display: flex; align-items: center; gap: 8px; padding: 0 16px; background: var(--electric); color: var(--midnight); font: 700 11px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; }
.ticker .tlabel svg { width: 14px; height: 14px; }
.ticker .tview { flex: 1; overflow: hidden; position: relative; mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.ticker .ttrack { display: inline-flex; gap: 40px; white-space: nowrap; padding-left: 24px; animation: tick var(--tdur, 60s) linear infinite; will-change: transform; }
.ticker:hover .ttrack, .ticker:focus-within .ttrack, .ticker.paused .ttrack { animation-play-state: paused; }
.ticker a { color: #F7F9FB; font-size: 13px; display: inline-flex; align-items: center; gap: 8px; }
.ticker a:hover { color: var(--cyan); text-decoration: none; }
.ticker .tdot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.ticker .tkind { font: 600 10px var(--f-mono); letter-spacing: .08em; color: var(--cyan); text-transform: uppercase; }
.ticker .tbtn { flex: none; background: none; border: 0; color: #94A2AE; padding: 0 12px; height: 100%; cursor: pointer; }
.ticker .tbtn:hover { color: #fff; } .ticker .tbtn svg { width: 14px; height: 14px; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker .ttrack { animation: none !important; } .ticker .tview { overflow-x: auto; } }

/* calendar */
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.cal-head h2 { min-width: 200px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.cal .dow { font: 600 10.5px var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.cal .day { min-height: 116px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal .day:nth-child(7n) { border-right: 0; }
.cal .day.out { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.cal .day.out .dn { color: var(--muted); }
.cal .day .dn { font: 700 13px var(--f-head); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cal .day.today .dn { background: var(--electric); color: var(--midnight); }
.cal .ev { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--co, var(--c1)); background: color-mix(in srgb, var(--co, var(--c1)) 14%, var(--surface)); color: var(--text); padding: 3px 6px; border-radius: 4px; font-size: 12px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .ev:hover { background: color-mix(in srgb, var(--co, var(--c1)) 24%, var(--surface)); }
.cal .ev b { font-weight: 600; margin-right: 4px; font-variant-numeric: tabular-nums; }
.cal .more { font-size: 11.5px; color: var(--link); background: none; border: 0; text-align: left; cursor: pointer; padding: 0 6px; }
.mcal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.mcal .dow { font: 600 9.5px var(--f-mono); color: var(--muted); padding: 4px 0; }
.mcal .d { position: relative; font: 600 12.5px var(--f-body); padding: 6px 0 10px; border-radius: 6px; color: var(--text-2); }
.mcal .d.out { color: var(--titanium); }
.mcal .d.today { background: var(--electric); color: var(--midnight); }
.mcal .d.has { cursor: pointer; } .mcal .d.has:hover { background: var(--surface-2); }
.mcal .d .dots { position: absolute; left: 0; right: 0; bottom: 3px; display: flex; justify-content: center; gap: 2px; }
.mcal .d .dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--co, var(--c1)); }
@media (max-width: 860px) { .cal .day { min-height: 64px; padding: 3px; } .cal .ev { font-size: 0; padding: 0; height: 6px; border-left-width: 0; background: var(--co, var(--c1)); } .cal .ev b { display: none; } .cal .dow { padding: 6px 2px; font-size: 9px; } }

/* messaging */
.chat { display: grid; grid-template-columns: 280px 1fr; height: calc(100vh - 240px); min-height: 480px; overflow: hidden; }
.chat-list { border-right: 1px solid var(--border); overflow-y: auto; padding: 8px; }
.chat-list button { display: flex; width: 100%; gap: 10px; align-items: center; border: 0; background: none; text-align: left; padding: 10px; border-radius: var(--radius); cursor: pointer; color: var(--text); }
.chat-list button:hover { background: var(--surface-2); }
.chat-list button.active { background: color-mix(in srgb, var(--electric) 12%, transparent); }
.chat-list .cn { font: 600 13.5px var(--f-head); display: block; }
.chat-list .cl { font-size: 12px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.chat-list .ub { margin-left: auto; background: var(--c2); color: #fff; font: 700 11px var(--f-body); min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 6px; }
.chat-list .gi { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; color: #fff; font: 800 12px var(--f-head); }
.chat-main { display: flex; flex-direction: column; min-width: 0; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 72%; display: flex; gap: 8px; align-items: flex-end; }
.bubble .bb { background: var(--surface-2); padding: 8px 12px; border-radius: 14px 14px 14px 4px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.bubble .bm { font-size: 11px; color: var(--muted); margin-top: 3px; }
.bubble.me { align-self: flex-end; flex-direction: row-reverse; }
.bubble.me .bb { background: var(--electric); color: var(--midnight); border-radius: 14px 14px 4px 14px; }
.bubble.me .bm { text-align: right; }
.chat-day { align-self: center; font: 600 10.5px var(--f-mono); letter-spacing: .08em; color: var(--muted); text-transform: uppercase; padding: 8px 0; }
.composer { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.composer textarea { flex: 1; resize: none; height: 42px; max-height: 120px; border: 1px solid var(--border-strong); border-radius: 21px; padding: 10px 16px; background: var(--surface); line-height: 1.4; }
.composer .btn { border-radius: 21px; height: 42px; }
.mini-chat .chat-msgs { padding: 8px 0; max-height: 260px; min-height: 180px; }
.mini-chat .composer { padding: 10px 0 0; }
.mini-chat select { height: 30px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); font-size: 12.5px; max-width: 150px; }
@media (max-width: 860px) { .chat { grid-template-columns: 1fr; height: auto; } .chat-list { border-right: 0; border-bottom: 1px solid var(--border); max-height: 200px; } .chat-msgs { min-height: 360px; } .bubble { max-width: 88%; } }

/* clock */
.clock { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0; }
.clock .tm { font: 800 44px/1 var(--f-head); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.clock .tm small { font-size: 18px; color: var(--muted); font-weight: 700; margin-left: 4px; }
.clock .dt { color: var(--muted); font-size: 13px; }
.zones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; width: 100%; }
.zones div { background: var(--surface-2); border-radius: var(--radius); padding: 8px; text-align: center; }
.zones b { display: block; font: 700 15px var(--f-head); font-variant-numeric: tabular-nums; }
.zones span { font: 500 9.5px var(--f-mono); letter-spacing: .08em; color: var(--muted); text-transform: uppercase; }
.analog { width: 120px; height: 120px; }

/* reports & charts */
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--text-2); margin: 4px 0 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .ax { font: 500 10px var(--f-mono); fill: var(--muted); }
.chart .gl { stroke: var(--grid); stroke-width: 1; }
.chart .bl { stroke: var(--border-strong); stroke-width: 1; }
.chart .lbl { font: 600 11px var(--f-body); fill: var(--text-2); }
.chart rect.bar:hover, .chart path.seg:hover { filter: brightness(1.1); }
.chart .hit { fill: transparent; }
.chart .hit:hover + .tip, .chart .tip { pointer-events: none; }
.vtip { position: fixed; z-index: 300; background: var(--midnight); color: #F7F9FB; font-size: 12px; padding: 6px 10px; border-radius: 6px; pointer-events: none; box-shadow: var(--shadow); white-space: nowrap; }
.donut-wrap { display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: center; }
@media (max-width: 860px) { .donut-wrap { grid-template-columns: 1fr; justify-items: center; } }
.report-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.report-grid > .card { grid-column: span 6; min-width: 0; } .report-grid > .card.wide { grid-column: span 12; } .report-grid > .card.third { grid-column: span 4; }
@media (max-width: 1100px) { .report-grid > .card, .report-grid > .card.third { grid-column: span 12; } }
@media (max-width: 860px) { .widget .card-head { flex-wrap: wrap; padding: 12px 16px; } .widget .card-body { padding: 8px 16px 16px; } .mini-chat select { max-width: 120px; } }
.dash-toggle { border: 1px solid var(--border); border-radius: 20px; padding: 4px 12px 4px 6px; background: var(--surface); font: 600 12.5px var(--f-head); white-space: nowrap; }
.dash-toggle .toggle { width: 34px; height: 20px; } .dash-toggle .toggle span::after { width: 14px; height: 14px; } .dash-toggle .toggle input:checked + span::after { transform: translateX(14px); }

/* ---------- 2.4 Appenzeller Suite, Ask AABOS, product updates ---------- */
.eco-tile { flex: none; display: grid; place-items: center; border-radius: 8px; color: #fff; background: linear-gradient(135deg, var(--acc), color-mix(in srgb, var(--acc) 62%, var(--midnight))); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.eco-tile svg { width: 55%; height: 55%; }
.eco-top { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; margin-bottom: 8px; }
.eco-h { font: 700 16px var(--f-head); margin: 28px 0 12px; }
.eco-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.eco-card { padding: 18px; display: flex; flex-direction: column; position: relative; overflow: hidden; border-top: 3px solid var(--acc); }
.eco-card h3 { margin: 0; font: 700 16px var(--f-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eco-card.off { border-top-color: var(--border-strong); }
.eco-card.off .eco-tile { filter: saturate(.35); opacity: .8; }
.eco-grid.more .eco-card { background: var(--surface-2); box-shadow: none; }
.eco-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; margin-top: 14px; }
.eco-stats div { background: color-mix(in srgb, var(--acc) 9%, var(--surface)); border-radius: 6px; padding: 8px 10px; min-width: 0; }
.eco-stats b { display: block; font: 800 20px var(--f-head); line-height: 1.1; overflow-wrap: anywhere; }
.eco-stats b small { font-size: 12px; font-weight: 600; color: var(--muted); }
.eco-stats span { display: block; font-size: 11.5px; line-height: 1.3; color: var(--muted); margin-top: 2px; }
.eco-stats span::first-letter { text-transform: uppercase; }
.eco-mini { list-style: none; padding: 0; margin: 10px 0 0; font-size: 12.5px; display: grid; gap: 4px; }
.list .kic { flex: none; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--tone) 15%, transparent); color: var(--tone); }
.list .kic svg { width: 17px; height: 17px; }
.eco-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.eco-chip { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-left: 3px solid var(--acc); border-radius: 6px; text-decoration: none; color: var(--text); position: relative; min-width: 0; background: var(--surface); }
.eco-chip:hover { border-color: var(--acc); }
.eco-chip span { min-width: 0; }
.eco-chip b { display: block; font: 700 13.5px var(--f-head); }
.eco-chip small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eco-chip .sd { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--titanium); }
.eco-chip .sd.ok { background: var(--ok); } .eco-chip .sd.bad { background: var(--danger); }
.eco-admin { display: grid; gap: 12px; }
.eco-row { display: flex; gap: 16px; align-items: center; padding: 16px; border-left: 3px solid var(--acc); flex-wrap: wrap; }
.eco-row .grow { flex: 1 1 280px; }
.ask { display: flex; flex-direction: column; gap: 10px; }
.ask-people { display: flex; gap: 8px; flex-wrap: wrap; }
.ask-p { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); cursor: pointer; text-align: left; font: inherit; color: var(--text); }
.ask-p b { display: block; font: 700 13px var(--f-head); line-height: 1.1; }
.ask-p small { display: block; font-size: 11px; color: var(--muted); }
.ask-p.on { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 12%, var(--surface)); box-shadow: 0 0 0 1px var(--acc); }
.ask-p .av, .av-s { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 800 13px var(--f-head); color: #fff; background: linear-gradient(135deg, var(--acc), color-mix(in srgb, var(--acc) 60%, var(--midnight))); flex: none; }
.ask-msgs { display: flex; flex-direction: column; gap: 10px; max-height: 340px; min-height: 96px; overflow: auto; padding: 4px 2px; }
.widget .ask-msgs { max-height: 220px; }
.ask-msgs .bubble { max-width: 92%; }
.ask-hello { font-size: 13.5px; color: var(--text-2); background: var(--surface-2); border-radius: 8px; padding: 12px; }
.ask-src { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ask-src a { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; padding: 3px 8px; border: 1px solid var(--border); border-radius: 999px; text-decoration: none; color: var(--link); background: var(--surface); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ask-src .mono { font-size: 9.5px; color: var(--muted); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--link); font: inherit; cursor: pointer; text-decoration: underline; }
.btn-update { background: linear-gradient(135deg, var(--electric), var(--cyan)); color: var(--midnight); font-weight: 700; box-shadow: 0 0 0 3px color-mix(in srgb, var(--electric) 25%, transparent); animation: updpulse 2.4s ease-in-out infinite; }
.btn-update .lbl { display: inline !important; }
@keyframes updpulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--electric) 8%, transparent); } }
@media (prefers-reduced-motion: reduce) { .btn-update { animation: none; } }
@media (max-width: 640px) { .btn-update .lbl { display: none !important; } }
.upd-hero { background: linear-gradient(135deg, var(--midnight), var(--deep-navy)); color: var(--precision-white); border-radius: 8px; padding: 20px 24px; position: relative; overflow: hidden; }
.upd-hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(0,168,232,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(0,168,232,.12) 1px, transparent 1px); background-size: 24px 24px; mask-image: linear-gradient(90deg, transparent 40%, #000); pointer-events: none; }
.upd-hero .mono { color: var(--cyan); }
.upd-hero h3 { font: 800 20px var(--f-head); margin: 6px 0; color: #fff; }
.upd-hero p { margin: 0; color: #C9D3DB; }
.upd-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.upd-list li { display: grid; gap: 2px; padding-left: 16px; border-left: 3px solid var(--electric); }
.upd-list b { font: 700 14px var(--f-head); }
.upd-list span { color: var(--text-2); font-size: 13.5px; }
.sso-or { display: flex; align-items: center; gap: 12px; margin: 20px 0 12px; color: var(--muted); font-size: 12px; }
.sso-or::before, .sso-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.btn-connect { width: 100%; height: 44px; justify-content: center; background: var(--midnight); color: #fff; border: 1px solid var(--midnight); }
.btn-connect:hover { background: var(--deep-navy); }
:root[data-theme="dark"] .btn-connect { border-color: var(--border-strong); }
@media (max-width: 900px) { .eco-top { grid-template-columns: 1fr; } }

/* ---------- 2.5 plan & billing ---------- */
.plan-banner { display: flex; align-items: center; gap: 10px; padding: 9px 32px; font-size: 13.5px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.plan-banner svg { width: 16px; height: 16px; flex: none; }
.plan-banner a { font-weight: 700; margin-left: auto; }
.plan-banner.tr { background: color-mix(in srgb, var(--electric) 10%, var(--surface)); color: var(--text); }
.plan-banner.gr { background: var(--warn-bg); color: var(--warn); }
.plan-banner.ro { background: var(--danger-bg); color: var(--danger); }
@media (max-width: 640px) { .plan-banner { padding: 9px 16px; } }
.pb-now { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; padding: 24px; border-top: 3px solid var(--electric); }
.pb-now h2 { display: flex; gap: 10px; align-items: center; margin: 6px 0 4px; font: 800 26px var(--f-head); }
.pb-now p { margin: 0; color: var(--text-2); }
.pb-facts { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 16px; }
.pb-facts span { display: block; font-size: 10px; }
.pb-facts b { font: 700 14px var(--f-head); }
.pb-now-usage { display: grid; gap: 14px; align-content: start; background: var(--surface-2); border-radius: 8px; padding: 16px; }
.pb-meter .row { justify-content: space-between; font-size: 13px; }
.pb-meter b { font: 700 15px var(--f-head); }
.meter.hot i { background: var(--danger); }
@media (max-width: 900px) { .pb-now { grid-template-columns: 1fr; } .plans { grid-template-columns: 1fr; } }

/* ---------- 2.6 business systems ---------- */
table.biz td.num, table.biz th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.biz td .btn + .btn { margin-left: 6px; }
table.biz td:last-child { white-space: nowrap; }
table.biz.lines input, table.biz.lines select { width: 100%; height: 34px; border: 1px solid var(--border); border-radius: 6px; padding: 0 8px; background: var(--surface); color: var(--text); }
.snap-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 20px; }
.snap-big { display: flex; align-items: center; gap: 16px; text-align: left; padding: 22px; border-radius: 10px; border: 0; cursor: pointer; background: linear-gradient(135deg, var(--midnight), var(--deep-navy)); color: #fff; font: inherit; min-height: 96px; }
.snap-big svg { width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: var(--electric); color: var(--midnight); flex: none; box-sizing: content-box; }
.snap-big b { display: block; font: 800 18px var(--f-head); }
.snap-big small { color: #C9D3DB; font-size: 13px; }
.snap-big.alt { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.snap-big.alt small { color: var(--muted); }
.snap-big.alt svg { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.snap-eng { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.snap-eng svg { width: 16px; height: 16px; }
.snap-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 20px; }
.snap-pic img, .snap-pic iframe { width: 100%; max-height: 62vh; object-fit: contain; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.snap-pic iframe { height: 62vh; }
.snap-wait { display: grid; justify-items: center; gap: 12px; padding: 16px 0; text-align: center; }
.spin { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--surface-2); border-top-color: var(--electric); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }
ul.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
ul.steps li { display: flex; gap: 10px; align-items: flex-start; }
ul.steps li svg { width: 20px; height: 20px; flex: none; border-radius: 50%; padding: 2px; }
ul.steps li.ok svg { background: var(--ok-bg); color: var(--ok); }
ul.steps li.bad svg { background: var(--warn-bg); color: var(--warn); }
ul.steps b { display: block; font: 700 14px var(--f-head); }
ul.steps small { color: var(--text-2); font-size: 13px; }
@media (max-width: 760px) { .snap-hero, .snap-grid { grid-template-columns: 1fr; } }
table.biz.lines td:nth-child(1) input { min-width: 150px; }
table.biz.lines td:nth-child(2) input { min-width: 64px; }
table.biz.lines td:nth-child(3) input { min-width: 76px; }
table.biz.lines td:nth-child(4) select { min-width: 140px; }
table.biz.lines td, table.biz.lines th { padding-left: 4px; padding-right: 4px; }
.modal.wide:has(.snap-grid) { max-width: 1080px; }
.snap-grid .table-wrap { overflow-x: auto; }
table.biz td .mono { white-space: nowrap; }

/* ===== 2.7: fully customisable dashboard ===== */
.widgets { --gap: 24px; gap: var(--gap); }
.widgets.g-compact { --gap: 12px; } .widgets.g-roomy { --gap: 36px; }
.widgets.dense { grid-auto-flow: row dense; }
.widgets > .widget { grid-column: span var(--span, 4); position: relative; }
.widgets > .widget.new-row { grid-column: 1 / span var(--span, 4); }
.widget.fixed-h { height: var(--h); }
.widget.fixed-h .card-body { overflow: auto; min-height: 0; }
.widget.collapsed { height: auto; } .widget.collapsed .card-body { display: none; } .widget.collapsed .card-head { border-bottom: 0; }
.widget.no-chart :is(.chart, .cols, .hbars, .donut-wrap, .sevs, .spark, .mcal), .widget.no-chart .split > svg { display: none !important; }
.widget.no-list .card-body ul.list { display: none; }
.widget.ws-tint { background: color-mix(in srgb, var(--tone) 8%, var(--surface)); }
.widget.ws-solid { border-top-color: var(--tone); }
.widget.ws-solid .card-head { background: var(--tone); color: #fff; border-bottom-color: transparent; border-radius: calc(var(--radius-lg) - 4px) calc(var(--radius-lg) - 4px) 0 0; }
.widget.ws-solid .card-head :is(h3, a, .right, .grip, .wt, select) { color: #fff; }
.widget.ws-solid .card-head .wic { background: rgba(255,255,255,.22); color: #fff; }
.widget.ws-solid .card-head .wtabs button { color: rgba(255,255,255,.85); } .widget.ws-solid .card-head .wtabs button.active { background: rgba(255,255,255,.22); color: #fff; }
.widget.ws-plain { border-top-width: 1px; border-top-color: var(--border); }
.widget.ws-plain .card-head .wic { background: transparent; }
/* backgrounds */
.dash.bg-tint, .dash.bg-dots { margin: -8px; padding: 8px; border-radius: var(--radius-lg); }
.dash.bg-tint { background: linear-gradient(180deg, color-mix(in srgb, var(--electric) 7%, transparent), transparent 480px); }
.dash.bg-dots { background-image: radial-gradient(color-mix(in srgb, var(--text) 13%, transparent) 1px, transparent 1.2px); background-size: 18px 18px; }
/* edit mode */
.dash-editbar { position: sticky; top: 8px; z-index: 30; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid color-mix(in srgb, var(--electric) 50%, var(--border)); box-shadow: 0 8px 24px rgba(10,20,30,.12); }
.dash-editbar .eb-text { display: grid; gap: 2px; font-size: 13px; flex: 1 1 280px; }
.dash-editbar .eb-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.dash.editing .widgets > .widget { outline: 1px dashed color-mix(in srgb, var(--electric) 55%, transparent); outline-offset: 3px; }
.dash.editing .widgets > .widget .card-body { pointer-events: none; user-select: none; }
.dash.editing .widgets > .widget.resizing { outline: 2px solid var(--electric); z-index: 5; }
.wtools { display: flex; gap: 2px; margin-left: 8px; }
.card-head > .wtools:first-of-type { margin-left: auto; }
.card-head a + .wtools, .card-head select + .wtools, .card-head .wtabs + .wtools { margin-left: 8px; }
.wt { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text-2); cursor: pointer; font: 700 14px var(--f-head); }
.wt:hover, .wt:focus-visible { color: var(--text); border-color: var(--electric); }
.wt svg { width: 14px; height: 14px; }
.rsz { display: none; }
.dash.editing .rsz { display: block; position: absolute; right: 2px; bottom: 2px; width: 22px; height: 22px; border: 0; padding: 0; cursor: nwse-resize; background: linear-gradient(135deg, transparent 50%, var(--electric) 50%, var(--electric) 58%, transparent 58%, transparent 68%, var(--electric) 68%, var(--electric) 76%, transparent 76%); border-radius: 0 0 var(--radius-lg) 0; touch-action: none; }
.dash.editing .rsz:focus-visible { outline: 2px solid var(--electric); outline-offset: 2px; }
.rsz-tag { display: none; }
.widget.resizing .rsz-tag { display: block; position: absolute; right: 28px; bottom: 6px; background: var(--electric); color: #fff; font: 600 11px var(--f-mono); padding: 3px 8px; border-radius: 4px; pointer-events: none; }
/* settings panels */
.wset { display: grid; gap: 18px; }
.wf { display: grid; gap: 8px; }
.wf > span:first-child { font: 600 12.5px var(--f-head); color: var(--text-2); }
.wf input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), .wf select { width: 100%; height: 40px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: var(--radius); padding: 0 12px; font: inherit; }
.wf input[type=range] { width: 100%; accent-color: var(--electric); }
.ws-ticks { display: flex; gap: 4px; flex-wrap: wrap; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sw { width: 30px; height: 30px; border-radius: 50%; background: var(--sw); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); cursor: pointer; padding: 0; }
.sw.on { box-shadow: 0 0 0 2px var(--text); }
.sw-custom { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; cursor: pointer; }
.sw-custom input { width: 34px; height: 30px; border: 1px solid var(--border-strong); border-radius: 6px; padding: 2px; background: var(--surface); }
.seg-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.seg-pick label { cursor: pointer; } .seg-pick input { position: absolute; opacity: 0; pointer-events: none; }
.seg-pick span { display: inline-block; padding: 7px 14px; border: 1px solid var(--border-strong); border-radius: 20px; font: 600 12.5px var(--f-head); }
.seg-pick input:checked + span { background: var(--text); color: var(--surface); border-color: var(--text); }
.seg-pick input:focus-visible + span { outline: 2px solid var(--electric); outline-offset: 2px; }
.wgallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.wg { display: grid; justify-items: start; gap: 6px; text-align: left; padding: 14px; border: 1px solid var(--border); border-top: 3px solid var(--tone); border-radius: var(--radius-lg); background: var(--surface); cursor: pointer; font: inherit; color: var(--text); }
.wg:hover { border-color: var(--tone); } .wg .muted { font-size: 12px; }
.wg .wic { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; background: color-mix(in srgb, var(--tone) 15%, transparent); color: var(--tone); }
.wg .wic svg { width: 15px; height: 15px; }
.wg-add { display: inline-flex; align-items: center; gap: 4px; font: 600 12.5px var(--f-head); color: var(--electric); }
.wg-add svg { width: 13px; height: 13px; }
.wg.added { opacity: .6; cursor: default; }
.std-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 16px; }
@media (max-width: 1100px) {
  .widgets > .widget, .widgets > .widget.new-row { grid-column: span 12; }
  .widget.fixed-h { height: auto; } .widget.fixed-h .card-body { overflow: visible; }
  .dash.editing .rsz { display: none; }
}
@media (max-width: 860px) { .dash-editbar { top: 0; } .dash-editbar .eb-actions .btn { flex: 1 1 auto; } }
.widget.ws-solid .wt { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.35); color: #fff; }
.widget.ws-solid .wt:hover, .widget.ws-solid .wt:focus-visible { background: rgba(255,255,255,.3); border-color: #fff; }
.dash-editbar { top: calc(var(--topwrap-h, 0px) + 8px); }

/* ===== 2.8: public pages, pricing, quotes ===== */
.pub { min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); }
.pub-top { display: flex; align-items: center; gap: 16px; padding: 14px 32px; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 20; }
.pub-top nav { margin-left: auto; display: flex; align-items: center; gap: 16px; font: 600 14px var(--f-head); }
.pub-top nav a:not(.btn) { color: var(--text-2); text-decoration: none; } .pub-top nav a.on { color: var(--text); box-shadow: inset 0 -2px 0 var(--electric); padding-bottom: 4px; }
.pub-main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 32px 24px 64px; }
.pub-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 32px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; }
.pr-hero { text-align: center; padding: 24px 0 8px; } .pr-hero h1 { font-size: 36px; margin: 8px 0 12px; } .pr-hero p { max-width: 680px; margin: 0 auto 20px; color: var(--text-2); font-size: 16px; }
.pr-hero .mono { color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 999px; padding: 3px; background: var(--surface); }
.seg button { border: 0; background: none; padding: 7px 16px; border-radius: 999px; font: 600 13px var(--f-head); color: var(--text-2); cursor: pointer; }
.seg button.on { background: var(--text); color: var(--surface); }
.seg button:focus-visible { outline: 2px solid var(--electric); outline-offset: 2px; }
.pr-note { text-align: center; font-size: 13px; max-width: 820px; margin: 16px auto 0; }
.pr-sec { margin-top: 48px; } .pr-sec > h2 { font-size: 22px; margin-bottom: 4px; } .pr-sec > .muted { margin-top: 0; }
.pr-sec.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; } .pr-sec.g2 h2 { font-size: 22px; }
.pr-calc { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
.pr-calc .field > span, .qb .field > label { font: 600 12.5px var(--f-head); color: var(--text-2); display: block; margin-bottom: 6px; }
.pr-calc input[type=number], .pr-calc select, .pc-prod select, .pc-prod input { height: 34px; border: 1px solid var(--border-strong); border-radius: 6px; padding: 0 8px; background: var(--surface); color: var(--text); font: inherit; }
.pr-calc input[type=range] { accent-color: var(--electric); }
.pr-calc-in { display: grid; gap: 16px; }
.pc-prods { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px 16px; }
.pc-prod { display: flex; align-items: center; gap: 8px; justify-content: space-between; font-size: 13.5px; flex-wrap: wrap; }
.pc-prod > span { flex: 1; min-width: 0; } .pc-prod select { max-width: 160px; }
.pr-calc-out { background: var(--surface-2); border-radius: var(--radius-lg); padding: 20px; position: sticky; top: 80px; }
.pc-big { font: 800 34px/1.1 var(--f-head); margin: 6px 0 4px; } .pc-big span { font: 500 15px var(--f-body); color: var(--muted); }
.pc-lines { list-style: none; padding: 0; margin: 14px 0; display: grid; gap: 6px; font-size: 13px; border-top: 1px solid var(--border); padding-top: 12px; }
.pc-lines li { display: flex; justify-content: space-between; gap: 12px; } .pc-lines b { white-space: nowrap; font-weight: 600; }
.kits { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.kit { padding: 18px; display: flex; flex-direction: column; } .kit ul { margin: 0 0 12px; padding-left: 18px; font-size: 13px; color: var(--text-2); flex: 1; }
.price-sm { font: 800 20px var(--f-head); } .price-sm .muted { font: 500 12px var(--f-body); }
.pr-table td { vertical-align: top; font-size: 13.5px; }
.reset-card { max-width: 440px; margin: 40px auto; } .reset-card h1 { font-size: 24px; margin: 6px 0 4px; } .reset-card .mono { color: var(--muted); }
/* quote document */
.quote-wrap { max-width: 860px; margin: 0 auto; }
.quote-doc { padding: 40px; } .quote-doc h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 28px 0 8px; }
.qd-head { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-bottom: 3px solid var(--electric); padding-bottom: 20px; margin-bottom: 20px; }
.qd-meta h1 { font-size: 30px; margin: 0 0 8px; text-align: right; } .qd-meta table td { padding: 2px 0 2px 16px; font-size: 13px; vertical-align: top; } .qd-meta table td:first-child { color: var(--muted); }
.qd-lines { width: 100%; border-collapse: collapse; font-size: 13.5px; } .qd-lines th { text-align: left; font: 600 12px var(--f-head); color: var(--muted); border-bottom: 1px solid var(--border); padding: 8px 6px; }
.qd-lines td { padding: 9px 6px; border-bottom: 1px solid var(--border); vertical-align: top; } .qd-lines .num, .num { text-align: right; white-space: nowrap; }
.qd-lines tfoot td { border-bottom: 0; padding: 4px 6px; } .qd-lines tfoot tr.strong td, .qs.strong { font-weight: 700; }
.qd-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 24px; padding: 16px 20px; background: var(--surface-2); border-radius: var(--radius); font: 600 15px var(--f-head); }
.qd-total b { font: 800 24px var(--f-head); } .qd-total small { font: 500 12px var(--f-body); color: var(--muted); }
.qd-terms ul { padding-left: 18px; font-size: 12.5px; color: var(--text-2); display: grid; gap: 4px; }
.qd-accept { margin-top: 16px; } .ok-notice { border-color: var(--ok); }
.mail-pre { white-space: pre-wrap; font: 13px/1.5 var(--f-mono); background: var(--surface-2); padding: 16px; border-radius: var(--radius); max-height: 420px; overflow: auto; }
/* quote builder */
.modal.xwide { max-width: min(1180px, 96vw); width: 96vw; }
.qb { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.qb h4 { margin: 18px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.qb .field input, .qb .field select, .qb .field textarea { width: 100%; height: 36px; border: 1px solid var(--border-strong); border-radius: 6px; padding: 0 10px; background: var(--surface); color: var(--text); font: inherit; }
.qb .field textarea { height: auto; padding: 8px 10px; } .qb .hint { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.qb-sum { position: sticky; top: 0; background: var(--surface-2); border-radius: var(--radius-lg); padding: 16px; font-size: 13px; }
.qs { justify-content: space-between; padding: 3px 0; }
@media (max-width: 900px) { .pr-calc, .qb, .pr-sec.g2 { grid-template-columns: 1fr; } .pr-calc-out, .qb-sum { position: static; } .pr-hero h1 { font-size: 28px; } .pub-top { padding: 12px 16px; } .pub-main { padding: 20px 16px 48px; } .quote-doc { padding: 20px; } .qd-meta h1 { text-align: left; } }
@media print {
  .pub-top, .pub-foot, .no-print, .demo-bar, .toasts { display: none !important; }
  .pub-main { padding: 0; max-width: none; } .quote-doc { border: 0; box-shadow: none; padding: 0; }
  body, .pub { background: #fff !important; color: #000; }
}
.pub-top .wordmark, .quote-doc .wordmark { color: var(--text); }
.qb .pc-prods { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.qb .pc-prod select { max-width: 190px; }

/* =====================================================================================
   AppenHub 2.9 — COMMAND CENTRE
   Dark-first card system inspired by modern operations dashboards, kept inside AG-BIS-001:
   Midnight/Deep Navy surfaces, Electric Blue + Cyan accents, Manrope / Inter / IBM Plex Mono.
   Personal appearance is applied as attributes on <html>:
     data-theme   dark | light          data-accent  electric | cyan | signal | amber | violet | coral | company
     data-density comfortable|compact   data-cards   glass | solid | outline
     data-radius  soft | sharp          data-sidebar full | rail            data-motion on | off
   Accent choices are limited to the brand palette; organisations can lock the accent (Branding → lock accent).
   ===================================================================================== */
:root {
  --r-card: 16px; --r-ctl: 10px; --pad: 20px; --gap: 20px;
  --accent: #00A8E8; --accent-2: #38D6E8; --accent-ink: #04111C;
  --glow: color-mix(in srgb, var(--accent) 22%, transparent);
  --c1: #00A8E8; --c2: #EB6834; --c3: #1BAF7A; --c4: #EDA100; --c5: #E87BA4; --c6: #7B6CF0;
  --card-bg: var(--surface); --card-border: var(--border); --card-shadow: 0 1px 2px rgba(7,21,33,.05), 0 8px 24px rgba(7,21,33,.06);
  --plate: #FFFFFF; --plate-border: rgba(7,21,33,.08);
}
:root[data-accent="cyan"] { --accent: #38D6E8; --accent-2: #00A8E8; }
:root[data-accent="signal"] { --accent: #1BAF7A; --accent-2: #6BDDA8; }
:root[data-accent="amber"] { --accent: #EDA100; --accent-2: #FFC861; }
:root[data-accent="violet"] { --accent: #7B6CF0; --accent-2: #A99DFF; }
:root[data-accent="coral"] { --accent: #EB6834; --accent-2: #FFAB6B; }
:root[data-density="compact"] { --pad: 14px; --gap: 14px; }
:root[data-radius="sharp"] { --r-card: 6px; --r-ctl: 4px; }

/* Dark command-centre palette (default look) */
:root[data-theme="dark"] {
  --bg: #050E17; --surface: #0A1724; --surface-2: #10213200; --surface-2: #102233; --surface-3: #15293D;
  --border: rgba(140,180,215,.13); --border-strong: rgba(140,180,215,.24);
  --text: #EAF2F8; --text-2: #C3D0DB; --muted: #8296A8; --link: #5CCBF0;
  --side: #040B13; --side-active: rgba(0,168,232,.12); --side-border: rgba(140,180,215,.09); --side-text: #B9C7D3; --side-muted: #5F7385;
  --c1: #22B5F0; --c2: #FF7A45; --c3: #2FD39A; --c4: #FFB21E; --c5: #F27FB0; --c6: #9C8CFF;
  --series: var(--accent); --grid: rgba(140,180,215,.10);
  --card-bg: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.012)), #0A1724;
  --card-border: rgba(140,180,215,.12); --card-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 12px 32px rgba(0,0,0,.28);
  --plate: #F4F8FB; --plate-border: rgba(255,255,255,.08);
}
:root[data-theme="dark"] body { background:
  radial-gradient(1200px 600px at 85% -10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%),
  radial-gradient(900px 500px at -10% 110%, rgba(56,214,232,.05), transparent 60%), var(--bg); background-attachment: fixed; }
:root[data-theme="light"] { --bg: #EEF3F7; --surface-3: #E6EDF3; --side: #071521; --series: var(--accent); }
:root[data-cards="solid"] { --card-bg: var(--surface); }
:root[data-cards="outline"] { --card-bg: transparent; --card-shadow: none; }
:root[data-motion="off"] *, :root[data-motion="off"] *::before, :root[data-motion="off"] *::after { transition: none !important; animation: none !important; }

/* ---------- shell ---------- */
.app { grid-template-columns: 264px 1fr; transition: grid-template-columns .2s ease; }
:root[data-sidebar="rail"] .app { grid-template-columns: 76px 1fr; }
.side { padding-bottom: 8px; }
.brand { padding: 22px 20px 18px; }
.brand svg, .brand img { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 6px 20px var(--glow); }
.nav { padding: 4px 14px 16px; }
.nav-label { padding: 18px 12px 8px; font-size: 10px; }
.nav a { padding: 10px 12px; border-radius: var(--r-ctl); font-weight: 600; gap: 12px; transition: background .15s, color .15s; }
.nav a svg { width: 19px; height: 19px; }
.nav a.active { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 22%, transparent), color-mix(in srgb, var(--accent) 6%, transparent)); color: #fff; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.nav a.active svg { color: var(--accent); opacity: 1; }
.nav a.active::before { left: -14px; background: var(--accent); width: 3px; box-shadow: 0 0 12px var(--accent); }
.side-tools { display: flex; gap: 8px; padding: 0 20px 12px; }
.side-tools button { flex: 1; height: 34px; border-radius: var(--r-ctl); border: 1px solid var(--side-border); background: rgba(255,255,255,.02); color: var(--side-text); display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font: 600 12px var(--f-head); }
.side-tools button:hover { border-color: color-mix(in srgb, var(--accent) 50%, transparent); color: #fff; }
.side-tools svg { width: 15px; height: 15px; }
.promo { margin: 4px 16px 14px; padding: 16px; border-radius: 14px; position: relative; overflow: hidden;
  background: radial-gradient(160px 120px at 100% 0%, color-mix(in srgb, var(--accent) 35%, transparent), transparent 70%), linear-gradient(160deg, #0D2538, #07131F);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, rgba(255,255,255,.06)); color: #DCE7EF; }
.promo .plogos { display: flex; margin-bottom: 10px; }
.promo .plogos .plate { width: 30px; height: 30px; border-radius: 8px; margin-right: -6px; box-shadow: 0 0 0 2px #0B1E2E; }
.promo b { display: block; font: 800 14px/1.25 var(--f-head); color: #fff; }
.promo span { display: block; font-size: 12px; color: #9DB0C0; margin: 4px 0 12px; }
.promo .btn { width: 100%; height: 32px; font-size: 12.5px; }
:root[data-sidebar="rail"] .side .brand > div, :root[data-sidebar="rail"] .nav a span, :root[data-sidebar="rail"] .nav-label, :root[data-sidebar="rail"] .promo, :root[data-sidebar="rail"] .side-foot, :root[data-sidebar="rail"] .side-tools .lbl, :root[data-sidebar="rail"] .nav a .lock { display: none; }
:root[data-sidebar="rail"] .brand { justify-content: center; padding: 20px 0 14px; }
:root[data-sidebar="rail"] .nav { padding: 4px 12px; }
:root[data-sidebar="rail"] .nav a { justify-content: center; padding: 11px 0; }
:root[data-sidebar="rail"] .nav a::after { content: ""; display: block; height: 0; }
:root[data-sidebar="rail"] .side-tools { flex-direction: column; padding: 0 12px 12px; }
:root[data-sidebar="rail"] .nav-sep { display: block; height: 1px; background: var(--side-border); margin: 10px 8px; }
.nav-sep { display: none; }
.top { padding: 14px 32px; gap: 14px; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(14px) saturate(140%); }
.search input { height: 42px; border-radius: 12px; background: var(--surface); padding-left: 40px; }
.search input:focus { border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 4px var(--glow); outline: none; }
.search svg { top: 12px; }
.search kbd { top: 11px; }
.chip-btn { height: 42px; border-radius: 12px; }
.top-right .btn { height: 42px; border-radius: 12px; }
.top-right .btn-icon { width: 42px; }
.me-chip { display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px 0 4px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--text); font: 600 13px var(--f-head); }
.me-chip:hover { border-color: var(--border-strong); }
.me-chip .avatar { width: 34px; height: 34px; cursor: inherit; }
.me-chip small { display: block; font: 500 10.5px var(--f-body); color: var(--muted); text-align: left; }
.me-chip svg { width: 14px; height: 14px; color: var(--muted); }
@media (max-width: 900px) { .me-chip .who, .me-chip > svg { display: none; } .me-chip { padding: 0 4px; } }
.content { max-width: 1520px; padding: 28px 32px 40px; }
.btn { border-radius: var(--r-ctl); }
.btn-accent, :root[data-theme="dark"] .btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px var(--glow); }
.btn-accent:hover, :root[data-theme="dark"] .btn-primary:hover { background: var(--accent-2); }
:root[data-theme="dark"] .btn-ghost { background: rgba(255,255,255,.03); }
:root[data-theme="dark"] .btn-ghost:hover { background: rgba(255,255,255,.06); }
.btn-update { border-radius: 12px; }

/* ---------- cards ---------- */
.card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--r-card); box-shadow: var(--card-shadow); }
.card-head { padding: 16px var(--pad) 12px; border-bottom: 0; }
.card-head h3 { font: 700 15px var(--f-head); letter-spacing: -.01em; }
.card-body { padding: 4px var(--pad) var(--pad); }
.widget { border-top: 0; position: relative; overflow: hidden; }
.widget::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, var(--tone, var(--accent)), transparent 70%); opacity: .9; }
.widget.ws-plain::before { display: none; }
.widget .card-head .wic { width: 32px; height: 32px; border-radius: 10px; background: color-mix(in srgb, var(--tone, var(--c1)) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone, var(--c1)) 26%, transparent); }
.widgets { gap: var(--gap); }
.widgets.g-compact { gap: 12px; } .widgets.g-roomy { gap: 30px; }
.list > li { border-color: var(--border); }
.empty { color: var(--muted); }
.badge { border-radius: 999px; }

/* ---------- dashboard header ---------- */
.dash-head { margin-bottom: 22px; align-items: center; }
.dash-head h1 { font-size: 28px; letter-spacing: -.02em; }
.dash-head .hello { display: flex; align-items: center; gap: 16px; }
.dash-head .hello .avatar { width: 56px; height: 56px; font-size: 18px; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px color-mix(in srgb, var(--accent) 55%, transparent); }
.range { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.range button { border: 0; background: none; color: var(--muted); font: 700 12px var(--f-head); padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.range button.on { background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 12px var(--glow); }

/* ---------- KPI cards (sparkline area along the bottom) ---------- */
.kpis { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.kpi { border-top: 0 !important; padding: 18px 20px 0; min-height: 150px; overflow: hidden; gap: 4px;
  background: radial-gradient(240px 140px at 100% 0%, color-mix(in srgb, var(--tone) 16%, transparent), transparent 70%), var(--card-bg); }
.kpi .ktop { justify-content: space-between; }
.kpi .ktop .mono { font-size: 10.5px; color: var(--muted); }
.kpi .kic { width: 36px; height: 36px; border-radius: 11px; order: 2; }
.kpi .v { font-size: 30px; margin-top: 4px; letter-spacing: -.02em; white-space: nowrap; }
.kpi .sub { flex-wrap: wrap; row-gap: 4px; }
.kpi .sub { font-size: 12px; }
.kpi .delta { display: inline-flex; align-items: center; gap: 4px; font: 700 11.5px var(--f-body); padding: 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.kpi .delta.down { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.kpi .kspark { margin: 10px -20px 0; height: 54px; display: block; width: calc(100% + 40px); }
.kpi .kspark svg { width: 100%; height: 100%; display: block; }
.kpi .kring { position: absolute; right: 18px; bottom: 16px; }
.kpi.style-plain { min-height: 0; padding-bottom: 18px; }
.kpis:has(.kspark) .kpi.style-plain { min-height: 150px; }
.kpi.alert { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 45%, transparent), var(--card-shadow); }
.kpi.warnk { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 40%, transparent), var(--card-shadow); }
.kpi:hover { transform: translateY(-1px); transition: transform .15s; }

/* ---------- charts ---------- */
.achart { position: relative; }
.achart svg { width: 100%; height: auto; display: block; overflow: visible; }
.achart .gl { stroke: var(--grid); stroke-dasharray: 3 5; }
.achart .ax { fill: var(--muted); font: 500 10.5px var(--f-body); }
.achart .hit { fill: transparent; }
.achart .hit:hover + .hov, .achart .hov { opacity: 0; transition: opacity .12s; pointer-events: none; }
.achart .col-hit:hover .hov { opacity: 1; }
.achart .hov line { stroke: color-mix(in srgb, var(--text) 30%, transparent); stroke-dasharray: 3 3; }
.achart .pill rect { fill: var(--accent); } .achart .pill text { fill: var(--accent-ink); font: 700 11px var(--f-body); }
.legend2 { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.legend2 i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.semi { display: grid; place-items: center; position: relative; }
.semi .sv { position: absolute; bottom: 6px; left: 0; right: 0; text-align: center; font: 800 34px var(--f-head); letter-spacing: -.02em; }
.ring svg circle.glow { filter: drop-shadow(0 0 6px var(--ring, var(--accent))); }
.tbars { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 6px; }
.tbars .tb { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.tbars .track { width: 100%; max-width: 30px; flex: 1; background: var(--surface-2); border-radius: 8px; position: relative; overflow: hidden; }
.tbars .track i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 8px; background: linear-gradient(180deg, var(--accent-2), var(--accent)); }
.tbars small { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.rank { width: 100%; border-collapse: collapse; font-size: 13px; }
.rank th { text-align: left; font: 500 10.5px var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 6px 8px 10px; border-bottom: 1px solid var(--border); }
.rank td { padding: 11px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.rank tr:last-child td { border-bottom: 0; }
.rank .bar { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; min-width: 80px; }
.rank .bar i { display: block; height: 100%; border-radius: 6px; }
.rank .pct { display: inline-block; min-width: 46px; text-align: center; font: 700 11.5px var(--f-body); padding: 3px 8px; border-radius: 8px; border: 1px solid currentColor; }
.feed li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); list-style: none; }
.feed { margin: 0; padding: 0; }
.feed li:last-child { border-bottom: 0; }
.feed .fi { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--fc, var(--c1)) 16%, transparent); color: var(--fc, var(--c1)); }
.feed .fi svg { width: 17px; height: 17px; }
.feed b { font: 600 13.5px var(--f-head); display: block; }
.feed small { color: var(--muted); font-size: 11.5px; }
.feed .when { margin-left: auto; text-align: right; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.reminders li { border-left: 3px solid var(--fc, var(--accent)); padding: 10px 12px; margin-bottom: 8px; border-radius: 10px; background: var(--surface-2); list-style: none; display: flex; gap: 10px; align-items: center; }
.reminders { margin: 0; padding: 0; }

/* ---------- product logos & app tiles ---------- */
.plate { background: var(--plate); border-radius: 12px; display: inline-grid; place-items: center; flex: none; box-shadow: 0 0 0 1px var(--plate-border), 0 4px 14px rgba(0,0,0,.18); overflow: hidden; }
.plate img { width: 76%; height: 76%; object-fit: contain; }
.plate.lg { width: 64px; height: 64px; border-radius: 16px; }
.plate.md { width: 48px; height: 48px; border-radius: 13px; }
.plate.sm { width: 34px; height: 34px; border-radius: 9px; }
.plate.xs { width: 26px; height: 26px; border-radius: 7px; }
.apptiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.atile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); text-align: left; cursor: pointer; font: inherit; min-width: 0; transition: border-color .15s, transform .15s; }
.atile:hover { border-color: color-mix(in srgb, var(--accent) 55%, transparent); transform: translateY(-1px); text-decoration: none; }
.atile b { font: 700 13.5px var(--f-head); }
.atile small { color: var(--muted); font-size: 11.5px; line-height: 1.35; display: block; }
.atile .st { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 5px; font: 600 10.5px var(--f-body); color: var(--ok); }
.atile .st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.atile.locked { background: transparent; border-style: dashed; }
.atile.locked .plate { filter: grayscale(.85); opacity: .55; }
.atile.locked .st { color: var(--accent); }
.atile.locked .st::before { display: none; }
.upnow { display: inline-flex; align-items: center; gap: 6px; font: 700 11.5px var(--f-head); color: var(--accent); }
.upnow svg { width: 13px; height: 13px; }
.sso { display: inline-flex; align-items: center; gap: 6px; font: 600 11px var(--f-body); color: var(--muted); }
.sso img { width: 14px; height: 14px; border-radius: 3px; background: #fff; }

/* suite page */
.suite-sec { margin: 26px 0 12px; display: flex; align-items: baseline; gap: 12px; }
.suite-sec h2 { font-size: 18px; } .suite-sec .muted { font-size: 13px; }
.scards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: var(--gap); }
.scard { padding: 18px; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; }
.scard .stop { display: flex; gap: 14px; align-items: center; }
.scard h3 { font-size: 16px; } .scard .desc { color: var(--muted); font-size: 13px; margin: 0; flex: 1; }
.scard .sfoot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.scard .sfoot .btn { margin-left: auto; }
.scard.locked { background: radial-gradient(260px 160px at 100% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%), var(--card-bg); }
.scard.locked .plate img { filter: grayscale(.7); opacity: .65; }
.scard .ribbon { position: absolute; top: 14px; right: -34px; transform: rotate(35deg); background: var(--accent); color: var(--accent-ink); font: 800 9.5px var(--f-mono); letter-spacing: .1em; padding: 4px 40px; }
.price-from { font: 700 13px var(--f-head); } .price-from small { color: var(--muted); font-weight: 500; }
.bot-av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font: 800 16px var(--f-head); color: #04111C; flex: none; background: var(--bc, var(--accent)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bc, var(--accent)) 25%, transparent); }
.bots { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.bot { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.bot.locked { background: transparent; border-style: dashed; } .bot.locked .bot-av { filter: grayscale(.8); opacity: .6; }
.bot b { font: 700 13.5px var(--f-head); display: block; } .bot small { color: var(--muted); font-size: 11.5px; }

/* ---------- profile ---------- */
.prof-hero { position: relative; padding: 0; overflow: hidden; }
.prof-hero .cover { height: 132px; background: radial-gradient(600px 200px at 20% 0%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 70%), linear-gradient(120deg, #0B2638, #050E17 70%); }
.prof-hero .who { display: flex; align-items: flex-end; gap: 20px; padding: 0 28px 22px; margin-top: -48px; flex-wrap: wrap; }
.prof-hero .avatar.xl { width: 112px; height: 112px; font-size: 34px; box-shadow: 0 0 0 5px var(--surface), 0 0 0 7px color-mix(in srgb, var(--accent) 60%, transparent); }
.prof-hero h1 { font-size: 26px; } .prof-hero .meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-top: 6px; }
.av-edit { position: relative; }
.av-edit .av-btn { position: absolute; right: 2px; bottom: 2px; width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface); background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer; }
.av-edit .av-btn svg { width: 15px; height: 15px; }
.opt-grid { display: grid; gap: 18px; }
.opt-row { display: grid; grid-template-columns: 170px 1fr; gap: 14px; align-items: center; }
.opt-row > span { font: 600 13px var(--f-head); }
@media (max-width: 700px) { .opt-row { grid-template-columns: 1fr; gap: 6px; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chips span { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--border); font: 600 12.5px var(--f-head); background: var(--surface-2); cursor: pointer; }
.chips input:checked + span { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow); color: var(--text); }
.chips input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.chips .sw { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.lockedopt { opacity: .55; }
.preview-mini { border-radius: 14px; border: 1px solid var(--border); padding: 12px; background: var(--bg); display: grid; grid-template-columns: 38px 1fr; gap: 10px; height: 118px; }
.preview-mini .pm-side { border-radius: 8px; background: var(--side); }
.preview-mini .pm-body { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: 30px 1fr; gap: 8px; }
.preview-mini .pm-body i { border-radius: 8px; background: var(--card-bg); border: 1px solid var(--card-border); }
.preview-mini .pm-body i:nth-child(1) { box-shadow: inset 0 -10px 0 color-mix(in srgb, var(--accent) 40%, transparent); }
.preview-mini .pm-body i:nth-child(4) { grid-column: span 2; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 30%, transparent), transparent), var(--surface); }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  :root[data-sidebar="rail"] .app, .app { grid-template-columns: 1fr; }
  .content { padding: 20px 16px 32px; }
  .top { padding: 12px 16px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi .v { font-size: 24px; }
  :root[data-sidebar="rail"] .side .brand > div, :root[data-sidebar="rail"] .nav a span, :root[data-sidebar="rail"] .nav-label { display: revert; }
}
@media (max-width: 520px) { .kpi .v { font-size: 22px; } .kpi { padding: 14px 14px 0; } .kpi .kspark { margin: 8px -14px 0; width: calc(100% + 28px); } .apptiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.scard .desc, .scard p { text-align: left; }
.bot { flex-wrap: wrap; } .bot > span:nth-child(2) { min-width: 90px; }
.bot .btn { margin-left: auto; }
.nav a[data-tipside] { }
:root[data-sidebar="rail"] .nav a:hover::after { content: attr(data-tipside); position: absolute; left: 64px; top: 50%; transform: translateY(-50%); background: #0B2638; color: #fff; padding: 6px 10px; border-radius: 8px; font: 600 12px var(--f-head); white-space: nowrap; z-index: 60; box-shadow: 0 6px 20px rgba(0,0,0,.35); height: auto; }
:root[data-sidebar="rail"] .side { overflow: visible; }

/* ===================== v2.10 — app launcher & AppenTel phone ===================== */
.topapps { gap: 8px; }
.topapps svg { color: var(--electric); }
.lpop { position: fixed; z-index: 70; width: min(420px, calc(100vw - 24px)); max-height: min(560px, calc(100vh - 90px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.35); overflow: hidden; animation: lpopIn .18s ease-out; }
@keyframes lpopIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.lpop-head { display: flex; align-items: baseline; gap: 10px; padding: 16px 18px 8px; }
.lpop-head .muted { margin-left: auto; font-size: 12px; }
.lpop-search { position: relative; display: flex; align-items: center; margin: 0 14px 6px; }
.lpop-search svg { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--muted); }
.lpop-search input { width: 100%; height: 38px; padding: 0 12px 0 34px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: 500 14px var(--f-body); }
.lpop-search input:focus { outline: none; border-color: var(--electric); box-shadow: 0 0 0 3px color-mix(in srgb, var(--electric) 25%, transparent); }
.lhero .lpop-search, .row .lpop-search { margin: 0; }
.lpop-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 8px 12px 12px; overflow: auto; }
.lmini { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 4px 10px; border-radius: 12px; background: none; border: 0; cursor: pointer; color: var(--text); font: 600 11.5px var(--f-body); text-align: center; }
.lmini span { line-height: 1.2; max-width: 88px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lmini:hover, .lmini:focus-visible { background: var(--surface-2); }
.lmini:hover .plate { transform: translateY(-2px); }
.lmini .plate { transition: transform .15s; }
.lpop-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 12px 18px; border-top: 1px solid var(--border); font-size: 13px; }
.lpop-foot a { display: inline-flex; align-items: center; gap: 6px; }
.lpop-foot svg { width: 15px; height: 15px; }
.lpop-foot .sso { margin-left: auto; }
.lhero { display: grid; grid-template-columns: auto 1fr; gap: 18px 28px; align-items: center; padding: 22px 24px; margin-bottom: 8px; background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--electric) 22%, transparent), transparent 60%), var(--surface); }
.lhero-txt { display: flex; flex-direction: column; }
.lhero-txt b { font: 800 46px/1 var(--f-head); margin: 6px 0 2px; }
.lhero-txt span:last-child { color: var(--text-2); }
.lhero-logos { display: flex; justify-content: flex-end; }
.lhero-logos .plate { margin-left: -8px; box-shadow: 0 0 0 3px var(--surface), 0 4px 14px rgba(0,0,0,.2); }
.lhero-tools { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.lhero-tools .lpop-search { min-width: 240px; flex: 0 1 320px; }
.ltiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-top: 10px; }
.ltiles.compact { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.ltile { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 22px 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; cursor: pointer; color: var(--text); transition: transform .15s, border-color .15s, box-shadow .15s; }
.ltile:hover, .ltile:focus-visible { transform: translateY(-3px); border-color: color-mix(in srgb, var(--electric) 60%, var(--border)); box-shadow: 0 14px 30px rgba(0,0,0,.22); text-decoration: none; }
.ltile b { font: 700 14px var(--f-head); }
.ltile small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.ltile.off .plate { filter: grayscale(.8); opacity: .6; }
.ltile.off { border-style: dashed; }
.ltile .lst { position: absolute; top: 10px; right: 10px; font: 700 10px var(--f-body); letter-spacing: .04em; text-transform: uppercase; padding: 3px 7px; border-radius: 6px; }
.lst.live { background: var(--ok-bg); color: var(--ok); }
.lst.soon { background: var(--warn-bg); color: var(--warn); }
table.access { width: 100%; border-collapse: collapse; }
table.access th, table.access td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; }
table.access th { font: 600 12px var(--f-body); color: var(--muted); white-space: nowrap; position: sticky; top: 0; background: var(--surface); }
table.access td.ck, table.access th:not(:first-child):not(:last-child) { text-align: center; }
table.access tr.na { opacity: .55; }
.tick { display: inline-grid; place-items: center; cursor: pointer; }
.tick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tick span { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--border-strong); display: grid; place-items: center; transition: background .12s, border-color .12s; }
.tick input:checked + span { background: var(--electric); border-color: var(--electric); }
.tick input:checked + span::after { content: ""; width: 10px; height: 6px; border: 2.5px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.tick input:focus-visible + span { outline: 2px solid var(--electric); outline-offset: 2px; }
.tick input:disabled + span { opacity: .4; cursor: not-allowed; }

/* phone button */
.phw .dotn { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font: 700 10px/16px var(--f-body); text-align: center; }
.phonebtn { position: relative; transition: background .2s, color .2s; }
.phonebtn svg { color: var(--electric); }
.phonebtn.oncall { background: #13A86B !important; border-color: #13A86B !important; }
.phonebtn.oncall svg { color: #fff; }
.phonebtn.ringing { background: #13A86B !important; border-color: #13A86B !important; animation: phFlash 1s steps(1) infinite; }
.phonebtn.ringing svg { color: #fff; animation: phShake .5s ease-in-out infinite; }
.phonebtn.ringing::before, .phonebtn.ringing::after { content: ""; position: absolute; inset: -2px; border-radius: inherit; border: 2px solid #13A86B; animation: phRipple 1.4s ease-out infinite; pointer-events: none; }
.phonebtn.ringing::after { animation-delay: .7s; }
.phonebtn.ringing { animation: phFlash 1s steps(1) infinite; }
@keyframes phFlash { 0% { box-shadow: inset 0 0 0 40px #13A86B; } 50% { box-shadow: inset 0 0 0 40px #E8A317; } }
@keyframes phShake { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-16deg); } 40% { transform: rotate(14deg); } 60% { transform: rotate(-10deg); } 80% { transform: rotate(8deg); } }
@keyframes phRipple { from { transform: scale(1); opacity: .9; } to { transform: scale(1.9); opacity: 0; } }

/* caller-ID card */
.callcard { position: fixed; z-index: 90; top: 76px; right: 20px; width: min(360px, calc(100vw - 24px)); color: #EAF3F8; background: linear-gradient(160deg, #0E3149 0%, #071521 70%); border: 1px solid rgba(255,255,255,.12); border-radius: 22px; box-shadow: 0 30px 70px rgba(0,0,0,.5), 0 0 0 1px rgba(19,168,107,.25), 0 0 40px rgba(19,168,107,.18); padding: 14px 16px 16px; overflow: hidden; transform: translateX(120%) scale(.96); opacity: 0; transition: transform .45s cubic-bezier(.2,1.3,.4,1), opacity .25s; }
.callcard.in { transform: none; opacity: 1; }
.callcard + .callcard { top: 300px; }
.cc-top { display: flex; align-items: center; gap: 8px; font: 600 11.5px var(--f-body); color: #9FB6C6; letter-spacing: .02em; }
.cc-brand { display: inline-flex; align-items: center; gap: 8px; }
.cc-brand .plate { width: 22px; height: 22px; border-radius: 6px; }
.cc-x { margin-left: auto; background: none; border: 0; color: #9FB6C6; cursor: pointer; padding: 4px; border-radius: 8px; }
.cc-x svg { width: 16px; height: 16px; }
.cc-x:hover { background: rgba(255,255,255,.08); }
.cc-body { display: flex; align-items: center; gap: 18px; padding: 20px 8px 18px; }
.cc-av { position: relative; width: 68px; height: 68px; flex: none; display: grid; place-items: center; }
.cc-av .cc-face { position: relative; z-index: 1; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(140deg, #13A86B, #0A7A9E); color: #fff; font: 800 22px var(--f-head); box-shadow: 0 0 0 3px rgba(255,255,255,.12); animation: ccBob 1.2s ease-in-out infinite; }
.cc-av .cc-face svg { width: 28px; height: 28px; }
.cc-av .wave { position: absolute; inset: 0; border-radius: 50%; border: 2px solid #13A86B; animation: ccWave 2.1s ease-out infinite; }
.cc-av .w2 { animation-delay: .7s; } .cc-av .w3 { animation-delay: 1.4s; }
@keyframes ccWave { from { transform: scale(.95); opacity: .9; } to { transform: scale(1.9); opacity: 0; } }
@keyframes ccBob { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.cc-who { display: flex; flex-direction: column; min-width: 0; gap: 3px; }
.cc-who b { font: 800 20px/1.15 var(--f-head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-num { font: 600 15px var(--f-mono); color: #CFE3EE; letter-spacing: .02em; }
.cc-tag { margin-top: 4px; align-self: flex-start; font: 600 11.5px var(--f-body); padding: 3px 8px; border-radius: 6px; background: rgba(0,168,232,.16); color: #7FD3F5; }
.cc-tag.muted { background: rgba(255,255,255,.07); color: #9FB6C6; }
.cc-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.cc-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 8px; border: 0; border-radius: 14px; cursor: pointer; color: #fff; font: 700 12px var(--f-body); text-decoration: none !important; background: rgba(255,255,255,.08); transition: transform .12s, filter .12s; }
.cc-btn svg { width: 22px; height: 22px; }
.cc-btn:hover { transform: translateY(-1px); filter: brightness(1.12); }
.cc-btn.answer { background: #13A86B; animation: ccPulse 1.2s ease-in-out infinite; }
.cc-btn.decline { background: #D9443A; }
.cc-btn.decline svg { transform: rotate(135deg); }
.cc-btn.info { color: #EAF3F8; }
.cc-btn.sm { flex-direction: row; padding: 7px 12px; border-radius: 10px; }
.cc-btn.sm svg { width: 17px; height: 17px; }
@keyframes ccPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(19,168,107,.6); } 50% { box-shadow: 0 0 0 8px rgba(19,168,107,0); } }
.oncall-bar { position: fixed; z-index: 85; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 16px; background: #0B2638; color: #EAF3F8; border: 1px solid rgba(19,168,107,.5); box-shadow: 0 16px 40px rgba(0,0,0,.4); animation: lpopIn .25s ease-out; }
.oc-dot { width: 10px; height: 10px; border-radius: 50%; background: #13A86B; animation: ccPulse 1.4s infinite; }
.oc-t { font: 600 14px var(--f-mono); color: #9FE3C4; min-width: 44px; }

/* phone panel */
.phpanel { position: fixed; z-index: 70; width: min(340px, calc(100vw - 24px)); max-height: calc(100vh - 90px); overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 24px 60px rgba(0,0,0,.35); padding: 16px; display: flex; flex-direction: column; gap: 12px; animation: lpopIn .18s ease-out; }
.ph-head { display: flex; align-items: center; gap: 10px; }
.ph-head small { display: block; color: var(--muted); font-size: 12px; }
.ph-status { gap: 6px; }
.ph-status span { font-size: 12px !important; }
.ph-status .sw { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.ph-dial { display: flex; gap: 8px; }
.ph-dial input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: 600 16px var(--f-mono); letter-spacing: .04em; }
.ph-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ph-pad button { height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: 700 16px var(--f-mono); cursor: pointer; }
.ph-pad button:hover { border-color: var(--electric); }
.ph-pad button:active { transform: scale(.96); }
.ph-sub { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.ph-recent { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ph-recent li { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 10px; }
.ph-recent li:hover { background: var(--surface-2); }
.ph-recent b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-recent small { color: var(--muted); font-size: 11.5px; }
.rc-ic { width: 28px; height: 28px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--surface-2); color: var(--ok); }
.rc-ic svg { width: 14px; height: 14px; }
.rc-ic.missed, .rc-ic.declined { color: var(--danger); background: var(--danger-bg); }
.rc-ic.ringing { color: #fff; background: #13A86B; }
.ph-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 8px; border-top: 1px solid var(--border); font-size: 13px; }
.ph-foot .check { margin-right: auto; display: inline-flex; gap: 6px; align-items: center; }
@media (max-width: 720px) {
  .topapps .lbl { display: none; }
  .callcard { top: auto; bottom: 16px; right: 12px; left: 12px; width: auto; transform: translateY(130%); }
  .callcard.in { transform: none; }
  .callcard + .callcard { top: auto; bottom: 250px; }
  .lpop-grid { grid-template-columns: repeat(3, 1fr); }
  .lhero { grid-template-columns: 1fr; } .lhero-logos { justify-content: flex-start; padding-left: 8px; }
}
@media (prefers-reduced-motion: reduce) { .phonebtn.ringing { background: #E8A317 !important; } .callcard { transition: opacity .2s; transform: none; } }

/* =====================================================================================
   AppenHub 2.11 — PIN lock screen, sign-in tray, desktop & taskbar, always-on panel
   ===================================================================================== */
/* ---------- lock screen ---------- */
.lock { min-height: 100vh; position: relative; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; padding: 6vh 20px 28px; color: #F7F9FB;
  background: radial-gradient(1200px 700px at 78% 12%, rgba(0,168,232,.32), transparent 60%), radial-gradient(900px 600px at 10% 90%, rgba(56,214,232,.16), transparent 60%), linear-gradient(160deg, #0B2638 0%, #071521 55%, #040E17 100%); }
.lock::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px); background-size: 22px 22px; pointer-events: none; }
.lock > * { position: relative; z-index: 1; }
.lock-clock { text-align: center; }
.lock-clock b { display: block; font: 800 clamp(56px, 9vw, 96px)/1 var(--f-head); letter-spacing: -.03em; }
.lock-clock span { font: 500 17px var(--f-body); color: #C9D3DB; }
.lock-card { align-self: center; display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(360px, 100%); text-align: center; }
.lock-card h1 { color: #fff; font-size: 26px; }
.lock-org { margin: -6px 0 6px; color: #94A2AE; font-size: 13.5px; }
.lock-av { width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; font: 800 40px var(--f-head); color: #071521; background: linear-gradient(135deg, #38D6E8, #00A8E8); box-shadow: 0 0 0 6px rgba(255,255,255,.08), 0 20px 50px rgba(0,0,0,.45); }
.lock-av.sm { width: 40px; height: 40px; font-size: 15px; box-shadow: none; }
.lock-av.sm svg { width: 18px; height: 18px; }
.pinbox { display: flex; width: 100%; border-radius: 12px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(10px); overflow: hidden; }
.pinbox:focus-within { border-color: #38D6E8; box-shadow: 0 0 0 3px rgba(56,214,232,.3); }
.pinbox input { flex: 1; min-width: 0; height: 50px; background: transparent; border: 0; color: #fff; padding: 0 16px; font: 700 22px var(--f-mono); letter-spacing: .35em; text-align: center; outline: none; }
.pinbox input::placeholder { color: #94A2AE; letter-spacing: .05em; font: 500 15px var(--f-body); }
.pin-go { width: 52px; border: 0; background: #00A8E8; color: #071521; cursor: pointer; display: grid; place-items: center; }
.pin-go svg { transform: rotate(-90deg); }
.pin-dots { display: flex; gap: 10px; height: 10px; }
.pin-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.18); transition: background .15s, transform .15s; }
.pin-dots i.on { background: #38D6E8; transform: scale(1.15); }
.lock-err { min-height: 20px; color: #FFB4AB; font-size: 13.5px; }
.shake { animation: pinShake .4s; }
@keyframes pinShake { 20%, 60% { transform: translateX(-9px); } 40%, 80% { transform: translateX(9px); } }
.lock-card.busy { opacity: .7; pointer-events: none; }
.lock-pad { display: grid; grid-template-columns: repeat(3, 64px); gap: 10px; margin-top: 4px; }
.lock-pad button { height: 52px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.07); color: #fff; font: 600 20px var(--f-mono); cursor: pointer; }
.lock-pad button:hover { background: rgba(255,255,255,.16); }
.lock-pad button:active { transform: scale(.94); }
@media (pointer: fine) and (min-width: 900px) { .lock-pad { display: none; } }
.lock-links { display: flex; gap: 18px; font-size: 13px; margin-top: 6px; }
.lock-links a { color: #9FD9F2; }
.lock-users { position: absolute; left: 24px; bottom: 24px; display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow: auto; z-index: 2; }
.lock-user { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 12px; border: 0; background: transparent; color: #F7F9FB; text-align: left; cursor: pointer; min-width: 220px; }
.lock-user:hover, .lock-user.on { background: rgba(255,255,255,.1); }
.lock-user b { display: block; font-size: 13.5px; }
.lock-user small { color: #94A2AE; font-size: 11.5px; }
.lock-brand { display: flex; align-items: center; gap: 8px; color: #C9D3DB; font: 700 15px var(--f-head); }
.lock-brand b { color: #38D6E8; }
.lock-brand small { color: #66737F; font: 500 12px var(--f-body); margin-left: 6px; }
@media (max-width: 860px) {
  .lock-users { position: static; flex-direction: row; max-width: 100%; overflow-x: auto; margin-top: 18px; }
  .lock-user { min-width: 0; }
  .lock { grid-template-rows: auto auto auto auto; }
  .lock-brand small { display: none; }
}
.pin-intro { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.pin-intro p { margin: 0; color: var(--text-2); }
.pin-mono svg { width: 44px; height: 44px; flex: none; }
.pin-devs { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pin-devs li { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; }
.pin-devs li > span { flex: 1; } .pin-devs b { display: block; font-size: 13px; } .pin-devs small { color: var(--muted); font-size: 12px; }

/* ---------- sign-in status dots & tray ---------- */
.sig { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: transparent; flex: none; }
.sig.ok, .sig.sandbox, .sig.ready { background: #13A86B; box-shadow: 0 0 0 2px rgba(19,168,107,.25); }
.sig.pending { background: #E8A317; animation: ccPulse 1.2s infinite; }
.sig.failed, .sig.direct { background: #94A2AE; }
.sig.unset { background: transparent; box-shadow: inset 0 0 0 1.5px #94A2AE; }
.signtray { position: fixed; left: 18px; bottom: 18px; z-index: 75; width: 300px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.3); padding: 12px 14px; animation: lpopIn .2s ease-out; transition: opacity .35s, transform .35s; }
.signtray.bye { opacity: 0; transform: translateY(12px); }
.st-head { display: flex; align-items: center; gap: 10px; }
.st-head b { flex: 1; font: 700 13.5px var(--f-head); }
.st-x { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 2px; display: grid; }
.st-x svg { width: 16px; height: 16px; }
.st-ok { width: 22px; height: 22px; border-radius: 50%; background: #13A86B; color: #fff; display: grid; place-items: center; }
.st-ok svg { width: 14px; height: 14px; }
.spin { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--border); border-top-color: var(--electric); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.signtray ul { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 240px; overflow: auto; }
.signtray li { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.signtray li > span:not(.plate) { flex: 1; }
.signtray > small { display: block; margin-top: 8px; color: var(--muted); font-size: 11.5px; }
.hubframes { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- desktop ---------- */
.content.view-desk { max-width: none; padding: 0; display: flex; flex-direction: column; }
.desk { position: relative; flex: 1; min-height: calc(100vh - 150px); display: flex; flex-direction: column; color: #F7F9FB; overflow: hidden; isolation: isolate; }
.has-demo .desk { min-height: calc(100vh - 190px); }
.desk.wall-midnight { background: radial-gradient(1100px 700px at 85% 0%, rgba(0,168,232,.30), transparent 60%), radial-gradient(800px 600px at 0% 100%, rgba(56,214,232,.14), transparent 60%), linear-gradient(160deg, #0B2638, #071521 60%, #040E17); }
.desk.wall-aurora { background: radial-gradient(900px 500px at 20% 10%, rgba(56,214,232,.45), transparent 60%), radial-gradient(800px 600px at 90% 30%, rgba(144,133,233,.42), transparent 60%), radial-gradient(900px 600px at 50% 110%, rgba(19,168,107,.35), transparent 60%), #071521; }
.desk.wall-dusk { background: radial-gradient(900px 600px at 80% 10%, rgba(255,171,107,.42), transparent 60%), radial-gradient(800px 600px at 10% 90%, rgba(213,81,129,.35), transparent 60%), linear-gradient(170deg, #202A33, #0B1620); }
.desk.wall-brand { background: radial-gradient(900px 600px at 30% 20%, rgba(255,255,255,.18), transparent 60%), linear-gradient(140deg, #00A8E8, #00729E 55%, #0B2638); }
.desk.wall-plain { background: var(--surface-2); color: var(--text); }
.desk::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(255,255,255,.045) 1px, transparent 1px); background-size: 24px 24px; }
.desk.wall-plain::before { display: none; }
.desk-greet { padding: 18px 24px 4px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.desk-greet b { font: 800 22px var(--f-head); letter-spacing: -.01em; }
.desk-greet > span { font-size: 13px; opacity: .78; display: inline-flex; align-items: center; gap: 6px; }
.desk-greet [data-sigsum] { display: inline-flex; align-items: center; gap: 6px; }
.desk-area { position: relative; flex: 1; margin: 8px 16px 0; min-height: 300px; outline: none; }
.dicon { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 7px; padding: 8px 4px 4px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: inherit; cursor: default; user-select: none; -webkit-user-select: none; touch-action: none; transition: background .12s, left .18s ease, top .18s ease; }
.dicon:hover { background: rgba(255,255,255,.10); }
.dicon.sel, .dicon:focus-visible { background: rgba(0,168,232,.28); border-color: rgba(56,214,232,.65); outline: none; }
.wall-plain .dicon:hover { background: var(--surface); } .wall-plain .dicon.sel { background: color-mix(in srgb, var(--electric) 18%, transparent); }
.dicon.drag { z-index: 5; transition: none; opacity: .9; background: rgba(0,168,232,.25); box-shadow: 0 18px 40px rgba(0,0,0,.35); cursor: grabbing; }
.dicon .plate { box-shadow: 0 8px 22px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.12); }
.size-s .dicon .plate { width: 48px; height: 48px; border-radius: 13px; } .size-l .dicon .plate { width: 78px; height: 78px; border-radius: 20px; }
.dicon .dl { font: 600 12.5px/1.25 var(--f-body); text-align: center; max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.wall-plain .dicon .dl { text-shadow: none; }
.dicon .sig { position: absolute; top: 6px; right: calc(50% - 38px); box-shadow: 0 0 0 2px #071521; }
.size-s .dicon .sig { right: calc(50% - 30px); } .size-l .dicon .sig { right: calc(50% - 46px); }
.hubplate { background: linear-gradient(140deg, #0B2638, #071521) !important; color: #38D6E8; }
.hubplate svg { width: 48%; height: 48%; }
.desk-empty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 6px; opacity: .85; }
.desk-empty b { font: 700 18px var(--f-head); }
.taskbar { position: relative; z-index: 3; margin: 8px 12px 12px; height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 10px; border-radius: 16px; background: rgba(7,21,33,.62); backdrop-filter: blur(18px) saturate(150%); border: 1px solid rgba(255,255,255,.1); color: #F7F9FB; }
.wall-plain .taskbar { background: var(--surface); color: var(--text); border-color: var(--border); }
.tb-start { width: 42px; height: 42px; border-radius: 12px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; padding: 0; }
.tb-start:hover, .tb-pin:hover { background: rgba(255,255,255,.12); }
.tb-start svg { width: 30px; height: 30px; }
.tb-search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 10px; background: rgba(255,255,255,.1); width: 230px; }
.wall-plain .tb-search { background: var(--surface-2); }
.tb-search svg { width: 16px; height: 16px; opacity: .7; }
.tb-search input { border: 0; background: transparent; color: inherit; outline: none; width: 100%; font: 500 13px var(--f-body); }
.tb-search input::placeholder { color: inherit; opacity: .6; }
.tb-pins { display: flex; gap: 4px; flex: 1; justify-content: center; min-width: 0; overflow-x: auto; }
.tb-pin { position: relative; width: 46px; height: 46px; border-radius: 12px; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; padding: 0; }
.tb-pin .sig { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); width: 6px; height: 6px; box-shadow: none !important; }
.tb-right { display: flex; align-items: center; gap: 14px; font-size: 12px; }
.tb-sig { display: inline-flex; gap: 6px; align-items: center; opacity: .85; }
.tb-clock { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.tb-clock b { font: 700 13px var(--f-body); } .tb-clock small { opacity: .75; }
.ctxm { position: fixed; z-index: 90; min-width: 220px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,.35); padding: 6px; animation: lpopIn .12s ease-out; }
.ctxm > button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 8px; color: var(--text); font: 500 13px var(--f-body); text-align: left; cursor: pointer; }
.ctxm > button:hover, .ctxm > button:focus-visible { background: var(--surface-2); outline: none; }
.ctxm svg { width: 16px; height: 16px; color: var(--muted); }
.cm-head { padding: 6px 10px 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.cm-head b { display: block; font-size: 13.5px; } .cm-head small { color: var(--muted); font-size: 11.5px; }
.cm-sub { padding: 6px 10px 2px; font: 600 11px var(--f-mono); text-transform: uppercase; color: var(--muted); letter-spacing: .06em; }
.cm-row { display: flex; gap: 4px; padding: 4px 10px 6px; }
.cm-row button { flex: 1; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 12px; cursor: pointer; }
.cm-row button.on { border-color: var(--electric); background: color-mix(in srgb, var(--electric) 14%, transparent); }
.cm-row.walls button { flex: none; width: 30px; height: 30px; border-radius: 50%; padding: 0; }
.cm-row.walls button.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--electric); }
.sw-midnight { background: linear-gradient(140deg, #0B2638, #071521) !important; } .sw-aurora { background: linear-gradient(140deg, #38D6E8, #9085E9 60%, #13A86B) !important; }
.sw-dusk { background: linear-gradient(140deg, #FFAB6B, #D55181) !important; } .sw-brand { background: linear-gradient(140deg, #00A8E8, #0B2638) !important; } .sw-plain { background: #EEF2F5 !important; }
.startm { position: fixed; z-index: 85; width: min(440px, calc(100vw - 16px)); max-height: min(640px, calc(100vh - 120px)); display: flex; flex-direction: column; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.45); animation: lpopIn .16s ease-out; overflow: hidden; }
.sm-head { padding: 14px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; }
.sm-me { display: flex; gap: 10px; align-items: center; } .sm-me b { display: block; } .sm-me small { color: var(--muted); font-size: 12px; }
.sm-body { overflow: auto; padding: 6px 10px 10px; }
.sm-sec { font: 600 11px var(--f-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 6px 6px; }
.sm-item { display: flex; align-items: center; gap: 8px; border-radius: 10px; padding: 2px 4px 2px 2px; }
.sm-item:hover { background: var(--surface-2); }
.sm-open { flex: 1; display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 6px; text-align: left; color: var(--text); cursor: pointer; min-width: 0; }
.sm-open b { display: block; font-size: 13.5px; } .sm-open small { color: var(--muted); font-size: 11.5px; }
.sm-on { color: var(--ok); padding: 0 8px; display: grid; } .sm-on svg { width: 16px; height: 16px; }
.sm-foot { display: flex; gap: 4px; padding: 8px 10px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.sm-foot a, .sm-foot button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 8px; border: 0; background: none; color: var(--text-2); font: 500 12.5px var(--f-body); cursor: pointer; }
.sm-foot a:hover, .sm-foot button:hover { background: var(--surface-2); text-decoration: none; }
.sm-foot svg { width: 15px; height: 15px; }
@media (max-width: 860px) {
  .tb-search, .tb-right .tb-sig { display: none; }
  .desk { min-height: calc(100vh - 210px); }
}

/* ---------- always-on panel (announcements, messages, phone) ---------- */
.app.has-dock { grid-template-columns: 264px minmax(0, 1fr) 330px; }
:root[data-sidebar="rail"] .app.has-dock { grid-template-columns: 76px minmax(0, 1fr) 330px; }
.app.has-dock.dock-rail { grid-template-columns: 264px minmax(0, 1fr) 60px; }
:root[data-sidebar="rail"] .app.has-dock.dock-rail { grid-template-columns: 76px minmax(0, 1fr) 60px; }
.dock { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--border); min-width: 0; z-index: 15; }
.has-demo .dock { top: 40px; height: calc(100vh - 40px); }
.dock-tabs { display: flex; gap: 2px; padding: 10px 10px 6px; border-bottom: 1px solid var(--border); }
.dtab { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 34px; border-radius: 9px; border: 0; background: none; color: var(--muted); font: 600 12px var(--f-body); cursor: pointer; }
.dtab:hover { background: var(--surface-2); color: var(--text); }
.dtab svg { width: 16px; height: 16px; }
.dtab span { display: none; }
.dock-rail { flex: none; width: 34px; }
.dbadge { position: absolute; top: 2px; right: calc(50% - 20px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font: 700 10px/16px var(--f-body); font-style: normal; }
.dbadge.ring { background: #13A86B; animation: ccPulse 1s infinite; }
.dsec { display: flex; flex-direction: column; min-height: 0; border-bottom: 1px solid var(--border); }
.dsec.grow { flex: 1; }
.dsec[data-dsec="ann"] { max-height: 27%; }
.dsec[data-dsec="msg"] { min-height: 190px; }
.dsec.flash { animation: dflash .9s; }
@keyframes dflash { 30% { background: color-mix(in srgb, var(--electric) 16%, transparent); } }
.dsec > header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 6px; font: 700 12.5px var(--f-head); color: var(--text); }
.dsec > header > span { display: inline-flex; gap: 7px; align-items: center; }
.dsec > header svg { width: 15px; height: 15px; color: var(--electric); }
.dsec > header a { font: 500 12px var(--f-body); }
.dbody { overflow: auto; padding: 0 8px 10px; min-height: 0; }
.dempty { padding: 10px 8px; color: var(--muted); font-size: 12.5px; display: flex; gap: 8px; align-items: center; }
.dempty svg { width: 14px; height: 14px; }
.dskel { height: 60px; margin: 4px 6px; border-radius: 10px; background: linear-gradient(90deg, var(--surface-2), var(--border), var(--surface-2)); background-size: 200% 100%; animation: skel 1.2s infinite; }
@keyframes skel { to { background-position: -200% 0; } }
.dann, .dmsg { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.dann button, .dmsg button { display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 8px 6px; border: 0; border-radius: 10px; background: none; color: var(--text); text-align: left; cursor: pointer; }
.dann button:hover, .dmsg button:hover { background: var(--surface-2); }
.dann-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; margin-top: 6px; }
.dann b { display: block; font-size: 13px; line-height: 1.35; } .dann small { display: block; color: var(--muted); font-size: 11.5px; }
.dann em { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-style: normal; color: var(--text-2); font-size: 12px; margin-top: 2px; }
.pinic { width: 12px !important; height: 12px !important; color: var(--electric); margin-right: 4px; vertical-align: -1px; }
.dmsg button { align-items: center; }
.dmsg .avatar.sm { width: 32px; height: 32px; font-size: 12px; flex: none; }
.dmsg .avatar svg { width: 15px; height: 15px; }
.dm-t { flex: 1; min-width: 0; } .dm-t b { display: block; font-size: 13px; } .dm-t small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dm-ago { color: var(--muted); font-size: 11px; white-space: nowrap; }
.dcount { min-width: 20px; height: 20px; border-radius: 10px; background: var(--electric); color: var(--midnight); font: 700 11px/20px var(--f-body); font-style: normal; text-align: center; padding: 0 6px; }
.dthread { display: flex; flex-direction: column; height: 100%; min-height: 220px; }
.dt-head { display: flex; align-items: center; gap: 6px; padding: 2px 2px 6px; }
.dt-head b { flex: 1; font-size: 13px; } .dt-head a { font-size: 12px; }
.dt-head [data-back] svg { transform: rotate(90deg); }
.dt-msgs { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 6px; padding: 4px 2px; min-height: 120px; }
.dt-m { max-width: 86%; align-self: flex-start; display: flex; flex-direction: column; }
.dt-m span { padding: 7px 10px; border-radius: 12px 12px 12px 4px; background: var(--surface-2); font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.dt-m small { font-size: 11px; color: var(--muted); padding: 0 4px 2px; }
.dt-m time { font-size: 10.5px; color: var(--muted); padding: 2px 4px 0; }
.dt-m.me { align-self: flex-end; align-items: flex-end; } .dt-m.me span { background: var(--electric); color: var(--midnight); border-radius: 12px 12px 4px 12px; }
.dt-send { display: flex; gap: 6px; padding-top: 6px; align-items: flex-end; }
.dt-send textarea { flex: 1; resize: none; min-height: 36px; max-height: 110px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: 13px var(--f-body); }
.dock-phone { display: flex; flex-direction: column; gap: 10px; padding: 0 12px 12px; }
.dock-phone .ph-head { display: none; }
.dock-phone .ph-status { flex-wrap: nowrap; gap: 4px; }
.dock-phone .ph-status label { flex: 1; min-width: 0; }
.dock-phone .ph-status span { padding: 4px 6px !important; font-size: 11px !important; justify-content: center; white-space: nowrap; width: 100%; }
.dock-phone .ph-status .sw { margin-right: 3px; }
.dock-phone .ph-sub { font-size: 12px; }
.dock-phone .ph-foot .btn-sm { height: 28px; padding: 0 8px; font-size: 12px; }
.dock-phone .ph-dial input { height: 36px; font-size: 14px; }
.dock-phone .ph-dial .btn { height: 36px; }
.dock-phone .ph-pad button { height: 34px; }
.dock-phone .ph-foot { padding-top: 6px; }
.dph-st { display: inline-flex; align-items: center; gap: 5px; font: 500 11.5px var(--f-body); color: var(--muted); }
.dph-st .sw { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dph-off { align-items: flex-start; } .dph-off > span { flex: 1; } .dph-off b { display: block; color: var(--text); font-size: 13px; } .dph-off small { display: block; font-size: 12px; }
.ph-ringing { display: flex; flex-direction: column; gap: 6px; }
.phr { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, #13A86B 14%, var(--surface)); border: 1px solid color-mix(in srgb, #13A86B 45%, transparent); animation: dflash 1.6s infinite; }
.phr.on { animation: none; }
.phr > span:nth-child(2) { flex: 1; } .phr b { display: block; font-size: 13px; } .phr small { color: var(--muted); font-size: 11.5px; }
.cc-btn.sm { width: 34px; height: 34px; }
/* shrunk to a rail */
.dock.rail .dock-tabs { flex-direction: column; border-bottom: 0; padding: 10px 8px; gap: 6px; flex: 1; }
.dock.rail .dtab { flex: none; height: 42px; }
.dock.rail .dsec { display: none; }
.dock.rail .dock-rail { order: 9; margin-top: auto; width: auto; }
@media (max-width: 1280px) { .app.has-dock { grid-template-columns: 264px minmax(0, 1fr) 300px; } .content { padding-left: 24px; padding-right: 24px; } }
@media (max-width: 1100px) { .app.has-dock, :root[data-sidebar="rail"] .app.has-dock { grid-template-columns: 76px minmax(0, 1fr) 290px; } }
/* phones and small tablets: a tab bar along the bottom that opens each part as a sheet */
@media (max-width: 860px) {
  .app.has-dock, .app.has-dock.dock-rail, :root[data-sidebar="rail"] .app.has-dock { grid-template-columns: 1fr; padding-bottom: 60px; }
  .dock, .has-demo .dock { position: fixed; top: auto; left: 0; right: 0; bottom: 0; height: auto; max-height: 72vh; border-left: 0; border-top: 1px solid var(--border); box-shadow: 0 -12px 40px rgba(0,0,0,.18); z-index: 55; }
  .dock .dock-tabs, .dock.rail .dock-tabs { order: 2; flex-direction: row; border-bottom: 0; border-top: 1px solid var(--border); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); flex: none; }
  .dock .dtab, .dock.rail .dtab { flex: 1; flex-direction: column; gap: 2px; height: 46px; }
  .dtab span { display: block; font-size: 10.5px; }
  .dock .dock-rail { display: none; }
  .dock .dsec, .dock.rail .dsec { display: none; max-height: none; }
  .dock[data-sheet="ann"] [data-dsec="ann"], .dock[data-sheet="msg"] [data-dsec="msg"], .dock[data-sheet="ph"] [data-dsec="ph"] { display: flex; height: 60vh; }
  .signtray { bottom: 76px; left: 12px; right: 12px; width: auto; }
}

/* ---------- admin: what each person sees ---------- */
.pa { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.pa-list { position: sticky; top: 90px; max-height: calc(100vh - 120px); display: flex; flex-direction: column; }
.pa-list ul { list-style: none; margin: 0; padding: 0 8px 8px; overflow: auto; }
.pa-list a { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; color: var(--text); }
.pa-list a:hover { background: var(--surface-2); text-decoration: none; }
.pa-list a.on { background: color-mix(in srgb, var(--electric) 14%, transparent); }
.pa-list a > span:nth-child(2) { flex: 1; min-width: 0; }
.pa-list b { display: block; font-size: 13px; } .pa-list small { display: block; color: var(--muted); font-size: 11.5px; }
.pa-pin { color: var(--ok); display: grid; } .pa-pin svg { width: 14px; height: 14px; }
.pa-who { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.pa-who > div:nth-child(2) { flex: 1; min-width: 220px; }
.pa-lvtext { display: block; margin-top: 4px; font-size: 11.5px; color: var(--muted); }
.pa-who .avatar.lg { width: 56px; height: 56px; font-size: 18px; }
.pa-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.pa-actions select { height: 34px; }
.pa-table select { height: 34px; min-width: 200px; }
.pa-table tr.na td:first-child { opacity: .55; }
.pa-cat td { font: 600 11px var(--f-mono) !important; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); }
.lvchip { display: inline-block; padding: 2px 8px; border-radius: 10px; font: 600 11px var(--f-body); margin-right: 4px; background: var(--surface-2); color: var(--text-2); }
.lv-view { background: #E8EEF3; color: #3A4651; } .lv-user { background: #E0F4FC; color: #00729E; } .lv-manager { background: #E4F5EC; color: #137A52; } .lv-admin { background: #EFEAFB; color: #5B47C2; } .lv-none { background: transparent; color: var(--muted); }
:root[data-theme="dark"] .lv-view, :root[data-theme="dark"] .lv-user, :root[data-theme="dark"] .lv-manager, :root[data-theme="dark"] .lv-admin { background: var(--surface-2); color: var(--text); }
@media (max-width: 1000px) { .pa { grid-template-columns: 1fr; } .pa-list { position: static; max-height: 300px; } }
@media (prefers-reduced-motion: reduce) { .dicon, .signtray { transition: none; } .phr { animation: none; } }
.demo-bar + .lock { min-height: calc(100vh - 40px); }
