/* ==========================================================================
   VizeBotu Kontrol Merkezi
   Kimlik: gece kontrol odasi. Koyu metal zemin, ince izgara, tek bir sinyal
   gradyani (limon > nane > camgobegi). Rakamlar ve kodlar mono, basliklar
   Chakra Petch, govde IBM Plex Sans.
   ========================================================================== */

:root {
  --bg: #05070a;
  --bg-raise: #080b10;
  --surface: #0b1017;
  --surface-2: #10161f;
  --surface-3: #161e2a;
  --line: rgba(150, 175, 205, 0.09);
  --line-2: rgba(150, 175, 205, 0.16);
  --line-3: rgba(150, 175, 205, 0.26);

  --ink: #e9eef5;
  --ink-2: #a3afc0;
  --ink-3: #6b788c;
  --ink-inverse: #04110d;

  --lime: #d4ff3a;
  --mint: #3dffc2;
  --cyan: #3dc8ff;
  --signal: linear-gradient(115deg, var(--lime) 0%, var(--mint) 48%, var(--cyan) 100%);
  --signal-soft: linear-gradient(115deg, rgba(212, 255, 58, 0.14), rgba(61, 255, 194, 0.1) 50%, rgba(61, 200, 255, 0.14));
  --accent: #5cffcd;

  /* Durum renkleri: yalnizca durum icin, her zaman etiket ve ikonla */
  --ok: #3ee08f;
  --warn: #ffb547;
  --bad: #ff5d6e;
  --busy: #3dc8ff;
  --idle: #7d889b;

  --radius: 14px;
  --radius-sm: 9px;
  --radius-xs: 6px;

  --font-display: "Chakra Petch", "IBM Plex Sans", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --sidebar-w: 256px;
  --tabbar-h: 64px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Zemin: ince izgara, ustten sinyal parlamasi */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 20%, transparent 75%);
  opacity: 0.55;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  z-index: -1;
  top: -30vh;
  left: 10vw;
  width: 80vw;
  height: 60vh;
  background: radial-gradient(closest-side, rgba(61, 255, 194, 0.09), transparent),
    radial-gradient(closest-side at 80% 40%, rgba(61, 200, 255, 0.07), transparent),
    radial-gradient(closest-side at 15% 60%, rgba(212, 255, 58, 0.06), transparent);
  filter: blur(20px);
  pointer-events: none;
}

/* Kaydirma cubugu: ince, koyu, sinyal renkli tutamac */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(61, 255, 194, 0.35) transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(212, 255, 58, 0.35), rgba(61, 255, 194, 0.35) 50%, rgba(61, 200, 255, 0.35));
  border: 3px solid var(--bg);
  border-radius: 99px;
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(212, 255, 58, 0.7), rgba(61, 255, 194, 0.7) 50%, rgba(61, 200, 255, 0.7));
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

/* Marka yazisi: buyuk harf, ikinci yarisi sinyal gradyani */
.wordmark {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.14em;
  line-height: 1.1;
  color: var(--ink);
  text-transform: uppercase;
}

.wordmark em {
  font-style: normal;
  background: var(--signal);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.wordmark-lg {
  margin: 2px 0 0;
  font-size: 30px;
  letter-spacing: 0.16em;
}

.mobilebar-text .wordmark {
  font-size: 15px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hidden {
  display: none !important;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.display {
  font-family: var(--font-display);
  letter-spacing: 0.01em;
}

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "zero" 1;
}

.eyebrow {
  margin: 0;
  font: 600 11px/1.2 var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

code {
  font: 500 0.86em var(--font-mono);
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  color: var(--ink);
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 2px;
}

::selection {
  background: rgba(61, 255, 194, 0.28);
}

/* ---------------------------------------------------------------- buttons */

.btn {
  --btn-h: 42px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--btn-h);
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: 600 13px/1 var(--font-display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: transform 0.15s var(--ease), background-color 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.25s, opacity 0.2s;
}

.btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.99);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  color: var(--ink-inverse);
  background: var(--signal);
  background-size: 140% 100%;
  background-position: 0% 50%;
  box-shadow: 0 0 0 1px rgba(61, 255, 194, 0.25), 0 8px 28px -10px rgba(61, 255, 194, 0.55);
}

.btn-primary:hover:not(:disabled) {
  background-position: 100% 50%;
  box-shadow: 0 0 0 1px rgba(61, 255, 194, 0.45), 0 10px 34px -8px rgba(61, 255, 194, 0.7);
}

.btn-secondary {
  color: var(--ink);
  background: var(--surface-2);
  border-color: var(--line-2);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--surface-3);
  border-color: var(--line-3);
}

.btn-ghost {
  color: var(--ink-2);
  background: transparent;
  border-color: var(--line);
}

.btn-ghost:hover:not(:disabled) {
  color: var(--ink);
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.03);
}

.btn-danger {
  color: #fff;
  background: rgba(255, 93, 110, 0.18);
  border-color: rgba(255, 93, 110, 0.5);
}

.btn-sm {
  --btn-h: 34px;
  padding: 0 12px;
  font-size: 11.5px;
}

.btn-sm .icon {
  width: 15px;
  height: 15px;
}

.btn-block {
  width: 100%;
}

.btn.is-busy {
  position: relative;
  color: transparent !important;
}

.btn.is-busy::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-color: var(--ink-2) transparent var(--ink-2) transparent;
  animation: spin 0.8s linear infinite;
}

.btn-primary.is-busy::after {
  border-color: var(--ink-inverse) transparent var(--ink-inverse) transparent;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.link-sm {
  font: 500 12px var(--font-mono);
  color: var(--ink-3);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.link-sm:hover {
  color: var(--mint);
}

/* ------------------------------------------------------------------ boot */

.boot-loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 22px;
  background: var(--bg);
  transition: opacity 0.35s;
}

.boot-logo {
  animation: breathe 1.8s var(--ease) infinite;
}

.boot-bar {
  width: 140px;
  height: 2px;
  border-radius: 2px;
  overflow: hidden;
  background: var(--line-2);
}

.boot-bar span {
  display: block;
  width: 40%;
  height: 100%;
  background: var(--signal);
  animation: slide 1.1s var(--ease) infinite;
}

/* ----------------------------------------------------------------- login */

.login-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.login-card {
  position: relative;
  width: min(420px, 100%);
  padding: 32px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(16, 22, 31, 0.92), rgba(8, 11, 16, 0.96));
  border: 1px solid var(--line-2);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
}

.login-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: var(--signal);
  opacity: 0.35;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.login-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.login-head h1 {
  margin: 2px 0 0;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}

