/* stallkit web UI - tokens, reset, layout and shared components.
   Page-specific styles belong in css/pages/<page>.css. */

/* The video's typefaces (its fonts.ts), bundled so every computer draws the same text:
   Inter for the interface, Plus Jakarta Sans for headings and big numbers, JetBrains Mono
   for file names and codes. These are the exact files the video rendered with (Google
   Fonts' latin and latin-ext subsets; latin-ext carries ğ ş İ). Each is a variable font,
   so one file draws every weight in its range. SIL OFL 1.1: see ../fonts/OFL.txt. */
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-latin-ext.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin-ext.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Before Inter arrives (font-display: swap) or where it cannot load, UI text falls back to
   the system face. Windows' plain "Segoe UI" (which system-ui resolves to) has no medium
   face: it draws weight 500 as Semibold. Windows 11's Segoe UI Variable, taken through its
   weight axis, draws every weight the video uses (400/500/600/700). local() only: where
   it is not installed this face fails quietly and the next family in the stack is used. */
@font-face {
  font-family: "stallkit UI";
  src: local("Segoe UI Variable Text");
  font-weight: 400 700;
  font-style: normal;
}

:root {
  /* The video's palette (theme.ts): slightly blue-tinted; the sidebar is card-coloured. */
  --bg: #0a0c11;
  --sidebar: #11141b;
  --panel: #11141b;
  --panel-2: #161a23;
  --panel-3: #1c212c;
  --border: #252b39;
  --border-soft: #1d2230;
  --border-2: #2f3647;
  --text: #eceef3;
  --text-2: #b7bcc9;
  --muted: #7f869a;
  --accent: #7b6cff;
  --accent-2: #a89cff;
  --accent-soft: rgba(123, 108, 255, 0.14);
  --success: #2fd6a3;
  --success-soft: rgba(47, 214, 163, 0.14);
  --warning: #f5b544;
  --warning-soft: rgba(245, 181, 68, 0.14);
  --danger: #f26d6d;
  --danger-soft: rgba(242, 109, 109, 0.14);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 14px;

  /* Derived tokens (not in the spec list; used by several components). */
  --info: #5ab8ff;
  --info-soft: rgba(90, 184, 255, 0.14);
  --muted-2: #5c6376;
  --accent-line: rgba(123, 108, 255, 0.45);
  --hover: rgba(255, 255, 255, 0.035);
  /* UI text is Inter, headings and big numbers Plus Jakarta Sans, file names JetBrains
     Mono (the video's fonts.ts, bundled above). Each falls back to the system face until
     its file has loaded ("stallkit UI" above first, for its real weight 500 on Windows 11). */
  --font: "Inter", "stallkit UI", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Plus Jakarta Sans", var(--font);
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  /* Plus Jakarta Sans sets words close together; the video widens them by .09em on every
     display-face text (BrowserFrame.tsx). */
  --display-word-spacing: 0.09em;
  --sidebar-w: 232px;
  --topbar-h: 67px;
  --pad-x: 32px;
  --pad-y: 24px;
  --shadow-pop: 0 18px 50px rgba(0, 0, 0, 0.5), 0 2px 10px rgba(0, 0, 0, 0.35);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

/* ------------------------------------------------------------------ reset */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
  margin: 0;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
/* Headings and big numbers in the display face (brand, page titles, card titles, stat
   values, score rings...): the video draws each of them in DISPLAY_FONT. */
.font-display,
.brand-name,
.page-title,
.fullpage-title,
.modal-title,
.empty-title,
.toast-title,
.stat-value,
.card-title,
.score-num {
  font-family: var(--font-display);
  word-spacing: var(--display-word-spacing);
}
h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}
ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
img,
svg {
  display: block;
}
img {
  max-width: 100%;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}
button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
a {
  color: var(--accent-2);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
[hidden] {
  display: none !important;
}
::selection {
  background: rgba(123, 108, 255, 0.35);
}
:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}
:focus:not(:focus-visible) {
  outline: none;
}
* {
  scrollbar-width: thin;
  scrollbar-color: #2a2d37 transparent;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-thumb {
  background: #262933;
  border-radius: 10px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background-color: #323643;
}
::-webkit-scrollbar-track {
  background: transparent;
}

.icon .f {
  fill: currentColor;
  stroke: none;
}
.num,
.tabular {
  font-variant-numeric: tabular-nums;
  white-space: nowrap !important;
}
.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.93em;
}
.muted {
  color: var(--muted);
}
.text-2 {
  color: var(--text-2);
}
.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.tone-success {
  --tone: var(--success);
  --tone-soft: var(--success-soft);
}
.tone-warning {
  --tone: var(--warning);
  --tone-soft: var(--warning-soft);
}
.tone-danger {
  --tone: var(--danger);
  --tone-soft: var(--danger-soft);
}
.tone-accent {
  --tone: var(--accent-2);
  --tone-soft: var(--accent-soft);
}
.tone-info {
  --tone: var(--info);
  --tone-soft: var(--info-soft);
}
.tone-neutral {
  --tone: var(--text-2);
  --tone-soft: rgba(255, 255, 255, 0.06);
}
.tone-muted {
  --tone: var(--muted);
  --tone-soft: rgba(255, 255, 255, 0.05);
}

