/* ============================================================================
   KODRADAR — PREMIUM INTERFACE LAYER
   Load after style.css. This file deliberately contains presentation overrides
   only: no external assets, fonts, or layout-dependent script hooks.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Premium tokens and ambient canvas
   -------------------------------------------------------------------------- */
:root {
  color-scheme: dark;
  --p-canvas: #060912;
  --p-canvas-raised: #090e19;
  --p-panel: rgba(15, 21, 35, 0.92);
  --p-panel-solid: #0f1523;
  --p-panel-raised: rgba(20, 28, 45, 0.94);
  --p-panel-soft: rgba(10, 15, 26, 0.72);
  --p-hairline: rgba(158, 176, 215, 0.12);
  --p-hairline-strong: rgba(158, 176, 215, 0.22);
  --p-highlight: rgba(255, 255, 255, 0.055);
  --p-highlight-strong: rgba(255, 255, 255, 0.09);
  --p-text-bright: #f5f7fc;
  --p-shadow-card: 0 1px 0 rgba(255, 255, 255, 0.045) inset,
    0 16px 40px -30px rgba(0, 0, 0, 0.92),
    0 4px 13px -9px rgba(0, 0, 0, 0.7);
  --p-shadow-float: 0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 28px 70px -28px rgba(0, 0, 0, 0.88),
    0 12px 32px -24px rgba(22, 35, 62, 0.72);
  --p-shadow-control: 0 1px 0 rgba(255, 255, 255, 0.055) inset,
    0 5px 13px -10px rgba(0, 0, 0, 0.9);
  --p-focus-ring: 0 0 0 3px rgba(91, 132, 255, 0.24),
    0 0 0 1px rgba(143, 173, 255, 0.92);
  --p-radius-control: 10px;
  --p-radius-card: 17px;
  --p-radius-panel: 22px;
  --p-control-h: 40px;
  --p-content-gap: clamp(14px, 1.25vw, 20px);
  --p-ease-out: cubic-bezier(0.2, 0.75, 0.2, 1);
  --p-ease-spring: cubic-bezier(0.16, 1, 0.3, 1);

  --r-2: var(--p-radius-control);
  --r-3: 12px;
  --r-4: var(--p-radius-card);
  --sh-focus: var(--p-focus-ring);
  --side-w: 252px;
  --pad-x: clamp(22px, 2.05vw, 34px);
  --fs-base: 14px;
  --fs-md: 13px;
  --fs-lg: 15.5px;
  --fs-xl: 21px;
  --fs-2xl: 27px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --p-canvas: #eef2f8;
  --p-canvas-raised: #f7f9fc;
  --p-panel: rgba(255, 255, 255, 0.91);
  --p-panel-solid: #ffffff;
  --p-panel-raised: rgba(255, 255, 255, 0.97);
  --p-panel-soft: rgba(245, 248, 252, 0.86);
  --p-hairline: rgba(35, 52, 82, 0.105);
  --p-hairline-strong: rgba(35, 52, 82, 0.19);
  --p-highlight: rgba(255, 255, 255, 0.7);
  --p-highlight-strong: rgba(255, 255, 255, 0.96);
  --p-text-bright: #0b1324;
  --p-shadow-card: 0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 18px 42px -34px rgba(24, 39, 68, 0.38),
    0 5px 16px -12px rgba(24, 39, 68, 0.18);
  --p-shadow-float: 0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 30px 72px -30px rgba(31, 48, 80, 0.36),
    0 12px 30px -24px rgba(31, 48, 80, 0.2);
  --p-shadow-control: 0 1px 0 #fff inset,
    0 4px 12px -10px rgba(24, 39, 68, 0.35);
  --p-focus-ring: 0 0 0 3px rgba(47, 94, 224, 0.16),
    0 0 0 1px rgba(47, 94, 224, 0.86);
}

html {
  background: var(--p-canvas);
  font-synthesis-weight: none;
}

body {
  background:
    radial-gradient(900px 540px at 7% -12%, rgba(91, 132, 255, 0.13), transparent 64%),
    radial-gradient(760px 520px at 93% 108%, rgba(139, 92, 246, 0.09), transparent 66%),
    linear-gradient(145deg, var(--p-canvas), var(--p-canvas-raised) 52%, var(--p-canvas));
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  line-height: 1.52;
}

:root[data-theme="light"] body {
  background:
    radial-gradient(880px 520px at 4% -12%, rgba(76, 111, 230, 0.105), transparent 64%),
    radial-gradient(760px 520px at 98% 110%, rgba(117, 86, 212, 0.07), transparent 66%),
    linear-gradient(145deg, var(--p-canvas), var(--p-canvas-raised) 52%, var(--p-canvas));
}

::selection {
  background: rgba(91, 132, 255, 0.36);
  color: #fff;
}

* {
  scrollbar-color: var(--line-2) transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  background-color: var(--line-2);
}

*::-webkit-scrollbar-thumb:hover {
  background-color: var(--mut);
}

/* Visible keyboard affordance is intentionally independent from hover styling. */
:where(a, button, input, select, textarea, summary, [role="button"], [role="tab"]):focus-visible {
  outline: 2px solid rgba(141, 169, 255, 0.92);
  outline-offset: 2px;
  box-shadow: var(--p-focus-ring);
}

:where(button, input, select, textarea, summary, [role="button"]):disabled,
:where(button, input, select, textarea, summary, [role="button"])[aria-disabled="true"] {
  filter: saturate(0.55);
  opacity: 0.5;
}

h1,
h2,
h3,
h4 {
  text-wrap: balance;
}

h1,
h2 {
  color: var(--p-text-bright);
  font-weight: 690;
  letter-spacing: -0.035em;
}

h3 {
  letter-spacing: 0.085em;
}

p,
.help {
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   2. Application shell, navigation and top bar
   -------------------------------------------------------------------------- */
.shell {
  position: relative;
  isolation: isolate;
}

.side {
  padding: 20px 14px 14px;
  gap: 3px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.024), transparent 21%),
    linear-gradient(180deg, rgba(10, 15, 26, 0.985), rgba(7, 11, 19, 0.985));
  border-right-color: var(--p-hairline);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.018) inset,
    22px 0 62px -55px rgba(0, 0, 0, 0.95);
}

:root[data-theme="light"] .side {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 249, 252, 0.95));
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.9) inset,
    20px 0 50px -46px rgba(31, 48, 80, 0.32);
}

.side .logo {
  min-height: 48px;
  padding: 2px 9px 18px;
  font-size: 16px;
  letter-spacing: 0.085em;
}

.logo .mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset,
    0 10px 22px -10px rgba(91, 132, 255, 0.86);
}

.logo .mark svg {
  width: 19px;
  height: 19px;
}

.logo .dot {
  width: 6px;
  height: 6px;
  margin-left: 3px;
}

.navlabel {
  padding: 16px 12px 6px;
  color: var(--mut-2);
  font-size: 9.5px;
  font-weight: 760;
  letter-spacing: 0.16em;
}

.nav a {
  min-height: 39px;
  margin: 1px 0;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--mut);
  font-weight: 570;
  letter-spacing: -0.005em;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease,
    transform 150ms var(--p-ease-out);
}

.nav a:hover {
  background: rgba(255, 255, 255, 0.046);
  border-color: rgba(255, 255, 255, 0.045);
  color: var(--txt);
}

.nav a.on {
  background:
    linear-gradient(90deg, rgba(91, 132, 255, 0.18), rgba(91, 132, 255, 0.07)),
    rgba(255, 255, 255, 0.02);
  border-color: rgba(91, 132, 255, 0.2);
  color: var(--p-text-bright);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.035) inset,
    0 10px 26px -22px rgba(91, 132, 255, 0.85);
}

.nav a.on::before {
  left: -15px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  box-shadow: 0 0 14px rgba(91, 132, 255, 0.75);
}

.nav .ic {
  width: 18px;
  height: 18px;
}

.nav a .badge {
  min-width: 20px;
  padding: 1px 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 10px -7px rgba(233, 162, 59, 0.8);
}

.side .foot {
  gap: 9px;
  padding-top: 16px;
}

.sysbox,
.statusbox {
  border-color: var(--p-hairline);
  border-radius: 13px;
  background: linear-gradient(180deg, var(--p-panel-soft), rgba(7, 11, 19, 0.54));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.035) inset;
}

:root[data-theme="light"] .sysbox,
:root[data-theme="light"] .statusbox {
  background: linear-gradient(180deg, #fff, #f6f8fc);
}

.sysbox .sb-h {
  padding: 9px 11px;
  border-bottom-color: var(--p-hairline);
}

.sysbox .sb-g {
  gap: 0;
  background: transparent;
}

.sysbox .sb-c {
  padding: 8px 11px;
  background: transparent;
  border-right: 1px solid var(--p-hairline);
  border-bottom: 1px solid var(--p-hairline);
}

.sysbox .sb-c:nth-child(2n) {
  border-right: 0;
}

.sysbox .sb-c:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.sysbox .sb-c .kk {
  font-size: 9px;
  letter-spacing: 0.1em;
}

.sysbox .sb-c .vv {
  margin-top: 1px;
  color: var(--p-text-bright);
}

.main {
  padding-bottom: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.012), transparent 25%),
    transparent;
}

.main > :not(.top) {
  width: 100%;
}