.login-form {
  display: grid;
  gap: 16px;
}

.form-error {
  min-height: 20px;
  margin: 0;
  color: var(--bad);
  font-size: 13px;
}

/* PIN alani: ikon yok, rakamlar ortada ve aralikli; yer tutucu tam gorunur */
.label-icon {
  width: 15px;
  height: 15px;
  color: var(--ink-3);
}

.pin-input {
  height: 54px !important;
  text-align: center;
  font-size: 24px !important;
  letter-spacing: 0.42em;
  padding-left: 0.42em !important;
  padding-right: 0 !important;
  caret-color: var(--mint);
}

.pin-input::placeholder {
  font-family: var(--font-body);
  font-size: 15px;
  letter-spacing: 0.01em;
  color: #4a5567;
}

.pin-input:focus {
  border-color: rgba(61, 255, 194, 0.7);
  box-shadow: 0 0 0 4px rgba(61, 255, 194, 0.12), 0 0 24px -6px rgba(61, 255, 194, 0.5);
}

/* ---------------------------------------------------------------- layout */

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 18px;
  background: linear-gradient(180deg, rgba(11, 16, 23, 0.9), rgba(5, 7, 10, 0.95));
  border-right: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 22px;
  border-bottom: 1px solid var(--line);
}

.side-brand strong {
  display: block;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.1;
}

.side-brand span {
  font-size: 11px;
  color: var(--ink-3);
}

.side-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
  scrollbar-width: none;
}

.side-group {
  margin: 18px 10px 8px;
  font: 600 10.5px var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.side-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  margin: 2px 0;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s, background-color 0.2s;
}

.side-link:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.03);
}

.side-link.active {
  color: var(--ink);
  background: var(--signal-soft);
  box-shadow: inset 0 0 0 1px rgba(61, 255, 194, 0.14);
}

.side-link.active::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--signal);
}

.side-link.active .icon {
  color: var(--mint);
}

.side-count {
  margin-left: auto;
  min-width: 22px;
  padding: 1px 7px;
  border-radius: 99px;
  font-size: 11px;
  text-align: center;
  color: #fff;
  background: rgba(255, 93, 110, 0.25);
  border: 1px solid rgba(255, 93, 110, 0.5);
}

.side-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.side-foot-actions {
  display: flex;
  gap: 6px;
}

.dimmed {
  opacity: 0.45;
  pointer-events: none;
}

.toggle-gap {
  margin-top: 14px;
  border-top: 1px solid var(--line);
}

.webhook-box {
  margin-top: 8px;
  transition: opacity 0.2s;
}

.webhook-url {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.webhook-url code {
  flex: 1 1 260px;
  min-width: 0;
  padding: 10px 12px;
  font-size: 12px;
  overflow-wrap: anywhere;
  user-select: all;
}

.card-form {
  margin-top: 6px;
}

/* Canli baglanti gostergesi */
.conn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.conn-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--idle);
}

.conn[data-conn="live"] {
  color: var(--mint);
}

.conn[data-conn="live"] .conn-dot {
  background: var(--mint);
  box-shadow: 0 0 10px var(--mint);
}

.conn[data-conn="live"] .conn-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--mint);
  animation: ping 2s var(--ease) infinite;
}

.conn[data-conn="down"] {
  color: var(--bad);
}

.conn[data-conn="down"] .conn-dot {
  background: var(--bad);
}

.conn[data-conn="connecting"] .conn-dot {
  background: var(--warn);
  animation: blink 1s steps(2) infinite;
}

.shell {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.mobilebar,
.tabbar {
  display: none;
}

.main {
  flex: 1;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 30px 36px 120px;
}

.pagehead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.page-title {
  margin: 6px 0 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.05;
}

.pagehead-actions {
  display: flex;
  gap: 10px;
}

.view {
  display: grid;
  gap: 18px;
  animation: rise 0.35s var(--ease);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

/* ----------------------------------------------------------------- panel */

.panel {
  position: relative;
  min-width: 0;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(16, 22, 31, 0.78), rgba(11, 16, 23, 0.9));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.panel-flush {
  padding: 0;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head h3 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font: 600 15px/1.3 var(--font-display);
  letter-spacing: 0.02em;
}

.panel-head h3 .icon {
  color: var(--ink-3);
}

.hint {
  margin: -4px 0 14px;
  color: var(--ink-3);
  font-size: 13.5px;
  line-height: 1.6;
}

.probe-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.probe {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  font-size: 13px;
}

.probe span {
  color: var(--ink-3);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.probe-ok {
  border-color: rgba(62, 224, 143, 0.3);
  background: rgba(62, 224, 143, 0.06);
}

.probe-ok strong {
  color: var(--ok);
}

.probe-bad {
  border-color: rgba(255, 93, 110, 0.3);
  background: rgba(255, 93, 110, 0.06);
}

.probe-bad strong {
  color: var(--bad);
}

.hint-warn {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--warn);
  background: rgba(255, 181, 71, 0.08);
  border: 1px solid rgba(255, 181, 71, 0.28);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  background: var(--surface-3);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.tag-ok {
  color: var(--ok);
  background: rgba(62, 224, 143, 0.1);
  border-color: rgba(62, 224, 143, 0.3);
}

.tag-warn {
  color: var(--warn);
  background: rgba(255, 181, 71, 0.1);
  border-color: rgba(255, 181, 71, 0.3);
}

.tag-bad {
  color: var(--bad);
  background: rgba(255, 93, 110, 0.1);
  border-color: rgba(255, 93, 110, 0.3);
}

.tag-signal {
  color: var(--ink-inverse);
  background: var(--signal);
  border-color: transparent;
  font-weight: 600;
}

.empty {
  margin: 8px 0 0;
  padding: 22px 12px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13.5px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------------- status console */

.console {
  --tone: var(--idle);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px 32px;
  padding: 26px 28px 22px;
  border-radius: 18px;
  background:
    radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--tone) 12%, transparent), transparent 55%),
    linear-gradient(180deg, rgba(18, 25, 35, 0.92), rgba(9, 13, 19, 0.96));
  border: 1px solid var(--line-2);
  box-shadow: 0 30px 60px -40px rgba(0, 0, 0, 0.9);
}

/* HUD kose isaretleri */
.console::before,
.console::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--tone);
  opacity: 0.7;
  pointer-events: none;
}

.console::before {
  top: 10px;
  left: 10px;
  border-right: 0;
  border-bottom: 0;
  border-top-left-radius: 6px;
}