/* ------------------------------------------------------------------ app shell */

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  transform: translateY(-150%);
  transition: transform 0.15s;
}
.skip-link:focus {
  transform: none;
  text-decoration: none;
}

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11.5px;
  height: var(--topbar-h);
  flex: none;
  padding: 0 20px 0 25px;
  color: var(--text);
}
.brand:hover {
  text-decoration: none;
}
/* The mark (icons.js logoMark): a violet gradient tile, drawn here; the cards inside
   are an SVG that fills it. */
.logo-tile {
  display: inline-block;
  flex: none;
  border-radius: 28.6%;
  background: linear-gradient(135deg, #a89cff, #7b6cff);
}
.logo-tile svg {
  width: 100%;
  height: 100%;
}
.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.brand-name {
  font-size: 15.8px;
  font-weight: 700;
  letter-spacing: -0.18px;
  line-height: 1.2;
}
.brand-tag {
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.3;
}

.nav {
  display: flex;
  flex-direction: column;
  padding: 12px 10.5px 0 21px;
}
.nav-setup {
  margin-top: auto;
  padding-top: 24px;
}
.nav-label {
  font-size: 10.1px;
  font-weight: 700;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--muted-2);
  padding: 0 0 7.5px 10.5px;
}
.nav-list {
  display: flex;
  flex-direction: column;
  gap: 3.5px;
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10.5px;
  height: 37px;
  padding: 0 10.5px;
  border-radius: 9px;
  color: var(--text-2);
  font-size: 13.2px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.nav-item .icon {
  color: var(--muted);
  flex: none;
  transition: color 0.15s;
}
.nav-item:hover {
  background: var(--hover);
  color: var(--text);
  text-decoration: none;
}
.nav-item:hover .icon {
  color: var(--text-2);
}
.nav-item[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
}
.nav-item[aria-current="page"] .icon {
  color: var(--accent-2);
}
.nav-item[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -10.5px;
  top: 8.8px;
  bottom: 8.8px;
  width: 2.6px;
  border-radius: 2px;
  background: var(--accent);
}
.nav-item .nav-busy {
  margin-left: auto;
}

.shop-area {
  flex: none;
  padding: 14px 10.5px 14px 21px;
}
.shop-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10.5px;
  width: 100%;
  padding: 10.5px 12.3px;
  border-radius: 10.5px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.shop-card:hover,
.shop-card[aria-expanded="true"] {
  border-color: var(--border-2);
  background: #1a1f2a;
}
.shop-icon {
  width: 31.6px;
  height: 31.6px;
  flex: none;
  border-radius: 8.8px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #3a3f4c, #262a34);
  color: var(--text-2);
}
.shop-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.shop-name {
  font-size: 12.3px;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shop-state {
  display: flex;
  align-items: center;
  gap: 5.3px;
  font-size: 11px;
  line-height: 1.35;
  white-space: nowrap; /* "Connected to Etsy" on one line, as "Etsy'ye bağlı" */
  color: var(--tone, var(--muted));
}
.shop-state .dot {
  width: 6px;
  height: 6px;
}
/* Not connected: the text in the muted grey, the dot a darker one (the video's shop card). */
.shop-state.tone-muted .dot {
  background: var(--muted-2);
}
.shop-chev {
  margin-left: -4px; /* the state line's room (Inter is a little wider) */
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.15s;
}
.shop-card:hover .shop-chev,
.shop-card:focus-visible .shop-chev,
.shop-card[aria-expanded="true"] .shop-chev {
  opacity: 1;
}
.trademark {
  margin-top: 10px;
  padding: 0 2px;
  font-size: 9.5px;
  line-height: 1.4;
  color: var(--muted-2);
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--topbar-h);
  flex: none;
  padding: 0 var(--pad-x);
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg);
}
.topbar-titles {
  min-width: 0;
  flex: 1 1 auto;
}
.page-title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.26px;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page-subtitle {
  margin-top: 1.8px;
  font-size: 12.3px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: none;
}
.page-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-actions:empty {
  display: none;
}

/* The new-version pill (top bar, before the bell) and its "What's new?" dialog. */
.update-slot {
  display: flex;
  min-width: 0;
}
.update-pill {
  display: inline-flex;
  align-items: stretch;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
}
.update-pill-main,
.update-pill-notes,
.update-pill-x {
  display: inline-flex;
  align-items: center;
  transition: background 0.15s, color 0.15s;
}
.update-pill-main {
  gap: 6px;
  padding: 0 11px 0 12px;
  color: var(--text);
  font-weight: 500;
}
.update-pill-main .icon {
  color: var(--accent-2);
}
.update-pill-version {
  font-variant-numeric: tabular-nums;
}
.update-pill-sep {
  color: var(--muted);
}
.update-pill-main b {
  font-weight: 600;
  color: var(--accent-2);
}
.update-pill-notes {
  padding: 0 11px;
  border-left: 1px solid rgba(123, 108, 255, 0.28);
  color: var(--text-2);
  font-size: 12.5px;
}
.update-pill-x {
  justify-content: center;
  width: 30px;
  border-left: 1px solid rgba(123, 108, 255, 0.28);
  color: var(--muted);
}
.update-pill-main:hover,
.update-pill-notes:hover,
.update-pill-x:hover {
  background: rgba(123, 108, 255, 0.12);
  color: var(--text);
  text-decoration: none;
}
.update-pill :focus-visible {
  outline-offset: -2px;
}
.update-notes {
  max-height: min(52vh, 420px);
  overflow-y: auto;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.update-pill.is-compact .update-pill-label,
.update-pill.is-tight .update-pill-notes {
  display: none; /* app.js: the page title would be cut otherwise */
}
@media (max-width: 1100px) {
  .update-pill-label {
    display: none;
  }
}
@media (max-width: 860px) {
  .update-pill-notes {
    display: none;
  }
}
.content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: var(--pad-y) var(--pad-x);
  scroll-behavior: auto;
}
/* Each page root is a vertical stack with a 16px rhythm; a page can switch it to its own
   grid/flex layout in its page css (.page-<name> { ... }). */
