/* =========================================================================
   mcvibe console v2 â Shell & Components  ("Precision Light")
   ========================================================================= */

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent-fill); color: var(--accent-2); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
input, select, textarea { font: inherit; color: inherit; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
*::-webkit-scrollbar { width: 11px; height: 11px; }
*::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 7px; border: 3px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--text-4); background-clip: padding-box; }

/* ---------- helpers ---------- */
.mono { font-family: var(--font-mono); }
.serif, .kpi-hero { font-family: var(--font-display); font-weight: 600; letter-spacing: var(--tr-tighter); }
.eyebrow { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: var(--tr-eyebrow); text-transform: uppercase; color: var(--text-3); }
.muted { color: var(--text-3); }
.muted-2 { color: var(--text-2); }
.t-num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-5 { gap: 24px; }
.between { justify-content: space-between; }
.grow { flex: 1; }
.wrap { flex-wrap: wrap; }
.hide { display: none !important; }

.c-gold, .c-accent { color: var(--accent); } .c-violet { color: var(--violet); }
.c-green { color: var(--green); } .c-amber { color: var(--amber); }
.c-red { color: var(--red); } .c-blue { color: var(--blue); }
.c-2 { color: var(--text-2); } .c-3 { color: var(--text-3); }

/* =========================================================================
   APP SHELL
   ========================================================================= */
#app { height: 100vh; overflow: hidden; }
.shell { display: grid; grid-template-columns: var(--rail-w) 1fr; height: 100vh; }