.console::after {
  right: 10px;
  bottom: 10px;
  border-left: 0;
  border-top: 0;
  border-bottom-right-radius: 6px;
}

.console[data-tone="ok"] {
  --tone: var(--ok);
}

.console[data-tone="warn"] {
  --tone: var(--warn);
}

.console[data-tone="bad"] {
  --tone: var(--bad);
}

.console[data-tone="busy"] {
  --tone: var(--busy);
}

.console-scan {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(61, 200, 255, 0.1) 45%, rgba(61, 255, 194, 0.18) 50%, transparent 55%);
  background-size: 50% 100%;
  background-repeat: no-repeat;
}

.console[data-tone="busy"] .console-scan {
  opacity: 1;
  animation: scan 2.4s linear infinite;
}

.console-main {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
}

.orb {
  position: relative;
  flex: none;
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
}

.orb-core {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--tone);
  box-shadow: 0 0 24px var(--tone), 0 0 60px color-mix(in srgb, var(--tone) 40%, transparent);
  transition: background-color 0.4s;
}

.orb-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--tone) 55%, transparent);
}

.orb-ring-2 {
  inset: 10px;
  border-style: dashed;
  border-color: color-mix(in srgb, var(--tone) 35%, transparent);
  animation: spin 14s linear infinite;
}

.console[data-tone="ok"] .orb-ring,
.console[data-tone="busy"] .orb-ring:not(.orb-ring-2) {
  animation: ping 2.4s var(--ease) infinite;
}

.console[data-tone="busy"] .orb-ring-2 {
  animation-duration: 2.5s;
}

.console-state {
  min-width: 0;
}

.state-label {
  margin: 4px 0 2px;
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 700;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, var(--ink), color-mix(in srgb, var(--tone) 70%, var(--ink)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.state-message {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.console-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(118px, auto));
  gap: 14px 28px;
  margin: 0;
  align-content: center;
}

.console-meta div {
  padding-left: 12px;
  border-left: 1px solid var(--line-2);
}

.console-meta dt {
  font: 500 10.5px var(--font-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.console-meta dd {
  margin: 3px 0 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}

/* Kontrol seridi: her cubuk bir kontrol */
.beat {
  position: relative;
  grid-column: 1 / -1;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.beat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.beat-legend {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--ink-2);
}

.beat-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sw {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}

.sw-ok {
  background: var(--ok);
}

.sw-warn {
  background: var(--warn);
}

.sw-bad {
  background: var(--bad);
}

.beat-strip {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 38px;
}

.beat-bar {
  flex: 1 1 0;
  min-width: 3px;
  max-width: 14px;
  height: 100%;
  border-radius: 3px;
  background: var(--surface-3);
  cursor: pointer;
  position: relative;
  transition: transform 0.15s var(--ease), filter 0.15s;
}

/* Tiklama alani cubuktan genis */
.beat-bar::after {
  content: "";
  position: absolute;
  inset: -8px -1px;
}

.beat-bar:hover,
.beat-bar:focus-visible {
  transform: scaleY(1.12);
  filter: brightness(1.25);
}

.beat-bar[data-r="success"] {
  background: var(--ok);
}

.beat-bar[data-r="partial"] {
  background: var(--warn);
}

.beat-bar[data-r="error"],
.beat-bar[data-r="timeout"] {
  background: var(--bad);
}

.beat-bar[data-r="empty"] {
  background: var(--surface-3);
  opacity: 0.5;
  cursor: default;
}

.beat-bar.is-new {
  animation: pop 0.6s var(--ease);
}

.beat-tip {
  position: absolute;
  z-index: 5;
  bottom: 52px;
  max-width: 280px;
  padding: 9px 11px;
  border-radius: var(--radius-xs);
  background: #0e141d;
  border: 1px solid var(--line-3);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.8);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-2);
  pointer-events: none;
  transform: translateX(-50%);
}

.beat-tip strong {
  display: block;
  color: var(--ink);
  font: 500 12px var(--font-mono);
  margin-bottom: 2px;
}

/* ------------------------------------------------------------------ KPIs */

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.kpi {
  position: relative;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(16, 22, 31, 0.78), rgba(11, 16, 23, 0.9));
  border: 1px solid var(--line);
  overflow: hidden;
}

.kpi-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  color: var(--ink-2);
}

.kpi-label span {
  font: 500 10.5px var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.kpi-value {
  margin: 8px 0 4px;
  font-size: 34px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.kpi-sub {
  margin: 0;
  font-size: 11.5px;
  color: var(--ink-3);
}

.kpi-meter {
  height: 4px;
  margin-top: 12px;
  border-radius: 4px;
  background: var(--surface-3);
  overflow: hidden;
}

.kpi-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 4px;
  background: var(--signal);
  transition: width 0.6s var(--ease);
}

.kpi-accent {
  border-color: rgba(61, 255, 194, 0.22);
  background:
    linear-gradient(180deg, rgba(16, 22, 31, 0.6), rgba(11, 16, 23, 0.9)),
    var(--signal-soft);
}

.kpi-accent .kpi-value {
  background: var(--signal);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --------------------------------------------------------------- targets */

.targets,
.found-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.target {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--line);
}

.code-chip {
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  height: 30px;
  padding: 0 8px;
  border-radius: 7px;
  font: 600 12px var(--font-mono);
  letter-spacing: 0.08em;
  color: var(--ink);
  background: var(--surface-3);
  border: 1px solid var(--line-2);
}

.target-main {
  min-width: 0;
}

.target-main strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
}

.target-main span {
  font-size: 12.5px;
  color: var(--ink-3);
}

.prov {
  font: 600 10.5px var(--font-mono);
  letter-spacing: 0.08em;
  padding: 3px 7px;
  border-radius: 5px;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
}

.prov-vfs {
  color: var(--cyan);
  border-color: rgba(61, 200, 255, 0.35);
  background: rgba(61, 200, 255, 0.08);
}

.prov-idata {
  color: var(--lime);
  border-color: rgba(212, 255, 58, 0.35);
  background: rgba(212, 255, 58, 0.07);
}

.prov-bls,
.prov-asvisa,
.prov-embassy {
  color: var(--ink-3);
  border-style: dashed;
}

.prov-kosmos {
  color: var(--warn);
  border-color: rgba(255, 181, 71, 0.35);
  background: rgba(255, 181, 71, 0.08);
}

.found-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(61, 255, 194, 0.16);
  background: linear-gradient(90deg, rgba(61, 255, 194, 0.06), transparent 60%);
}

.found-item.is-new {
  animation: flash 1.6s var(--ease);
}