.page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.page-loading {
  display: grid;
  place-items: center;
  min-height: 240px;
}
.page-loading.is-stuck {
  align-content: center;
  gap: 16px;
}
.page-loading.is-stuck .note {
  max-width: 560px;
}
.banner-slot:empty {
  display: none;
}
.banner-slot {
  margin-bottom: 16px;
}

/* Notifications dropdown */
.popover.notif-pop {
  padding: 0;
  overflow: hidden;
}
.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 10px 16px;
  border-bottom: 1px solid var(--border);
}
.notif-head h2 {
  font-size: 13.5px;
  font-weight: 600;
}
.notif-list {
  max-height: min(440px, 70vh);
  overflow-y: auto;
  padding: 6px;
}
.notif-item {
  display: flex;
  gap: 11px;
  width: 100%;
  padding: 10px;
  border-radius: 9px;
  text-align: left;
  color: var(--text);
}
button.notif-item:hover {
  background: var(--hover);
}
.notif-item .icon-tile {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}
.notif-text {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.4;
}
.notif-time {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
}
.notif-dot {
  flex: none;
  width: 7px;
  height: 7px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 8px rgba(168, 156, 255, 0.7);
}
.notif-item.is-unread {
  background: rgba(123, 108, 255, 0.06);
}
.notif-empty {
  padding: 28px 16px;
}

/* Full-page messages (no session, quit, fatal). */
.fullpage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background: radial-gradient(ellipse at 50% 42%, rgba(123, 108, 255, 0.12), transparent 60%), var(--bg);
}
.fullpage-box {
  max-width: 520px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.fullpage-box .logo-tile {
  margin-bottom: 8px;
}
.fullpage-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.fullpage-msg {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-2);
}
.fullpage-msg + .fullpage-msg {
  color: var(--muted);
  font-size: 13.5px;
}

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.btn:hover {
  text-decoration: none;
}
.btn:active:not(:disabled) {
  transform: translateY(0.5px);
}
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.btn[aria-busy="true"] {
  cursor: progress;
  opacity: 0.9;
}
.btn .icon {
  flex: none;
}
.btn-sm {
  height: 30px;
  padding: 0 10px;
  gap: 6px;
  font-size: 12.5px;
  border-radius: 8px;
}
.btn-lg {
  height: 46px;
  padding: 0 20px;
  gap: 9px;
  font-size: 15px;
  border-radius: 12px;
}
.btn-block {
  width: 100%;
}
.btn-primary {
  background: linear-gradient(180deg, #8475ff 0%, #7767fe 100%);
  border-color: rgba(255, 255, 255, 0.07);
  color: #fff;
  box-shadow: 0 6px 22px -8px rgba(123, 108, 255, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #8f83ff 0%, #7e6fff 100%);
  box-shadow: 0 8px 26px -8px rgba(123, 108, 255, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn-primary:disabled {
  box-shadow: none;
}
/* The video's outlined ("ghost") Button: transparent, a dim border, a grey label, so it
   never reads as a second primary action (Filtrele, CSV içe aktar, İlanları yenile). */
.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text-2);
}
.btn-secondary:hover:not(:disabled),
.btn-secondary.is-active {
  background: var(--hover);
  border-color: var(--border-2);
  color: var(--text);
}
.btn-ghost {
  background: transparent;
  color: var(--text-2);
}
.btn-ghost:hover:not(:disabled),
.btn-ghost.is-active {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}
/* The video's "soft" button: a violet tint, lavender text, no border. */
.btn-soft {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent-2);
}
.btn-soft:hover:not(:disabled),
.btn-soft.is-active {
  background: rgba(123, 108, 255, 0.2);
}
.btn-danger {
  background: var(--danger-soft);
  border-color: rgba(242, 109, 109, 0.3);
  color: #ff8a8a;
}
.btn-danger:hover:not(:disabled) {
  background: rgba(242, 109, 109, 0.2);
  border-color: rgba(242, 109, 109, 0.45);
}
.btn-success {
  background: var(--success-soft);
  border-color: rgba(47, 214, 163, 0.3);
  color: var(--success);
}
.btn-success:hover:not(:disabled) {
  background: rgba(47, 214, 163, 0.18);
}
.btn-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 11.5px;
  font-weight: 700;
}
.btn-secondary .btn-count,
.btn-ghost .btn-count {
  background: var(--panel-3);
  color: var(--text-2);
}
.btn-icon {
  position: relative;
  width: 36px;
  padding: 0;
}
.btn-secondary.btn-icon,
.btn-ghost.btn-icon {
  color: var(--text-2);
}
.btn-secondary.btn-icon:hover:not(:disabled),
.btn-ghost.btn-icon:hover:not(:disabled) {
  color: var(--text);
}
.btn-icon.btn-sm {
  width: 30px;
}
.btn-icon.btn-lg {
  width: 46px;
}
.btn-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
}
/* The top bar's bell: a quiet outlined square with a muted glyph (the video's AppShell). */
.btn-icon.topbar-bell {
  width: 35px;
  height: 35px;
  border-radius: 10.5px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
}
.btn-icon.topbar-bell:hover:not(:disabled),
.btn-icon.topbar-bell:focus-visible,
.btn-icon.topbar-bell[aria-expanded="true"] {
  border-color: var(--border-2);
  background: var(--hover);
  color: var(--text-2);
}
.copy-field .btn.is-done {
  color: var(--success);
}