.top {
  min-height: 70px;
  margin-bottom: 18px;
  padding-top: 14px;
  padding-bottom: 13px;
  align-items: center;
  border-bottom-color: var(--p-hairline);
  background: linear-gradient(180deg, rgba(7, 10, 18, 0.95), rgba(7, 10, 18, 0.79));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.018);
  backdrop-filter: blur(18px) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) saturate(1.25);
}

:root[data-theme="light"] .top {
  background: linear-gradient(180deg, rgba(241, 244, 249, 0.96), rgba(241, 244, 249, 0.82));
}

.top h1,
.top h2 {
  margin-bottom: 1px;
  font-size: clamp(19px, 1.5vw, 23px);
  line-height: 1.18;
}

.top .mut.small {
  max-width: 720px;
  color: var(--mut);
  line-height: 1.4;
}

.crumb {
  margin-bottom: 4px;
  color: var(--mut-2);
  font-size: 9.5px;
  font-weight: 760;
  letter-spacing: 0.14em;
}

.top-actions {
  flex-wrap: nowrap;
  gap: 8px;
}

.live,
.clock {
  min-height: 34px;
  padding: 7px 11px;
  background: rgba(11, 17, 29, 0.68);
  border-color: var(--p-hairline-strong);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.035) inset;
}

:root[data-theme="light"] .live,
:root[data-theme="light"] .clock {
  background: rgba(255, 255, 255, 0.82);
}

.live.on {
  border-color: rgba(43, 196, 110, 0.3);
  background: linear-gradient(180deg, rgba(43, 196, 110, 0.13), rgba(43, 196, 110, 0.07));
}

.burger {
  box-shadow: var(--p-shadow-float);
}

.route-loading {
  gap: var(--p-content-gap);
}

.route-loading .skel {
  height: 162px;
  border-color: var(--p-hairline);
  box-shadow: var(--p-shadow-card);
}

/* --------------------------------------------------------------------------
   3. Controls, forms, tabs and progress controls
   -------------------------------------------------------------------------- */
button,
.action-menu summary {
  min-height: var(--p-control-h);
  padding: 8px 14px;
  border-color: var(--p-hairline-strong);
  border-radius: var(--p-radius-control);
  background: linear-gradient(180deg, rgba(31, 41, 64, 0.94), rgba(18, 25, 41, 0.94));
  color: var(--txt-2);
  font-weight: 620;
  box-shadow: var(--p-shadow-control);
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease,
    box-shadow 150ms ease, transform 150ms var(--p-ease-out);
  touch-action: manipulation;
}

:root[data-theme="light"] button,
:root[data-theme="light"] .action-menu summary {
  background: linear-gradient(180deg, #fff, #f3f6fb);
  border-color: var(--p-hairline-strong);
}

button:hover,
.action-menu summary:hover {
  border-color: rgba(135, 159, 207, 0.42);
  background: linear-gradient(180deg, rgba(38, 49, 76, 0.98), rgba(23, 31, 50, 0.98));
  color: var(--p-text-bright);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.07) inset,
    0 10px 22px -18px rgba(0, 0, 0, 0.95);
}

:root[data-theme="light"] button:hover,
:root[data-theme="light"] .action-menu summary:hover {
  background: #eef3fa;
  border-color: rgba(58, 78, 113, 0.28);
}

button:active,
.action-menu summary:active {
  transform: translateY(1px) scale(0.992);
}

button.pri {
  border-color: rgba(123, 153, 255, 0.72);
  background: linear-gradient(180deg, #6384f4, #4566db);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.22) inset,
    0 12px 24px -15px rgba(91, 132, 255, 0.95);
  font-weight: 680;
}

button.pri:hover {
  border-color: rgba(151, 177, 255, 0.88);
  background: linear-gradient(180deg, #7391f8, #5273e5);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.26) inset,
    0 15px 29px -15px rgba(91, 132, 255, 0.95);
}

button.ok,
button.bad {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.035) inset;
}

button.ghost {
  box-shadow: none;
}

button.sm {
  min-height: 32px;
  padding: 6px 10px;
}

button.lg {
  min-height: 46px;
  padding-inline: 20px;
}

.ic-btn {
  min-width: 30px;
  width: 30px;
  min-height: 30px;
  height: 30px;
  padding: 0;
  border-radius: 9px;
  background: transparent;
  box-shadow: none;
}

.btnbar,
.pager {
  gap: 9px;
}

.action-pop {
  min-width: 210px;
  padding: 7px;
  border-color: var(--p-hairline-strong);
  border-radius: 14px;
  background: var(--p-panel-raised);
  box-shadow: var(--p-shadow-float);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.chips {
  gap: 3px;
  padding: 4px;
  border-color: var(--p-hairline);
  border-radius: 12px;
  background: rgba(7, 11, 20, 0.62);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025) inset;
}

:root[data-theme="light"] .chips {
  background: rgba(232, 237, 245, 0.68);
}

.chips button {
  min-height: 31px;
  padding: 6px 11px;
  border-radius: 8px;
  font-weight: 600;
}

.chips button.on,
.chips button[aria-pressed="true"] {
  border-color: var(--p-hairline-strong);
  background: linear-gradient(180deg, rgba(36, 47, 72, 0.98), rgba(23, 31, 50, 0.98));
  color: var(--p-text-bright);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.07) inset,
    0 5px 13px -10px rgba(0, 0, 0, 0.9);
}

:root[data-theme="light"] .chips button.on,
:root[data-theme="light"] .chips button[aria-pressed="true"] {
  background: #fff;
}

input,
select,
textarea {
  min-height: var(--p-control-h);
  padding: 9px 12px;
  border-color: var(--p-hairline-strong);
  border-radius: var(--p-radius-control);
  background: rgba(7, 11, 20, 0.72);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025) inset;
  caret-color: var(--pri-t);
}

:root[data-theme="light"] input,
:root[data-theme="light"] select,
:root[data-theme="light"] textarea {
  background: rgba(248, 250, 253, 0.96);
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(142, 163, 205, 0.38);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(113, 149, 255, 0.92);
  background: var(--p-panel-solid);
  box-shadow: var(--p-focus-ring), 0 1px 0 rgba(255, 255, 255, 0.035) inset;
}

textarea {
  min-height: 104px;
  line-height: 1.62;
}

label {
  margin-bottom: 6px;
  color: var(--txt-2);
  font-size: 12px;
  font-weight: 660;
}

.field {
  margin-bottom: 15px;
}

.field-row {
  column-gap: 20px;
}

.switch {
  min-height: 32px;
  gap: 10px;
}

.switch input {
  width: 40px;
  height: 22px;
  min-height: 22px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.36) inset;
}

.switch input::before {
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.switch input:checked::before {
  left: 21px;
}

.radio {
  min-height: 48px;
  padding: 11px 13px;
  border-color: var(--p-hairline);
  border-radius: 13px;
  background: var(--p-panel-soft);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025) inset;
}

.radio:hover {
  border-color: var(--p-hairline-strong);
  background: var(--p-panel-raised);
}

.radio.on,
.radio:has(input:checked) {
  border-color: rgba(91, 132, 255, 0.42);
  background: linear-gradient(135deg, rgba(91, 132, 255, 0.14), rgba(91, 132, 255, 0.055));
}

.tabs {
  min-height: 44px;
  gap: 3px;
  margin-bottom: 18px;
  padding: 4px;
  border-color: var(--p-hairline);
  border-radius: 14px;
  background: rgba(7, 11, 20, 0.64);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025) inset;
}

:root[data-theme="light"] .tabs {
  background: rgba(232, 237, 245, 0.72);
}

.tabs button {
  min-height: 36px;
  padding: 6px 13px;
  border-radius: 10px;
  font-weight: 640;
}

.tabs button.on,
.tabs button[aria-selected="true"] {
  border-color: var(--p-hairline-strong);
  background: linear-gradient(180deg, rgba(37, 48, 74, 0.98), rgba(22, 30, 49, 0.98));
  color: var(--p-text-bright);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.075) inset,
    0 7px 16px -13px rgba(0, 0, 0, 0.92);
}

:root[data-theme="light"] .tabs button.on,
:root[data-theme="light"] .tabs button[aria-selected="true"] {
  background: #fff;
}

.stepper {
  position: relative;
  gap: 8px;
  margin-bottom: 18px;
  padding: 4px 0;
}

.stepper span {
  min-height: 34px;
  padding: 7px 13px;
  border-color: var(--p-hairline-strong);
  border-radius: 10px;
  background: rgba(7, 11, 20, 0.48);
  color: var(--mut);
  font-weight: 620;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease,
    transform 150ms var(--p-ease-out);
}

.stepper span[role="button"] {
  cursor: pointer;
}

.stepper span[role="button"]:hover {
  border-color: var(--p-hairline-strong);
  background: var(--p-panel-raised);
  color: var(--txt);
}

.stepper span.on,
.stepper span[aria-current="step"] {
  border-color: rgba(91, 132, 255, 0.42);
  background: linear-gradient(135deg, rgba(91, 132, 255, 0.18), rgba(91, 132, 255, 0.07));
  color: var(--p-text-bright);
  box-shadow: 0 8px 18px -15px rgba(91, 132, 255, 0.8);
}

.stepper span.done {
  border-color: rgba(43, 196, 110, 0.34);
}

/* --------------------------------------------------------------------------
   4. Surfaces, cards, metrics and feedback
   -------------------------------------------------------------------------- */
.card,
.stat,
#ovroot .dash-card,
#ovroot .dash-kpi {
  border-color: var(--p-hairline);
  background:
    linear-gradient(145deg, var(--p-highlight), transparent 34%),
    var(--p-panel);
  box-shadow: var(--p-shadow-card);
}