.found-item time {
  font: 500 11.5px var(--font-mono);
  color: var(--ink-3);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- people */

.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
  margin-bottom: 6px;
}

.people .empty {
  grid-column: 1 / -1;
}

.person {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  text-align: left;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.015);
  color: var(--ink-2);
  font: inherit;
  cursor: pointer;
  transition: all 0.18s var(--ease);
}

.person:hover {
  border-color: var(--line-3);
  color: var(--ink);
}

.person.selected {
  border-color: rgba(61, 255, 194, 0.5);
  background: var(--signal-soft);
  color: var(--ink);
}

.person-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-inverse);
  background: var(--signal);
}

.person-main {
  display: grid;
  min-width: 0;
}

.person-main strong {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person-main span {
  font-size: 11.5px;
  color: var(--ink-3);
}

.applicant-line {
  margin: 12px 0 0;
}

/* -------------------------------------------------------------- pipeline */

.pipeline {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 4px 0 18px;
  padding: 0;
  counter-reset: step;
}

.pipeline li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
}

.pipeline li::before {
  content: "";
  position: absolute;
  top: 7px;
  left: -50%;
  right: 50%;
  height: 2px;
  background: var(--line-2);
}

.pipeline li:first-child::before {
  display: none;
}

.pipe-dot {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line-3);
  transition: all 0.3s var(--ease);
}

.pipeline li.done {
  color: var(--ink-2);
}

.pipeline li.done::before,
.pipeline li.current::before {
  background: var(--signal);
}

.pipeline li.done .pipe-dot {
  background: var(--mint);
  border-color: var(--mint);
}

.pipeline li.current {
  color: var(--ink);
  font-weight: 500;
}

.pipeline li.current .pipe-dot {
  border-color: var(--mint);
  background: var(--bg);
  box-shadow: 0 0 0 4px rgba(61, 255, 194, 0.15), 0 0 16px rgba(61, 255, 194, 0.6);
}

.pipeline li.current .pipe-dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--mint);
  animation: breathe 1.4s var(--ease) infinite;
}

.pipeline.is-failed li.current .pipe-dot {
  border-color: var(--bad);
  box-shadow: 0 0 0 4px rgba(255, 93, 110, 0.15);
}

.pipeline.is-failed li.current .pipe-dot::after {
  background: var(--bad);
  animation: none;
}

.booking-now {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
}

.booking-now p {
  margin: 0;
  min-width: 0;
  font-size: 13.5px;
  color: var(--ink-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 10px;
  border-radius: 99px;
  font: 600 11px var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-2);
  background: var(--surface-3);
  border: 1px solid var(--line-2);
}

.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.pill-ok {
  color: var(--ok);
  border-color: rgba(62, 224, 143, 0.35);
}

.pill-warn {
  color: var(--warn);
  border-color: rgba(255, 181, 71, 0.35);
}

.pill-bad {
  color: var(--bad);
  border-color: rgba(255, 93, 110, 0.35);
}

.pill-busy {
  color: var(--busy);
  border-color: rgba(61, 200, 255, 0.35);
}

/* ------------------------------------------------------------------- log */

.log {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 12.5px;
  line-height: 1.55;
}

.log li {
  display: grid;
  grid-template-columns: 64px 44px minmax(0, 1fr);
  gap: 10px;
  padding: 5px 16px;
  border-left: 2px solid transparent;
  word-break: break-word;
}

.log li:hover {
  background: rgba(255, 255, 255, 0.025);
}

.log time {
  color: var(--ink-3);
}

.log .lv {
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 0.08em;
  padding-top: 2px;
}

.log .lv-info {
  color: var(--ink-3);
}

.log .lv-warn {
  color: var(--warn);
}

.log .lv-error {
  color: var(--bad);
}

.log li.l-warn {
  border-left-color: rgba(255, 181, 71, 0.6);
  background: rgba(255, 181, 71, 0.03);
}

.log li.l-error {
  border-left-color: rgba(255, 93, 110, 0.7);
  background: rgba(255, 93, 110, 0.045);
}

.log .msg {
  color: var(--ink-2);
  white-space: pre-wrap;
}

.log li.is-new {
  animation: fadein 0.5s var(--ease);
}

.log mark {
  background: rgba(212, 255, 58, 0.25);
  color: var(--ink);
  border-radius: 2px;
}

.log-mini {
  max-height: 290px;
  overflow: hidden;
  margin: 0 -22px -20px;
  padding-bottom: 12px;
  mask-image: linear-gradient(180deg, #000 75%, transparent);
  -webkit-mask-image: linear-gradient(180deg, #000 75%, transparent);
}

.log-mini li {
  grid-template-columns: 64px minmax(0, 1fr);
  padding-left: 22px;
  padding-right: 22px;
}

.log-mini .lv {
  display: none;
}

.log-mini .msg {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 7, 10, 0.5);
}

.log-toolbar input[type="search"] {
  flex: 1 1 180px;
  min-width: 140px;
}

.log-scroll {
  position: relative;
  height: calc(100vh - 250px);
  height: calc(100dvh - 250px);
  min-height: 360px;
  overflow-y: auto;
  padding: 8px 0 16px;
  overscroll-behavior: contain;
}

.log-older {
  display: flex;
  margin: 4px auto 10px;
}

.log-jump {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 99px;
  font: 600 12px var(--font-display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-inverse);
  background: var(--signal);
  box-shadow: 0 10px 30px -8px rgba(61, 255, 194, 0.6);
  cursor: pointer;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
}

.seg {
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-3);
  font: 500 12.5px var(--font-body);
  cursor: pointer;
}

.seg.active {
  color: var(--ink);
  background: var(--surface-3);
  box-shadow: inset 0 0 0 1px var(--line-2);
}

.switch-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
}

/* ----------------------------------------------------------------- table */

.table-wrap {
  overflow-x: auto;
  margin: 0 -22px;
  padding: 0 22px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.table th {
  padding: 8px 10px;
  text-align: left;
  font: 500 10.5px var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}

.table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
  vertical-align: top;
}

.table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.table td.nowrap {
  white-space: nowrap;
}

.table td.msg-cell {
  min-width: 240px;
  color: var(--ink-3);
}

.table tr.is-new td {
  animation: flash 1.6s var(--ease);
}

/* -------------------------------------------------------------- settings */

.subnav {
  display: none;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: -6px 0 2px;
  padding-bottom: 2px;
}

.subnav::-webkit-scrollbar {
  display: none;
}

.subnav a {
  flex: none;
  padding: 7px 13px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--surface);
}