.spinner {
  display: inline-block;
  flex: none;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-top-color: currentColor;
  animation: sk-spin 0.75s linear infinite;
}
.spinner.tone-accent {
  color: var(--accent-2);
  border-color: rgba(168, 156, 255, 0.22);
  border-top-color: var(--accent-2);
}
@keyframes sk-spin {
  to {
    transform: rotate(360deg);
  }
}

.kbd {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 5px;
  border: 1px solid var(--border-2);
  background: var(--panel-2);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1;
}

/* ------------------------------------------------------------------ badges & dots */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--tone-soft, rgba(255, 255, 255, 0.06));
  color: var(--tone, var(--text-2));
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap !important;
  flex-shrink: 0;
}
.badge-sm {
  height: 20px;
  padding: 0 7px;
  font-size: 11px;
}
.badge-lg {
  height: 30px;
  padding: 0 12px;
  font-size: 13px;
}
.badge .dot {
  width: 6px;
  height: 6px;
}
.dot {
  display: inline-block;
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tone, currentColor);
}
.badge .dot {
  background: currentColor;
}

/* ------------------------------------------------------------------ cards */

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  min-width: 0;
}
.card-pad {
  padding: 20px;
}
.card-pad-sm {
  padding: 14px;
}
.card-pad-lg {
  padding: 24px;
}
.card-flush > .card-head {
  padding: 16px 20px;
  margin: 0;
  border-bottom: 1px solid var(--border);
}
.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.card-titles {
  flex: 1;
  min-width: 0;
}
.card-title {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.card-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}
.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.card-foot {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.icon-tile {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--tone-soft, var(--panel-3));
  color: var(--tone, var(--text-2));
  border: 1px solid rgba(255, 255, 255, 0.04);
}
.icon-tile-sm {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}
.icon-tile.tone-neutral {
  background: var(--panel-3);
  color: var(--text-2);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.section-title h3 {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.note {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--tone-soft);
  border: 1px solid color-mix(in srgb, var(--tone) 22%, transparent);
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.5;
}
.note.tone-neutral {
  background: var(--panel-2);
  border-color: var(--border);
}
.note-icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  color: var(--tone);
  background: color-mix(in srgb, var(--tone) 14%, transparent);
}
.note-text {
  flex: 1;
  min-width: 0;
}
.note-text strong,
.note-text b {
  color: var(--text);
  font-weight: 700;
}
.note-action {
  flex: none;
}

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 48px 24px;
}
.empty-compact {
  padding: 24px 16px;
}
.empty-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
  border-radius: 14px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--muted);
}
.empty-compact .empty-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  margin-bottom: 4px;
}
.empty-title {
  font-size: 15px;
  font-weight: 600;
}
.empty-compact .empty-title {
  font-size: 13.5px;
}
.empty-msg {
  max-width: 420px;
  font-size: 13px;
  color: var(--muted);
}
.empty-action {
  margin-top: 12px;
}

.skeleton-group {
  display: flex;
  flex-direction: column;
}
.skeleton {
  display: block;
  border-radius: 6px;
  background: linear-gradient(90deg, #1b1d25 0%, #252834 40%, #1b1d25 80%);
  background-size: 300% 100%;
  animation: sk-shimmer 1.5s ease-in-out infinite;
}
@keyframes sk-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -50% 0;
  }
}

.thumb {
  display: inline-grid;
  place-items: center;
  flex: none;
  overflow: hidden;
  border-radius: 8px;
  background: var(--panel-3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--muted);
}
.thumb img {
  width: 100%;
  height: 100%;
}

/* ------------------------------------------------------------------ chips & tabs */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 31px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.chip:hover:not(:disabled) {
  background: var(--hover);
  color: var(--text);
}
.chip.is-active {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--text);
  font-weight: 600;
}
.chip-count {
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 500;
}
.chip.is-active .chip-count {
  color: var(--accent-2);
}

.tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--border);
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 34px;
  padding: 0 13px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.tab:hover:not(.is-active) {
  color: var(--text-2);
}
.tab.is-active {
  background: var(--panel-3);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.tab-count {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 21px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--panel-3);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}
/* t250 / t280: the active tab's count is a solid violet pill */
.tab.is-active .tab-count {
  background: var(--accent);
  color: #fff;
}
.tabs-sm .tab {
  height: 28px;
  padding: 0 10px;
  font-size: 12.5px;
}

/* ------------------------------------------------------------------ form controls */