.card {
  padding: 19px 20px;
  border-radius: var(--p-radius-card);
}

.card:hover,
.stat:hover,
#ovroot .dash-card:hover,
#ovroot .dash-kpi:hover {
  border-color: var(--p-hairline-strong);
}

.card-h {
  gap: 14px;
  margin-bottom: 15px;
}

.card-h h3,
.card > h3:first-child {
  color: var(--mut);
  font-size: 10.5px;
  font-weight: 760;
  letter-spacing: 0.11em;
}

.card.flat {
  border-color: var(--p-hairline);
  background: rgba(7, 11, 20, 0.5);
}

:root[data-theme="light"] .card.flat {
  background: rgba(245, 248, 252, 0.86);
}

.scrollbox,
.kw,
.pre {
  border-color: var(--p-hairline);
  border-radius: 13px;
  background: rgba(7, 11, 20, 0.58);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset;
}

:root[data-theme="light"] .scrollbox,
:root[data-theme="light"] .kw,
:root[data-theme="light"] .pre {
  background: rgba(246, 248, 252, 0.9);
}

.hint,
.warnbox,
.errbox,
.alert {
  min-height: 44px;
  padding: 11px 14px;
  border-radius: 13px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025) inset;
}

.hint {
  background: linear-gradient(90deg, rgba(91, 132, 255, 0.13), rgba(91, 132, 255, 0.045));
}

.warnbox,
.alert.warn {
  background: linear-gradient(90deg, rgba(233, 162, 59, 0.14), rgba(233, 162, 59, 0.045));
}

.errbox,
.alert.bad {
  background: linear-gradient(90deg, rgba(240, 85, 97, 0.14), rgba(240, 85, 97, 0.045));
}

.pill {
  min-height: 23px;
  padding: 2px 9px;
  border-color: var(--p-hairline);
  font-weight: 700;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025) inset;
}

.tag {
  min-height: 26px;
  padding: 3px 9px;
  border-color: var(--p-hairline);
  border-radius: 8px;
  background: var(--p-panel-soft);
}

.stat {
  min-height: 104px;
  padding: 15px 16px;
  border-radius: var(--p-radius-card);
}

.stat::after {
  content: "";
  position: absolute;
  inset: auto 14px 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(91, 132, 255, 0.34), transparent);
  opacity: 0;
  transition: opacity 180ms ease;
}

.stat:hover::after {
  opacity: 1;
}

.stat .k {
  color: var(--mut);
  font-size: 10px;
  letter-spacing: 0.105em;
}

.stat .v {
  margin-top: 7px;
  color: var(--p-text-bright);
  font-size: clamp(24px, 2vw, 29px);
  font-weight: 720;
  letter-spacing: -0.045em;
}

.stat .ico {
  top: 13px;
  right: 13px;
  width: 29px;
  height: 29px;
  border: 1px solid currentColor;
  border-color: color-mix(in srgb, currentColor 24%, transparent);
  border-radius: 9px;
}

.empty {
  min-height: 126px;
  padding: 30px 18px;
  border-color: var(--p-hairline-strong);
  border-radius: var(--p-radius-card);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.018), transparent);
}

.empty svg {
  width: 30px;
  height: 30px;
}

.skel {
  background: linear-gradient(90deg, rgba(25, 34, 54, 0.86) 20%, rgba(42, 55, 84, 0.9) 50%, rgba(25, 34, 54, 0.86) 80%);
  background-size: 240% 100%;
}

/* --------------------------------------------------------------------------
   5. Tables, event feeds, logs and dense data
   -------------------------------------------------------------------------- */
.tbl-wrap {
  border-radius: 13px;
}

table {
  line-height: 1.42;
}

th,
td {
  padding: 10px 13px;
  border-bottom-color: var(--p-hairline);
}

th {
  height: 40px;
  background: rgba(15, 21, 35, 0.94);
  color: var(--mut);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.095em;
  box-shadow: 0 -1px 0 var(--p-hairline) inset;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

:root[data-theme="light"] th {
  background: rgba(255, 255, 255, 0.94);
}

tbody tr:hover td {
  background: rgba(91, 132, 255, 0.045);
}

tbody tr:focus-within td {
  background: rgba(91, 132, 255, 0.07);
}

.hlist {
  gap: 7px;
}

.hrow {
  min-height: 47px;
  padding: 9px 11px;
  border-color: var(--p-hairline);
  border-radius: 11px;
  background: rgba(7, 11, 20, 0.52);
  transition: border-color 150ms ease, background 150ms ease;
}

.hrow:hover,
.hrow:focus-within {
  border-color: var(--p-hairline-strong);
  background: var(--p-panel-soft);
}

.ev {
  min-height: 52px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-bottom-color: var(--p-hairline);
  border-radius: 11px;
}

.ev:hover,
.ev:focus-within {
  border-color: var(--p-hairline);
  background: rgba(91, 132, 255, 0.045);
}

.ev .t {
  color: var(--mut-2);
}

.ev .acts {
  opacity: 0.42;
}

.sc {
  border-radius: 8px;
  font-weight: 780;
}

.logline {
  min-height: 34px;
  padding: 7px 9px;
  border-bottom: 1px solid var(--p-hairline);
  border-left: 2px solid transparent;
  line-height: 1.5;
}

.logline:nth-child(2n) {
  background: rgba(255, 255, 255, 0.012);
}

.logline:hover {
  background: rgba(91, 132, 255, 0.045);
}

.logline.WARNING {
  border-left-color: var(--warn);
  background: linear-gradient(90deg, rgba(233, 162, 59, 0.06), transparent 35%);
}

.logline.ERROR,
.logline.CRITICAL {
  border-left-color: var(--bad);
  background: linear-gradient(90deg, rgba(240, 85, 97, 0.07), transparent 35%);
}

#logbox {
  padding: 4px;
  border: 1px solid var(--p-hairline);
  border-radius: 13px;
  background: rgba(7, 11, 20, 0.48);
}

.bar,
.gauge {
  border-color: var(--p-hairline);
  background: rgba(3, 6, 12, 0.52);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.34) inset;
}

.bar i,
.gauge .fill {
  box-shadow: 0 0 12px rgba(91, 132, 255, 0.26);
}

/* --------------------------------------------------------------------------
   6. Link management and operational cards
   -------------------------------------------------------------------------- */
.links-layout {
  gap: var(--p-content-gap);
}

.links-layout > .card,
.links-side > .card {
  border-radius: var(--p-radius-panel);
}

.sites-grid {
  gap: 14px;
}

.site {
  gap: 11px;
  padding: 14px;
  border-color: var(--p-hairline);
  border-radius: 15px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.032), transparent 42%),
    rgba(8, 13, 23, 0.62);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025) inset;
  transition: transform 180ms var(--p-ease-out), border-color 180ms ease,
    background 180ms ease, box-shadow 180ms ease;
}

:root[data-theme="light"] .site {
  background: linear-gradient(145deg, #fff, #f7f9fc);
}

.site:hover,
.site:focus-within {
  border-color: rgba(123, 148, 197, 0.28);
  background: var(--p-panel-raised);
  box-shadow: var(--p-shadow-card);
  transform: translateY(-1px);
}

.site-name {
  color: var(--p-text-bright);
  font-size: 15.5px;
  font-weight: 690;
  letter-spacing: -0.025em;
}

.site-url {
  margin-top: 3px;
}

.site-stats {
  gap: 6px;
}

.site-stats div {
  min-height: 48px;
  padding: 7px 6px;
  border-color: var(--p-hairline);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.022);
}

.site-stats b {
  color: var(--p-text-bright);
  font-size: 17px;
}

.site-f {
  padding-top: 9px;
  border-top-color: var(--p-hairline);
}

.inbox .inbox-sec {
  margin-top: 16px;
  color: var(--mut-2);
  font-size: 9.5px;
  letter-spacing: 0.12em;
}

.inbox-item,
.unm,
.unmlist {
  border-color: var(--p-hairline);
  border-radius: 13px;
  background: rgba(7, 11, 20, 0.5);
}

:root[data-theme="light"] .inbox-item,
:root[data-theme="light"] .unm,
:root[data-theme="light"] .unmlist {
  background: rgba(247, 249, 252, 0.88);
}

.inbox-item,
.unm {
  padding: 11px 12px;
}

.unm.compact {
  padding: 9px 10px;
  border-bottom-color: var(--p-hairline);
}

.fav {
  border-color: var(--p-hairline);
  border-radius: 8px;
  background: var(--p-panel-raised);
}

/* --------------------------------------------------------------------------
   7. Login, setup wizard, drawers and transient layers
   -------------------------------------------------------------------------- */
.login {
  padding: 26px;
  background:
    radial-gradient(680px 420px at 50% 36%, rgba(91, 132, 255, 0.14), transparent 72%),
    radial-gradient(520px 360px at 30% 90%, rgba(139, 92, 246, 0.08), transparent 70%);
}

.login::before {
  inset: -50%;
  opacity: 0.62;
  background: conic-gradient(from 60deg, transparent 0 285deg, rgba(91, 132, 255, 0.075) 345deg, transparent 360deg);
}

.login::after {
  content: "";
  position: absolute;
  width: min(740px, 84vw);
  height: min(740px, 84vw);
  border: 1px solid rgba(91, 132, 255, 0.07);
  border-radius: 50%;
  box-shadow: 0 0 0 90px rgba(91, 132, 255, 0.018),
    0 0 0 180px rgba(91, 132, 255, 0.012);
  pointer-events: none;
}

