/* Rami AI OS — glass design (after "Glassy Dashboard V5"): Poppins, frosted warm glass over a dusk interior. */
:root {
  --accent: #5b8def;
  --accent-2: #3d6fe6;
  --green: #4ade80;
  --amber: #f5b85a;
  --red: #f87171;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, .62);
  --faint: rgba(255, 255, 255, .38);
  --line: rgba(255, 255, 255, .13);
  --glass: rgba(58, 46, 40, .30);
  --glass-strong: rgba(48, 38, 33, .52);
  --glass-hi: rgba(255, 255, 255, .10);
  --blur: 26px;
  --radius: 22px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Poppins", system-ui, sans-serif;
  color: var(--text);
  background: #1d1714;
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(91, 141, 239, .45); }

/* --- the scene ------------------------------------------------------------------------------------ */
.scene { position: fixed; inset: 0; overflow: hidden; z-index: 0; }
.scene .photo {
  position: absolute; inset: -3%;
  background: url("/static/bg.jpg") center 60% / cover no-repeat, url("/static/bg.svg") center 60% / cover no-repeat,
    linear-gradient(160deg, #6d5a4c, #2b211c 55%, #15100d);
  animation: drift 60s ease-in-out infinite alternate;
  transform-origin: 50% 60%;
}
.scene .shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, .35) 100%),
    linear-gradient(180deg, rgba(10, 8, 6, .28), rgba(10, 8, 6, .05) 30%, rgba(10, 8, 6, .35));
}
@keyframes drift { from { transform: scale(1.02) translate3d(0, 0, 0); } to { transform: scale(1.08) translate3d(-1%, -1%, 0); } }

/* --- glass ---------------------------------------------------------------------------------------- */
.glass {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .03)), var(--glass);
  backdrop-filter: blur(var(--blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px -18px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .16);
}
.glass.strong { background: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02)), var(--glass-strong); }
.inner {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
}

