/* ==========================================================================
   StatusKit design system — white, quiet, information-first.
   Built on Bootstrap 5.3 variables. Mobile-first.
   ========================================================================== */

@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  --ink: #101828;
  --ink-2: #344054;
  --muted: #5d6679;
  --faint: #98a2b3;
  --line: #e4e7ec;
  --line-soft: #eef0f3;
  --surface: #f6f7f9;
  --paper: #ffffff;

  --brand: #0b5e7e;
  --brand-600: #094c66;
  --brand-50: #ebf4f7;
  --brand-100: #d3e6ee;

  --ok: #12a150;      --ok-50: #e7f6ed;
  --ok-soft: #6cc995;
  --warn: #b97f00;    --warn-50: #fdf5dd;   --warn-bar: #f2b522;
  --partial: #e05a0c; --partial-50: #fdeee4;
  --major: #d92d20;   --major-50: #fdecea;
  --maint: #2e6fd8;   --maint-50: #e9f0fc;
  --neutral: #667085; --neutral-50: #f2f4f7;

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-2: 0 6px 18px -6px rgba(16, 24, 40, .10), 0 2px 4px -2px rgba(16, 24, 40, .05);
  --shadow-3: 0 24px 48px -12px rgba(16, 24, 40, .20);
  --sidebar-w: 256px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --bs-body-font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-font-size: .9375rem;
  --bs-body-line-height: 1.55;
  --bs-body-color: var(--ink-2);
  --bs-body-bg: var(--paper);
  --bs-emphasis-color: var(--ink);
  --bs-secondary-color: var(--muted);
  --bs-border-color: var(--line);
  --bs-border-radius: var(--radius-sm);
  --bs-border-radius-lg: var(--radius);
  --bs-primary: var(--brand);
  --bs-primary-rgb: 11, 94, 126;
  --bs-link-color: var(--brand);
  --bs-link-color-rgb: 11, 94, 126;
  --bs-link-hover-color: var(--brand-600);
  --bs-link-hover-color-rgb: 9, 76, 102;
  --bs-focus-ring-color: rgba(11, 94, 126, .28);
  --bs-heading-color: var(--ink);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { background: var(--paper); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, h4, h5, h6 { color: var(--ink); font-weight: 650; letter-spacing: -.01em; }
a { text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
.btn:hover, .nav-link:hover, .dropdown-item:hover, .page-link:hover, .brand:hover, .card-link:hover { text-decoration: none; }
img { max-width: 100%; height: auto; }
code { color: var(--ink); background: var(--neutral-50); padding: .1em .35em; border-radius: 4px; font-size: .86em; }
pre code { background: none; padding: 0; }
::selection { background: var(--brand-100); color: var(--ink); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 2000; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; color: #fff; }
.text-muted { color: var(--muted) !important; }
.text-ink { color: var(--ink) !important; }
.small, small { font-size: .84rem; }
.fw-semibold { font-weight: 600 !important; }
.tabular { font-variant-numeric: tabular-nums; }
.min-w-0 { min-width: 0; }

/* ---------- Brand mark: three uptime bars ---------- */
.brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--ink); font-weight: 700; font-size: 1.05rem; letter-spacing: -.02em; }
.brand-mark { display: inline-flex; align-items: flex-end; gap: 3px; height: 20px; }
.brand-mark span { width: 5px; border-radius: 2px; background: var(--ok); }
.brand-mark span:nth-child(1) { height: 12px; }
.brand-mark span:nth-child(2) { height: 20px; }
.brand-mark span:nth-child(3) { height: 15px; background: var(--brand); }

/* ---------- Buttons ---------- */
.btn { --bs-btn-font-weight: 600; --bs-btn-padding-x: 1rem; --bs-btn-padding-y: .55rem; --bs-btn-font-size: .9rem; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; gap: .45rem; transition: background-color .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), color .15s var(--ease); }
.btn-lg { --bs-btn-padding-x: 1.25rem; --bs-btn-padding-y: .75rem; --bs-btn-font-size: 1rem; }
.btn-sm { --bs-btn-padding-x: .7rem; --bs-btn-padding-y: .35rem; --bs-btn-font-size: .82rem; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-600); --bs-btn-hover-border-color: var(--brand-600); --bs-btn-active-bg: var(--brand-600); --bs-btn-active-border-color: var(--brand-600); --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand); box-shadow: 0 1px 2px rgba(16, 24, 40, .12), inset 0 1px 0 rgba(255, 255, 255, .12); }
.btn-light { --bs-btn-bg: #fff; --bs-btn-border-color: var(--line); --bs-btn-color: var(--ink-2); --bs-btn-hover-bg: var(--surface); --bs-btn-hover-border-color: #d0d5dd; --bs-btn-hover-color: var(--ink); --bs-btn-active-bg: var(--neutral-50); --bs-btn-active-border-color: #d0d5dd; box-shadow: var(--shadow-1); }
.btn-ghost { --bs-btn-color: var(--ink-2); --bs-btn-hover-bg: var(--neutral-50); --bs-btn-hover-color: var(--ink); --bs-btn-active-bg: var(--line-soft); border: 0; }
.btn-danger { --bs-btn-bg: var(--major); --bs-btn-border-color: var(--major); --bs-btn-hover-bg: #b42318; --bs-btn-hover-border-color: #b42318; }
.btn-outline-danger { --bs-btn-color: var(--major); --bs-btn-border-color: #f4b9b4; --bs-btn-hover-bg: var(--major-50); --bs-btn-hover-color: #b42318; --bs-btn-hover-border-color: #f4b9b4; --bs-btn-active-bg: var(--major-50); --bs-btn-active-color: #b42318; }
.btn-icon { width: 36px; height: 36px; padding: 0; }
.btn-icon.btn-sm { width: 30px; height: 30px; }
.btn .spinner-border { width: 1rem; height: 1rem; border-width: .15em; }
.btn-google { --bs-btn-bg: #fff; --bs-btn-border-color: var(--line); --bs-btn-color: var(--ink); --bs-btn-hover-bg: var(--surface); --bs-btn-hover-border-color: #d0d5dd; box-shadow: var(--shadow-1); }
.btn-google svg { width: 18px; height: 18px; }

/* ---------- Forms ---------- */
.form-control, .form-select { border-color: #d0d5dd; border-radius: var(--radius-sm); color: var(--ink); box-shadow: var(--shadow-1); transition: border-color .15s, box-shadow .15s; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--bs-focus-ring-color); }
.form-control::placeholder { color: var(--faint); }
.form-floating > .form-control, .form-floating > .form-select { height: calc(3.5rem + 2px); min-height: calc(3.5rem + 2px); line-height: 1.25; }
.form-floating > textarea.form-control { height: auto; }
.form-floating > label { color: var(--muted); padding-left: .85rem; max-width: 100%; }
.form-floating > .form-control:focus ~ label, .form-floating > .form-control:not(:placeholder-shown) ~ label, .form-floating > .form-select ~ label { color: var(--muted); transform: scale(.82) translateY(-.55rem) translateX(.15rem); }
.form-floating > label::after { background: transparent !important; }
.form-label { font-weight: 600; color: var(--ink); font-size: .875rem; margin-bottom: .35rem; }
.form-text { color: var(--muted); font-size: .8rem; }
.form-check-input { border-color: #c4c9d2; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { box-shadow: 0 0 0 4px var(--bs-focus-ring-color); border-color: var(--brand); }
.form-switch { padding-left: 3.1em; }
.form-switch .form-check-input { width: 2.3em; height: 1.25em; margin-top: .15em; margin-left: -3.1em; cursor: pointer; }
.form-check-label { color: var(--ink-2); cursor: pointer; }
.was-validated .form-control:valid, .form-control.is-valid { border-color: #a6dcbc; background-image: none; }
.form-control.is-invalid, .was-validated .form-control:invalid, .form-select.is-invalid { border-color: #f1a39c; }
.invalid-feedback { font-size: .8rem; }
.has-reveal { position: relative; }
.has-reveal .form-control { padding-right: 3rem; }
.btn-reveal { position: absolute; right: .35rem; top: .7rem; width: 2.25rem; height: 2.25rem; border: 0; background: transparent; color: var(--muted); border-radius: var(--radius-xs); z-index: 5; }
.btn-reveal:hover { background: var(--neutral-50); color: var(--ink); }
.input-group-text { background: var(--surface); border-color: #d0d5dd; color: var(--muted); }
.form-section { padding: 1.25rem 0; border-top: 1px solid var(--line-soft); }
.form-section:first-child { border-top: 0; padding-top: 0; }
.form-section h3 { font-size: .95rem; margin-bottom: .2rem; }
.form-section > p { color: var(--muted); font-size: .84rem; margin-bottom: 1rem; }
.color-input { display: flex; align-items: center; gap: .6rem; }
.color-input input[type=color] { width: 48px; height: 48px; padding: 4px; border-radius: var(--radius-sm); border: 1px solid #d0d5dd; background: #fff; cursor: pointer; }
.captcha-wrap { min-height: 66px; }

/* ---------- Badges ---------- */
.badge-status { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 600; white-space: nowrap; line-height: 1.4; border: 1px solid transparent; }
.badge-status .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tone-ok { color: #087a3c; background: var(--ok-50); border-color: #c9ead6; }
.tone-warn { color: #8a5f00; background: var(--warn-50); border-color: #f5e3a8; }
.tone-partial { color: #b54708; background: var(--partial-50); border-color: #f9d3bd; }
.tone-major { color: #b42318; background: var(--major-50); border-color: #f6cbc6; }
.tone-maint { color: #1d4fa8; background: var(--maint-50); border-color: #cddcf6; }
.tone-neutral { color: #475467; background: var(--neutral-50); border-color: var(--line); }
.badge-soft { background: var(--neutral-50); color: var(--ink-2); border: 1px solid var(--line); font-weight: 600; border-radius: 999px; padding: .2rem .55rem; font-size: .74rem; }
.badge-brand { background: var(--brand-50); color: var(--brand-600); border: 1px solid var(--brand-100); font-weight: 600; border-radius: 999px; padding: .2rem .55rem; font-size: .74rem; }

/* ---------- Panels & cards ---------- */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.panel-head h2, .panel-head h3 { font-size: 1rem; margin: 0; display: flex; align-items: center; gap: .5rem; }
.panel-head h2 .bi, .panel-head h3 .bi { color: var(--muted); }
.panel-head p { margin: .15rem 0 0; color: var(--muted); font-size: .84rem; }
.panel-body { padding: 1.25rem; }
.panel-foot { padding: .9rem 1.25rem; border-top: 1px solid var(--line-soft); background: var(--surface); border-radius: 0 0 var(--radius) var(--radius); display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }
.panel-flush .list-row:last-child { border-bottom: 0; }
.list-row { display: flex; align-items: center; gap: .85rem; padding: .85rem 1.25rem; border-bottom: 1px solid var(--line-soft); }
.list-row:hover { background: #fbfcfd; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .title { font-weight: 600; color: var(--ink); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .meta { font-size: .8rem; color: var(--muted); }

/* KPI tiles */
.kpi { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; height: 100%; display: flex; flex-direction: column; gap: .35rem; box-shadow: var(--shadow-1); transition: box-shadow .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease); }
.kpi:hover { border-color: #d6dae1; box-shadow: var(--shadow-2); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: .82rem; font-weight: 600; }
.kpi-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 1rem; background: var(--neutral-50); color: var(--ink-2); box-shadow: inset 0 0 0 1px rgba(16, 24, 40, .06); }
.kpi-icon.ok { background: var(--ok-50); color: var(--ok); }
.kpi-icon.major { background: var(--major-50); color: var(--major); }
.kpi-icon.brand { background: var(--brand-50); color: var(--brand); }
.kpi-icon.maint { background: var(--maint-50); color: var(--maint); }
.kpi-icon.warn { background: var(--warn-50); color: var(--warn); }
.kpi-value { font-size: 1.65rem; font-weight: 700; color: var(--ink); letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: .78rem; color: var(--muted); }
.meter { height: 6px; border-radius: 99px; background: var(--neutral-50); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--brand); border-radius: 99px; transition: width .6s var(--ease); }
.meter.warn > span { background: var(--warn-bar); }
.meter.full > span { background: var(--major); }

/* Empty states */
.empty-state { text-align: center; padding: 3rem 1.25rem; max-width: 440px; margin: 0 auto; }
.empty-state h3 { font-size: 1.05rem; margin: .9rem 0 .35rem; }
.empty-state p { color: var(--muted); margin-bottom: 1.1rem; }
.empty-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin: 0 auto; background: var(--brand-50); color: var(--brand); font-size: 1.4rem; border: 1px solid var(--brand-100); }
.empty-icon.ok { background: var(--ok-50); color: var(--ok); border-color: #c9ead6; }

/* Skeletons */
.skeleton { position: relative; overflow: hidden; background: var(--neutral-50); border-radius: var(--radius-sm); }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.chart-box { position: relative; height: 260px; }
.chart-box.sm { height: 180px; }
.chart-box .skeleton { position: absolute; inset: 0; }

/* Code */
.d-grid > *, .row > * { min-width: 0; }
.code-copy { min-width: 0; max-width: 100%; display: flex; align-items: center; gap: .5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .5rem .5rem .5rem .85rem; }
.code-copy code { flex: 1; min-width: 0; background: none; padding: 0; font-size: .8rem; overflow-x: auto; white-space: nowrap; display: block; scrollbar-width: thin; }
.code-block { background: #0f172a08; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .9rem 1rem; font-size: .8rem; overflow-x: auto; color: var(--ink); margin: 0; }

/* ---------- Data grids ---------- */
.grid-toolbar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; padding: .85rem 1.25rem; border-bottom: 1px solid var(--line-soft); }
.grid-toolbar .search { position: relative; flex: 1 1 220px; max-width: 360px; }
.grid-toolbar .search .bi { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.grid-toolbar .search input { padding-left: 2.2rem; height: 38px; }
.grid-toolbar .form-select { height: 38px; width: auto; min-width: 140px; padding-top: .35rem; padding-bottom: .35rem; }
.grid-toolbar .spacer { flex: 1; }
.table-wrap { overflow-x: auto; max-height: 70vh; }
.table-grid { width: 100%; margin: 0; font-size: .875rem; border-collapse: separate; border-spacing: 0; }
.table-grid thead th { position: sticky; top: 0; z-index: 2; background: #fafbfc; color: var(--muted); font-size: .75rem; font-weight: 600; text-align: left; padding: .65rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table-grid tbody td { padding: .8rem 1rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; color: var(--ink-2); }
.table-grid tbody tr { transition: background-color .12s; }
.table-grid tbody tr:hover { background: #fafbfc; }
.table-grid tbody tr:last-child td { border-bottom: 0; }
.table-grid .cell-title { font-weight: 600; color: var(--ink); display: block; }
.table-grid .cell-sub { font-size: .78rem; color: var(--muted); display: block; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-grid .col-check { width: 40px; }
.table-grid .col-actions { width: 1%; white-space: nowrap; text-align: right; }
.sort-link { color: inherit; display: inline-flex; align-items: center; gap: .25rem; }
.sort-link .bi { font-size: .7rem; opacity: .5; }
.sort-link.active { color: var(--ink); }
.sort-link.active .bi { opacity: 1; }
.grid-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .8rem 1.25rem; border-top: 1px solid var(--line-soft); }
.grid-summary { font-size: .82rem; color: var(--muted); }
.pagination { --bs-pagination-color: var(--ink-2); --bs-pagination-border-color: var(--line); --bs-pagination-hover-bg: var(--surface); --bs-pagination-hover-color: var(--ink); --bs-pagination-active-bg: var(--brand); --bs-pagination-active-border-color: var(--brand); --bs-pagination-focus-box-shadow: 0 0 0 4px var(--bs-focus-ring-color); gap: 4px; }
.pagination .page-link { border-radius: var(--radius-xs) !important; min-width: 32px; text-align: center; }
.bulk-bar { display: none; align-items: center; gap: .6rem; padding: .6rem 1.25rem; background: var(--brand-50); border-bottom: 1px solid var(--brand-100); font-size: .85rem; color: var(--brand-600); font-weight: 600; flex-wrap: wrap; }
.bulk-bar.show { display: flex; }
.dropdown-menu { --bs-dropdown-border-color: var(--line); --bs-dropdown-link-active-bg: var(--brand-50); --bs-dropdown-link-active-color: var(--brand-600); --bs-dropdown-font-size: .875rem; border-radius: var(--radius); box-shadow: var(--shadow-3); padding: .35rem; }
.dropdown-item { border-radius: var(--radius-xs); padding: .45rem .7rem; display: flex; align-items: center; gap: .55rem; color: var(--ink-2); }
.dropdown-item .bi { color: var(--muted); width: 1rem; }
.dropdown-item.text-danger .bi { color: var(--major); }
.dropdown-item:active .bi { color: inherit; }
.dropdown-divider { border-color: var(--line-soft); }
.dropdown-header { font-size: .74rem; color: var(--muted); }

@media (max-width: 767.98px) {
  .table-wrap { max-height: none; }
  .table-wrap:has(.table-cards) { overflow: visible; }
  .table-grid.table-cards thead { display: none; }
  .table-grid.table-cards, .table-grid.table-cards tbody, .table-grid.table-cards tr, .table-grid.table-cards td { display: block; width: 100%; }
  .table-grid.table-cards tbody tr { border-bottom: 1px solid var(--line); padding: .8rem 1rem; position: relative; }
  .table-grid.table-cards tbody td { border: 0; padding: .2rem 0; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  .table-grid.table-cards tbody td::before { content: attr(data-label); color: var(--muted); font-size: .78rem; font-weight: 600; text-align: left; flex-shrink: 0; }
  .table-grid.table-cards tbody td.cell-main { display: block; text-align: left; padding-right: 3.2rem; padding-bottom: .4rem; }
  .table-grid.table-cards tbody td.cell-main::before, .table-grid.table-cards tbody td.col-check::before, .table-grid.table-cards tbody td.col-actions::before { display: none; }
  .table-grid.table-cards tbody tr:has(td.col-check) { padding-left: 2.75rem; }
  .table-grid.table-cards tbody td.col-check { position: absolute; left: 1rem; top: .95rem; width: auto; padding: 0; display: block; }
  .table-grid.table-cards tbody td.col-actions { position: absolute; right: .75rem; top: .75rem; width: auto; padding: 0; }
  .table-grid.table-cards .cell-sub { max-width: 100%; white-space: normal; }
  .grid-toolbar .search { max-width: none; }
  .grid-toolbar .form-select { flex: 1 1 140px; }
}

/* ---------- Toasts & modals ---------- */
.toast-stack { position: fixed; top: 16px; right: 16px; z-index: 1090; display: flex; flex-direction: column; gap: .5rem; max-width: min(380px, calc(100vw - 32px)); }
.toast-x { display: flex; align-items: flex-start; gap: .65rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-3); padding: .8rem .9rem; font-size: .875rem; color: var(--ink-2); animation: toast-in .25s var(--ease); }
.toast-x .bi { font-size: 1.1rem; line-height: 1.2; }
.toast-x.success .bi { color: var(--ok); }
.toast-x.error .bi { color: var(--major); }
.toast-x.warning .bi { color: var(--warn); }
.toast-x.info .bi { color: var(--maint); }
.toast-x .msg { flex: 1; }
.toast-x .close { border: 0; background: none; color: var(--faint); padding: 0 .1rem; line-height: 1; font-size: 1.1rem; }
.toast-x.hide { opacity: 0; transform: translateY(-6px); transition: all .2s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.modal { --bs-modal-border-radius: var(--radius-lg); --bs-modal-border-color: var(--line); --bs-modal-header-border-color: var(--line-soft); --bs-modal-footer-border-color: var(--line-soft); --bs-modal-padding: 1.25rem; }
.modal-content { box-shadow: var(--shadow-3); }
.modal-title { font-size: 1.05rem; font-weight: 650; display: flex; align-items: center; gap: .5rem; }
.modal-footer { background: var(--surface); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.modal-backdrop { --bs-backdrop-bg: #101828; --bs-backdrop-opacity: .35; }
.confirm-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--major-50); color: var(--major); font-size: 1.25rem; margin-bottom: .8rem; }
@media (max-width: 575.98px) {
  .modal-dialog:not(.modal-fullscreen) { margin: auto 0 0; max-width: none; min-height: 100%; display: flex; align-items: flex-end; }
  .modal-dialog:not(.modal-fullscreen) .modal-content { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .modal.fade .modal-dialog { transform: translateY(40px); }
  .modal.show .modal-dialog { transform: none; }
}

.nav-tabs-x { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; margin-bottom: 1.25rem; }
.nav-tabs-x::-webkit-scrollbar { display: none; }
.nav-tabs-x a { padding: .65rem .85rem; color: var(--muted); font-weight: 600; font-size: .875rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: .4rem; }
.nav-tabs-x a:hover { color: var(--ink); text-decoration: none; }
.nav-tabs-x a.active { color: var(--brand); border-bottom-color: var(--brand); }

.alert { border-radius: var(--radius); font-size: .875rem; }
.alert-info { --bs-alert-bg: var(--maint-50); --bs-alert-border-color: #cddcf6; --bs-alert-color: #1d4fa8; }
.alert-warning { --bs-alert-bg: var(--warn-50); --bs-alert-border-color: #f5e3a8; --bs-alert-color: #7a5300; }
.alert-danger { --bs-alert-bg: var(--major-50); --bs-alert-border-color: #f6cbc6; --bs-alert-color: #912018; }
.alert-success { --bs-alert-bg: var(--ok-50); --bs-alert-border-color: #c9ead6; --bs-alert-color: #05603a; }

/* ==========================================================================
   Marketing site
   ========================================================================== */
.site-header { position: sticky; top: 0; z-index: 1030; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(10px); -webkit-backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .navbar { padding: .8rem 0; }
.site-header .nav-link { color: var(--ink-2); font-weight: 550; font-size: .92rem; padding: .45rem .8rem !important; border-radius: var(--radius-sm); }
.site-header .nav-link:hover, .site-header .nav-link.active { color: var(--ink); background: var(--neutral-50); }
.site-header .navbar-toggler { border: 1px solid var(--line); padding: .4rem .55rem; border-radius: var(--radius-sm); }
.site-header .navbar-toggler:focus { box-shadow: 0 0 0 4px var(--bs-focus-ring-color); }
@media (max-width: 991.98px) {
  .site-header .navbar-collapse { padding: .75rem 0 .5rem; }
  .site-header .nav-actions { padding-top: .75rem; border-top: 1px solid var(--line-soft); margin-top: .5rem; }
  .site-header .nav-actions .btn { flex: 1; }
}
.ad-slot { margin: 1.25rem auto; text-align: center; max-width: 100%; overflow: hidden; }
.ad-slot-site_header { margin: 0 auto; padding: .5rem 0; }

.hero { padding: 3.5rem 0 3rem; position: relative; }
.hero { isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 620px; background: radial-gradient(900px 380px at 82% 0%, var(--brand-50), transparent 70%), radial-gradient(600px 300px at 0% 10%, #f1f8f4, transparent 70%); pointer-events: none; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 620px; background-image: radial-gradient(rgba(16, 24, 40, .07) 1px, transparent 1px); background-size: 22px 22px; -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 20%, #000, transparent 75%); mask-image: radial-gradient(ellipse 70% 60% at 60% 20%, #000, transparent 75%); pointer-events: none; z-index: -1; }
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; max-width: 100%; padding: .3rem .8rem .3rem .35rem; margin-bottom: 1.25rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-2); font-size: .82rem; font-weight: 600; box-shadow: var(--shadow-1); transition: border-color .15s, box-shadow .15s; }
.eyebrow:hover { text-decoration: none; border-color: #d0d5dd; box-shadow: var(--shadow-2); color: var(--ink); }
.eyebrow .new { background: var(--brand); color: #fff; border-radius: 999px; padding: .1rem .55rem; font-size: .72rem; flex-shrink: 0; }
.eyebrow .txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.eyebrow .bi { color: var(--muted); flex-shrink: 0; }
.hero h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); line-height: 1.04; letter-spacing: -.035em; font-weight: 700; max-width: 14ch; margin-bottom: 1.1rem; }
.hero .lede { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--muted); max-width: 52ch; margin-bottom: 1.6rem; }
.hero-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.hero-proof { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: 1.6rem; color: var(--muted); font-size: .86rem; }
.hero-proof span { display: inline-flex; align-items: center; gap: .4rem; }
.hero-proof .bi { color: var(--ok); }
@media (min-width: 992px) { .hero { padding: 5rem 0 4.5rem; } }

/* Hero live preview: the product's own status page in miniature */
.preview { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-3); overflow: hidden; }
.preview-bar { display: flex; align-items: center; gap: .4rem; padding: .65rem .9rem; border-bottom: 1px solid var(--line-soft); background: #fbfbfc; }
.preview-bar i { width: 10px; height: 10px; border-radius: 50%; background: #e4e7ec; display: block; }
.preview-bar .addr { margin-left: .6rem; flex: 1; background: #fff; border: 1px solid var(--line-soft); border-radius: 6px; font-size: .74rem; color: var(--muted); padding: .2rem .6rem; display: flex; align-items: center; gap: .35rem; overflow: hidden; white-space: nowrap; }
.preview-body { padding: 1.1rem; }
.preview-banner { display: flex; align-items: center; gap: .6rem; background: var(--ok); color: #fff; font-weight: 650; padding: .85rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; }
.preview-row { padding: .7rem 0; border-bottom: 1px solid var(--line-soft); }
.preview-row:last-child { border-bottom: 0; padding-bottom: 0; }
.preview-row .top { display: flex; justify-content: space-between; align-items: center; font-size: .84rem; font-weight: 600; color: var(--ink); margin-bottom: .45rem; }
.preview-row .top small { color: var(--ok); font-weight: 600; }
.preview .bars span { animation: bar-rise .7s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 12ms); }
@keyframes bar-rise { from { transform: scaleY(.15); opacity: 0; } }

.section { padding: 4rem 0; }
.section-sm { padding: 2.5rem 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.section-head { max-width: 640px; margin-bottom: 2.25rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); letter-spacing: -.03em; line-height: 1.12; margin-bottom: .7rem; }
.section-head p { color: var(--muted); font-size: 1.04rem; margin: 0; }
@media (min-width: 992px) { .section { padding: 5.5rem 0; } }

.logo-strip { display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; align-items: center; color: var(--faint); font-weight: 650; font-size: .95rem; }

/* Feature layout: one wide feature + supporting ones, each with a real UI fragment */
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.4rem; height: 100%; display: flex; flex-direction: column; box-shadow: var(--shadow-1); transition: box-shadow .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease); }
.feature:hover { border-color: #d6dae1; box-shadow: var(--shadow-2); transform: translateY(-2px); }
.feature h3 { font-size: 1.08rem; margin: .9rem 0 .4rem; }
.feature p { color: var(--muted); margin: 0 0 1rem; font-size: .92rem; }
.feature .fi { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(180deg, #fff, var(--brand-50)); color: var(--brand); font-size: 1.1rem; border: 1px solid var(--brand-100); box-shadow: 0 1px 2px rgba(11, 94, 126, .08); }
.feature .demo { margin-top: auto; background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: .9rem; font-size: .8rem; }
.feature-wide { display: grid; gap: 1.5rem; }
@media (min-width: 992px) { .feature-wide { grid-template-columns: 1fr 1.1fr; align-items: center; } }
.timeline-demo .t { display: flex; gap: .7rem; padding-bottom: .7rem; position: relative; }
.timeline-demo .t:not(:last-child)::before { content: ""; position: absolute; left: 5px; top: 14px; bottom: 0; width: 2px; background: var(--line); }
.timeline-demo .t .pip { width: 12px; height: 12px; border-radius: 50%; margin-top: 3px; flex-shrink: 0; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.timeline-demo .t strong { color: var(--ink); display: block; font-size: .8rem; }
.timeline-demo .t span { color: var(--muted); font-size: .76rem; }
.chan-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.chan-list span { display: inline-flex; align-items: center; gap: .35rem; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .25rem .6rem; font-weight: 600; color: var(--ink-2); }

.steps { counter-reset: step; display: grid; gap: 1rem; }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { padding: 1.4rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); position: relative; }
.step .n { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; color: var(--brand-600); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .7rem; }
.step .n .bi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); font-size: 1rem; border: 1px solid var(--brand-100); }
.step h3 { font-size: 1.05rem; }
.step p { color: var(--muted); font-size: .92rem; margin: 0; }

/* Pricing */
.billing-toggle { display: inline-flex; background: var(--neutral-50); border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.billing-toggle button { border: 0; background: transparent; font-weight: 600; font-size: .86rem; color: var(--muted); padding: .4rem 1rem; border-radius: 999px; }
.billing-toggle button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-1); }
.billing-toggle .save { color: var(--ok); font-size: .76rem; }
.price-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.6rem; height: 100%; display: flex; flex-direction: column; position: relative; box-shadow: var(--shadow-1); transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.price-card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); }
.price-card.featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow-2); }
.price-card .tag { position: absolute; top: -11px; left: 1.6rem; background: var(--brand); color: #fff; font-size: .74rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; }
.price-card h3 { font-size: 1.1rem; margin-bottom: .25rem; }
.price-card .desc { color: var(--muted); font-size: .88rem; min-height: 2.6em; }
.price-card .amount { font-size: 2.4rem; font-weight: 700; color: var(--ink); letter-spacing: -.03em; margin: .9rem 0 .2rem; font-variant-numeric: tabular-nums; }
.price-card .amount small { font-size: .9rem; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.price-card .per { font-size: .8rem; color: var(--muted); min-height: 1.2em; }
.price-card ul { list-style: none; padding: 0; margin: 1.25rem 0 1.5rem; display: grid; gap: .55rem; font-size: .9rem; }
.price-card li { display: flex; gap: .55rem; align-items: flex-start; }
.price-card li .bi { color: var(--ok); margin-top: .15rem; }
.price-card .btn { margin-top: auto; }

/* FAQ */
.faq .accordion-item { border: 0; border-bottom: 1px solid var(--line); background: transparent; }
.faq .accordion-button { background: transparent; font-weight: 600; color: var(--ink); font-size: 1rem; padding: 1.15rem 0; box-shadow: none; }
.faq .accordion-button:not(.collapsed) { color: var(--ink); }
.faq .accordion-button:focus-visible { outline: 2px solid var(--brand); }
.faq .accordion-body { padding: 0 0 1.2rem; color: var(--muted); max-width: 70ch; }

.cta-band { background: radial-gradient(700px 260px at 50% -40%, var(--brand-100), transparent 70%), linear-gradient(180deg, #fff, var(--brand-50)); border: 1px solid var(--brand-100); color: var(--ink-2); border-radius: var(--radius-lg); padding: 2.75rem 1.5rem; text-align: center; position: relative; overflow: hidden; box-shadow: var(--shadow-2); }
.cta-band::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(11, 94, 126, .10) 1px, transparent 1px); background-size: 18px 18px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 75%); mask-image: linear-gradient(180deg, #000, transparent 75%); pointer-events: none; }
.cta-band > * { position: relative; }
.cta-band h2 { color: var(--ink); font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -.03em; }
.cta-band p { color: var(--muted); max-width: 520px; margin: .5rem auto 1.5rem; }
.cta-band .bars { justify-content: center; max-width: 520px; margin: 0 auto 1.5rem; }

.site-footer { border-top: 1px solid var(--line); padding: 3rem 0 2rem; margin-top: 3rem; font-size: .88rem; }
.site-footer h4 { font-size: .82rem; color: var(--ink); margin-bottom: .8rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.site-footer .bottom { border-top: 1px solid var(--line-soft); margin-top: 2rem; padding-top: 1.25rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--muted); }
.social a { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: var(--radius-sm); display: inline-grid; place-items: center; color: var(--ink-2); }

/* Content pages */
.page-hero { padding: 3rem 0 1.5rem; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -.03em; }
.breadcrumb { font-size: .82rem; --bs-breadcrumb-divider-color: var(--faint); --bs-breadcrumb-item-active-color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.prose { font-size: 1.05rem; line-height: 1.75; color: var(--ink-2); max-width: 70ch; }
.prose h2 { font-size: 1.45rem; margin: 2.2rem 0 .8rem; letter-spacing: -.02em; }
.prose h3 { font-size: 1.18rem; margin: 1.8rem 0 .6rem; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose figure, .prose table { margin-bottom: 1.2rem; }
.prose li { margin-bottom: .35rem; }
.prose img { border-radius: var(--radius); border: 1px solid var(--line); }
.prose blockquote { border-left: 3px solid var(--brand); padding: .2rem 0 .2rem 1rem; color: var(--ink); font-size: 1.08rem; }
.prose pre { background: var(--surface); border: 1px solid var(--line); padding: 1rem; border-radius: var(--radius-sm); overflow-x: auto; font-size: .86rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: .5rem .7rem; }
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--brand-100); }
.post-card { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; color: inherit; transition: box-shadow .2s, border-color .2s; }
.post-card:hover { text-decoration: none; border-color: #d0d5dd; box-shadow: var(--shadow-2); }
.post-card .thumb { aspect-ratio: 16/9; background: var(--surface); display: grid; place-items: center; color: var(--faint); font-size: 2rem; overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card .body { padding: 1.15rem 1.25rem 1.3rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.post-card h2, .post-card h3 { font-size: 1.08rem; margin: 0; color: var(--ink); line-height: 1.35; }
.post-card p { color: var(--muted); font-size: .9rem; margin: 0; }
.post-meta { font-size: .8rem; color: var(--muted); display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; }
.author-box { display: flex; gap: 1rem; align-items: center; padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); margin-top: 2.5rem; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; font-weight: 700; font-size: .85rem; flex-shrink: 0; overflow: hidden; border: 1px solid var(--brand-100); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.05rem; }
.toc { position: sticky; top: 96px; font-size: .86rem; }
.toc a { color: var(--muted); display: block; padding: .25rem 0; }

/* ==========================================================================
   Auth pages
   ========================================================================== */
.auth-body { background: var(--surface); min-height: 100vh; }
.auth-wrap { min-height: 100vh; display: grid; }
@media (min-width: 992px) { .auth-wrap { grid-template-columns: minmax(420px, 1fr) 1fr; } }
.auth-main { display: flex; flex-direction: column; padding: 1.5rem 1.25rem; background: #fff; }
.auth-main .auth-inner { width: 100%; max-width: 400px; margin: auto; padding: 2rem 0; }
.auth-main h1 { font-size: 1.6rem; letter-spacing: -.025em; margin-bottom: .35rem; }
.auth-main .sub { color: var(--muted); margin-bottom: 1.6rem; }
.auth-aside { display: none; position: relative; overflow: hidden; background: radial-gradient(700px 360px at 80% 0%, var(--brand-50), transparent 70%), radial-gradient(520px 300px at 0% 100%, #eef8f2, transparent 70%), var(--surface); border-left: 1px solid var(--line); padding: 3rem; align-items: center; justify-content: center; flex-direction: column; }
.auth-aside::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(16, 24, 40, .07) 1px, transparent 1px); background-size: 22px 22px; -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%); pointer-events: none; }
.auth-aside > * { position: relative; }
@media (min-width: 992px) { .auth-aside { display: flex; } .auth-main { padding: 2rem 3rem; } }
.auth-aside .preview { max-width: 460px; width: 100%; }
.auth-aside blockquote { max-width: 460px; margin: 1.75rem auto 0; color: var(--ink-2); font-size: 1.02rem; }
.divider-text { display: flex; align-items: center; gap: .8rem; color: var(--faint); font-size: .8rem; margin: 1.25rem 0; }
.divider-text::before, .divider-text::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.otp-input { letter-spacing: .5em; font-size: 1.4rem !important; text-align: center; font-variant-numeric: tabular-nums; }

/* Installer */
.installer { max-width: 620px; margin: 0 auto; padding: 2rem 1rem 3rem; }
.installer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.installer-card { padding: 1.75rem; }
.installer-steps { display: flex; list-style: none; padding: 0; margin: 0 0 1.25rem; gap: .5rem; }
.installer-steps li { flex: 1; display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--muted); font-weight: 600; }
.installer-steps .num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); font-size: .75rem; flex-shrink: 0; }
.installer-steps li.current { color: var(--ink); }
.installer-steps li.current .num { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.installer-steps li.done .num { background: var(--ok); border-color: var(--ok); color: #fff; }
@media (max-width: 575.98px) { .installer-steps .lbl { display: none; } .installer-steps li { flex: 0 0 auto; } }
.req-list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.req-list li { display: flex; gap: .7rem; align-items: flex-start; padding: .7rem .9rem; border-bottom: 1px solid var(--line-soft); font-size: .9rem; }
.req-list li:last-child { border-bottom: 0; }
.req-list li.ok .bi { color: var(--ok); }
.req-list li.fail { background: var(--major-50); }
.req-list li.fail .bi { color: var(--major); }
.req-list li.warn .bi { color: var(--warn); }
.step-dot { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .74rem; margin-right: .35rem; }

/* ==========================================================================
   App shell (dashboard + admin)
   ========================================================================== */
.app-body { background: var(--surface); }
.app-shell { min-height: 100vh; }
.sidebar { background: #fff; border-right: 1px solid var(--line); width: var(--sidebar-w); display: flex; flex-direction: column; }
@media (min-width: 992px) {
  .sidebar, .sidebar.offcanvas-lg { position: fixed; inset: 0 auto 0 0; z-index: 1035; visibility: visible !important; transform: none !important; background-color: #fff !important; width: var(--sidebar-w); }
  .app-main { margin-left: var(--sidebar-w); }
}
@media (max-width: 991.98px) { .sidebar.offcanvas-lg { width: min(var(--sidebar-w), 86vw); } }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.1rem; height: 60px; border-bottom: 1px solid var(--line-soft); }
.sidebar-nav { flex: 1; overflow-y: auto; padding: .75rem .65rem; }
.nav-group + .nav-group { margin-top: 1rem; }
.nav-label { font-size: .68rem; font-weight: 700; color: var(--faint); padding: 0 .65rem .4rem; text-transform: uppercase; letter-spacing: .07em; }
.side-link { display: flex; align-items: center; gap: .65rem; padding: .5rem .65rem; border-radius: var(--radius-sm); color: var(--ink-2); font-weight: 550; font-size: .89rem; position: relative; }
.side-link .bi { font-size: 1.02rem; color: var(--muted); width: 1.1rem; text-align: center; }
.side-link:hover { background: var(--neutral-50); color: var(--ink); text-decoration: none; }
.side-link.active { background: var(--brand-50); color: var(--brand-600); }
.side-link.active::before { content: ""; position: absolute; left: -.65rem; top: .45rem; bottom: .45rem; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.side-link.active .bi { color: var(--brand); }
.side-link .count { margin-left: auto; font-size: .72rem; font-weight: 700; background: var(--major); color: #fff; border-radius: 99px; padding: .05rem .45rem; }
.side-link .count.neutral { background: var(--neutral-50); color: var(--ink-2); border: 1px solid var(--line); }
.sidebar-foot { padding: .75rem; border-top: 1px solid var(--line-soft); }
.plan-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; font-size: .8rem; }
.plan-card strong { color: var(--ink); }
.topbar { position: sticky; top: 0; z-index: 1020; height: 60px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: .75rem; padding: 0 1rem; }
.topbar .title { font-weight: 650; color: var(--ink); font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.user-chip { display: flex; align-items: center; gap: .55rem; border: 1px solid transparent; background: none; padding: .25rem .4rem .25rem .25rem; border-radius: 999px; color: var(--ink); font-weight: 600; font-size: .86rem; }
.user-chip:hover { background: var(--neutral-50); }
.user-chip .avatar { width: 32px; height: 32px; font-size: .76rem; }
.app-content { padding: 1.25rem 1rem 3rem; max-width: 1320px; margin: 0 auto; }
@media (min-width: 768px) { .app-content { padding: 1.75rem 1.75rem 3rem; } .topbar { padding: 0 1.75rem; } }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; flex-wrap: wrap; }
.page-head h1 { font-size: 1.45rem; margin: 0; letter-spacing: -.025em; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.page-head p { margin: .3rem 0 0; color: var(--muted); }
.page-head .head-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.impersonation-bar { background: var(--warn-50); border-bottom: 1px solid #f5e3a8; color: #7a5300; font-size: .85rem; padding: .5rem 1rem; display: flex; align-items: center; justify-content: center; gap: .75rem; flex-wrap: wrap; }
.onboarding { display: grid; gap: .6rem; }
.onboard-step { display: flex; gap: .8rem; align-items: center; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink-2); }
.onboard-step:hover { text-decoration: none; border-color: #d0d5dd; background: #fcfcfd; }
.onboard-step .chk { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex-shrink: 0; color: transparent; }
.onboard-step.done .chk { background: var(--ok); border-color: var(--ok); color: #fff; }
.onboard-step.done .t { text-decoration: line-through; color: var(--muted); }
.onboard-step .t { font-weight: 600; color: var(--ink); display: block; }
.onboard-step .d { font-size: .8rem; color: var(--muted); }

.status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0; background: var(--neutral); box-shadow: 0 0 0 3px var(--neutral-50); }
.status-dot.ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-50); }
.status-dot.major { background: var(--major); box-shadow: 0 0 0 3px var(--major-50); animation: pulse 1.6s infinite; }
.status-dot.warn { background: var(--warn-bar); box-shadow: 0 0 0 3px var(--warn-50); }
.status-dot.partial { background: var(--partial); box-shadow: 0 0 0 3px var(--partial-50); }
.status-dot.maint { background: var(--maint); box-shadow: 0 0 0 3px var(--maint-50); }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(217, 45, 32, .08); } }

.stat-strip { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.stat-strip > div { padding: .9rem 1rem; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.stat-strip .lbl { font-size: .76rem; color: var(--muted); font-weight: 600; display: block; }
.stat-strip .val { font-size: 1.25rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
@media (min-width: 768px) { .stat-strip { grid-template-columns: repeat(4, 1fr); } .stat-strip > div { border-bottom: 0; } .stat-strip > div:last-child { border-right: 0; } }
@media (min-width: 1200px) { .stat-strip.six { grid-template-columns: repeat(6, 1fr); } }

.component-row { display: flex; align-items: center; gap: .75rem; padding: .7rem 1.25rem; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.component-row:last-child { border-bottom: 0; }
.component-row .name { flex: 1 1 200px; min-width: 0; font-weight: 600; color: var(--ink); }
.component-row .name small { display: block; font-weight: 400; color: var(--muted); }
.component-row .form-select { width: auto; min-width: 190px; height: 34px; padding-top: .25rem; padding-bottom: .25rem; font-size: .84rem; }
.group-title { padding: .6rem 1.25rem; background: #fafbfc; border-bottom: 1px solid var(--line-soft); border-top: 1px solid var(--line-soft); font-size: .78rem; font-weight: 650; color: var(--muted); display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.group-title:first-child { border-top: 0; }

.check-list { display: grid; gap: .5rem; }
.check-item { display: flex; gap: .65rem; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .55rem .75rem; background: #fff; flex-wrap: wrap; }
.check-item .form-check-input { margin: 0; }
.check-item label { flex: 1; min-width: 140px; font-weight: 550; color: var(--ink); cursor: pointer; }
.check-item .form-select { width: auto; height: 32px; padding-top: .2rem; padding-bottom: .2rem; font-size: .82rem; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 1.25rem 1.6rem; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: -4px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; left: 0; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--faint); }
.timeline li.tone-major::after { border-color: var(--major); }
.timeline li.tone-partial::after { border-color: var(--partial); }
.timeline li.tone-warn::after { border-color: var(--warn-bar); }
.timeline li.tone-ok::after { border-color: var(--ok); background: var(--ok); }
.timeline li.tone-maint::after { border-color: var(--maint); }
.timeline li.tone-ok, .timeline li.tone-major, .timeline li.tone-partial, .timeline li.tone-warn, .timeline li.tone-maint, .timeline li.tone-neutral { background: none; border: 0; color: inherit; }
.timeline .when { font-size: .78rem; color: var(--muted); }
.timeline .msg { color: var(--ink-2); margin-top: .2rem; word-wrap: break-word; }

.monitor-type-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
@media (min-width: 768px) { .monitor-type-grid { grid-template-columns: repeat(4, 1fr); } }
.type-option { position: relative; }
.type-option input { position: absolute; opacity: 0; pointer-events: none; }
.type-option label { display: block; border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem; cursor: pointer; height: 100%; background: #fff; transition: border-color .15s, box-shadow .15s; }
.type-option label .bi { font-size: 1.2rem; color: var(--brand); }
.type-option label strong { display: block; color: var(--ink); margin-top: .35rem; font-size: .9rem; }
.type-option label span { font-size: .76rem; color: var(--muted); line-height: 1.35; display: block; }
.type-option input:checked + label { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.type-option input:focus-visible + label { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ==========================================================================
   Uptime bars (shared by the public page, hero and dashboard)
   ========================================================================== */
.bars { display: flex; gap: 2px; align-items: stretch; height: 30px; width: 100%; }
.bars span { flex: 1 1 0; min-width: 2px; border-radius: 2px; background: var(--ok); transform-origin: bottom; transition: opacity .15s, transform .15s; }
.bars span:hover { opacity: .75; transform: scaleY(1.08); }
.bars .t-ok { background: var(--ok); }
.bars .t-ok-soft { background: var(--ok-soft); }
.bars .t-warn { background: var(--warn-bar); }
.bars .t-partial { background: var(--partial); }
.bars .t-major { background: var(--major); }
.bars .t-maint { background: var(--maint); }
.bars .t-none { background: #e6e9ee; }
.bars.sm { height: 22px; }
.bars-legend { display: flex; justify-content: space-between; font-size: .74rem; color: var(--faint); margin-top: .35rem; }
@media (max-width: 575.98px) { .bars.responsive span:nth-child(-n+60) { display: none; } }

/* ==========================================================================
   Public status page
   ========================================================================== */
.sp-body { background: #fff; --sp-brand: var(--brand); border-top: 3px solid var(--sp-brand); }
.sp-wrap { max-width: 860px; margin: 0 auto; padding: 0 1rem; }
.sp-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.5rem 0; flex-wrap: wrap; }
.sp-logo { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); font-weight: 700; font-size: 1.2rem; letter-spacing: -.02em; }
.sp-logo img { max-height: 40px; width: auto; }
.sp-header .actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.sp-header .btn-primary { --bs-btn-bg: var(--sp-brand); --bs-btn-border-color: var(--sp-brand); --bs-btn-hover-bg: var(--sp-brand); --bs-btn-hover-border-color: var(--sp-brand); --bs-btn-active-bg: var(--sp-brand); filter: none; }
.sp-header .btn-primary:hover { filter: brightness(.92); }
.sp-banner { display: flex; align-items: center; gap: .9rem; color: #fff; border-radius: var(--radius-lg); padding: 1.35rem 1.4rem; margin-bottom: 2rem; font-size: 1.2rem; font-weight: 650; letter-spacing: -.01em; background-image: linear-gradient(120deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 55%); box-shadow: 0 10px 24px -12px rgba(16, 24, 40, .35); min-width: 0; overflow-wrap: anywhere; }
.sp-banner .bi { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .18); flex-shrink: 0; }
.sp-banner .bi { font-size: 1.35rem; }
.sp-banner small { display: block; font-size: .8rem; font-weight: 500; opacity: .85; }
.sp-banner.s-operational { background: var(--ok); }
.sp-banner.s-maintenance { background: #1f5fae; }
.sp-banner.s-degraded { background: #c78a00; }
.sp-banner.s-partial { background: var(--partial); }
.sp-banner.s-major { background: var(--major); }
.sp-incident { border: 1px solid var(--line); border-radius: var(--radius-lg); margin-bottom: 1.25rem; overflow: hidden; }
.sp-incident-head { display: flex; gap: .85rem; align-items: flex-start; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--line-soft); }
.sp-incident-head.t-major { border-top: 3px solid var(--major); }
.sp-incident-head.t-partial { border-top: 3px solid var(--partial); }
.sp-incident-head.t-warn { border-top: 3px solid var(--warn-bar); }
.sp-incident-head.t-maint { border-top: 3px solid var(--maint); }
.sp-incident-head.t-neutral { border-top: 3px solid var(--faint); }
.sp-date { width: 42px; flex-shrink: 0; border-radius: 8px; overflow: hidden; text-align: center; border: 1px solid var(--line); }
.sp-date .m { background: var(--sp-brand); color: #fff; font-size: .62rem; font-weight: 700; padding: .1rem 0; }
.sp-date .d { font-weight: 700; color: var(--ink); font-size: 1rem; padding: .1rem 0; }
.sp-incident-head > div { min-width: 0; }
.sp-incident-head h3 { font-size: 1.02rem; margin: 0 0 .2rem; overflow-wrap: anywhere; }
.sp-incident-head h3 a { color: var(--ink); }
.sp-incident-head .meta { font-size: .8rem; color: var(--muted); display: flex; gap: .3rem .6rem; flex-wrap: wrap; align-items: center; min-width: 0; overflow-wrap: anywhere; }
.sp-updates { padding: 1rem 1.25rem .25rem; }
.sp-update { display: grid; grid-template-columns: 1fr; gap: .35rem; padding-bottom: 1rem; }
@media (min-width: 640px) { .sp-update { grid-template-columns: 120px 1fr; gap: 1rem; } }
.sp-update .st { font-weight: 650; font-size: .84rem; color: var(--ink); }
.sp-update .when { font-size: .78rem; color: var(--muted); display: block; margin-bottom: .2rem; }
.sp-update { min-width: 0; }
.sp-update > * { min-width: 0; }
.sp-update .text { color: var(--ink-2); font-size: .92rem; overflow-wrap: anywhere; }
.sp-affected { font-size: .8rem; color: var(--muted); padding: 0 1.25rem 1rem; overflow-wrap: anywhere; }
.sp-section { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); padding: 1rem; margin-bottom: 1.25rem; }
.sp-section-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .1rem .2rem .8rem; }
.sp-section-head h2 { font-size: .92rem; margin: 0; display: flex; align-items: center; gap: .5rem; }
.sp-section-head .count { font-size: .8rem; color: var(--muted); font-weight: 500; }
.sp-components { display: grid; gap: .6rem; }
.sp-component { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; box-shadow: var(--shadow-1); min-width: 0; }
.sp-component .row1 { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.sp-component .nm { font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: .5rem; min-width: 0; font-size: .92rem; overflow-wrap: anywhere; }
.sp-component .nm .bi { font-size: .95rem; }
.sp-component .nm .info { color: var(--faint); font-size: .8rem; }
.sp-component .st { font-size: .8rem; font-weight: 600; white-space: nowrap; }
.sp-component .bars { margin-top: .7rem; }
.sp-component .uptime-row { display: flex; justify-content: space-between; font-size: .72rem; color: var(--faint); margin-top: .3rem; }
.c-ok { color: var(--ok); }
.c-warn { color: var(--warn); }
.c-partial { color: var(--partial); }
.c-major { color: var(--major); }
.c-maint { color: var(--maint); }
.sp-components.cols-2 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .sp-components.cols-2 { grid-template-columns: 1fr 1fr; } }
.sp-history h2 { font-size: 1.15rem; margin: 2.25rem 0 1rem; }
.sp-day { padding: 1rem 0; border-bottom: 1px solid var(--line-soft); }
.sp-day h3 { font-size: .92rem; margin-bottom: .5rem; }
.sp-day .none { color: var(--faint); font-size: .86rem; }
.sp-day .item { margin-bottom: .75rem; min-width: 0; overflow-wrap: anywhere; }
.sp-day .item a { font-weight: 600; }
.sp-day .item .excerpt { font-size: .86rem; color: var(--muted); }
.sp-footer { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 2rem 0 2.5rem; margin-top: 2rem; border-top: 1px solid var(--line-soft); font-size: .82rem; color: var(--muted); }
.sp-footer a { color: var(--muted); }
.powered { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); font-weight: 600; }
.powered .brand-mark { height: 14px; }
.powered .brand-mark span { width: 3px; }
.powered .brand-mark span:nth-child(1) { height: 8px; }
.powered .brand-mark span:nth-child(2) { height: 14px; }
.powered .brand-mark span:nth-child(3) { height: 10px; }
.subscribe-menu { width: min(340px, calc(100vw - 32px)); padding: 1rem; }
.lock-card { max-width: 420px; margin: 4rem auto; }

/* Editor & SEO panel */
.editor-wrap { border: 1px solid #d0d5dd; border-radius: var(--radius-sm); background: #fff; box-shadow: var(--shadow-1); }
.editor-wrap.is-invalid { border-color: #f1a39c; }
.editor-wrap .ql-toolbar.ql-snow { border: 0; border-bottom: 1px solid var(--line); border-radius: var(--radius-sm) var(--radius-sm) 0 0; font-family: inherit; position: sticky; top: 60px; background: #fff; z-index: 3; }
.editor-wrap .ql-container.ql-snow { border: 0; font-family: inherit; font-size: 1rem; }
.editor-wrap .ql-editor { min-height: 380px; line-height: 1.7; color: var(--ink-2); padding: 1.1rem 1.25rem; }
.editor-wrap .ql-editor h2 { font-size: 1.4rem; margin: 1.2rem 0 .5rem; }
.editor-wrap .ql-editor h3 { font-size: 1.15rem; margin: 1rem 0 .4rem; }
.editor-wrap .ql-editor.ql-blank::before { color: var(--faint); font-style: normal; }
.serp { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; background: #fff; font-family: Arial, sans-serif; }
.serp-url { font-size: .8rem; color: #202124; margin-bottom: .2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.serp-title { color: #1a0dab; font-size: 1.15rem; line-height: 1.3; margin-bottom: .2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.serp-desc { color: #4d5156; font-size: .86rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.seo-checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; font-size: .84rem; }
.seo-checks li { display: flex; gap: .5rem; align-items: flex-start; }
.seo-checks li.ok .bi { color: var(--ok); }
.seo-checks li.todo { color: var(--ink-2); }
.seo-checks li.todo .bi { color: var(--faint); }
.seo-score { font-weight: 700; font-size: .9rem; padding: .15rem .6rem; border-radius: 999px; background: var(--neutral-50); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.seo-score.good { background: var(--ok-50); color: #087a3c; }
.seo-score.ok { background: var(--warn-50); color: #8a5f00; }
.seo-score.bad { background: var(--major-50); color: #b42318; }
.settings-nav { display: grid; gap: .15rem; }
.settings-nav a { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; border-radius: var(--radius-sm); color: var(--ink-2); font-weight: 550; font-size: .89rem; }
.settings-nav a .bi { color: var(--muted); }
.settings-nav a:hover { background: var(--neutral-50); text-decoration: none; }
.settings-nav a.active { background: var(--brand-50); color: var(--brand-600); }
.settings-nav a.active .bi { color: var(--brand); }
@media (max-width: 991.98px) { .settings-nav { display: flex; overflow-x: auto; gap: .25rem; scrollbar-width: none; } .settings-nav a { white-space: nowrap; } }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Print */
@media print {
  .site-header, .site-footer, .sidebar, .topbar, .toast-stack, .ad-slot, .sp-header .actions, .tabbar, .cmdk { display: none !important; }
  .app-main { margin: 0 !important; }
}
.dns-records { display: grid; grid-template-columns: auto 1fr; gap: .25rem .6rem; font-size: .8rem; }
.dns-records dt { font-weight: 600; color: var(--ink); }
.dns-records dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.sp-postmortem { margin: 0 1.25rem 1.25rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfcfd; }
.sp-postmortem h2 { font-size: .95rem; margin: 0 0 .5rem; display: flex; align-items: center; gap: .4rem; color: var(--ink); }
.sp-postmortem .text { font-size: .9rem; color: var(--ink-2, #344054); line-height: 1.6; overflow-wrap: anywhere; }
.sp-notice { display: flex; gap: .65rem; align-items: flex-start; border-radius: var(--radius); padding: .85rem 1rem; margin-bottom: 1.25rem; font-size: .9rem; border: 1px solid; overflow-wrap: anywhere; }
.sp-notice i { font-size: 1.05rem; line-height: 1.3; }
.sp-notice.info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.sp-notice.warning { background: #fffbeb; border-color: #fde68a; color: #7c4a03; }
.sp-notice.success { background: #ecfdf3; border-color: #abefc6; color: #05603a; }
.sp-notice a { color: inherit; text-decoration: underline; }
.template-pick { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.honey { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

/* ==========================================================================
   1.2 interface layer: identity tiles, command palette, mobile tab bar
   ========================================================================== */
.sp-banner > div { min-width: 0; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.panel { transition: box-shadow .2s var(--ease); }

/* Identity tile used as the first cell of data grids */
.ident { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.ident > .ident-text { flex: 1; min-width: 0; }
.ident-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--neutral-50); color: var(--ink-2); border: 1px solid var(--line); font-size: 1rem; }
.ident-ico.ok { background: var(--ok-50); color: var(--ok); border-color: #c9ead6; }
.ident-ico.major { background: var(--major-50); color: var(--major); border-color: #f6cbc6; }
.ident-ico.warn { background: var(--warn-50); color: var(--warn); border-color: #f5e3a8; }
.ident-ico.partial { background: var(--partial-50); color: var(--partial); border-color: #f9d3bd; }
.ident-ico.maint { background: var(--maint-50); color: var(--maint); border-color: #cddcf6; }
.ident-ico.brand { background: var(--brand-50); color: var(--brand); border-color: var(--brand-100); }
.ident .avatar { width: 36px; height: 36px; font-size: .78rem; }
.table-grid .ident .cell-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-grid .ident .cell-title.wrap { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 767.98px) { .table-grid.table-cards .ident .cell-title { white-space: normal; overflow-wrap: anywhere; } }

/* Topbar title with section icon */
.topbar .title { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.topbar .title > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.title-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; background: var(--brand-50); color: var(--brand); border: 1px solid var(--brand-100); font-size: .92rem; }
.cmdk-trigger { display: inline-flex; align-items: center; gap: .55rem; height: 36px; min-width: 240px; padding: 0 .5rem 0 .75rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--faint); font-size: .86rem; box-shadow: var(--shadow-1); transition: border-color .15s, box-shadow .15s, color .15s; }
.cmdk-trigger:hover { border-color: #d0d5dd; color: var(--muted); }
.cmdk-trigger .lbl { flex: 1; text-align: left; }
kbd, .kbd { display: inline-flex; align-items: center; gap: 2px; font-family: inherit; font-size: .72rem; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: .05rem .4rem; line-height: 1.5; }
@media (max-width: 991.98px) { .cmdk-trigger { min-width: 0; width: 36px; padding: 0; justify-content: center; color: var(--ink-2); } .cmdk-trigger .lbl, .cmdk-trigger kbd { display: none; } }

/* Command palette */
.cmdk .modal-dialog { max-width: 620px; }
.cmdk .modal-content { overflow: hidden; }
.cmdk-search { display: flex; align-items: center; gap: .65rem; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line-soft); }
.cmdk-search .bi { color: var(--muted); font-size: 1.05rem; }
.cmdk-search input { flex: 1; min-width: 0; border: 0; outline: 0; font-size: 1rem; color: var(--ink); background: transparent; padding: .2rem 0; }
.cmdk-search input::placeholder { color: var(--faint); }
.cmdk-list { max-height: min(56vh, 460px); overflow-y: auto; padding: .4rem; margin: 0; list-style: none; overscroll-behavior: contain; }
.cmdk-group { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); padding: .65rem .7rem .3rem; }
.cmdk-item { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: var(--radius-sm); color: var(--ink-2); cursor: pointer; font-size: .9rem; }
.cmdk-item .ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--neutral-50); color: var(--muted); border: 1px solid var(--line); flex-shrink: 0; font-size: .9rem; }
.cmdk-item .txt { flex: 1; min-width: 0; }
.cmdk-item .txt strong { display: block; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-item .txt small { display: block; color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-item .go { color: var(--faint); opacity: 0; transition: opacity .12s; }
.cmdk-item[aria-selected="true"] { background: var(--brand-50); color: var(--brand-600); }
.cmdk-item[aria-selected="true"] .ico { background: #fff; color: var(--brand); border-color: var(--brand-100); }
.cmdk-item[aria-selected="true"] .go { opacity: 1; color: var(--brand); }
.cmdk-item mark { background: none; color: var(--brand); padding: 0; font-weight: 700; }
.cmdk-empty { text-align: center; color: var(--muted); padding: 2rem 1rem; font-size: .9rem; }
.cmdk-foot { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; padding: .6rem 1.1rem; border-top: 1px solid var(--line-soft); background: var(--surface); color: var(--muted); font-size: .76rem; }
.cmdk-foot span { display: inline-flex; align-items: center; gap: .3rem; }
@media (max-width: 575.98px) {
  .cmdk .modal-dialog:not(.modal-fullscreen) { margin: .75rem; min-height: 0; align-items: flex-start; display: block; }
  .cmdk .modal-dialog:not(.modal-fullscreen) .modal-content { border-radius: var(--radius-lg); }
  .cmdk-foot { display: none; }
}

/* Mobile tab bar for the app shell */
.tabbar { display: none; }
@media (max-width: 991.98px) {
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(255, 255, 255, .96); backdrop-filter: saturate(180%) blur(10px); -webkit-backdrop-filter: saturate(180%) blur(10px); border-top: 1px solid var(--line); padding: .3rem .25rem calc(.3rem + env(safe-area-inset-bottom)); box-shadow: 0 -6px 18px -12px rgba(16, 24, 40, .18); }
  .tabbar a, .tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; min-height: 50px; border: 0; background: none; color: var(--muted); font-size: .68rem; font-weight: 600; border-radius: var(--radius-sm); padding: .2rem 0; }
  .tabbar .bi { font-size: 1.2rem; line-height: 1.1; }
  .tabbar a:hover { text-decoration: none; color: var(--ink); }
  .tabbar .active { color: var(--brand); }
  .tabbar .active .bi::before { font-weight: 700 !important; }
  .tabbar .active::after { content: ""; position: absolute; top: -.3rem; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--brand); }
  .tabbar .pip { position: absolute; top: .25rem; left: calc(50% + .45rem); min-width: 16px; height: 16px; border-radius: 99px; background: var(--major); color: #fff; font-size: .62rem; display: grid; place-items: center; padding: 0 .25rem; box-shadow: 0 0 0 2px #fff; }
  .has-tabbar .app-content { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
  .has-tabbar .toast-stack { top: auto; bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* Onboarding as a compact checklist grid */
.onboarding { display: grid; gap: .6rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .onboarding { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); } }
.onboard-step { align-items: flex-start; height: 100%; transition: border-color .15s, box-shadow .15s, transform .15s; }
.onboard-step:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); }
.onboard-step.done { background: var(--surface); }
.onboard-step.done .t { text-decoration: none; }
.onboard-step.next { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
.onboard-step .num { font-size: .7rem; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; display: block; margin-bottom: .15rem; }
@media (max-width: 767.98px) { .onboard-step.done { display: none; } }
.onboard-done-note { display: none; font-size: .8rem; color: var(--muted); }
@media (max-width: 767.98px) { .onboard-done-note { display: block; } }

/* Trust / security grid on the landing page */
.trust-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 576px) { .trust-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 992px) { .trust-grid { grid-template-columns: repeat(3, 1fr); } }
.trust-item { display: flex; gap: .85rem; align-items: flex-start; padding: 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.trust-item .bi { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--ok-50); color: var(--ok); border: 1px solid #c9ead6; font-size: 1rem; }
.trust-item strong { display: block; color: var(--ink); font-size: .95rem; margin-bottom: .15rem; }
.trust-item span { color: var(--muted); font-size: .86rem; }

/* Product facts strip with icons */
.stat-strip .lbl .bi { color: var(--brand); margin-right: .3rem; }

/* Marketing nav icons only in the collapsed (mobile) menu */
.site-header .nav-link .bi { display: none; }
@media (max-width: 991.98px) {
  .site-header .nav-link { display: flex !important; align-items: center; gap: .7rem; padding: .7rem .8rem !important; font-size: 1rem; }
  .site-header .nav-link .bi { display: inline-block; width: 1.1rem; color: var(--muted); }
}

/* Footer status line */
.site-footer .bottom .status-line { display: inline-flex; align-items: center; gap: .5rem; }

/* Monitor detail & incident pages: long URLs never push the layout wider than the screen */
.page-head > div { min-width: 0; }
.page-head h1, .page-head p { overflow-wrap: anywhere; }
.list-row .title.wrap { white-space: normal; overflow-wrap: anywhere; }