.login .card {
  z-index: 1;
  max-width: 440px;
  padding: 30px;
  border-color: var(--p-hairline-strong);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.065), transparent 35%),
    rgba(13, 19, 32, 0.93);
  box-shadow: var(--p-shadow-float);
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
}

:root[data-theme="light"] .login .card {
  background: rgba(255, 255, 255, 0.94);
}

.login .logo {
  margin-bottom: 14px;
  font-size: 18px;
}

.login input {
  min-height: 45px;
}

.wiz {
  padding-right: 5px;
}

.wiz h3 {
  color: var(--p-text-bright);
  font-size: 17px;
  font-weight: 690;
  letter-spacing: -0.025em;
}

.wiz p,
.steps {
  color: var(--txt-2);
  line-height: 1.68;
}

.steps li {
  margin: 6px 0;
  padding-left: 3px;
}

.drawer {
  width: min(640px, 100%);
  border-left-color: var(--p-hairline-strong);
  background: var(--p-panel-raised);
  box-shadow: -30px 0 80px -28px rgba(0, 0, 0, 0.88);
  animation: p-drawer-in 260ms var(--p-ease-spring);
  backdrop-filter: blur(22px) saturate(1.12);
  -webkit-backdrop-filter: blur(22px) saturate(1.12);
}

@keyframes p-drawer-in {
  from {
    transform: translateX(36px);
    opacity: 0;
  }
}

.drawer .dhead {
  min-height: 68px;
  padding: 15px 22px;
  border-bottom-color: var(--p-hairline);
  background: rgba(15, 21, 35, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

:root[data-theme="light"] .drawer .dhead,
:root[data-theme="light"] .drawer .dfoot {
  background: rgba(255, 255, 255, 0.9);
}

.drawer-in {
  padding: 22px 24px 28px;
}

.drawer .dfoot {
  min-height: 68px;
  padding: 13px 22px;
  border-top-color: var(--p-hairline);
  background: rgba(15, 21, 35, 0.9);
  box-shadow: 0 -18px 34px -30px rgba(0, 0, 0, 0.8);
}

.scrim {
  background: rgba(2, 5, 11, 0.65);
  backdrop-filter: blur(5px) saturate(0.88);
  -webkit-backdrop-filter: blur(5px) saturate(0.88);
}

.tipbox {
  padding: 8px 11px;
  border-color: var(--p-hairline-strong);
  border-radius: 10px;
  background: rgba(10, 16, 28, 0.97);
  color: #d5ddeb;
  box-shadow: var(--p-shadow-float);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#toast {
  gap: 10px;
}

.ntf {
  padding: 13px 13px 15px;
  border-color: var(--p-hairline-strong);
  border-radius: 16px;
  background: rgba(13, 19, 32, 0.94);
  box-shadow: var(--p-shadow-float);
}

:root[data-theme="light"] .ntf {
  background: rgba(255, 255, 255, 0.96);
}

.ntf .nicon {
  width: 36px;
  height: 36px;
  border: 1px solid currentColor;
  border-color: color-mix(in srgb, currentColor 22%, transparent);
  border-radius: 11px;
}

.tgprev {
  border-color: var(--p-hairline);
  border-radius: 15px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.025) inset;
}

.bubble {
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 14px 14px 14px 5px;
  box-shadow: 0 10px 28px -18px rgba(0, 0, 0, 0.75);
}

/* --------------------------------------------------------------------------
   8. Dashboard command center
   -------------------------------------------------------------------------- */
#ovroot {
  gap: 10px;
  overflow: auto;            /* güvenlik ağı: alçak ekranda sayfa değil, yalnız bu alan kayar */
  overscroll-behavior: contain;
}

#ovroot .dash-command {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(350px, 0.85fr);
  grid-template-areas: "main rail";
  gap: 12px;
  min-width: 0;
}

#ovroot .dash-command-main,
#ovroot .dash-command-rail {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--p-hairline);
  border-radius: var(--p-radius-panel);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.065), transparent 30%),
    var(--p-panel);
  box-shadow: var(--p-shadow-card);
}

#ovroot .dash-command-main::before {
  content: "";
  position: absolute;
  top: -120px;
  right: -85px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(91, 132, 255, 0.14), rgba(139, 92, 246, 0.045) 46%, transparent 70%);
  pointer-events: none;
}

#ovroot .dash-command-main {
  grid-area: main;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "copy"
    "strip";
  align-items: center;
  gap: 10px;
  padding: 14px 22px 0;
}

#ovroot .dash-command-copy {
  position: relative;
  z-index: 1;
  grid-area: copy;
  min-width: 0;
  align-self: center;
}

#ovroot .dash-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--mut);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.13em;
  line-height: 1.35;
  text-transform: uppercase;
}

#ovroot .dash-live-pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ok-t);
}

#ovroot .dash-live-pulse i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(43, 196, 110, 0.1), 0 0 14px rgba(43, 196, 110, 0.55);
  animation: ping 2.4s infinite;
}

#ovroot .dash-command-title {
  max-width: 760px;
  margin: 5px 0 4px;
  color: var(--p-text-bright);
  font-size: clamp(22px, 1.7vw, 27px);
  font-weight: 720;
  letter-spacing: -0.052em;
  line-height: 1.08;
}

#ovroot .dash-command-copy > p {
  max-width: 720px;
  margin: 0;
  color: var(--txt-2);
  font-size: 13.5px;
  line-height: 1.58;
}

#ovroot .dash-command-copy > p b {
  color: var(--p-text-bright);
  font-variant-numeric: tabular-nums;
}

#ovroot .dash-command-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

#ovroot .dash-command-actions button {
  min-height: 36px;
}

#ovroot #commandOrb {
  position: relative;
  z-index: 1;
  grid-area: orb;
  justify-self: end;
}

#ovroot .dash-command-orb {
  --orb: var(--ok);
  --orb-soft: rgba(43, 196, 110, 0.12);
  display: grid;
  justify-items: center;
  gap: 10px;
  min-width: 156px;
}

#ovroot .dash-command-orb.warn {
  --orb: var(--warn);
  --orb-soft: rgba(233, 162, 59, 0.12);
}

#ovroot .dash-command-orb.bad {
  --orb: var(--bad);
  --orb-soft: rgba(240, 85, 97, 0.12);
}

#ovroot .dash-orb-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 124px;
  height: 124px;
  padding: 9px;
  border-radius: 50%;
  background: conic-gradient(from 215deg, var(--orb), color-mix(in srgb, var(--orb) 24%, transparent) 62%, var(--orb));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 34px var(--orb-soft);
}

#ovroot .dash-orb-ring::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: inherit;
  pointer-events: none;
}

#ovroot .dash-orb-core {
  display: grid;
  place-items: center;
  align-content: center;
  width: 100%;
  height: 100%;
  border: 1px solid var(--p-hairline);
  border-radius: 50%;
  background: radial-gradient(circle at 45% 36%, rgba(255, 255, 255, 0.065), transparent 58%), var(--p-panel-solid);
  box-shadow: 0 10px 28px -20px rgba(0, 0, 0, 0.9) inset;
}

#ovroot .dash-orb-core strong {
  color: var(--p-text-bright);
  font-size: 27px;
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

#ovroot .dash-orb-core strong span {
  color: var(--mut);
  font-size: 14px;
  font-weight: 620;
  letter-spacing: -0.02em;
}

#ovroot .dash-orb-core small {
  margin-top: 5px;
  color: var(--mut);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

#ovroot .dash-orb-stats {
  display: flex;
  justify-content: center;
  gap: 10px;
  color: var(--mut);
  font-size: 10px;
  white-space: nowrap;
}

#ovroot .dash-health-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  padding: 3px 2px 10px;
  border-bottom: 1px solid var(--p-hairline);
  color: var(--mut);
  font-size: 11px;
}

#ovroot .dash-health-summary > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--p-hairline);
  border-radius: 999px;
  background: rgba(255,255,255,.025);
}

#ovroot .dash-health-summary i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
}

#ovroot .dash-health-summary .bad { color: var(--bad-t); border-color: var(--bad-line); }
#ovroot .dash-health-summary .warn { color: var(--warn-t); border-color: var(--warn-line); }

#ovroot .dash-health-clear {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--ok-line);
  border-radius: 13px;
  background: var(--ok-soft);
  color: var(--ok-t);
}

#ovroot .dash-health-clear > svg { width: 22px; height: 22px; flex: none; }
#ovroot .dash-health-clear > div { display: grid; gap: 3px; }
#ovroot .dash-health-clear span { color: var(--txt-2); font-size: 12px; }

#ovroot .dash-command-actions button.pri.bad {
  border-color: rgba(240,85,97,.55);
  background: linear-gradient(135deg, #f05a67, #c73d55);
  box-shadow: 0 12px 26px -15px rgba(240,85,97,.75), inset 0 1px rgba(255,255,255,.22);
}

#ovroot .dash-orb-stats span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

#ovroot .dash-orb-stats i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mut);
}

#ovroot .dash-orb-stats i.ok {
  background: var(--ok);
}

#ovroot .dash-orb-stats i.warn {
  background: var(--warn);
}

#ovroot .dash-orb-stats i.bad {
  background: var(--bad);
}