.subnav a.active {
  color: var(--ink-inverse);
  background: var(--signal);
  border-color: transparent;
}

.settings {
  display: grid;
  gap: 18px;
}

.section {
  display: none;
  gap: 18px;
}

.section.active {
  display: grid;
  animation: rise 0.3s var(--ease);
}

.fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px 16px;
  margin-bottom: 4px;
}

.fields-4 {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.field {
  display: grid;
  gap: 7px;
  min-width: 0;
  margin-bottom: 12px;
}

.fields .field {
  margin-bottom: 0;
}

.field-wide {
  grid-column: 1 / -1;
}

.field-narrow {
  max-width: 340px;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
}

.field-label em {
  font-style: normal;
  font-size: 11px;
  color: var(--ink-3);
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="date"],
input[type="search"],
select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: rgba(5, 7, 10, 0.6);
  color: var(--ink);
  font: 400 15px var(--font-body);
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

input.mono,
select.mono {
  font-family: var(--font-mono);
  font-size: 14px;
}

input::placeholder {
  color: #4a5567;
}

input:hover,
select:hover {
  border-color: var(--line-3);
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(61, 255, 194, 0.6);
  background: rgba(5, 7, 10, 0.85);
  box-shadow: 0 0 0 3px rgba(61, 255, 194, 0.12);
}

input[type="date"] {
  color-scheme: dark;
}

select {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b788c' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  cursor: pointer;
}

select option {
  background: #0b1017;
}

.input-sm {
  height: 34px !important;
  font-size: 13px !important;
}

.input-lg {
  height: 50px !important;
  font-size: 20px !important;
  letter-spacing: 0.14em;
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* Secim cipleri */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.015);
  color: var(--ink-2);
  font: 500 14px var(--font-body);
  cursor: pointer;
  transition: all 0.18s var(--ease);
}

.chip:hover {
  color: var(--ink);
  border-color: var(--line-3);
}

.chip .check {
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid var(--line-3);
  transition: all 0.18s;
}

.chip .check .icon {
  width: 12px;
  height: 12px;
  stroke-width: 3;
  opacity: 0;
  color: var(--ink-inverse);
}

.chip.selected {
  color: var(--ink);
  border-color: rgba(61, 255, 194, 0.45);
  background: rgba(61, 255, 194, 0.07);
}

.chip.selected .check {
  border-color: transparent;
  background: var(--signal);
}

.chip.selected .check .icon {
  opacity: 1;
}

.chip .prov {
  padding: 2px 5px;
  font-size: 9.5px;
}

/* Mod kartlari */
.mode-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.mode-card {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 16px;
  text-align: left;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.015);
  color: var(--ink-2);
  font: inherit;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.mode-card:hover {
  border-color: var(--line-3);
}

.mode-card strong {
  font: 600 15px var(--font-display);
  letter-spacing: 0.03em;
  color: var(--ink);
}

.mode-card span {
  font-size: 13px;
  line-height: 1.5;
}

.mode-card::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--line-3);
}

.mode-card.selected {
  border-color: rgba(61, 255, 194, 0.5);
  background: var(--signal-soft);
}

.mode-card.selected::after {
  border: 5px solid var(--mint);
  box-shadow: 0 0 12px rgba(61, 255, 194, 0.6);
}

/* Anahtar (toggle) */
.toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.toggle:last-of-type {
  border-bottom: 0;
}

.toggle strong {
  display: block;
  font-weight: 500;
  font-size: 14px;
}

.toggle small {
  color: var(--ink-3);
  font-size: 12.5px;
}

input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  position: relative;
  width: 44px;
  height: 26px;
  margin: 0;
  border-radius: 99px;
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink-3);
  transition: transform 0.25s var(--ease), background-color 0.2s;
}

input[type="checkbox"]:checked {
  background: var(--signal);
  border-color: transparent;
}

input[type="checkbox"]:checked::after {
  transform: translateX(18px);
  background: var(--ink-inverse);
}

.switch-inline input[type="checkbox"] {
  width: 36px;
  height: 22px;
}

.switch-inline input[type="checkbox"]::after {
  width: 14px;
  height: 14px;
}

.switch-inline input[type="checkbox"]:checked::after {
  transform: translateX(14px);
}

/* ---------------------------------------------------------------- alerts */

.alert-card {
  position: relative;
  margin-bottom: 18px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 181, 71, 0.12), rgba(11, 16, 23, 0.95) 55%);
  border: 1px solid rgba(255, 181, 71, 0.45);
  box-shadow: 0 0 0 4px rgba(255, 181, 71, 0.06), 0 20px 50px -25px rgba(255, 181, 71, 0.4);
  animation: rise 0.35s var(--ease);
}

.alert-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.alert-head h2 {
  margin: 0 0 3px;
  font-size: 18px;
  font-weight: 600;
}

.alert-head p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-2);
}

.alert-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  color: var(--warn);
  background: rgba(255, 181, 71, 0.12);
  border: 1px solid rgba(255, 181, 71, 0.35);
  animation: breathe 1.6s var(--ease) infinite;
}

.countdown {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--warn);
  background: rgba(255, 181, 71, 0.1);
}

.alert-body {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.captcha-image {
  height: 64px;
  max-width: 100%;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
  image-rendering: -webkit-optimize-contrast;
}

.alert-form {
  display: flex;
  flex: 1 1 300px;
  gap: 10px;
  flex-wrap: wrap;
}

.alert-form input {
  flex: 1 1 180px;
  width: auto;
}

.alert-form .btn {
  height: 50px;
}

/* --------------------------------------------------------------- savebar */

.savebar {
  position: fixed;
  z-index: 40;
  left: calc(var(--sidebar-w) + (100vw - var(--sidebar-w)) / 2);
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 10px 10px 18px;
  border-radius: 14px;
  background: rgba(14, 20, 29, 0.92);
  border: 1px solid rgba(61, 255, 194, 0.3);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(14px);
  transform: translate(-50%, calc(100% + 48px));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.35s var(--ease), opacity 0.25s, visibility 0.35s;
}

.savebar.visible {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.savebar-text {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ink-2);
  white-space: nowrap;
}

.savebar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
  animation: blink 1.4s ease-in-out infinite;
}

.savebar-actions {
  display: flex;
  gap: 8px;
}

/* ---------------------------------------------------------------- toasts */

.toasts {
  position: fixed;
  z-index: 90;
  right: 22px;
  bottom: 22px;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(14, 20, 29, 0.96);
  border: 1px solid var(--line-2);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.9);
  font-size: 13.5px;
  color: var(--ink);
  pointer-events: auto;
  animation: toastin 0.35s var(--ease);
}