/* ---------- Sidebar ---------- */
.rail { background: var(--bg-rail); border-right: 1px solid var(--line); display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.rail__top { padding: 13px 12px 8px; }
.proj-switch { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 9px; border-radius: var(--r-2); border: 1px solid var(--line); background: var(--panel); transition: border-color var(--d2), box-shadow var(--d2); }
.proj-switch:hover { border-color: var(--line-strong); box-shadow: var(--sh-1); }
.proj-switch__logo { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; background: var(--ink); color: var(--ink-fg); display: grid; place-items: center; font-size: 15px; }
.proj-switch__meta { display: flex; flex-direction: column; line-height: 1.2; text-align: left; min-width: 0; }
.proj-switch__eyebrow { font-family: var(--font-mono); font-size: 8px; letter-spacing: 0.14em; color: var(--text-4); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proj-switch__name { font-size: 14px; font-weight: 650; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-switch__chev { margin-left: auto; color: var(--text-4); }

.region-pill { display: flex; align-items: center; gap: 7px; margin: 4px 12px 4px; padding: 6px 10px; border-radius: var(--r-2); background: var(--inset); border: 1px solid var(--line-faint); font-family: var(--font-mono); font-size: 11px; color: var(--text-2); white-space: nowrap; }
.region-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-fill); }
.region-pill__chev { margin-left: auto; color: var(--text-4); }

.nav { flex: 1; overflow-y: auto; padding: 4px 10px 16px; }
.nav__group { margin-top: 15px; }
.nav__group:first-child { margin-top: 4px; }
.nav__label { font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-4); padding: 0 9px 5px; }
.nav__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 9px; border-radius: var(--r-2); margin-bottom: 1px; color: var(--text-2); font-size: 13.5px; font-weight: 500; position: relative; transition: background var(--d1), color var(--d1); white-space: nowrap; overflow: hidden; text-align: left; }
.nav__item > span:not(.badge-mini) { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav__item .ico { width: 17px; height: 17px; flex-shrink: 0; color: var(--text-3); transition: color var(--d1); }
.nav__item:hover { background: var(--panel-2); color: var(--text); }
.nav__item:hover .ico { color: var(--text-2); }
.nav__item.active { background: var(--accent-fill); color: var(--accent-2); font-weight: 600; }
.nav__item.active .ico { color: var(--accent); }
.nav__item .badge-mini { flex: 0 0 auto; margin-left: auto; font-family: var(--font-mono); font-size: 9.5px; padding: 1px 6px; border-radius: var(--r-pill); background: var(--panel-2); color: var(--text-3); border: 1px solid var(--line-faint); }
.nav__item .badge-mini.alert { background: var(--red); color: #fff; border-color: transparent; }

.rail__bottom { border-top: 1px solid var(--line); padding: 9px 10px; }
.rail__user { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--r-2); }
.rail__user:hover { background: var(--panel-2); }
.avatar { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; font-size: 12px; font-weight: 650; color: var(--accent-fg); background: var(--accent); }
.rail__logout { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 9px; border-radius: var(--r-2); color: var(--text-3); font-size: 13px; }
.rail__logout:hover { background: var(--panel-2); color: var(--text-2); }

/* ---------- Main ---------- */
.main { display: flex; flex-direction: column; height: 100vh; overflow: hidden; min-width: 0; }
.topbar { height: var(--topbar-h); flex-shrink: 0; display: flex; align-items: center; gap: 14px; padding: 0 22px; border-bottom: 1px solid var(--line); background: color-mix(in oklch, var(--bg-topbar) 82%, transparent); backdrop-filter: blur(12px); }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); }
.crumbs b { color: var(--text); font-weight: 600; }
.crumbs .sep { color: var(--text-4); }
.cmdk { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 240px; padding: 7px 12px; border-radius: var(--r-2); background: var(--inset); border: 1px solid var(--line); color: var(--text-3); font-size: 13px; transition: border-color var(--d2); }
.cmdk:hover { border-color: var(--line-strong); }
.cmdk > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk kbd { margin-left: auto; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
.topbar__btn { width: 34px; height: 34px; border-radius: var(--r-2); display: grid; place-items: center; color: var(--text-2); border: 1px solid var(--line); background: var(--panel); transition: background var(--d1), color var(--d1), border-color var(--d1); }
.topbar__btn:hover { background: var(--panel-2); color: var(--text); border-color: var(--line-strong); }
.topbar__btn.has-dot { position: relative; }
.topbar__btn.has-dot::after { content:""; position:absolute; top:7px; right:8px; width:6px; height:6px; border-radius:50%; background: var(--red); box-shadow: 0 0 0 2px var(--bg-topbar); }

.scroll { flex: 1; overflow-y: auto; overflow-x: hidden; }
.page { max-width: 1500px; margin: 0 auto; padding: 24px 30px 80px; }
.view { animation: fade .3s var(--ease); }
@keyframes fade { from { transform: translateY(6px); } to { transform: none; } }

/* ---------- Page header ---------- */
.phead { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.phead__l { min-width: 0; }
.phead h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: var(--tr-tight); line-height: 1.1; display: flex; align-items: center; gap: 11px; }
.phead h1 .pico { color: var(--accent); display: grid; place-items: center; width: 30px; height: 30px; background: var(--accent-fill); border-radius: var(--r-2); }
.phead h1 .pico .ico { width: 18px; height: 18px; }
.phead__sub { margin: 7px 0 0; color: var(--text-3); font-size: 13px; }
.phead__sub code, .phead__sub .mono { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-2); background: var(--inset); padding: 1px 6px; border-radius: 4px; border: 1px solid var(--line-faint); }
.phead__r { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }

/* =========================================================================
   COMPONENTS
   ========================================================================= */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: var(--sh-1); }
.card--pad { padding: var(--pad); }
.card__head { display: flex; align-items: center; gap: 10px; padding: 13px var(--pad); border-bottom: 1px solid var(--line-faint); }
.card__head h3 { margin: 0; font-size: 13px; font-weight: 650; letter-spacing: 0; display: flex; align-items: center; gap: 8px; color: var(--text); }
.card__head .ico { color: var(--text-3); width: 16px; height: 16px; }
.card__head .right { margin-left: auto; display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 12px; }
.card__body { padding: var(--pad); }