#ovroot .dash-strip {
  position: relative;
  z-index: 1;
  grid-area: strip;
  align-self: end;
  margin: 0 -22px;
  padding: 7px 22px;
  border: 0;
  border-top: 1px solid var(--p-hairline);
  border-radius: 0;
  background: rgba(5, 9, 16, 0.28);
  box-shadow: none;
}

:root[data-theme="light"] #ovroot .dash-strip {
  background: rgba(240, 244, 249, 0.6);
}

#ovroot .dash-command-rail {
  grid-area: rail;
  display: flex;
  flex-direction: column;
  padding: 14px;
  background:
    linear-gradient(150deg, rgba(233, 162, 59, 0.04), transparent 38%),
    var(--p-panel);
}

#ovroot .dash-rail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 1px 1px 13px;
  border-bottom: 1px solid var(--p-hairline);
}

#ovroot .dash-rail-head h3 {
  margin-top: 5px;
  color: var(--p-text-bright);
  font-size: 17px;
  font-weight: 690;
  letter-spacing: -0.03em;
  text-transform: none;
}

#ovroot .dash-rail-count {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid var(--p-hairline);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--mut);
  font-size: 10px;
  font-weight: 720;
  white-space: nowrap;
}

#ovroot .dash-command-rail .dash-alerts {
  flex: 1;
  justify-content: center;
  gap: 6px;
  padding-top: 9px;
}

#ovroot .dash-command-rail .dash-alert {
  min-height: 42px;
  padding: 7px 9px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.022);
}

#ovroot .dash-command-rail .dash-alert .grow {
  line-height: 1.35;
}

#ovroot .dash-command-rail .dash-alert.warn {
  background: linear-gradient(90deg, rgba(233, 162, 59, 0.11), rgba(233, 162, 59, 0.02));
}

#ovroot .dash-command-rail .dash-alert.bad {
  background: linear-gradient(90deg, rgba(240, 85, 97, 0.11), rgba(240, 85, 97, 0.02));
}

#ovroot .dash-command-rail .dash-alert.ok {
  border-color: var(--ok-line);
  background: linear-gradient(90deg, rgba(43, 196, 110, 0.1), rgba(43, 196, 110, 0.018));
}

#ovroot .dash-alert-more {
  width: 100%;
}

#ovroot .dash-metric-band {
  grid-template-columns: 1.35fr repeat(3, minmax(0, 1fr));
  gap: 10px;
}

#ovroot .dash-kpi {
  min-height: 78px;
  padding: 10px 13px;
  border-radius: 15px;
}

#ovroot .dash-kpi::after {
  content: "";
  position: absolute;
  inset: auto 12px 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(91, 132, 255, 0.35), transparent);
  opacity: 0;
  transition: opacity 160ms ease;
}

#ovroot .dash-kpi:hover::after {
  opacity: 1;
}

#ovroot .dash-kpi .k {
  font-size: 11.5px;
  letter-spacing: 0.015em;
  text-transform: none;
}

#ovroot .dash-kpi .v {
  margin-top: 6px;
  color: var(--p-text-bright);
  font-size: clamp(20px, 1.55vw, 24px);
  font-weight: 730;
  letter-spacing: -0.045em;
}

#ovroot .dash-kpi .ico {
  width: 25px;
  height: 25px;
  border: 1px solid currentColor;
  border-color: color-mix(in srgb, currentColor 20%, transparent);
  border-radius: 8px;
}

#ovroot .dash-kpi.hero {
  border-color: rgba(43, 196, 110, 0.2);
  background:
    radial-gradient(230px 110px at 20% 100%, rgba(43, 196, 110, 0.11), transparent 74%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), transparent 42%),
    var(--p-panel);
}

#ovroot .dash-kpi.hero .v {
  color: var(--ok-t);
  font-size: clamp(25px, 1.9vw, 30px);
}

#ovroot .dash-workbench {
  grid-template-columns: minmax(0, 1.72fr) minmax(310px, 0.82fr);
  gap: 12px;
}

#ovroot .dash-primary,
#ovroot .dash-insights {
  border-radius: var(--p-radius-panel);
}

#ovroot .dash-card {
  border-radius: var(--p-radius-card);
}

#ovroot .dash-card-h {
  min-height: 50px;
  padding: 10px 16px 9px;
  border-bottom-color: var(--p-hairline);
}

#ovroot .dash-card-h h3 {
  color: var(--p-text-bright);
  font-size: 13px;
  font-weight: 690;
  letter-spacing: -0.02em;
}

#ovroot .dash-hint {
  margin-top: 3px;
  color: var(--mut);
}

#ovroot .dash-body,
#ovroot .dash-health {
  padding: 10px 12px;
}

#ovroot .dash-chart {
  padding: 10px 15px 3px;
}

#ovroot .dash-chart.grow {
  min-height: 128px;
}

#ovroot .dash-split {
  gap: 18px;
  padding: 10px 16px 13px;
  border-top-color: var(--p-hairline);
  background: rgba(5, 9, 16, 0.22);
}

:root[data-theme="light"] #ovroot .dash-split {
  background: rgba(242, 245, 249, 0.6);
}

#ovroot .dash-tip {
  padding: 9px 11px;
  border-color: var(--p-hairline-strong);
  border-radius: 10px;
  background: rgba(9, 14, 25, 0.97);
  box-shadow: var(--p-shadow-float);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#ovroot .dash-hr {
  min-height: 40px;
  padding: 7px 9px;
  border-color: transparent;
  border-bottom-color: var(--p-hairline);
  border-radius: 9px;
}

#ovroot .dash-hr:hover {
  border-color: var(--p-hairline);
  background: rgba(91, 132, 255, 0.04);
}

#ovroot .dash-rank {
  min-height: 35px;
  padding: 6px 7px;
  border-radius: 8px;
}

#ovroot .dash-rank:hover {
  background: rgba(91, 132, 255, 0.045);
}

#ovroot .dash-d7-sum {
  gap: 7px;
  margin-bottom: 7px;
}

#ovroot .dash-d7-sum div {
  min-height: 50px;
  padding: 8px 9px;
  border-color: var(--p-hairline);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.022);
}

#ovroot .dash-bot {
  gap: 12px;
}

/* --------------------------------------------------------------------------
   8a. Workspace switcher and sidebar productivity controls
   -------------------------------------------------------------------------- */
.workspace-switch {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  margin: 2px 0 9px;
  padding: 9px 10px;
  border: 1px solid var(--p-hairline);
  border-radius: 13px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), transparent 48%),
    rgba(9, 14, 24, 0.68);
  color: var(--txt-2);
  text-align: left;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.035) inset;
}

:root[data-theme="light"] .workspace-switch {
  background: linear-gradient(145deg, #fff, #f4f7fb);
}

.workspace-switch:hover,
.workspace-switch:focus-visible {
  border-color: rgba(111, 143, 240, 0.34);
  background:
    linear-gradient(145deg, rgba(91, 132, 255, 0.1), transparent 52%),
    rgba(15, 22, 37, 0.92);
}

:root[data-theme="light"] .workspace-switch:hover,
:root[data-theme="light"] .workspace-switch:focus-visible {
  background: linear-gradient(145deg, rgba(91, 132, 255, 0.1), #fff);
}

.workspace-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(123, 153, 255, 0.32);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(91, 132, 255, 0.25), rgba(139, 92, 246, 0.13));
  color: #dce7ff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 8px 18px -13px rgba(91, 132, 255, 0.9);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: -0.02em;
}

.workspace-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
  line-height: 1.25;
}

.workspace-kicker {
  color: var(--mut-2);
  font-size: 8.5px;
  font-weight: 760;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.workspace-copy > :last-child:not(.workspace-kicker) {
  overflow: hidden;
  color: var(--p-text-bright);
  font-size: 12.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-live {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px rgba(43, 196, 110, 0.09), 0 0 12px rgba(43, 196, 110, 0.5);
}

.workspace-live.off,
.workspace-live.bad {
  background: var(--bad);
  box-shadow: 0 0 0 4px rgba(240, 85, 97, 0.08), 0 0 12px rgba(240, 85, 97, 0.42);
}

.workspace-live.warn {
  background: var(--warn);
  box-shadow: 0 0 0 4px rgba(233, 162, 59, 0.08), 0 0 12px rgba(233, 162, 59, 0.42);
}

.side-create {
  width: 100%;
  min-height: 41px;
  margin: 0 0 5px;
  justify-content: flex-start;
  border-color: rgba(123, 153, 255, 0.48);
  background: linear-gradient(135deg, rgba(91, 132, 255, 0.24), rgba(91, 132, 255, 0.105));
  color: #e8efff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 12px 24px -18px rgba(91, 132, 255, 0.86);
}

.side-create:hover {
  border-color: rgba(143, 169, 255, 0.72);
  background: linear-gradient(135deg, rgba(91, 132, 255, 0.34), rgba(91, 132, 255, 0.16));
  color: #fff;
}

.side-collapse,
.krp-side-toggle {
  display: inline-grid;
  place-items: center;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 9px;
  color: var(--mut);
}

/* --------------------------------------------------------------------------
   8b. Command palette and keyboard help
   -------------------------------------------------------------------------- */
body.krp-modal-open {
  overflow: hidden;
}

.krp-command-trigger {
  min-height: 34px;
  padding: 6px 10px;
  color: var(--mut);
}

.krp-command-trigger .krp-shortcut {
  margin-left: 4px;
}

.krp-overlay {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: start center;
  padding: clamp(72px, 12vh, 124px) 18px 24px;
  overflow: auto;
  background: rgba(2, 5, 11, 0.7);
  backdrop-filter: blur(9px) saturate(0.86);
  -webkit-backdrop-filter: blur(9px) saturate(0.86);
  animation: krp-overlay-in 180ms ease-out;
}

.krp-overlay[hidden] {
  display: none;
}

@keyframes krp-overlay-in {
  from {
    opacity: 0;
  }
}

.krp-dialog {
  width: min(680px, 100%);
  max-height: min(680px, calc(100dvh - 116px));
  overflow: hidden;
  border: 1px solid var(--p-hairline-strong);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), transparent 30%),
    rgba(13, 19, 32, 0.975);
  color: var(--txt);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 40px 100px -32px rgba(0, 0, 0, 0.96),
    0 18px 44px -28px rgba(16, 28, 54, 0.88);
  animation: krp-dialog-in 220ms var(--p-ease-spring);
}