.toast .icon {
  margin-top: 1px;
  color: var(--ok);
}

.toast.error {
  border-color: rgba(255, 93, 110, 0.45);
}

.toast.error .icon {
  color: var(--bad);
}

.toast.leaving {
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.25s;
}

/* ------------------------------------------------------------ animations */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes ping {
  0% {
    transform: scale(0.85);
    opacity: 0.9;
  }
  80%,
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

@keyframes breathe {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

@keyframes blink {
  50% {
    opacity: 0.3;
  }
}

@keyframes slide {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(260%);
  }
}

@keyframes scan {
  0% {
    background-position: -60% 0;
  }
  100% {
    background-position: 220% 0;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadein {
  from {
    opacity: 0;
    transform: translateX(-4px);
  }
}

@keyframes pop {
  0% {
    transform: scaleY(0.2);
    filter: brightness(2);
  }
  100% {
    transform: none;
  }
}

@keyframes flash {
  0% {
    background-color: rgba(61, 255, 194, 0.2);
  }
  100% {
    background-color: transparent;
  }
}

@keyframes toastin {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}

/* ------------------------------------------------------------ side dot */

.side-dot {
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px rgba(61, 255, 194, 0.7);
}

.hint-list {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding-left: 18px;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.55;
}

.hint-list strong {
  color: var(--ink);
  font-weight: 600;
}

.mode-cards-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 16px;
}

.mode-cards-2 .mode-card {
  padding-right: 44px;
}

/* --------------------------------------------------------- booking queue */

.queue,
.cards {
  list-style: none;
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.queue .empty,
.cards .empty {
  padding: 14px;
}

.queue-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) minmax(180px, 260px) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
  transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.queue-row.in-queue {
  border-color: rgba(61, 255, 194, 0.32);
  background: var(--signal-soft);
}

.queue-pos {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  background: var(--surface-3);
}

.queue-row.in-queue .queue-pos {
  color: var(--ink-inverse);
  background: var(--signal);
}

.queue-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.queue-main strong {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-main > span {
  font-size: 11.5px;
  color: var(--ink-3);
}

.queue-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.queue-badges:empty {
  display: none;
}

.queue-badges .btn-sm {
  height: 24px;
  padding: 0 8px;
  font-size: 11.5px;
}

.queue-card {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.queue-card .field-label {
  font-size: 11px;
}

.queue-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.queue-actions .icon-btn {
  width: 30px;
  height: 30px;
}

.queue-actions .icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ----------------------------------------------------------------- cards */

.cards {
  margin: 14px 0 18px;
}

.card-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.015);
}

.card-row.is-default {
  border-color: rgba(61, 255, 194, 0.45);
  background: var(--signal-soft);
}

.card-row.is-missing {
  border-style: dashed;
  border-color: rgba(255, 181, 71, 0.45);
}

.card-chip {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: var(--mint);
  background: var(--surface-3);
}

.card-row.is-missing .card-chip {
  color: var(--warn);
}

.card-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.card-main strong {
  font-size: 13.5px;
}

.card-main span {
  font-size: 12px;
  color: var(--ink-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-actions .icon-btn {
  width: 34px;
  height: 34px;
}

.card-form-title {
  margin: 0 0 12px;
}

/* ---------------------------------------------------------------- vizbot */

.chat-panel {
  display: flex;
  flex-direction: column;
  height: min(calc(100dvh - 190px), 900px);
  min-height: 520px;
  padding: 0;
  overflow: hidden;
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.chat-id {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.chat-id div {
  display: grid;
  line-height: 1.2;
}

.chat-id strong {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.chat-id .mono {
  font-size: 11.5px;
  color: var(--ink-3);
}

.chat-avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--ink-inverse);
  background: var(--signal);
  box-shadow: 0 8px 24px -10px rgba(61, 255, 194, 0.7);
}

.chat-avatar-lg {
  width: 56px;
  height: 56px;
  border-radius: 16px;
}

.chat-avatar-lg .icon {
  width: 26px;
  height: 26px;
}

.chat-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-setup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 18px 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  color: var(--warn);
  background: rgba(255, 181, 71, 0.08);
  border: 1px solid rgba(255, 181, 71, 0.28);
}

.chat-setup p {
  margin: 0;
  font-size: 13.5px;
}

.chat-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px;
  overscroll-behavior: contain;
}

.chat-list {
  list-style: none;
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
}

.chat-welcome {
  display: grid;
  justify-items: center;
  gap: 10px;
  max-width: 460px;
  margin: 8vh auto 0;
  text-align: center;
}

.chat-welcome strong {
  font-size: 20px;
}

.chat-welcome p {
  margin: 0;
  color: var(--ink-3);
  font-size: 14px;
  line-height: 1.6;
}

.chat-msg {
  display: grid;
  gap: 4px;
  max-width: min(78%, 720px);
  animation: rise 0.25s var(--ease);
}

.chat-user {
  justify-self: end;
  justify-items: end;
}

.chat-bot {
  justify-self: start;
}

.chat-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14.5px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.chat-user .chat-bubble {
  color: var(--ink-inverse);
  background: linear-gradient(115deg, #c9f53c, #45f5c0);
  border-bottom-right-radius: 5px;
}

.chat-bot .chat-bubble {
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-bottom-left-radius: 5px;
}

.chat-error .chat-bubble {
  color: var(--bad);
  background: rgba(255, 93, 110, 0.08);
  border-color: rgba(255, 93, 110, 0.35);
}

.chat-bubble p {
  margin: 0;
  white-space: pre-wrap;
}

.chat-bubble p + p,
.chat-bubble p + ul,
.chat-bubble p + ol,
.chat-bubble ul + p,
.chat-bubble ol + p {
  margin-top: 8px;
}

.chat-bubble ul,
.chat-bubble ol {
  display: grid;
  gap: 3px;
  margin: 0;
  padding-left: 20px;
}

.chat-bubble strong {
  font-weight: 600;
}

.chat-bubble code {
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 12.5px;
  background: rgba(255, 255, 255, 0.06);
}

.chat-bubble a {
  color: var(--mint);
}

.chat-msg time {
  padding: 0 4px;
  font-size: 10.5px;
  color: var(--ink-3);
}

.chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-self: start;
}

.chat-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: 99px;
  font: 500 11.5px var(--font-mono);
  color: var(--ink-2);
  background: var(--surface-3);
  border: 1px solid var(--line);
}

.chat-chip .icon {
  width: 13px;
  height: 13px;
}

.chat-chip-ok .icon {
  color: var(--ok);
}

.chat-chip-error {
  color: var(--bad);
  border-color: rgba(255, 93, 110, 0.3);
}

.chat-chip-pending {
  color: var(--warn);
  border-color: rgba(255, 181, 71, 0.35);
}

.chat-typing {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink-3);
}

.dots {
  display: inline-flex;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
}

.dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--mint);
  animation: typing 1.2s infinite ease-in-out;
}