/* --- top bar -------------------------------------------------------------------------------------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; height: 74px; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; padding: 0 28px;
}
.top .side { display: flex; gap: 10px; align-items: center; min-width: 200px; }
.top .side.right { justify-content: flex-end; }
.circle {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line); position: relative;
  background: rgba(255, 255, 255, .08); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  transition: transform .35s var(--ease), background .25s;
}
.circle:hover { background: rgba(255, 255, 255, .18); transform: translateY(-2px); }
.circle svg { width: 17px; height: 17px; stroke-width: 1.8; }
.badge {
  position: absolute; top: -3px; right: -3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px;
  background: #ef4444; font-size: 10px; font-weight: 600; display: grid; place-items: center;
  box-shadow: 0 0 0 2px rgba(30, 20, 15, .5); animation: pop .5s var(--ease);
}
.badge:empty, .badge[data-n="0"] { display: none; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 13px;
  background: linear-gradient(140deg, #ffb347, #f07a2a); position: relative; cursor: pointer;
  box-shadow: 0 6px 18px -6px rgba(240, 122, 42, .7);
}
.avatar::after {
  content: ""; position: absolute; right: 0; bottom: 1px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 2px #3a2a20;
}
.pills { display: flex; gap: 8px; }
.pill {
  height: 40px; padding: 0 18px 0 15px; border-radius: 999px; display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .08); cursor: pointer; font-weight: 500;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  transition: background .3s, transform .35s var(--ease), box-shadow .3s;
}
.pill svg { width: 16px; height: 16px; stroke-width: 1.8; }
.pill:hover { background: rgba(255, 255, 255, .16); transform: translateY(-1px); }
.pill.on { background: rgba(255, 255, 255, .22); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }

/* --- dock ----------------------------------------------------------------------------------------- */
.dock {
  position: fixed; left: 26px; top: 50%; transform: translateY(-50%); z-index: 30;
  display: flex; flex-direction: column; gap: 9px; padding: 9px; border-radius: 999px;
  background: rgba(28, 22, 19, .42); border: 1px solid var(--line);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.dock .d {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; position: relative;
  background: rgba(255, 255, 255, .07); transition: background .3s, transform .4s var(--ease), color .3s;
}
.dock .d svg { width: 16px; height: 16px; stroke-width: 1.8; }
.dock .d:hover { background: rgba(255, 255, 255, .18); transform: scale(1.08); }
.dock .d.on { background: #fff; color: #1d1714; box-shadow: 0 6px 18px -4px rgba(255, 255, 255, .45); }
.dock .d .tip {
  position: absolute; left: 50px; white-space: nowrap; padding: 5px 10px; border-radius: 8px; font-size: 11px;
  background: rgba(15, 12, 10, .85); color: #fff; opacity: 0; pointer-events: none; transform: translateX(-6px);
  transition: opacity .2s, transform .3s var(--ease);
}
.dock .d:hover .tip { opacity: 1; transform: none; }
.dock .d .dot { position: absolute; top: 2px; right: 2px; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; }

/* --- main ----------------------------------------------------------------------------------------- */
main {
  position: fixed; inset: 74px 0 0 0; overflow-y: auto; overflow-x: hidden; z-index: 10;
  padding: 14px 40px 60px 104px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent;
}
.wrap { max-width: 1440px; margin: 0 auto; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 4px 0 20px; flex-wrap: wrap; }
.head h1 { font-size: 26px; font-weight: 600; margin: 0; letter-spacing: -.01em; }
.head p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.head .actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
h2 { font-size: 15px; font-weight: 600; margin: 0; }
h3 { font-size: 13px; font-weight: 600; margin: 0; }
.sub { color: var(--muted); font-size: 11.5px; }
.faint { color: var(--faint); }
.muted { color: var(--muted); }

.seg {
  display: inline-flex; padding: 4px; border-radius: 999px; gap: 2px;
  background: rgba(255, 255, 255, .08); border: 1px solid var(--line); backdrop-filter: blur(18px);
}
.seg button {
  border: 0; background: transparent; padding: 6px 15px; border-radius: 999px; cursor: pointer; font-size: 12px;
  color: var(--muted); font-weight: 500; transition: background .3s, color .3s;
}
.seg button.on { background: #fff; color: #1d1714; box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .4); }

.btn {
  height: 38px; padding: 0 16px; border-radius: 999px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .1); font-weight: 500; font-size: 12.5px;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); white-space: nowrap;
  transition: background .25s, transform .35s var(--ease), opacity .2s;
}
.btn svg { width: 15px; height: 15px; stroke-width: 2; }
.btn:hover { background: rgba(255, 255, 255, .2); transform: translateY(-1px); }
.btn.primary { background: linear-gradient(180deg, #6d9bf5, var(--accent-2)); border-color: rgba(255, 255, 255, .25);
  box-shadow: 0 10px 24px -10px rgba(61, 111, 230, .9); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.sm { height: 30px; padding: 0 12px; font-size: 11.5px; }
.btn.danger { background: rgba(248, 113, 113, .18); border-color: rgba(248, 113, 113, .35); }
.btn.good { background: rgba(74, 222, 128, .16); border-color: rgba(74, 222, 128, .35); }
.btn[disabled] { opacity: .45; pointer-events: none; }

.grid { display: grid; gap: 18px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.main-side { grid-template-columns: minmax(0, 2.55fr) minmax(300px, 1fr); }
.side-main { grid-template-columns: minmax(280px, .9fr) minmax(0, 2fr); }
.card { padding: 20px 22px; }
.card .ch { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.lift { transition: transform .45s var(--ease), box-shadow .45s var(--ease), background .3s; }
.lift:hover { transform: translateY(-5px); box-shadow: 0 30px 60px -22px rgba(0, 0, 0, .65), inset 0 1px 0 rgba(255, 255, 255, .2); }

/* KPI */
.kpi { padding: 18px 20px 16px; min-height: 148px; display: flex; flex-direction: column; cursor: default; overflow: hidden; }
.kpi .ic {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: color-mix(in srgb, var(--c, var(--accent)) 30%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, var(--accent)) 45%, transparent);
}
.kpi .ic svg { width: 16px; height: 16px; color: color-mix(in srgb, var(--c, var(--accent)) 60%, white); }
.kpi .x { color: var(--faint); }
.kpi .x svg { width: 14px; height: 14px; }
.kpi .label { color: var(--muted); font-size: 11.5px; margin-top: 12px; }
.kpi .val { font-size: 27px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.kpi .row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: auto; }
.kpi svg.spark { width: 46%; height: 38px; overflow: visible; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 500;
  background: rgba(255, 255, 255, .1); white-space: nowrap;
}
.chip svg { width: 11px; height: 11px; }
.chip.green { background: rgba(74, 222, 128, .16); color: #86efac; }
.chip.red { background: rgba(248, 113, 113, .18); color: #fca5a5; }
.chip.amber { background: rgba(245, 184, 90, .18); color: #fcd34d; }
.chip.blue { background: rgba(91, 141, 239, .2); color: #a9c4ff; }
.chip.ghost { background: transparent; border: 1px solid var(--line); }

/* bars (like "Productivity") */
.bars { display: flex; align-items: flex-end; gap: 14px; height: 250px; padding: 6px 4px 0 34px; position: relative; }
.bars .gridline { position: absolute; left: 34px; right: 0; border-top: 1px dashed rgba(255, 255, 255, .07); font-size: 10px; }
.bars .gridline span { position: absolute; left: -32px; top: -7px; color: var(--faint); }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; position: relative; }
.bars .b .bar {
  width: min(38px, 70%); border-radius: 999px; min-height: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .34), rgba(255, 255, 255, .12));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
  transform-origin: bottom; animation: grow 1s var(--ease) both; animation-delay: calc(var(--i) * 60ms + 200ms);
  transition: filter .3s, background .3s;
}
.bars .b.hi .bar { background: linear-gradient(180deg, #7aa6ff, #3d6fe6); box-shadow: 0 0 28px -2px rgba(91, 141, 239, .75), inset 0 1px 0 rgba(255, 255, 255, .5); }
.bars .b:hover .bar { filter: brightness(1.35); }
.bars .b .lbl { font-size: 10.5px; color: var(--faint); }
.bars .b .tt {
  position: absolute; bottom: calc(var(--h) + 34px); padding: 4px 9px; border-radius: 8px; font-size: 11px; white-space: nowrap;
  background: rgba(15, 12, 10, .85); opacity: 0; transform: translateY(4px); transition: .25s var(--ease); pointer-events: none; z-index: 3;
}
.bars .b:hover .tt { opacity: 1; transform: none; }
@keyframes grow { from { transform: scaleY(0); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }

/* stacked bars (spend) */
.stack { display: flex; align-items: flex-end; gap: 5px; height: 300px; }
.stack .col { flex: 1; display: flex; flex-direction: column-reverse; gap: 2px; height: 100%; justify-content: flex-start; position: relative; cursor: default; }
.stack .seg2 { border-radius: 5px; transform-origin: bottom; animation: grow .9s var(--ease) both; animation-delay: calc(var(--i) * 18ms + 150ms); min-height: 2px; }
.stack .col:hover .seg2 { filter: brightness(1.3); }
.stack .col .tt { position: absolute; bottom: 100%; left: 50%; transform: translate(-50%, 4px); background: rgba(15, 12, 10, .9); padding: 6px 10px; border-radius: 9px; font-size: 11px; white-space: nowrap; opacity: 0; pointer-events: none; transition: .2s; z-index: 4; }
.stack .col:hover .tt { opacity: 1; transform: translate(-50%, -4px); }

/* timeline (Today) */
.tl { display: flex; flex-direction: column; gap: 9px; }
.tl .it { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: stretch; }
.tl .t { color: var(--faint); font-size: 10.5px; padding-top: 10px; }
.tl .ev {
  padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .07);
  border-left: 3px solid var(--c); transition: background .3s, transform .35s var(--ease);
}
.tl .ev:hover { background: rgba(255, 255, 255, .12); transform: translateX(3px); }
.tl .ev b { font-weight: 600; font-size: 12px; display: block; }
.tl .ev span { color: var(--muted); font-size: 10.5px; }
.tl .done .ev { opacity: .5; }
.tl .now { height: 1px; background: linear-gradient(90deg, var(--accent), transparent); margin: 2px 0 2px 44px; position: relative; }
.tl .now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

/* lists */
.list { display: flex; flex-direction: column; }
.list .li { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-top: 1px solid rgba(255, 255, 255, .06); }
.list .li:first-child { border-top: 0; }
.list .li .grow { flex: 1; min-width: 0; }
.list .li .grow .t1 { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .li .grow .t2 { font-size: 10.5px; color: var(--faint); }
.ag {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; position: relative;
  background: linear-gradient(140deg, color-mix(in srgb, var(--c) 85%, white), color-mix(in srgb, var(--c) 70%, black));
  box-shadow: 0 6px 16px -6px var(--c);
}
.ag svg { width: 15px; height: 15px; color: #fff; stroke-width: 2; }
.ag.lg { width: 56px; height: 56px; }
.ag.lg svg { width: 24px; height: 24px; }
.ag .st { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(40, 30, 25, .9); }
.st-online { background: var(--green); }
.st-warning { background: var(--amber); }
.st-paused { background: #a3a3a3; }
.st-down { background: var(--red); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .35; } }
.lvl-error { color: #fca5a5; }
.lvl-success { color: #86efac; }
.lvl-warning { color: #fcd34d; }

/* ring */
.ring { position: relative; width: 74px; height: 74px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; }
.ring .bgc { stroke: rgba(255, 255, 255, .12); }
.ring .fg { stroke: var(--c, #f5c04a); stroke-linecap: round; transition: stroke-dashoffset 1.6s var(--ease); filter: drop-shadow(0 0 6px var(--c, #f5c04a)); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 14px; font-weight: 600; }

/* agent cards (like the "Favorites" cards) */
.acard { padding: 10px; display: flex; flex-direction: column; cursor: pointer; min-height: 262px; }
.acard .cover {
  height: 108px; border-radius: 15px; padding: 14px; position: relative; overflow: hidden;
  background: linear-gradient(150deg, color-mix(in srgb, var(--c) 78%, white 6%), color-mix(in srgb, var(--c) 62%, black));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
}
.acard .cover::after {
  content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, .28), transparent 55%);
}
.acard .cover > svg { width: 24px; height: 24px; stroke-width: 1.7; position: relative; z-index: 1; }
.acard .cover .tag { position: absolute; right: 12px; bottom: 12px; z-index: 1; padding: 3px 10px; border-radius: 999px; font-size: 10.5px; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .35); }
.acard .cover .stt { position: absolute; left: 14px; bottom: 12px; z-index: 1; display: flex; align-items: center; gap: 6px; font-size: 11px; }
.acard .cover .stt i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.acard .body { padding: 13px 6px 4px; flex: 1; display: flex; flex-direction: column; }
.acard .body h3 { font-size: 14px; }
.acard .body p { color: var(--muted); font-size: 11.5px; margin: 3px 0 10px; }
.acard .mets { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin-bottom: 10px; }
.acard .mets div { font-size: 10.5px; color: var(--faint); }
.acard .mets b { display: block; color: #fff; font-size: 13px; font-weight: 600; }
.acard .foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; font-size: 10.5px; color: var(--faint); }
.acard .foot .icons { display: flex; gap: 10px; }
.acard .foot svg { width: 14px; height: 14px; }

/* kanban */
.kan { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 16px; align-items: start; }
.kcol { padding: 14px; min-height: 420px; transition: background .25s, box-shadow .25s; }
.kcol.over { background: rgba(91, 141, 239, .14); box-shadow: inset 0 0 0 1px rgba(91, 141, 239, .5); }
.kcol .kh { display: flex; align-items: center; justify-content: space-between; margin: 2px 4px 12px; }
.kcol .kh h3 { display: flex; align-items: center; gap: 8px; }
.kcol .kh i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.kcard { padding: 12px 13px; margin-bottom: 10px; cursor: grab; border-radius: 14px; background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .09); transition: transform .35s var(--ease), background .25s, opacity .2s; }
.kcard:hover { background: rgba(255, 255, 255, .13); transform: translateY(-2px); }
.kcard.drag { opacity: .4; }
.kcard .kt { font-size: 12.5px; font-weight: 500; margin: 7px 0 4px; }
.kcard .kd { font-size: 11px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.kcard .kf { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; font-size: 10.5px; color: var(--faint); gap: 6px; }
.kcard .kf .acts { display: flex; gap: 5px; }

/* messages (communications) */
.msgs { display: grid; grid-template-columns: 300px minmax(0, 1fr) 290px; gap: 18px; height: calc(100vh - 190px); min-height: 520px; }
.msgs > .glass { display: flex; flex-direction: column; overflow: hidden; }
.chan { display: flex; gap: 11px; align-items: center; padding: 10px; border-radius: 14px; cursor: pointer; transition: background .25s; }
.chan:hover { background: rgba(255, 255, 255, .07); }
.chan.on { background: rgba(255, 255, 255, .13); }
.chan .grow { flex: 1; min-width: 0; }
.chan .grow b { font-size: 12.5px; font-weight: 600; display: block; }
.chan .grow span { font-size: 11px; color: var(--faint); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chan .n { background: var(--accent); border-radius: 999px; font-size: 10px; padding: 1px 7px; }
.thread { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.bub { max-width: 74%; display: flex; gap: 9px; align-items: flex-end; animation: rise .5s var(--ease) both; }
.bub .ag { width: 28px; height: 28px; }
.bub .ag svg { width: 13px; height: 13px; }
.bub .bx { padding: 10px 13px; border-radius: 16px 16px 16px 5px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .08); }
.bub .bx small { display: block; color: var(--faint); font-size: 10px; margin-top: 4px; }
.bub.me { align-self: flex-end; flex-direction: row-reverse; }
.bub.me .bx { background: linear-gradient(180deg, rgba(110, 155, 245, .75), rgba(61, 111, 230, .7)); border-radius: 16px 16px 5px 16px; }
.daysep { align-self: center; font-size: 10.5px; color: var(--faint); padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .06); }

/* tables */
table.t { width: 100%; border-collapse: collapse; font-size: 12px; }
table.t th { text-align: left; font-weight: 500; color: var(--faint); font-size: 10.5px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.t td { padding: 9px 10px; border-bottom: 1px solid rgba(255, 255, 255, .05); vertical-align: top; }
table.t tr:hover td { background: rgba(255, 255, 255, .03); }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }

/* inputs */
.in {
  height: 38px; border-radius: 12px; padding: 0 13px; border: 1px solid var(--line); background: rgba(0, 0, 0, .18); outline: none; width: 100%;
  transition: border-color .2s, background .2s;
}
textarea.in { height: auto; padding: 10px 13px; resize: vertical; min-height: 80px; }
.in:focus { border-color: rgba(91, 141, 239, .7); background: rgba(0, 0, 0, .26); }
select.in option { background: #2a211c; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 11px; color: var(--muted); }

/* misc */
.empty { padding: 26px; text-align: center; color: var(--faint); font-size: 12px; }
.empty svg { width: 26px; height: 26px; opacity: .5; display: block; margin: 0 auto 8px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 12px; }
.kv dt { color: var(--faint); }
.kv dd { margin: 0; }
ol.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 9px; }
ol.steps li { counter-increment: s; display: grid; grid-template-columns: 24px 1fr; gap: 10px; font-size: 12px; color: rgba(255, 255, 255, .85); }
ol.steps li::before { content: counter(s); width: 22px; height: 22px; border-radius: 50%; background: rgba(255, 255, 255, .1); display: grid; place-items: center; font-size: 10.5px; font-weight: 600; }
.uptime { display: flex; gap: 3px; height: 30px; align-items: stretch; }
.uptime i { flex: 1; border-radius: 3px; background: rgba(74, 222, 128, .7); transition: transform .2s; }
.uptime i:hover { transform: scaleY(1.15); }
.uptime i.mid { background: var(--amber); }
.uptime i.bad { background: var(--red); }
.uptime i.none { background: rgba(255, 255, 255, .1); }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11px; color: var(--muted); }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 6px; vertical-align: -1px; }
.bar-h { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.bar-h i { display: block; height: 100%; border-radius: 999px; background: var(--c, var(--accent)); transform-origin: left; animation: growx 1.1s var(--ease) both; }
@keyframes growx { from { transform: scaleX(0); } }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.hr { height: 1px; background: var(--line); margin: 14px 0; }
.row { display: flex; gap: 10px; align-items: center; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.wrapflex { flex-wrap: wrap; }
.mt { margin-top: 18px; }
.scroll { overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent; }

/* entry animations: blur → sharp, rise, staggered */
.reveal { animation: rise .8s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
@keyframes rise {
  from { opacity: 0; transform: translateY(22px) scale(.985); filter: blur(12px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes pop { from { transform: scale(0); } 70% { transform: scale(1.2); } to { transform: scale(1); } }
.page-out { animation: out .28s ease both; }
@keyframes out { to { opacity: 0; filter: blur(10px); transform: translateY(-8px) scale(.99); } }

/* toast, modal, palette */
.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; flex-direction: column; gap: 10px; }
.toast { padding: 12px 16px; border-radius: 14px; min-width: 240px; max-width: 360px; font-size: 12.5px; animation: rise .5s var(--ease) both; display: flex; gap: 10px; align-items: center; }
.toast svg { width: 16px; height: 16px; flex: none; }
.veil { position: fixed; inset: 0; z-index: 50; background: rgba(10, 8, 6, .35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: grid; place-items: start center; padding-top: 12vh; animation: fade .3s both; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(560px, calc(100vw - 32px)); padding: 22px; animation: rise .5s var(--ease) both; }
.palette { width: min(620px, calc(100vw - 32px)); padding: 10px; animation: rise .45s var(--ease) both; }
.palette input { width: 100%; height: 48px; background: transparent; border: 0; outline: none; font-size: 15px; padding: 0 12px; }
.palette .res { max-height: 50vh; overflow-y: auto; border-top: 1px solid var(--line); padding-top: 6px; }
.palette .opt { display: flex; gap: 12px; align-items: center; padding: 9px 12px; border-radius: 12px; cursor: pointer; }
.palette .opt svg { width: 16px; height: 16px; color: var(--muted); }
.palette .opt.on, .palette .opt:hover { background: rgba(255, 255, 255, .1); }
.palette .opt span { color: var(--faint); margin-left: auto; font-size: 11px; }
kbd { font-family: inherit; font-size: 10px; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line); color: var(--muted); }

/* responsive */
@media (max-width: 1180px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main-side, .side-main { grid-template-columns: 1fr; }
  .msgs { grid-template-columns: 260px 1fr; }
  .msgs > .info { display: none; }
  .kan { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { overflow: auto; }
  .top { padding: 0 14px; height: 64px; }
  .top .pills .pill span { display: none; }
  .top .pills .pill { padding: 0 12px; }
  .top .side { min-width: 0; }
  .top .side .circle.opt { display: none; }
  .dock { left: 50%; top: auto; bottom: 14px; transform: translateX(-50%); flex-direction: row; }
  .dock .d .tip { display: none; }
  main { inset: 64px 0 0 0; padding: 10px 16px 100px; }
  .g4, .g3, .g2 { grid-template-columns: 1fr; }
  .kan { grid-template-columns: 1fr; }
  .msgs { grid-template-columns: 1fr; height: auto; }
  .bars { gap: 6px; }
  .head h1 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}

.lucide { width: 16px; height: 16px; }
table.t svg, .list .li > svg, .lvl-success svg, .lvl-error svg { width: 15px; height: 15px; vertical-align: -3px; }
.stackav { display: flex; margin-left: auto; }
.stackav > span { position: relative; margin-left: -8px; }
.stackav .ag { width: 34px; height: 34px; box-shadow: 0 0 0 2px rgba(50, 38, 32, .9); }
.stackav em { position: absolute; right: -4px; top: -6px; font-style: normal; font-size: 9.5px; font-weight: 600; min-width: 16px; height: 16px;
  border-radius: 8px; background: #ef4444; display: grid; place-items: center; padding: 0 3px; }