:root[data-theme="light"] .krp-dialog {
  background: rgba(255, 255, 255, 0.985);
  box-shadow: 0 1px 0 #fff inset,
    0 40px 90px -35px rgba(24, 39, 68, 0.52),
    0 16px 38px -28px rgba(24, 39, 68, 0.32);
}

@keyframes krp-dialog-in {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.975);
  }
}

.krp-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 19px 12px;
}

.krp-title-wrap {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.krp-eyebrow {
  color: var(--mut-2);
  font-size: 9px;
  font-weight: 780;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.krp-title {
  color: var(--p-text-bright);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.krp-close {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 10px;
  color: var(--mut);
}

.krp-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin: 0 16px 10px;
}

.krp-search-icon {
  position: absolute;
  left: 14px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  color: var(--mut);
  pointer-events: none;
}

.krp-search-icon svg {
  width: 18px;
  height: 18px;
}

.krp-input {
  min-height: 52px;
  padding: 12px 46px 12px 43px;
  border-color: var(--p-hairline-strong);
  border-radius: 13px;
  background: rgba(6, 10, 18, 0.7);
  color: var(--p-text-bright);
  font-size: 15px;
  font-weight: 520;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.035) inset;
}

:root[data-theme="light"] .krp-input {
  background: rgba(245, 248, 252, 0.94);
}

.krp-results-meta {
  min-height: 25px;
  padding: 0 20px 7px;
  color: var(--mut);
  font-size: 10.5px;
  font-variant-numeric: tabular-nums;
}

.krp-list,
.krp-help-list {
  max-height: min(440px, calc(100dvh - 308px));
  padding: 5px 8px 9px;
  overflow: auto;
  overscroll-behavior: contain;
  border-top: 1px solid var(--p-hairline);
  scrollbar-gutter: stable;
}

.krp-group + .krp-group {
  margin-top: 6px;
}

.krp-group-label {
  position: sticky;
  top: -5px;
  z-index: 2;
  padding: 10px 11px 6px;
  background: rgba(13, 19, 32, 0.94);
  color: var(--mut-2);
  font-size: 9px;
  font-weight: 780;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

:root[data-theme="light"] .krp-group-label {
  background: rgba(255, 255, 255, 0.94);
}

.krp-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 58px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--txt-2);
  text-align: left;
  box-shadow: none;
}

.krp-option:hover,
.krp-option.is-active,
.krp-option[aria-selected="true"] {
  border-color: rgba(91, 132, 255, 0.22);
  background: linear-gradient(90deg, rgba(91, 132, 255, 0.13), rgba(91, 132, 255, 0.045));
  color: var(--p-text-bright);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.035) inset;
  transform: none;
}

.krp-option-main {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.krp-option-label {
  overflow: hidden;
  color: inherit;
  font-size: 13.5px;
  font-weight: 660;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.krp-option-desc {
  overflow: hidden;
  color: var(--mut);
  font-size: 11.5px;
  font-weight: 480;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.krp-option-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}

.krp-kind {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 3px 7px;
  border: 1px solid var(--p-hairline);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--mut);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.krp-shortcut,
.krp-footer kbd {
  display: inline-flex;
  min-width: 25px;
  min-height: 23px;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  border: 1px solid var(--p-hairline-strong);
  border-bottom-color: rgba(158, 176, 215, 0.33);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--mut);
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2) inset;
  font: 650 10px/1 var(--mono);
  white-space: nowrap;
}

:root[data-theme="light"] .krp-shortcut,
:root[data-theme="light"] .krp-footer kbd {
  background: #f6f8fb;
  border-bottom-color: rgba(35, 52, 82, 0.26);
}

.krp-empty {
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 30px 20px;
  color: var(--mut);
  text-align: center;
}

.krp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 47px;
  padding: 9px 16px;
  border-top: 1px solid var(--p-hairline);
  background: rgba(7, 11, 20, 0.46);
  color: var(--mut);
  font-size: 10.5px;
}

:root[data-theme="light"] .krp-footer {
  background: rgba(245, 248, 252, 0.84);
}

.krp-help-list {
  display: grid;
  gap: 4px;
  padding: 9px;
}

.krp-help-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 54px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-bottom-color: var(--p-hairline);
  border-radius: 10px;
}

.krp-help-row:hover {
  border-color: var(--p-hairline);
  background: rgba(91, 132, 255, 0.035);
}

.krp-help-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
  color: var(--txt-2);
  font-size: 13px;
}

.krp-help-copy small {
  color: var(--mut);
  font-size: 11px;
}

.krp-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ok-t);
  font-size: 10px;
  font-weight: 700;
}

.krp-live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 9px rgba(43, 196, 110, 0.55);
}

.krp-dialog.is-help .krp-search-wrap,
.krp-dialog.is-help .krp-results-meta,
.krp-dialog.is-help .krp-list {
  display: none;
}

.krp-dialog:not(.is-help) .krp-help-list {
  display: none;
}

/* --------------------------------------------------------------------------
   9. Desktop density: tuned for 1536 × 850 and similar operations displays
   -------------------------------------------------------------------------- */
@media (min-width: 1400px) {
  .main {
    padding-left: 30px;
    padding-right: 30px;
  }

  .top {
    margin-left: -30px;
    margin-right: -30px;
    padding-left: 30px;
    padding-right: 30px;
  }

  .g2,
  .g3,
  .g4 {
    gap: 16px;
  }
}

@media (max-height: 850px) and (min-width: 961px) {
  .side {
    padding-top: 14px;
  }

  .side .logo {
    min-height: 42px;
    padding-bottom: 11px;
  }

  .navlabel {
    padding-top: 9px;
  }

  .nav a {
    min-height: 35px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .main {
    padding-bottom: 20px;
  }

  .top {
    min-height: 60px;
    margin-bottom: 13px;
    padding-top: 10px;
    padding-bottom: 9px;
  }

  .card {
    padding: 15px 17px;
  }

  #ovroot {
    gap: 9px;
  }

  #ovroot .dash-command {
    gap: 9px;
  }

  #ovroot .dash-command-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    padding-top: 17px;
  }

  #ovroot .dash-command-title {
    margin-top: 6px;
    margin-bottom: 5px;
    font-size: clamp(24px, 2vw, 31px);
  }

  #ovroot .dash-command-actions {
    margin-top: 12px;
  }

  #ovroot .dash-orb-ring {
    width: 104px;
    height: 104px;
    padding: 8px;
  }

  #ovroot .dash-orb-core strong {
    font-size: 23px;
  }

  #ovroot .dash-command-rail {
    padding: 14px;
  }

  #ovroot .dash-command-rail .dash-alert {
    min-height: 41px;
    padding: 7px 9px;
  }

  #ovroot .dash-kpi {
    min-height: 84px;
    padding: 9px 11px;
  }

  #ovroot .dash-kpi .v {
    margin-top: 3px;
  }

  #ovroot .dash-card-h {
    min-height: 50px;
    padding: 10px 13px 9px;
  }

  #ovroot .dash-body,
  #ovroot .dash-health {
    padding: 8px 10px;
  }
}

@media (max-width: 1399px) and (min-width: 961px) {
  :root {
    --side-w: 226px;
    --pad-x: 20px;
  }

  #ovroot .dash-command {
    grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.78fr);
  }

  #ovroot .dash-command-main {
    grid-template-columns: minmax(0, 1fr);
  }

  #ovroot .dash-orb-ring {
    width: 110px;
    height: 110px;
  }
}