.grid { display: grid; gap: var(--gap); }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.g-12 { grid-template-columns: 1fr 1fr; }
.g-21 { grid-template-columns: 2fr 1fr; }
.span-2 { grid-column: span 2; }
@media (max-width: 1180px){ .g-4 { grid-template-columns: repeat(2,1fr);} .g-3{ grid-template-columns: repeat(2,1fr);} }
@media (max-width: 820px){ .g-2,.g-3,.g-4,.g-12,.g-21 { grid-template-columns: 1fr; } .span-2{ grid-column: auto;} }

/* ============ Mobile (â¤860px): off-canvas rail + responsive polish ============ */
.nav-toggle { display: none; }
.rail-backdrop { display: none; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .rail {
    position: fixed; top: 0; bottom: 0; left: 0;
    width: var(--rail-w); max-width: 86vw; z-index: 60;
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: 2px 0 40px rgba(0,0,0,.28);
  }
  body.nav-open .rail { transform: translateX(0); }
  .rail-backdrop {
    display: block; position: fixed; inset: 0; z-index: 55;
    background: rgba(0,0,0,.45); opacity: 0; pointer-events: none;
    transition: opacity .2s;
  }
  body.nav-open .rail-backdrop { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }

  .nav-toggle { display: grid; }
  .topbar { padding: 0 12px; gap: 10px; }
  .cmdk { display: none; }
  .crumbs { flex: 1; min-width: 0; }
  .crumbs b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  .page { padding: 16px 13px 64px; }
  .phead { flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
  .phead h1 { font-size: 20px; }

  /* Wide tables scroll inside their card instead of breaking the page. */
  .card { overflow-x: auto; }
}

/* stat tile â flat, crisp, metric-forward */
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-3); padding: 15px 16px; box-shadow: var(--sh-1); position: relative; transition: border-color var(--d2), box-shadow var(--d2), transform var(--d2); }
.stat__top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.stat__label { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); line-height: 1.3; }
.stat__ico { margin-left: auto; color: var(--text-4); display: grid; place-items: center; }
.stat__ico .ico { width: 15px; height: 15px; }
.stat__val { font-family: var(--font-display); font-size: 29px; font-weight: 650; letter-spacing: var(--tr-tighter); line-height: 1; color: var(--text); font-variant-numeric: tabular-nums; }
.stat__val.serif { font-size: 30px; }
.stat__val .unit { font-size: 13px; color: var(--text-3); font-weight: 500; margin-left: 3px; letter-spacing: 0; }
.stat__sub { margin-top: 8px; font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 6px; }
.stat--accent { cursor: pointer; }
.stat--accent:hover { border-color: var(--accent-line); box-shadow: var(--sh-2); transform: translateY(-1px); }

/* small color accent strip option */
.tint-gold, .tint-accent { background: var(--accent-fill); color: var(--accent); }
.tint-violet { background: var(--violet-fill); color: var(--violet); }
.tint-green { background: var(--green-fill); color: var(--green); }
.tint-amber { background: var(--amber-fill); color: var(--amber); }
.tint-red { background: var(--red-fill); color: var(--red); }
.tint-blue { background: var(--blue-fill); color: var(--blue); }