.input,
.input-affix,
.select,
.search {
  background: var(--panel);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.input {
  display: block;
  width: 100%;
  height: 38px;
  padding: 0 12px;
  font-size: 13.5px;
  outline: none;
}
.input::placeholder,
.search-input::placeholder {
  color: var(--muted-2);
}
.input:hover,
.input-affix:hover,
.select:hover,
.search:hover {
  border-color: #3a3e4a;
}
.input:focus,
.input-affix:focus-within,
.select:focus-within,
.search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(123, 108, 255, 0.18);
  outline: none;
}
.input:disabled,
.input[readonly] {
  color: var(--text-2);
}
.input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.input.align-right {
  text-align: right;
}
.input-sm {
  height: 32px;
  font-size: 12.5px;
}
.input-lg {
  height: 44px;
  font-size: 15px;
}
.textarea {
  height: auto;
  min-height: 80px;
  padding: 10px 12px;
  line-height: 1.5;
  resize: vertical;
}
.input-affix {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  cursor: text;
}
.input-affix .input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}
.input-affix.input-sm {
  height: 32px;
}
.input-affix.input-lg {
  height: 44px;
}
.input-affix.is-disabled {
  opacity: 0.6;
}
.affix,
.affix-icon {
  flex: none;
  color: var(--muted);
  font-size: 12px;
}
.affix-suf {
  font-family: var(--mono);
  font-size: 11.5px;
}
.input[aria-invalid="true"],
.field.has-error .input-affix,
.field.has-error .select {
  border-color: rgba(242, 109, 109, 0.6);
}

.select {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 38px;
  padding: 0 34px 0 12px;
  min-width: 0;
}
.select-sm {
  height: 32px;
}
.select-prefix {
  flex: none;
  color: var(--muted);
  font-size: 13px;
}
.select-native {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  min-width: 0;
  flex: 1;
  height: 100%;
  cursor: pointer;
  padding: 0;
}
.select-native option {
  background: var(--panel-2);
  color: var(--text);
}
.select-chev {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.select.is-disabled {
  opacity: 0.6;
}

.search {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 38px;
  padding: 0 8px 0 12px;
  min-width: 220px;
  cursor: text;
  color: var(--muted);
}
.search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 13.5px;
}
.search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}
.search .kbd {
  flex: none;
}
.search:focus-within .kbd,
.search.has-value .kbd {
  visibility: hidden;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.field-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}
.field-req {
  color: var(--danger);
}
.field-aside {
  font-size: 11.5px;
  color: var(--muted);
}
.field-hint {
  font-size: 12px;
  color: var(--muted);
}
.field-error {
  font-size: 12px;
  color: var(--danger);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: var(--text);
  border-radius: 8px;
}
.toggle:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.toggle-track {
  position: relative;
  flex: none;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: var(--panel-3);
  border: 1px solid var(--border-2);
  transition: background 0.18s, border-color 0.18s;
}
.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #c9ccd6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: transform 0.18s var(--ease), background 0.18s;
}
.toggle.is-on .toggle-track {
  background: var(--accent);
  border-color: var(--accent);
}
.toggle.is-on .toggle-thumb {
  transform: translateX(18px);
  background: #fff;
}
.toggle-text {
  display: flex;
  flex-direction: column;
}
.toggle-label {
  font-size: 13.5px;
  font-weight: 500;
}
.toggle-sub {
  font-size: 12px;
  color: var(--muted);
}

.checkbox {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin: 0;
  border-radius: 5px;
  border: 1.5px solid #454957;
  background: transparent;
  cursor: pointer;
  vertical-align: middle;
  transition: background 0.12s, border-color 0.12s;
}
.checkbox:hover:not(:disabled) {
  border-color: var(--accent-2);
}
.checkbox:checked,
.checkbox:indeterminate {
  background: var(--accent);
  border-color: var(--accent);
}
.checkbox:checked::after {
  content: "";
  width: 9px;
  height: 5px;
  margin-top: -2px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg);
}
.checkbox:indeterminate::after {
  content: "";
  width: 8px;
  height: 2px;
  border-radius: 1px;
  background: #fff;
}
.checkbox:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.check-row {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  cursor: pointer;
}
.check-row.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.copy-field {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 4px 0;
  background: var(--panel);
  border: 1px solid var(--border-2);
  border-radius: 10px;
}
.copy-field .input {
  border: 0;
  background: transparent;
  box-shadow: none;
  height: 30px;
  min-width: 0;
}
.copy-field:focus-within {
  border-color: var(--accent);
}

/* ------------------------------------------------------------------ dropzone */

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 220px;
  padding: 32px 24px;
  border-radius: var(--radius-lg);
  border: 1.5px dashed var(--border-2);
  background: radial-gradient(ellipse at 50% 30%, rgba(123, 108, 255, 0.07), transparent 65%), var(--panel);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.dropzone:hover {
  border-color: #3d4150;
}
.dropzone.is-over {
  border-color: var(--accent);
  background: radial-gradient(ellipse at 50% 30%, rgba(123, 108, 255, 0.16), transparent 70%), var(--panel);
  box-shadow: 0 0 0 4px rgba(123, 108, 255, 0.12);
}
.dropzone.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.dropzone.is-reading {
  cursor: progress;
}
.dropzone-compact {
  min-height: 120px;
  padding: 20px;
}
.dropzone-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 10px;
  border-radius: 18px;
  background: linear-gradient(180deg, #23243a, #1a1b2a);
  border: 1px solid rgba(168, 156, 255, 0.18);
  color: var(--accent-2);
  box-shadow: 0 10px 40px -10px rgba(123, 108, 255, 0.55);
}
.dropzone-compact .dropzone-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  margin-bottom: 4px;
}
.dropzone-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.dropzone-compact .dropzone-title {
  font-size: 14px;
}
.dropzone-sub {
  font-size: 13px;
  color: var(--muted);
}