@media (min-width: 961px) {
  .shell {
    transition: grid-template-columns 220ms var(--p-ease-out);
  }

  .side {
    overflow-x: hidden;
    transition: padding 220ms var(--p-ease-out), width 220ms var(--p-ease-out);
  }

  html.nav-collapsed {
    --side-w: 78px;
  }

  html.nav-collapsed .side {
    padding-right: 12px;
    padding-left: 12px;
  }

  html.nav-collapsed .side .logo {
    width: 52px;
    min-height: 45px;
    gap: 18px;
    padding-right: 9px;
    padding-left: 9px;
    overflow: hidden;
    white-space: nowrap;
  }

  html.nav-collapsed .logo .mark {
    width: 34px;
    min-width: 34px;
  }

  html.nav-collapsed .logo .dot {
    display: none;
  }

  html.nav-collapsed .workspace-switch {
    grid-template-columns: 34px;
    justify-content: center;
    width: 52px;
    min-width: 52px;
    padding-right: 8px;
    padding-left: 8px;
  }

  html.nav-collapsed .workspace-copy,
  html.nav-collapsed .workspace-live,
  html.nav-collapsed .navlabel,
  html.nav-collapsed .sysbox,
  html.nav-collapsed .statusbox {
    display: none;
  }

  html.nav-collapsed .side-create {
    width: 52px;
    min-width: 52px;
    padding-right: 0;
    padding-left: 0;
    justify-content: center;
    overflow: hidden;
    font-size: 0;
  }

  html.nav-collapsed .side-create svg {
    width: 17px;
    height: 17px;
  }

  html.nav-collapsed .nav {
    width: 52px;
  }

  html.nav-collapsed .nav a {
    width: 52px;
    min-width: 52px;
    justify-content: center;
    gap: 0;
    padding-right: 0;
    padding-left: 0;
  }

  html.nav-collapsed .nav a .grow {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  html.nav-collapsed .nav a .badge {
    position: absolute;
    top: 2px;
    right: 1px;
    min-width: 16px;
    padding: 0 4px;
    font-size: 9px;
  }

  html.nav-collapsed .nav a.on::before {
    left: -12px;
  }

  html.nav-collapsed .side .foot {
    align-items: center;
    width: 52px;
  }

  html.nav-collapsed .side .foot > #pauseBtn,
  html.nav-collapsed .side .foot > .row {
    display: none;
  }

  html.nav-collapsed .side-collapse,
  html.nav-collapsed .krp-side-toggle {
    transform: rotate(180deg);
  }

  html.nav-collapsed .side-collapse:hover,
  html.nav-collapsed .krp-side-toggle:hover {
    transform: rotate(180deg) translateY(1px);
  }
}

/* --------------------------------------------------------------------------
   10. Tablet and mobile: natural document flow, no trapped content
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  #ovroot .dash-command {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "rail";
  }

  #ovroot .dash-command-rail {
    min-height: 0;
  }

  #ovroot .dash-command-rail .dash-alerts {
    justify-content: flex-start;
  }

  #ovroot .dash-metric-band {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #ovroot .dash-kpi.hero {
    grid-column: span 3;
  }

  #ovroot .dash-workbench {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  :root {
    --p-content-gap: 12px;
    --p-control-h: 42px;
  }

  html,
  body {
    overflow: hidden;
  }

  .side {
    width: min(304px, calc(100vw - 44px));
    padding: calc(16px + env(safe-area-inset-top)) 13px calc(14px + env(safe-area-inset-bottom));
    border-right-color: var(--p-hairline-strong);
    box-shadow: 28px 0 74px -34px rgba(0, 0, 0, 0.95);
  }

  .side-collapse,
  .krp-side-toggle {
    display: none;
  }

  .nav a {
    min-height: 46px;
    padding: 10px 12px;
  }

  .burger {
    top: calc(9px + env(safe-area-inset-top));
    left: 10px;
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-color: var(--p-hairline-strong);
    background: rgba(15, 21, 35, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  :root[data-theme="light"] .burger {
    background: rgba(255, 255, 255, 0.9);
  }

  .main {
    display: block;
    height: 100dvh;
    padding: 0 14px calc(28px + env(safe-area-inset-bottom));
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: auto;
  }

  .main > :not(.top) {
    max-width: 100%;
  }

  .top {
    min-height: calc(62px + env(safe-area-inset-top));
    margin: 0 -14px 14px;
    padding: calc(10px + env(safe-area-inset-top)) 14px 9px 64px;
    align-items: center;
  }

  .top h1,
  .top h2 {
    font-size: 19px;
  }

  .top-actions {
    gap: 6px;
  }

  .live,
  .clock {
    min-height: 34px;
    padding: 6px 9px;
  }

  .fitpage,
  .split.fitpage,
  #ovroot {
    display: flex;
    flex: none;
    flex-direction: column;
    min-height: auto;
    overflow: visible;
  }

  .card,
  .card.fill,
  .split.fitpage .card.fill,
  .links-layout .card,
  #ovroot .dash-card {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible;
  }

  .fill-body,
  .card.fill > .fill-body,
  .split.fitpage .card.fill > .fill-body,
  .links-layout .sites-wrap,
  .links-layout .inbox-body,
  #ovroot .dash-body,
  #ovroot .dash-health {
    flex: none;
    height: auto;
    max-height: none;
    min-height: 0;
    overflow: visible;
  }

  .card {
    padding: 17px;
  }

  .g2,
  .g3,
  .g4,
  .split,
  .field-row {
    gap: 12px;
  }

  .tbl-wrap,
  .card.fill > .tbl-wrap.fill-body {
    overflow-x: auto;
    overflow-y: visible;
    border: 1px solid var(--p-hairline);
    border-radius: 13px;
    -webkit-overflow-scrolling: touch;
  }

  .tbl-wrap table,
  .card.fill > .tbl-wrap.fill-body table {
    min-width: 760px;
  }

  .tabs {
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .tabs button {
    min-height: 42px;
    scroll-snap-align: start;
  }

  .stepper {
    flex-wrap: nowrap;
    width: 100%;
    padding-bottom: 7px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .stepper span {
    flex: none;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    scroll-snap-align: start;
  }

  .links-layout,
  .sites-grid {
    gap: 12px;
  }

  .site:hover,
  .site:focus-within {
    transform: none;
  }

  #akisroot #evlist,
  #logbox.fill-body {
    overscroll-behavior: contain;
  }

  #ovroot .dash-command {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #ovroot .dash-command-main {
    grid-template-columns: minmax(0, 1fr);
    padding: 22px 22px 0;
  }

  #ovroot .dash-strip {
    margin-inline: -22px;
    padding-inline: 22px;
  }

  #ovroot .dash-command-rail {
    padding: 17px;
  }

  #ovroot .dash-metric-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #ovroot .dash-kpi.hero {
    grid-column: 1 / -1;
  }

  #ovroot .dash-workbench,
  #ovroot .dash-bot {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #ovroot .dash-chart.grow {
    height: 230px;
    min-height: 230px;
  }

  .krp-overlay {
    padding: max(18px, env(safe-area-inset-top)) 12px max(18px, env(safe-area-inset-bottom));
    place-items: center;
  }

  .krp-dialog {
    max-height: calc(100dvh - max(36px, env(safe-area-inset-top) + env(safe-area-inset-bottom)));
    border-radius: 18px;
  }

  .krp-list,
  .krp-help-list {
    max-height: calc(100dvh - 286px);
  }
}

@media (max-width: 560px) {
  :root {
    --p-radius-card: 15px;
    --p-radius-panel: 18px;
  }

  body {
    font-size: 14px;
  }

  .main {
    padding-right: 10px;
    padding-left: 10px;
  }

  .top {
    margin-right: -10px;
    margin-left: -10px;
    padding-right: 10px;
  }

  .top-actions .clock {
    display: none;
  }

  .top-actions #pageActions button {
    min-height: 42px;
  }

  input,
  select,
  textarea {
    min-height: 44px;
    font-size: 16px;
  }

  button,
  .action-menu summary,
  .tabs button,
  .chips button,
  .stepper span[role="button"] {
    min-height: 44px;
  }

  button.sm {
    min-height: 40px;
  }

  .ic-btn {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
  }

  .card {
    padding: 15px;
  }

  .card-h {
    align-items: flex-start;
    margin-bottom: 13px;
  }

  .g2,
  .g3,
  .g4,
  .split,
  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .btnbar {
    align-items: stretch;
  }

  .btnbar > button {
    flex: 1 1 auto;
  }

  .chips {
    width: 100%;
  }

  .chips button {
    flex: 1 1 auto;
  }

  .ev {
    grid-template-columns: 46px 31px minmax(0, 1fr);
    gap: 7px;
    padding: 9px 7px;
  }

  .ev .acts {
    grid-column: 1 / -1;
    opacity: 1;
  }

  .logline {
    padding: 8px 7px;
  }

  .site {
    padding: 13px;
  }

  .site-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .drawer {
    top: 0;
    left: 0;
    width: 100%;
    border-left: 0;
  }

  .drawer .dhead {
    min-height: calc(62px + env(safe-area-inset-top));
    padding: calc(12px + env(safe-area-inset-top)) 14px 11px;
  }

  .drawer-in {
    padding: 18px 15px calc(24px + env(safe-area-inset-bottom));
  }

  .drawer .dfoot {
    padding: 11px 14px calc(11px + env(safe-area-inset-bottom));
  }

  .login {
    display: flex;
    align-items: center;
    padding: max(16px, env(safe-area-inset-top)) 12px max(16px, env(safe-area-inset-bottom));
  }

  .login .card {
    padding: 23px 20px;
    border-radius: 19px;
  }

  .ntf {
    padding: 12px 11px 14px;
  }

  .krp-command-trigger .krp-shortcut {
    display: none;
  }

  .krp-overlay {
    padding: 0;
    place-items: stretch;
  }

  .krp-dialog {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-height: 100dvh;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .krp-head {
    flex: none;
    padding: calc(15px + env(safe-area-inset-top)) 15px 11px;
  }

  .krp-title {
    font-size: 17px;
  }

  .krp-close {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
  }

  .krp-search-wrap {
    flex: none;
    margin: 0 12px 9px;
  }

  .krp-input {
    min-height: 50px;
    font-size: 16px;
  }

  .krp-results-meta {
    flex: none;
    padding-right: 15px;
    padding-left: 15px;
  }

  .krp-list,
  .krp-help-list {
    flex: 1;
    max-height: none;
    min-height: 0;
  }

  .krp-option {
    min-height: 64px;
    padding: 10px 9px;
  }

  .krp-option-meta {
    gap: 5px;
  }

  .krp-kind {
    display: none;
  }

  .krp-footer {
    flex: none;
    min-height: calc(49px + env(safe-area-inset-bottom));
    padding: 9px 12px calc(9px + env(safe-area-inset-bottom));
  }

  #ovroot {
    gap: 11px;
  }

  #ovroot .dash-command {
    grid-template-areas:
      "rail"
      "main";
  }

  #ovroot .dash-command-main {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "strip";
    gap: 13px;
    padding: 18px 16px 0;
  }

  #ovroot .dash-command-main::before {
    top: 40px;
    right: -170px;
  }

  #ovroot .dash-command-title {
    margin: 8px 0 7px;
    font-size: clamp(24px, 7.3vw, 28px);
    line-height: 1.1;
  }

  #ovroot .dash-command-copy > p {
    font-size: 13px;
  }

  #ovroot .dash-command-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 13px;
  }

  #ovroot .dash-command-actions button {
    min-width: 0;
    white-space: normal;
  }

  #ovroot .dash-command-actions .dash-action-tertiary {
    display: none;
  }

  #ovroot #commandOrb {
    display: none;
  }

  #ovroot .dash-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-inline: -16px;
    padding: 11px 16px;
    gap: 8px 12px;
  }

  #ovroot .dash-strip .dash-state,
  #ovroot .dash-strip .dash-sep,
  #ovroot .dash-strip .metric-latency,
  #ovroot .dash-strip .metric-error,
  #ovroot .dash-strip .metric-waiting,
  #ovroot .dash-strip .metric-uptime {
    display: none;
  }

  #ovroot .dash-strip .dash-m,
  #ovroot .dash-strip .dash-right {
    margin-left: 0;
    white-space: normal;
  }

  #ovroot .dash-command-rail {
    padding: 15px;
  }

  #ovroot .dash-rail-head {
    padding-bottom: 11px;
  }

  #ovroot .dash-command-rail .dash-alert {
    display: grid;
    grid-template-columns: 7px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-height: 58px;
    padding: 8px 9px;
  }

  #ovroot .dash-command-rail .dash-alert .grow {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  #ovroot .dash-command-rail .dash-alert button {
    width: auto;
    max-width: 122px;
    padding-inline: 10px;
    white-space: normal;
  }

  #ovroot .dash-metric-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  #ovroot .dash-kpi {
    min-height: 88px;
    padding: 10px;
  }

  #ovroot .dash-kpi.hero {
    grid-column: auto;
    min-height: 92px;
  }

  #ovroot .dash-kpi.hero canvas,
  #ovroot .dash-kpi.hero .sub {
    display: none;
  }

  #ovroot .dash-kpi .v {
    font-size: 20px;
  }

  #ovroot .dash-kpi .sub {
    white-space: normal;
  }

  #ovroot .dash-kpi:not(.hero) .sub {
    display: none;
  }

  #ovroot .dash-card-h {
    min-height: 47px;
    padding: 11px 13px 9px;
  }

  #ovroot .dash-card-h,
  #ovroot .dash-split {
    align-items: center;
  }

  #ovroot .dash-card-h .dash-hint {
    display: none;
  }

  #ovroot .dash-chart.grow {
    flex: 0 0 210px;
    height: 210px !important;
    min-height: 210px;
    padding-inline: 9px;
    overflow: hidden;
  }

  #ovroot .dash-split {
    flex-direction: row;
    gap: 10px;
    padding: 10px 12px 11px;
  }

  #ovroot .dash-donut,
  #ovroot .dash-donut canvas {
    width: 68px;
    height: 68px;
  }

  #ovroot .dash-legend {
    width: auto;
    grid-template-columns: 1fr 1fr;
    gap: 5px 8px;
  }

  #ovroot .dash-lg {
    gap: 5px;
  }

  #ovroot .dash-lg b {
    min-width: 28px;
  }

  #ovroot .dash-lg .dash-pct {
    display: none;
  }

  #ovroot .dash-health {
    padding: 8px;
  }

  #ovroot .dash-hr {
    grid-template-columns: 62px minmax(82px, auto) minmax(0, 1fr);
    gap: 6px;
    padding: 8px 6px;
  }

  #ovroot #lastev .ev {
    grid-template-columns: 46px 30px minmax(0, 1fr);
  }

  #ovroot #days7 .dash-d7-list {
    display: none;
  }
}

@media (max-width: 390px) {
  .top h1,
  .top h2 {
    max-width: 155px;
  }

  .live {
    font-size: 11px;
  }

  #ovroot .dash-eyebrow {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  #ovroot .dash-command-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #ovroot .dash-command-actions .dash-action-tertiary {
    display: none;
  }

  #ovroot .dash-orb-stats {
    white-space: normal;
  }

  #ovroot .dash-hr {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  #ovroot .dash-hr-ac,
  #ovroot .dash-hr-ek {
    grid-column: 1 / -1;
    white-space: normal;
  }
}

/* --------------------------------------------------------------------------
   11. Motion and system accessibility preferences
   -------------------------------------------------------------------------- */
@media (hover: hover) and (pointer: fine) {
  button:not(:disabled):hover,
  .action-menu summary:hover {
    transform: translateY(-1px);
  }

  button:not(:disabled):active,
  .action-menu summary:active {
    transform: translateY(1px) scale(0.992);
  }

  .nav a:hover {
    transform: translateX(2px);
  }
}

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

  button,
  .nav a,
  .site,
  .drawer {
    transform: none !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --p-hairline: rgba(183, 199, 231, 0.28);
    --p-hairline-strong: rgba(190, 205, 235, 0.48);
  }

  :root[data-theme="light"] {
    --p-hairline: rgba(24, 38, 64, 0.24);
    --p-hairline-strong: rgba(24, 38, 64, 0.46);
  }

  .mut,
  .dim,
  .help {
    color: var(--txt-2);
  }

  :where(a, button, input, select, textarea, summary, [role="button"], [role="tab"]):focus-visible {
    outline-width: 3px;
  }
}