.dots i:nth-child(2) {
  animation-delay: 0.15s;
}

.dots i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing {
  0%,
  80%,
  100% {
    opacity: 0.25;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

.chat-confirm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 18px 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(255, 181, 71, 0.12), rgba(11, 16, 23, 0.95) 60%);
  border: 1px solid rgba(255, 181, 71, 0.45);
  animation: rise 0.25s var(--ease);
}

.chat-confirm-text {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1 1 260px;
}

.chat-confirm-text strong {
  color: var(--warn);
  font-size: 13.5px;
}

.chat-confirm-text span {
  font-size: 13.5px;
  color: var(--ink-2);
}

.chat-confirm-actions {
  display: flex;
  gap: 8px;
}

.chat-suggest {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 18px 12px;
}

.chat-suggestion {
  height: 34px;
  font-size: 13px;
}

.chat-compose {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: rgba(5, 7, 10, 0.35);
}

.chat-compose textarea {
  flex: 1;
  min-height: 46px;
  max-height: 180px;
  padding: 12px 14px;
  resize: none;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: rgba(5, 7, 10, 0.6);
  color: var(--ink);
  font: 400 15px/1.45 var(--font-body);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.chat-compose textarea:focus {
  outline: none;
  border-color: rgba(61, 255, 194, 0.6);
  box-shadow: 0 0 0 3px rgba(61, 255, 194, 0.12);
}

.chat-compose textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-compose .btn {
  height: 46px;
}

.chat-note {
  margin: 0;
  padding: 0 18px 12px;
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ------------------------------------------------------- setup checklist */

.setup {
  display: grid;
  gap: 12px;
}

.setup .panel-head {
  margin-bottom: 0;
}

.setup-summary {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}

.setup-meter {
  height: 4px;
  border-radius: 99px;
  background: var(--surface-3);
  overflow: hidden;
}

.setup-meter span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--signal);
  transition: width 0.5s var(--ease);
}

.setup-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.setup-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
}

.setup-item.is-todo {
  border-color: rgba(255, 181, 71, 0.28);
  background: rgba(255, 181, 71, 0.05);
}

.setup-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--ink-3);
  background: var(--surface-3);
  border: 1px solid var(--line-2);
}

.setup-mark .icon {
  width: 15px;
  height: 15px;
}

.setup-item.is-ok .setup-mark {
  color: var(--ok);
  background: rgba(62, 224, 143, 0.1);
  border-color: rgba(62, 224, 143, 0.3);
}

.setup-item.is-todo .setup-mark {
  color: var(--warn);
  background: rgba(255, 181, 71, 0.12);
  border-color: rgba(255, 181, 71, 0.35);
}

.setup-text {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.setup-text strong {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

.setup-text > span {
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.5;
}

.setup-badge {
  padding: 1px 7px;
  border-radius: 5px;
  font: 600 10px/1.6 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  border: 1px solid var(--line-2);
}

.setup-badge.is-ok {
  color: var(--ok);
  border-color: rgba(62, 224, 143, 0.3);
}

.setup-badge.is-todo {
  color: var(--warn);
  border-color: rgba(255, 181, 71, 0.35);
}

.setup-toggle {
  justify-self: start;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

/* "Sıradaki adım" düğmesi: durum kartında, hatanın hemen altında */
.next-step {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 181, 71, 0.4);
  background: rgba(255, 181, 71, 0.1);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.next-step:hover {
  background: rgba(255, 181, 71, 0.16);
  border-color: rgba(255, 181, 71, 0.6);
}

.next-step-label {
  flex: none;
  font: 600 10.5px var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--warn);
}

.next-step-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13.5px;
  font-weight: 500;
}

.next-step .icon {
  flex: none;
  width: 14px;
  height: 14px;
  color: var(--warn);
  transform: rotate(90deg);
}

/* Hedef kartında son kontrol sonucu */
.target-main .target-last {
  display: -webkit-box;
  margin-top: 3px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 12px;
  line-height: 1.45;
}

.target-last.is-ok {
  color: var(--ok);
}

.target-last.is-open {
  color: var(--lime);
  font-weight: 600;
}

.target-last.is-bad {
  color: var(--bad);
}

.target-last.is-idle {
  color: var(--ink-3);
}

.target.has-error {
  border-color: rgba(255, 93, 110, 0.25);
}

.booking-off p {
  margin: 0 0 10px;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.55;
}

.booking-off p strong {
  color: var(--ink);
}

/* Portallar: takip edilmeyen kurumun kartı */
.usage-note {
  display: none;
  margin: -4px 0 12px;
  font-size: 12.5px;
  color: var(--ink-3);
}

[data-provider-card].is-unused {
  opacity: 0.55;
}

[data-provider-card].is-unused:focus-within,
[data-provider-card].is-unused:hover {
  opacity: 0.85;
}

[data-provider-card].is-unused .usage-note {
  display: block;
}

/* Ayar bölümlerinin başındaki açıklama */
.section-intro {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  border-left: 3px solid var(--mint);
  background: rgba(61, 255, 194, 0.04);
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.6;
}

/* Gelişmiş ayarlar: kapalı başlar */
.advanced {
  border-radius: var(--radius);
  border: 1px dashed var(--line-2);
}

.advanced summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  list-style: none;
  cursor: pointer;
}

.advanced summary::-webkit-details-marker {
  display: none;
}

.advanced summary strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
}

.advanced summary small {
  color: var(--ink-3);
  font-size: 12.5px;
}

.advanced summary .icon {
  flex: none;
  color: var(--ink-3);
  transition: transform 0.2s var(--ease);
}

.advanced[open] summary .icon {
  transform: rotate(180deg);
}

.advanced-body {
  display: grid;
  gap: 18px;
  padding: 0 14px 14px;
}

/* "Düzelt" ile gelinen kart kısa süre parlar */
.flash-target {
  animation: target-flash 1.8s var(--ease);
}