/* ------------------------------------------------------------------ table */

.tbl-wrap {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: auto;
}
.card .tbl-wrap {
  border: 0;
  border-radius: 0;
  background: transparent;
}
.tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 13.5px;
}
.tbl th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 42px;
  padding: 0 14px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  /* The video's column heads: 13px, 600, 0.6px apart (primitives TH, SiparislerEkrani
     HeadCell, KarZararEkrani PHead, IlanlarEkrani HeadCell), at the app's scale. */
  font-size: 11.4px;
  font-weight: 600;
  letter-spacing: 0.53px;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}
.tbl td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tbl tbody tr:last-child td {
  border-bottom: 0;
}
.tbl .align-right {
  text-align: right;
  white-space: nowrap !important;
  font-variant-numeric: tabular-nums;
}
.tbl .align-center {
  text-align: center;
}
.tbl .tbl-check {
  width: 48px;
  padding-left: 16px;
  padding-right: 0;
  position: relative;
}
.tbl tbody tr {
  transition: background 0.12s;
}
.tbl tbody tr:hover:not(.tbl-empty):not(.tbl-skel) {
  background: rgba(255, 255, 255, 0.022);
}
.tbl tbody tr.is-clickable {
  cursor: pointer;
}
.tbl tbody tr.is-selected {
  background: rgba(123, 108, 255, 0.045);
}
.tbl tbody tr.is-selected td:first-child {
  box-shadow: inset 2px 0 0 var(--accent);
}
.tbl tbody tr:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: -2px;
}
.tbl-empty td {
  padding: 0;
}
.cell-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.cell-title {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cell-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pagination {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.page-btn {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  transition: background 0.12s, color 0.12s;
}
.page-btn:hover:not(:disabled):not(.is-active) {
  background: var(--hover);
  color: var(--text);
}
.page-btn.is-active {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--text);
}
.page-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.page-gap {
  color: var(--muted);
  padding: 0 4px;
}

/* ------------------------------------------------------------------ stepper */

.stepper {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.step {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  min-width: 0;
}
.step-circle {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--border-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.step.is-done .step-circle {
  background: var(--success);
  border-color: var(--success);
  color: #06291d;
}
.step.is-current .step-circle {
  border: 2px solid var(--accent);
  color: var(--text);
  background: var(--accent-soft);
  box-shadow: 0 0 0 4px rgba(123, 108, 255, 0.1);
}
.step.is-error .step-circle {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}
.step-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.step-label {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
}
.step.is-todo .step-label {
  color: var(--text-2);
}
.step-sub {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}
.step.is-done .step-sub {
  color: var(--success);
}
.step.is-current .step-sub {
  color: var(--accent-2);
}
.step.is-error .step-sub {
  color: var(--danger);
}
.step-line {
  flex: 1;
  min-width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--border-2);
}
.step-line.is-done {
  background: color-mix(in srgb, var(--success) 60%, transparent);
}

/* ------------------------------------------------------------------ score ring */

.score-ring {
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
}
.score-ring svg {
  position: absolute;
  inset: 0;
}
.score-track {
  fill: none;
  stroke: #262833;
}
.score-arc {
  fill: none;
  stroke: var(--tone, var(--muted));
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s var(--ease), stroke 0.3s;
}
.score-fill {
  fill: color-mix(in srgb, var(--tone, var(--muted)) 7%, #15161c);
}
.score-ring.tone-neutral .score-fill {
  fill: #17181e;
}
.score-num {
  position: relative;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* ------------------------------------------------------------------ progress */

.progress {
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--panel-3);
  overflow: hidden;
}
.progress-sm {
  height: 4px;
}
.progress-lg {
  height: 8px;
}
.progress-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--tone, var(--accent));
  transition: width 0.35s var(--ease);
}
.progress.tone-accent .progress-fill {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}
.progress.is-indeterminate .progress-fill {
  position: absolute;
  width: 35%;
  animation: sk-indeterminate 1.2s ease-in-out infinite;
}
@keyframes sk-indeterminate {
  0% {
    left: -35%;
  }
  100% {
    left: 100%;
  }
}

/* ------------------------------------------------------------------ step dots (pipeline) */

.stepdots {
  display: grid;
  align-items: center;
  width: 100%;
}
.sd {
  position: relative;
  display: grid;
  place-items: center;
  height: 26px;
}
.sd.has-next::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 1.5px;
  transform: translateY(-50%);
  background: #2a2d37;
  z-index: 0;
}
.sd.line-done::after {
  background: color-mix(in srgb, var(--success) 65%, transparent);
}
.sd-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3a3d49;
  box-shadow: 0 0 0 4px var(--panel);
}
.sd.is-done .sd-dot,
.sd.is-warn .sd-dot,
.sd.is-error .sd-dot,
.sd.is-running .sd-dot {
  width: 24px;
  height: 24px;
  box-shadow: 0 0 0 3px var(--panel);
}
.sd.is-done .sd-dot {
  background: #13302a;
  border: 1.5px solid color-mix(in srgb, var(--success) 70%, transparent);
  color: var(--success);
}
.sd.is-warn .sd-dot {
  background: #33291a;
  border: 1.5px solid color-mix(in srgb, var(--warning) 70%, transparent);
  color: var(--warning);
}
.sd.is-error .sd-dot {
  background: #3a1d20;
  border: 1.5px solid color-mix(in srgb, var(--danger) 70%, transparent);
  color: var(--danger);
}
.sd.is-running .sd-dot {
  background: var(--panel);
}
.sd.is-running .sd-dot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(168, 156, 255, 0.22);
  border-top-color: var(--accent-2);
  border-right-color: var(--accent-2);
  animation: sk-spin 0.9s linear infinite;
}
.sd.is-running .sd-dot::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 8px rgba(168, 156, 255, 0.9);
}