@media (forced-colors: active) {
  :root {
    --p-hairline: CanvasText;
    --p-hairline-strong: CanvasText;
  }

  body,
  .side,
  .top,
  .card,
  .stat,
  .drawer,
  #ovroot .dash-card,
  #ovroot .dash-kpi,
  #ovroot .dash-command-main,
  #ovroot .dash-command-rail {
    background: Canvas;
    box-shadow: none;
  }

  :where(a, button, input, select, textarea, summary, [role="button"], [role="tab"]):focus-visible {
    outline: 3px solid Highlight;
    outline-offset: 2px;
  }

  .pill::before,
  .dotpulse,
  .live i,
  #ovroot .dash-live-pulse i,
  #ovroot .dash-state i {
    forced-color-adjust: none;
  }
}

/* --------------------------------------------------------------------------
   12. Genel Bakış alçak ekran yoğunluğu (1536x850 ve 1366x768): tek ekrana otur
   -------------------------------------------------------------------------- */
@media (max-height: 860px) and (min-width: 961px) {
  #ovroot { gap: 8px; }
  #ovroot .dash-command { gap: 8px; max-height: 232px; }
  #ovroot .dash-command-rail { padding: 11px 12px; min-height: 0; overflow: hidden; }
  #ovroot .dash-rail-head { padding-bottom: 8px; }
  #ovroot .dash-rail-head h3 { margin-top: 3px; font-size: 15px; }
  #ovroot .dash-command-rail .dash-alerts { min-height: 0; overflow: auto; overscroll-behavior: contain; justify-content: flex-start; padding-top: 7px; gap: 5px; }
  #ovroot .dash-command-rail .dash-alert { min-height: 36px; padding: 5px 9px; }
  #ovroot .dash-command-main { padding-top: 10px; gap: 8px; }
  #ovroot .dash-command-title { margin: 3px 0 3px; font-size: clamp(20px, 1.5vw, 24px); }
  #ovroot .dash-command-copy > p { font-size: 13px; line-height: 1.45; }
  #ovroot .dash-command-actions { margin-top: 8px; }
  #ovroot .dash-command-actions button { min-height: 33px; }
  #ovroot .dash-metric-band { gap: 8px; }
  #ovroot .dash-kpi { min-height: 68px; padding: 8px 12px; }
  #ovroot .dash-kpi .v { margin-top: 3px; }
  #ovroot .dash-workbench, #ovroot .dash-bot { gap: 8px; }
  #ovroot .dash-mid { min-height: 184px; }
  #ovroot .dash-bot { min-height: 160px; }
  #ovroot .dash-card-h { min-height: 44px; padding: 8px 14px 7px; }
  #ovroot .dash-chart.grow { min-height: 110px; }
  #ovroot .dash-split { padding: 7px 14px 9px; }
}
@media (max-height: 790px) and (min-width: 961px) {
  #ovroot .dash-kpi.hero canvas { display: none; }
  #ovroot .dash-kpi { min-height: 60px; padding: 7px 12px; }
  #ovroot .dash-kpi.hero .v { font-size: 24px; }
  #ovroot .dash-command-copy > p { display: none; }
  #ovroot .dash-mid { min-height: 168px; }
  #ovroot .dash-bot { min-height: 140px; }
  #ovroot .dash-hint { display: none; }
}

/* Mobil menü: .shell yığın bağlamı (isolation) kenar çubuğunu perdenin ALTINA düşürüyordu; menüye dokunulamıyordu */
@media (max-width: 960px) {
  .shell { isolation: auto; }
  .side { z-index: 60; }
  .nav-scrim { z-index: 49; }
}