/* badge / chip */
.badge { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.01em; padding: 2px 7px; border-radius: var(--r-1); border: 1px solid var(--line); color: var(--text-2); background: var(--panel); text-transform: lowercase; white-space: nowrap; }
.badge .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge--green { color: var(--green); background: var(--green-fill); border-color: transparent; }
.badge--amber { color: color-mix(in oklch, var(--amber) 78%, black 6%); background: var(--amber-fill); border-color: transparent; }
.badge--red { color: var(--red); background: var(--red-fill); border-color: transparent; }
.badge--violet { color: var(--violet); background: var(--violet-fill); border-color: transparent; }
.badge--blue { color: var(--blue); background: var(--blue-fill); border-color: transparent; }
.badge--gold, .badge--accent { color: var(--accent-2); background: var(--accent-fill); border-color: transparent; }
.badge--solid-red { color: #fff; background: var(--red); border-color: transparent; text-transform: uppercase; font-size: 9.5px; letter-spacing: 0.06em; }
.badge--ok { color: var(--green); background: var(--green-fill); border-color: transparent; text-transform: uppercase; font-size: 9.5px; letter-spacing: 0.06em; }
.badge--ghost { color: var(--text-2); background: var(--panel-2); border-color: var(--line-faint); text-transform: none; }

/* Segmented control (e.g. Son Analizler pre/live filter) */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-1); overflow: hidden; background: var(--panel-2); }
.seg__btn { appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: var(--text-3); font-family: inherit; font-size: 12px; padding: 7px 14px; cursor: pointer; }
.seg__btn + .seg__btn { border-left: 1px solid var(--line-faint); }
.seg__btn:hover:not(.is-active) { color: var(--text); }
.seg__btn.is-active { background: var(--accent); color: var(--accent-fg); }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: var(--r-2); font-size: 12.5px; color: var(--text-2); border: 1px solid var(--line); background: var(--panel); transition: background var(--d1), border-color var(--d1), color var(--d1); }
.chip:hover { border-color: var(--line-strong); color: var(--text); }
.chip.on { background: var(--accent-fill); border-color: var(--accent-line); color: var(--accent-2); font-weight: 550; }
.chip.on-v { background: var(--violet-fill); border-color: transparent; color: var(--violet); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 13px; border-radius: var(--r-2); font-size: 13px; font-weight: 550; border: 1px solid var(--line); background: var(--panel); color: var(--text); transition: background var(--d1), border-color var(--d1), transform var(--d1), box-shadow var(--d1); }
.btn:hover { background: var(--panel-2); border-color: var(--line-strong); }
.btn:active { transform: translateY(1px); }
.btn .ico { width: 15px; height: 15px; }
.btn--sm { padding: 6px 10px; font-size: 12px; }
.btn--primary { background: var(--ink); color: var(--ink-fg); border-color: transparent; font-weight: 600; box-shadow: var(--sh-1); }
.btn--primary:hover { background: var(--ink-2); }
.btn--accent, .btn--violet { background: var(--accent); color: var(--accent-fg); border-color: transparent; font-weight: 600; }
.btn--accent:hover, .btn--violet:hover { background: var(--accent-2); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--text-2); }
.btn--ghost:hover { background: var(--panel-2); color: var(--text); }
.btn--danger { background: transparent; border-color: color-mix(in oklch, var(--red) 40%, var(--line)); color: var(--red); }
.btn--danger:hover { background: var(--red-fill); }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

/* inputs */
.input, .select { width: 100%; padding: 8px 11px; border-radius: var(--r-2); background: var(--panel); border: 1px solid var(--line); color: var(--text); font-size: 13.5px; transition: border-color var(--d2), box-shadow var(--d2); }
.input::placeholder { color: var(--text-4); }
.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.select { cursor: pointer; -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23808699' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: 12px; color: var(--text-2); font-weight: 550; }
.field__hint { font-size: 11.5px; color: var(--text-4); }
.search { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border-radius: var(--r-2); background: var(--panel); border: 1px solid var(--line); transition: border-color var(--d2), box-shadow var(--d2); }
.search:focus-within { border-color: var(--accent); box-shadow: var(--ring); }
.search input { background: none; border: none; outline: none; width: 100%; font-size: 13.5px; }
.search .ico { color: var(--text-4); width: 16px; height: 16px; flex-shrink: 0; }

/* toggle */
.toggle { width: 38px; height: 22px; border-radius: 999px; background: var(--line-strong); border: none; position: relative; transition: background var(--d2); flex-shrink: 0; }
.toggle::after { content:""; position:absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--sh-1); transition: transform var(--d2); }
.toggle.on { background: var(--accent); }
.toggle.on::after { transform: translateX(16px); }