/* ------------------------------------------------------------------ tag chips */

.tagchip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 11px;
  border-radius: 9px;
  background: var(--panel-2);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  max-width: 100%;
}
.tagchip-text {
  overflow: hidden;
  text-overflow: ellipsis;
}
.tagchip-count {
  font-size: 11px;
  color: var(--muted);
}
.tagchip.is-clickable:hover {
  border-color: #3a3e4a;
}
.tagchip.is-selected,
.tagchip.tone-accent {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  box-shadow: 0 0 16px -6px rgba(123, 108, 255, 0.6);
}
.tagchip.tone-success {
  background: var(--success-soft);
  border-color: color-mix(in srgb, var(--success) 35%, transparent);
}
.tagchip.tone-warning {
  background: var(--warning-soft);
  border-color: color-mix(in srgb, var(--warning) 35%, transparent);
}
.tagchip.tone-danger {
  background: var(--danger-soft);
  border-color: color-mix(in srgb, var(--danger) 35%, transparent);
}
.tagchip.is-slot {
  min-width: 96px;
  background: transparent;
  border: 1px dashed #2a2d37;
}
.tagchip-x {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-right: -4px;
  border-radius: 5px;
  color: var(--muted);
}
.tagchip-x:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}
.tagchip-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

/* ------------------------------------------------------------------ stat cards & charts */

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 18px 16px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--border);
  min-width: 0;
}
.stat.is-highlight {
  border-color: rgba(123, 108, 255, 0.55);
  background: radial-gradient(ellipse at 20% 0%, rgba(123, 108, 255, 0.16), transparent 70%), var(--panel);
  box-shadow: 0 0 40px -12px rgba(123, 108, 255, 0.55), inset 0 0 0 1px rgba(123, 108, 255, 0.12);
}
.stat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.stat-label {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}
.stat.is-highlight .stat-label {
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 12px;
}
.stat-value {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.stat.is-highlight .stat-value {
  font-size: 30px;
}
.stat-sub {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.stat.is-highlight .stat-sub {
  color: var(--success);
}
.stat-foot {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
}

.barchart {
  width: 100%;
  position: relative;
}
.barchart svg {
  display: block;
  overflow: visible;
}
.bar-value {
  fill: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.bar-value.is-hi {
  fill: var(--text);
  font-size: 13.5px;
  font-weight: 700;
}
.bar-label {
  fill: var(--muted);
  font-size: 12px;
}
.bar-label.is-hi {
  fill: var(--text);
  font-weight: 700;
}
.bar.is-hi {
  filter: drop-shadow(0 0 14px rgba(123, 108, 255, 0.55));
}
.bar-zero {
  stroke: var(--border-2);
  stroke-width: 1;
}

/* ------------------------------------------------------------------ popover & menu */

.popover {
  position: fixed;
  z-index: 60;
  min-width: 200px;
  max-width: calc(100vw - 16px);
  padding: 6px;
  border-radius: var(--radius);
  background: var(--panel-2);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-pop);
  animation: sk-pop 0.12s var(--ease);
}
.popover:focus {
  outline: none;
}
@keyframes sk-pop {
  from {
    opacity: 0;
    transform: translateY(-3px) scale(0.985);
  }
}
.menu {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 8px;
  color: var(--text);
  font-size: 13.5px;
  text-align: left;
}
.menu-item:hover:not(:disabled),
.menu-item:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}
.menu-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.menu-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  flex: none;
  color: var(--muted);
}
.menu-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.menu-hint {
  font-size: 11.5px;
  color: var(--muted);
}
.menu-check {
  color: var(--accent-2);
}
.menu-item.is-checked .menu-icon {
  color: var(--accent-2);
}
.menu-item.is-danger,
.menu-item.is-danger .menu-icon {
  color: #ff8a8a;
}
.menu-item.is-danger:hover:not(:disabled),
.menu-item.is-danger:focus-visible {
  background: var(--danger-soft);
}
.menu-divider {
  height: 1px;
  margin: 5px 4px;
  background: var(--border-2);
}
.menu-header {
  padding: 8px 10px 4px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ------------------------------------------------------------------ modal */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(6, 7, 10, 0.62);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: sk-fade 0.14s ease-out;
}
.modal-backdrop.is-leaving {
  opacity: 0;
  transition: opacity 0.12s;
}
@keyframes sk-fade {
  from {
    opacity: 0;
  }
}
.modal {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 48px);
  border-radius: 16px;
  background: var(--panel-2);
  border: 1px solid rgba(123, 108, 255, 0.5);
  box-shadow: var(--shadow-pop), 0 0 60px -20px rgba(123, 108, 255, 0.45);
  animation: sk-rise 0.16s var(--ease);
}
.modal:focus {
  outline: none;
}
.modal-danger {
  border-color: rgba(242, 109, 109, 0.4);
  box-shadow: var(--shadow-pop);
}
@keyframes sk-rise {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.985);
  }
}
.modal-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 20px 20px 0 22px;
}
.modal-titles {
  flex: 1;
  min-width: 0;
}
.modal-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.modal-sub {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}
.modal-x {
  margin: -4px -6px 0 0;
}
.modal-body {
  padding: 12px 22px 0;
  overflow-y: auto;
  font-size: 13.5px;
  color: var(--text-2);
}
.modal-msg {
  line-height: 1.55;
}
.modal-body > * + * {
  margin-top: 12px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 20px 20px 22px;
}