@keyframes target-flash {
  0%,
  40% {
    box-shadow: 0 0 0 2px rgba(61, 255, 194, 0.55), 0 0 32px -6px rgba(61, 255, 194, 0.5);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(61, 255, 194, 0);
  }
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 1180px) {
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .console {
    grid-template-columns: 1fr;
  }

  .console-meta {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1023px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .pagehead-actions .btn span {
    display: none;
  }

  .mobilebar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 16px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    background: rgba(5, 7, 10, 0.82);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .mobilebar-text {
    flex: 1;
    min-width: 0;
    line-height: 1.15;
  }

  .mobilebar-text strong {
    display: block;
    font-size: 16px;
  }

  .mobilebar-text span {
    font-size: 12px;
    color: var(--ink-3);
  }

  .conn-compact .conn-text {
    font-size: 10px;
  }

  .tabbar {
    position: fixed;
    z-index: 35;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: calc(var(--tabbar-h) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: rgba(5, 7, 10, 0.9);
    border-top: 1px solid var(--line-2);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .tabbar a {
    position: relative;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 4px;
    color: var(--ink-3);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
  }

  .tabbar .icon {
    width: 22px;
    height: 22px;
  }

  .tabbar a.active {
    color: var(--ink);
  }

  .tabbar a.active .icon {
    color: var(--mint);
  }

  .tabbar a.active::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 30%;
    right: 30%;
    height: 2px;
    border-radius: 0 0 2px 2px;
    background: var(--signal);
  }

  .tab-badge {
    position: absolute;
    top: 10px;
    left: calc(50% + 8px);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bad);
    box-shadow: 0 0 0 2px var(--bg);
  }

  .main {
    padding: 20px 16px calc(var(--tabbar-h) + var(--safe-bottom) + 90px);
  }

  .pagehead {
    align-items: center;
    margin-bottom: 18px;
  }

  .page-title {
    font-size: 26px;
  }

  .pagehead-actions .btn {
    width: 44px;
    padding: 0;
  }

  .subnav {
    display: flex;
    margin: 0 -16px;
    padding: 0 16px 2px;
  }

  .savebar {
    left: 16px;
    right: 16px;
    bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 12px);
    justify-content: space-between;
    transform: translateY(160%);
  }

  .savebar.visible {
    transform: none;
  }

  .toasts {
    left: 16px;
    right: 16px;
    width: auto;
    top: calc(64px + env(safe-area-inset-top, 0px));
    bottom: auto;
  }

  .log-scroll {
    height: calc(100dvh - 330px);
  }
}

@media (max-width: 760px) {
  body {
    font-size: 14.5px;
  }

  .setup-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .setup-item > .btn {
    grid-column: 2;
    justify-self: start;
  }

  .next-step {
    width: 100%;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .kpis {
    gap: 12px;
  }

  .kpi {
    padding: 14px 15px;
  }

  .kpi-value {
    font-size: 28px;
  }

  .kpi-label {
    flex-direction: column;
    gap: 2px;
  }

  .console {
    padding: 20px 18px 18px;
    gap: 18px;
  }

  .console-main {
    gap: 16px;
  }

  .orb {
    width: 52px;
    height: 52px;
  }

  .console-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
  }

  .beat-strip .beat-bar:nth-child(-n + 20) {
    display: none;
  }

  .beat-legend {
    gap: 10px;
    font-size: 11.5px;
  }

  .panel {
    padding: 16px;
  }

  .table-wrap {
    margin: 0 -16px;
    padding: 0 16px;
  }

  .log-mini {
    margin: 0 -16px -16px;
  }

  .log-mini li {
    padding-left: 16px;
    padding-right: 16px;
  }

  .log li {
    grid-template-columns: 58px minmax(0, 1fr);
    padding: 6px 12px;
    font-size: 12px;
  }

  .log li .lv {
    display: none;
  }

  .mode-cards {
    grid-template-columns: 1fr;
  }

  .pipeline li {
    font-size: 11px;
  }

  /* Tablolar mobilde kart listesine donusur */
  .table thead {
    display: none;
  }

  .table,
  .table tbody,
  .table tr,
  .table td {
    display: block;
    width: 100%;
  }

  .table tr {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }

  .table td {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 3px 0;
    border: 0;
    text-align: right;
  }

  .table td::before {
    content: attr(data-label);
    flex: none;
    font: 500 10.5px var(--font-mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-3);
    text-align: left;
    padding-top: 3px;
  }

  .table td.msg-cell {
    min-width: 0;
    display: block;
    text-align: left;
    padding-top: 6px;
  }

  .table td.msg-cell::before {
    display: block;
    margin-bottom: 2px;
  }

  .table tbody tr:hover td {
    background: none;
  }

  .alert-card {
    padding: 16px;
  }

  .alert-form .btn {
    flex: 1 1 auto;
  }

  .log-toolbar .segmented {
    width: 100%;
  }

  .log-toolbar .seg {
    flex: 1;
  }

  .savebar-text {
    font-size: 12.5px;
  }

  .savebar-text .savebar-label-long {
    display: none;
  }
}

@media (max-width: 380px) {
  .kpis {
    grid-template-columns: 1fr 1fr;
  }

  .kpi-value {
    font-size: 24px;
  }

  .savebar-text {
    display: none;
  }

  .savebar-actions {
    width: 100%;
  }

  .savebar-actions .btn {
    flex: 1;
  }
}

/* Vizbot, randevu listesi ve kartlar: dar ekran */
@media (max-width: 1023px) {
  .tabbar {
    grid-template-columns: repeat(5, 1fr);
  }

  .chat-panel {
    height: calc(100dvh - 64px - var(--tabbar-h) - var(--safe-bottom) - 118px);
    min-height: 420px;
  }

  .queue-row {
    grid-template-columns: 30px minmax(0, 1fr) auto;
  }

  .queue-card {
    grid-column: 2 / -1;
    grid-row: 2;
  }
}

@media (max-width: 760px) {
  .mode-cards-2 {
    grid-template-columns: 1fr;
  }

  .chat-head,
  .chat-scroll,
  .chat-compose {
    padding-left: 12px;
    padding-right: 12px;
  }

  .chat-head-actions .btn span {
    display: none;
  }

  .chat-msg {
    max-width: 90%;
  }

  .chat-compose .btn span {
    display: none;
  }

  .chat-compose .btn {
    width: 46px;
    padding: 0;
  }

  .chat-confirm,
  .chat-setup {
    margin-left: 12px;
    margin-right: 12px;
  }

  .chat-suggest {
    padding-left: 12px;
    padding-right: 12px;
  }

  /* Dar ekranda sohbete yer açılır; aynı bilgi Vizbot ayarlarında da var. */
  .chat-note {
    display: none;
  }

  .card-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .card-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}