/* tabs */
.tabs { display: inline-flex; gap: 3px; padding: 3px; border-radius: var(--r-2); background: var(--inset); border: 1px solid var(--line); }
.tab { padding: 6px 13px; border-radius: 5px; font-size: 12.5px; color: var(--text-3); font-weight: 550; transition: background var(--d1), color var(--d1); }
.tab:hover { color: var(--text); }
.tab.on { background: var(--panel); color: var(--text); box-shadow: var(--sh-1); }
.tab .cnt { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-4); margin-left: 6px; }

/* table */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-4); font-weight: 500; padding: 14px 16px 10px; border-bottom: 1px solid var(--line); }
.tbl th.r, .tbl td.r { text-align: right; }
.tbl td { padding: 0 16px; height: var(--row-h); border-bottom: 1px solid var(--line-faint); color: var(--text-2); vertical-align: middle; }
.tbl tbody tr { transition: background var(--d1); }
.tbl tbody tr:hover { background: var(--panel-2); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl .strong { color: var(--text); font-weight: 600; }
.tbl .mono { font-family: var(--font-mono); font-size: 12px; }
.link { color: var(--accent); font-weight: 550; }
.link:hover { text-decoration: underline; }
.link-v { color: var(--violet); font-weight: 550; }
.link-v:hover { text-decoration: underline; }

.lrow { display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-bottom: 1px solid var(--line-faint); transition: background var(--d1); }
.lrow:last-child { border-bottom: none; }
.lrow:hover { background: var(--panel-2); }

.bar { height: 7px; border-radius: 999px; background: var(--inset); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: var(--violet); }

.code { font-family: var(--font-mono); font-size: 11.5px; line-height: 1.55; color: var(--text-2); background: var(--inset); border: 1px solid var(--line); border-radius: var(--r-2); padding: 12px 14px; overflow-x: auto; white-space: pre; }
.logline { font-family: var(--font-mono); font-size: 11.5px; line-height: 1.5; color: var(--text-2); padding: 7px 14px; display: flex; gap: 12px; border-bottom: 1px solid var(--line-faint); }
.logline:hover { background: var(--inset); }
.logline .ts { color: var(--text-4); white-space: nowrap; }

.callout { display: flex; gap: 12px; padding: 13px 15px; border-radius: var(--r-3); border: 1px solid var(--line); background: var(--panel); }
.callout .ico { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.callout__t { font-weight: 650; font-size: 13px; margin-bottom: 3px; color: var(--text); }
.callout__d { font-size: 12.5px; color: var(--text-3); line-height: 1.5; }
.callout--gold, .callout--accent { border-color: var(--accent-line); background: var(--accent-fill); }
.callout--gold .ico, .callout--accent .ico { color: var(--accent); }
.callout--violet { border-color: color-mix(in oklch, var(--violet) 28%, transparent); background: var(--violet-fill); }
.callout--violet .ico { color: var(--violet); }
.callout--red { border-color: color-mix(in oklch, var(--red) 32%, transparent); background: var(--red-fill); }
.callout--red .ico { color: var(--red); }

.empty { text-align: center; padding: 44px 20px; color: var(--text-3); }
.empty h4 { margin: 0 0 6px; color: var(--text-2); font-size: 14px; font-weight: 600; }
.empty p { margin: 0; font-size: 12.5px; }

.frow { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; border-bottom: 1px solid var(--line-faint); }
.frow:last-child { border-bottom: none; }
.frow__l { min-width: 0; }
.frow__t { font-size: 13.5px; font-weight: 600; color: var(--text); }
.frow__d { font-size: 12px; color: var(--text-3); margin-top: 3px; max-width: 52ch; line-height: 1.45; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--panel); overflow: hidden; }
.stepper input { width: 56px; text-align: center; background: none; border: none; outline: none; font-family: var(--font-mono); font-size: 13px; padding: 8px 4px; }
.stepper button { width: 26px; height: 34px; color: var(--text-3); border-left: 1px solid var(--line-faint); }
.stepper button:hover { background: var(--panel-2); color: var(--text); }

.subhead { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 650; margin: 4px 0 2px; }
.subhead .ico { color: var(--text-3); width: 16px; height: 16px; }
.hr { height: 1px; background: var(--line-faint); border: none; margin: 0; }

/* =========================================================================
   AUTH / PROJECTS (full-screen stages)
   ========================================================================= */
.stage { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px;
  background:
    radial-gradient(110% 80% at 50% -10%, var(--accent-fill), transparent 55%),
    radial-gradient(80% 60% at 50% 120%, var(--violet-fill), transparent 50%),
    var(--bg);
}
.authcard { width: 100%; max-width: 392px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-4); padding: 34px 32px; box-shadow: var(--sh-3); text-align: center; animation: pop .4s var(--ease-spring); }
@keyframes pop { from { transform: scale(.97) translateY(8px); } to { transform: none; } }
.authlogo { width: 50px; height: 50px; margin: 0 auto 18px; border-radius: 13px; display: grid; place-items: center; background: var(--ink); color: var(--ink-fg); box-shadow: var(--sh-2); }
.authcard h2 { margin: 0 0 5px; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.authcard .sub { color: var(--text-3); font-size: 13px; margin: 0 0 22px; }
.oauth-btn { display: flex; align-items: center; justify-content: center; gap: 11px; width: 100%; padding: 11px; border-radius: var(--r-2); font-size: 14px; font-weight: 600; margin-bottom: 10px; transition: transform var(--d1), box-shadow var(--d1), background var(--d1); }
.oauth-btn:hover { transform: translateY(-1px); box-shadow: var(--sh-2); }
.oauth-btn:active { transform: translateY(0); }
.oauth-google { background: var(--panel); color: var(--text); border: 1px solid var(--line-strong); }
.oauth-apple { background: var(--ink); color: var(--ink-fg); }
.authnote { font-size: 11.5px; color: var(--text-4); line-height: 1.7; margin-top: 16px; }
.otp { display: flex; gap: 10px; justify-content: center; margin: 4px 0 20px; }
.otp input { width: 46px; height: 56px; text-align: center; font-family: var(--font-mono); font-size: 22px; border-radius: var(--r-2); background: var(--panel); border: 1px solid var(--line-strong); color: var(--text); transition: border-color var(--d2), box-shadow var(--d2); }
.otp input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.otp input.filled { border-color: var(--accent); }

.projwrap { width: 100%; max-width: 960px; }
.projhead { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; }
.projhead .eyebrow { color: var(--accent); margin-bottom: 8px; }
.projhead h1 { margin: 0; font-size: 42px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; font-family: var(--font-display); }
.projhead .cnt { margin: 10px 0 0; color: var(--text-3); font-size: 14px; }
.projgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.projcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-4); padding: 22px; transition: border-color var(--d2), transform var(--d2), box-shadow var(--d2); cursor: pointer; text-align: left; display: flex; flex-direction: column; min-height: 220px; position: relative; overflow: hidden; }
.projcard:hover { border-color: var(--accent-line); transform: translateY(-3px); box-shadow: var(--sh-3); }
.projcard__logo { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; font-size: 25px; background: var(--ink); color: var(--ink-fg); }
.projcard__tag { position: absolute; top: 22px; right: 22px; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); background: var(--inset); border: 1px solid var(--line); padding: 3px 8px; border-radius: var(--r-pill); }
.projcard h3 { margin: 16px 0 12px; font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.projcard__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.projcard--new { border-style: dashed; border-color: var(--line-strong); align-items: flex-start; justify-content: center; }
.projcard--new:hover { border-color: var(--accent-line); }
.projcard--new .plus { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-fill); color: var(--accent); }

#tweaks-root { position: fixed; right: 18px; bottom: 18px; z-index: 90; }

/* v3 console: TOTP step-up modal overlay (Layer 4). */
.stepup-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center;padding:20px;z-index:1000}