/* ------------------------------------------------------------------ toasts */

.toasts {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12.3px;
  width: 413px;
  max-width: calc(100vw - 32px);
  padding: 14px 12px 14px 15.8px;
  border-radius: 14px;
  background: linear-gradient(180deg, #1f2531, #191e28);
  border: 1px solid color-mix(in srgb, var(--tone) 35%, transparent);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 40px color-mix(in srgb, var(--tone) 10%, transparent);
  animation: sk-toast 0.2s var(--ease);
}
.toast.is-leaving {
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s, transform 0.15s;
}
@keyframes sk-toast {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.toast-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 37px;
  height: 37px;
  border-radius: 50%;
  background: var(--tone);
  color: #0b0c0f;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--tone) 16%, transparent);
}
.toast.tone-success .toast-icon {
  color: #062a1f;
}
.toast-text {
  flex: 1;
  min-width: 0;
  padding-top: 1px;
}
.toast-title {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.35;
}
.toast-msg {
  margin-top: 2.6px;
  font-size: 11.9px;
  color: var(--muted);
  line-height: 1.45;
}
.toast-action {
  margin-top: 8px;
}
.toast-x {
  margin-top: 2px;
}
/* place: "top" (the video's "Kontrol tamam"): top right, under the header. */
.toasts.is-top {
  top: calc(var(--topbar-h) + 16px);
  bottom: auto;
}
/* The video's accent toast (StepsScenes Toast): violet ground, an accent border, a
   lavender bold line with its icon bare, one line when it fits. */
.toast.tone-accent {
  width: auto;
  padding: 12px 10px 12px 17px;
  gap: 10px;
  background: #1b1840;
  border-color: var(--accent);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
.toast.tone-accent .toast-icon {
  width: auto;
  height: auto;
  background: none;
  box-shadow: none;
  color: var(--accent-2);
}
.toast.tone-accent .toast-title {
  color: var(--accent-2);
  font-family: var(--font); /* the video's toasts are UI text */
  word-spacing: normal;
  font-size: 15px;
  font-weight: 700;
}

/* ------------------------------------------------------------------ utilities */

.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.row-wrap {
  flex-wrap: wrap;
}
.spacer {
  flex: 1;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

/* ------------------------------------------------------------------ responsive */

@media (max-width: 1100px) {
  :root {
    --pad-x: 24px;
  }
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 860px) {
  :root {
    --sidebar-w: 200px;
    --pad-x: 16px;
    --pad-y: 16px;
  }
  .grid-2,
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
  .page-subtitle {
    display: none;
  }
}
@media (max-width: 640px) {
  .app {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }
  .sidebar {
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .brand {
    height: 52px;
    padding: 0 12px;
  }
  .brand-text,
  .nav-label,
  .trademark,
  .shop-text,
  .shop-chev {
    display: none;
  }
  .nav,
  .nav-setup {
    flex-direction: row;
    margin: 0;
    padding: 0 4px;
  }
  .nav-list {
    flex-direction: row;
  }
  .nav-item span {
    display: none;
  }
  .nav-item[aria-current="page"]::before {
    display: none;
  }
  .shop-area {
    padding: 0 8px;
  }
  .toasts {
    right: 16px;
    left: 16px;
    bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .spinner,
  .sd.is-running .sd-dot::before {
    animation-duration: 1.2s !important;
    animation-iteration-count: infinite !important;
  }
}
.topbar-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  min-height: 44px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
}

.sidebar-backdrop {
  display: none;
}

.mobile-only {
  display: none !important;
}

button, .btn, .nav-item, select, .select, input[type="button"], input[type="submit"], input[type="reset"], .clickable {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }
  .mobile-only {
    display: inline-flex !important;
  }
  .app {
    display: flex !important;
    flex-direction: column !important;
    height: 100vh !important;
    height: 100dvh !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }
  .main {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }
  .topbar {
    padding: 0 12px !important;
    height: 56px !important;
  }
  .topbar-titles {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: 0 !important;
  }
  .topbar-menu-btn {
    display: inline-flex !important;
    margin-right: 4px !important;
  }
  .sidebar-backdrop {
    display: none;
    position: fixed !important;
    inset: 0 !important;
    background: rgba(0, 0, 0, 0.65) !important;
    backdrop-filter: blur(2px) !important;
    z-index: 999 !important;
  }
  .sidebar-backdrop.is-open {
    display: block !important;
  }
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 280px !important;
    max-width: 85vw !important;
    background: var(--sidebar) !important;
    z-index: 1000 !important;
    transform: translateX(-100%) !important;
    transition: transform 0.25s var(--ease) !important;
    display: flex !important;
    flex-direction: column !important;
  }
  .sidebar.is-open {
    transform: translateX(0) !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5) !important;
  }
}
