/* =========================================================
   ZEVORI · WhatsApp Bakım CRM
   Marka: ZEVORI — Fredoka, Gök Mavisi / Turkuaz / Deniz / Gece / Mercan
   ========================================================= */

:root {
  /* Resmî marka paleti */
  --sky: #00B4D8;        /* Ana renk — Gök Mavisi */
  --aqua: #90E0EF;       /* Vurgu — Parlak Turkuaz */
  --sea: #0077B6;        /* Derinlik — Deniz Mavisi */
  --night: #03045E;      /* Kontrast / Yazı — Gece Mavisi */
  --coral: #FF6B6B;      /* Canlılık / Zıt Renk — Mercan */

  /* Türetilmiş tonlar */
  --sky-600: #0098B8;
  --sky-50: #E6F8FC;
  --aqua-100: #D4F3F9;
  --aqua-50: #EEFAFD;
  --sea-700: #005F92;
  --night-700: #13157A;
  --night-900: #02033F;
  --coral-50: #FFF0F0;
  --coral-100: #FFE0E0;
  --coral-700: #D24343;
  --gold: #F2C45C;
  --gold-700: #B98526;

  /* Anlamsal (durum) renkleri — marka tonlarıyla uyumlu */
  --ok: #12B886;
  --ok-50: #E7F8F1;
  --ok-100: #C9F0E0;
  --ok-700: #0A7856;
  --warn: #F59F00;
  --warn-50: #FFF6E1;
  --warn-700: #9A5B00;

  /* Yüzeyler & yazı */
  --bg: #F1F8FB;
  --surface: #FFFFFF;
  --surface-2: #F6FBFD;
  --line: #DFEDF3;
  --line-2: #ECF5F9;
  --ink: #03045E;
  --text: #262A62;
  --muted: #676E97;
  --muted-2: #9BA2BE;

  /* Şekil & derinlik */
  --r-card: 20px;
  --r-ctl: 12px;
  --r-sm: 8px;
  --shadow-1: 0 1px 2px rgba(3, 4, 94, .04), 0 6px 18px -10px rgba(3, 4, 94, .12);
  --shadow-2: 0 18px 40px -16px rgba(3, 4, 94, .28);
  --ring: 0 0 0 4px rgba(0, 180, 216, .20);

  --font-display: "Fredoka", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", "Fredoka", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;

  --sidebar-w: 268px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--sea); text-decoration: none; }
a:hover { color: var(--sea-700); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); margin: 0; font-weight: 600; letter-spacing: -.005em; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 10px; }
::selection { background: var(--aqua); color: var(--night); }

.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.strong { font-weight: 700; color: var(--ink); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- İkonlar (Material Symbols Rounded) ---------- */
.ico {
  font-family: "Material Symbols Rounded";
  font-weight: 500;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  font-variation-settings: "FILL" 0, "opsz" 24;
  user-select: none;
  flex-shrink: 0;
}
.ico.fill { font-variation-settings: "FILL" 1, "opsz" 24; }
.ico.sm { font-size: 16px; }
.ico.xs { font-size: 14px; }
.ico.lg { font-size: 24px; }

/* =========================================================
   Uygulama iskeleti
   ========================================================= */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }

/* ---------- Kenar menü ---------- */
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 18px;
  padding: 22px 16px 16px;
  color: #fff;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(0, 180, 216, .22), transparent 60%),
    radial-gradient(90% 50% at 100% 100%, rgba(0, 119, 182, .35), transparent 60%),
    var(--night);
  overflow-y: auto;
  z-index: 50;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 6px; color: #fff; }
.brand:hover { color: #fff; }
.brand-mark { width: 44px; height: 44px; filter: drop-shadow(0 4px 10px rgba(242, 196, 92, .25)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: .14em; }
.brand-sub { font-family: var(--font-display); font-size: 11.5px; font-weight: 500; color: var(--aqua); letter-spacing: .02em; margin-top: 3px; }

.sys-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 14px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(144, 224, 239, .14);
  font-family: var(--font-display); font-size: 13px; color: rgba(255, 255, 255, .85);
}
.sys-pill .ico { color: var(--aqua); font-size: 18px; }
.sys-ver { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 99px; background: rgba(0, 180, 216, .18); color: var(--aqua); font-size: 12px; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 14px;
  color: rgba(255, 255, 255, .78);
  font-family: var(--font-display); font-size: 14.5px; font-weight: 500; white-space: nowrap;
  transition: background .18s, color .18s, transform .18s;
}
.nav a .ico { font-size: 22px; color: var(--aqua); opacity: .9; }
.nav a > span:not(.ico) { overflow: hidden; text-overflow: ellipsis; }
.nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav a.active { background: var(--sky); color: var(--night); box-shadow: 0 10px 24px -12px rgba(0, 180, 216, .9); }
.nav a.active .ico { color: var(--night); font-variation-settings: "FILL" 1, "opsz" 24; opacity: 1; }
.nav-badge {
  margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px;
  display: inline-grid; place-items: center; border-radius: 99px;
  font-family: var(--font-display); font-size: 12px; font-weight: 600;
  background: rgba(144, 224, 239, .18); color: var(--aqua);
}
.nav-badge.coral { background: var(--coral); color: #fff; }
.nav a.active .nav-badge { background: var(--night); color: #fff; }

.side-foot { margin-top: auto; position: relative; padding-top: 44px; }
.peek-mascot { position: absolute; right: 10px; top: -8px; width: 84px; height: 84px; z-index: 0; pointer-events: none; transform-origin: bottom center; animation: peek 6s ease-in-out infinite; }
@keyframes peek { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(-2deg); } }
.engine-card {
  position: relative; z-index: 1;
  padding: 14px; border-radius: 16px;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(144, 224, 239, .18);
  backdrop-filter: blur(6px);
}
.engine-card .row { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-display); font-size: 13px; }
.engine-card .row b { font-weight: 600; color: #7CF0C8; font-size: 12.5px; }
.engine-card .row b.bad { color: #FFB3B3; }
.engine-card .bar { height: 6px; margin: 9px 0 8px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.engine-card .bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--sky), var(--aqua)); transition: width .6s; }
.engine-card small { color: rgba(255, 255, 255, .7); font-size: 12px; }
.side-sign { margin-top: 12px; text-align: center; font-family: var(--font-display); font-size: 11px; letter-spacing: .08em; color: rgba(144, 224, 239, .55); }

.scrim { position: fixed; inset: 0; background: rgba(3, 4, 94, .45); z-index: 45; }

/* ---------- Üst bar ---------- */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: 68px; padding: 0 28px;
  display: flex; align-items: center; gap: 16px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.crumbs { display: flex; align-items: center; gap: 6px; font-family: var(--font-display); color: var(--muted); font-size: 14px; white-space: nowrap; }
.crumbs strong { color: var(--ink); font-weight: 600; }
.top-status { display: flex; align-items: center; gap: 8px; margin-left: 12px; min-width: 0; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding-left: 12px; border-left: 1px solid var(--line); }
.user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-meta b { font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: 14px; }
.user-meta small { color: var(--muted); font-size: 12px; }

.icon-btn {
  position: relative;
  width: 40px; height: 40px; border-radius: 12px;
  display: inline-grid; place-items: center;
  border: 1px solid transparent; background: transparent; color: var(--muted);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--aqua-50); color: var(--sea); }
.bell-badge {
  position: absolute; top: 4px; right: 4px;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  display: grid; place-items: center;
  background: var(--coral); color: #fff; font-size: 11px; font-weight: 800;
  border: 2px solid #fff;
}

.content { width: 100%; max-width: 1640px; margin: 0 auto; padding: 28px; display: flex; flex-direction: column; gap: 22px; outline: none; }
.view-enter { animation: viewIn .35s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* =========================================================
   Bileşenler
   ========================================================= */

/* ---------- Kartlar ---------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-1);
  padding: 22px;
  min-width: 0;
}
.card.pad-lg { padding: 26px; }
.card.flush { padding: 0; overflow: hidden; }
.card-h { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.card-h .grow { flex: 1 1 180px; min-width: 0; }
.card-h .grow.wide { flex-basis: 340px; }
.card-h h2 { font-size: 20px; line-height: 1.25; }
.card-h h3 { font-size: 17px; line-height: 1.3; }
.card-h p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.card-h .end { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.tile {
  width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--aqua-100); color: var(--sea);
}
.tile .ico { font-size: 24px; }
.tile.sm { width: 36px; height: 36px; border-radius: 11px; }
.tile.sm .ico { font-size: 20px; }
.tile.coral { background: var(--coral-100); color: var(--coral-700); }
.tile.ok { background: var(--ok-100); color: var(--ok-700); }
.tile.warn { background: var(--warn-50); color: var(--warn-700); }
.tile.night { background: var(--night); color: var(--aqua); }
.tile.sky { background: var(--sky); color: var(--night); }

.eyebrow { font-family: var(--font-display); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--sea); display: inline-flex; align-items: center; gap: 6px; }

/* Sayfa başlığı */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 32px; line-height: 1.15; margin-top: 6px; }
.page-head p { color: var(--muted); margin-top: 6px; max-width: 680px; font-size: 14.5px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Butonlar ---------- */
.btn {
  --bh: 42px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--bh); padding: 0 18px;
  border-radius: var(--r-ctl); border: 1px solid transparent;
  font-family: var(--font-display); font-weight: 500; font-size: 14.5px; letter-spacing: .01em;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, transform .08s, box-shadow .15s;
}
.btn .ico { font-size: 19px; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-sm { --bh: 36px; padding: 0 13px; font-size: 13.5px; border-radius: 11px; }
.btn-sm .ico { font-size: 17px; }
.btn-lg { --bh: 50px; padding: 0 22px; font-size: 16px; }
.btn-block { width: 100%; }

.btn-primary { background: var(--night); color: #fff; box-shadow: 0 8px 18px -10px rgba(3, 4, 94, .7); }
.btn-primary:hover { background: var(--night-700); color: #fff; }
.btn-sky { background: var(--sky); color: var(--night); box-shadow: 0 8px 18px -10px rgba(0, 180, 216, .9); }
.btn-sky:hover { background: #22C3E3; color: var(--night); }
.btn-sea { background: var(--sea); color: #fff; }
.btn-sea:hover { background: var(--sea-700); color: #fff; }
.btn-soft { background: var(--sky-50); color: var(--sea); }
.btn-soft:hover { background: var(--aqua-100); color: var(--sea-700); }
.btn-outline { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--aqua); background: var(--aqua-50); color: var(--ink); }
.btn-danger { background: var(--coral-50); color: var(--coral-700); border-color: var(--coral-100); }
.btn-danger:hover { background: var(--coral-100); color: var(--coral-700); }
.btn-coral { background: var(--coral); color: #fff; }
.btn-coral:hover { background: #F45A5A; color: #fff; }
.btn-ok { background: var(--ok-700); color: #fff; }
.btn-ok:hover { background: #086A4C; color: #fff; }
.btn-ghost-light { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .22); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.btn-icon { width: 36px; padding: 0; }

/* ---------- Çipler / rozetler ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px; border-radius: 99px;
  font-family: var(--font-display); font-size: 12.5px; font-weight: 500;
  background: var(--line-2); color: var(--muted);
  white-space: nowrap;
}
.chip .ico { font-size: 15px; }
.chip.sky { background: var(--sky-50); color: var(--sea); }
.chip.aqua { background: var(--aqua-100); color: var(--sea-700); }
.chip.ok { background: var(--ok-50); color: var(--ok-700); }
.chip.warn { background: var(--warn-50); color: var(--warn-700); }
.chip.coral { background: var(--coral-50); color: var(--coral-700); }
.chip.night { background: var(--night); color: #fff; }
.chip.gold { background: linear-gradient(135deg, #FFE7A8, var(--gold)); color: #5A3D00; }
.chip.lg { height: 30px; padding: 0 12px; font-size: 13.5px; }
.chip.xs { height: 20px; padding: 0 7px; font-size: 11px; }
.chip-x { border: 0; background: transparent; padding: 0; margin-right: -3px; display: inline-grid; place-items: center; color: inherit; opacity: .7; }
.chip-x:hover { opacity: 1; }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted-2); flex-shrink: 0; }
.dot-ok { background: var(--ok); }
.dot-sky { background: var(--sky); }
.dot-warn { background: var(--warn); }
.dot-coral { background: var(--coral); }
.dot.live { position: relative; }
.dot.live::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 1.6s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 13px; border-radius: 99px;
  background: var(--surface-2); border: 1px solid var(--line);
  font-family: var(--font-display); font-size: 13px; color: var(--muted); white-space: nowrap;
}
.status-pill b { color: var(--ink); font-weight: 600; }
.status-pill.ok b { color: var(--ok-700); }
.status-pill.bad b { color: var(--coral-700); }
.status-pill.warn b { color: var(--warn-700); }

/* ---------- Avatar ---------- */
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: inline-grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 14px; color: #fff;
  background: var(--sea);
}
.avatar.sm { width: 32px; height: 32px; font-size: 12.5px; }
.av-sky { background: var(--sky); color: var(--night); }
.av-sea { background: var(--sea); }
.av-night { background: var(--night); color: var(--aqua); }
.av-coral { background: var(--coral); }
.av-aqua { background: var(--aqua); color: var(--night); }

/* ---------- Form elemanları ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label {
  font-family: var(--font-display); font-size: 13px; font-weight: 500; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.label .req, .field > label .req { color: var(--coral); margin-right: auto; margin-left: -4px; }
.hint { font-size: 12px; color: var(--muted); }
.hint.err { color: var(--coral-700); }
.input, .select, .textarea {
  width: 100%; height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: var(--r-ctl);
  background: var(--surface-2); color: var(--ink);
  font-size: 14.5px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.input:hover, .select:hover, .textarea:hover { border-color: #CBE3EC; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--sky); background: #fff; box-shadow: var(--ring); }
.input.invalid { border-color: var(--coral); box-shadow: 0 0 0 4px rgba(255, 107, 107, .15); }
.textarea { height: auto; min-height: 130px; padding: 12px 14px; line-height: 1.6; resize: vertical; }
.select { appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%230077B6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group > .ico { position: absolute; left: 13px; color: var(--sea); pointer-events: none; font-size: 19px; }
.input-group > .ico + .input { padding-left: 42px; }
.input[type=number] { -moz-appearance: textfield; }
.input[type=number]::-webkit-outer-spin-button, .input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input-group .prefix { position: absolute; left: 14px; font-weight: 800; color: var(--sea); font-size: 14.5px; pointer-events: none; }
.input-group .prefix + .input { padding-left: 50px; }
.input-group .suffix { position: absolute; right: 12px; font-size: 12px; color: var(--muted); pointer-events: none; }
.input-group .suffix-btn { position: absolute; right: 5px; height: 34px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-stack { display: flex; flex-direction: column; gap: 14px; }

/* Anahtar (switch) */
.switch { position: relative; display: inline-flex; flex-shrink: 0; width: 46px; height: 26px; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #CFE0E8; transition: background .2s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(3, 4, 94, .25); transition: transform .22s cubic-bezier(.3, 1.4, .6, 1); }
.switch input:checked + span { background: var(--sky); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { box-shadow: var(--ring); }

/* Onay kutusu */
.check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.check input { appearance: none; margin: 1px 0 0; width: 20px; height: 20px; flex-shrink: 0; border-radius: 6px; border: 2px solid #B9D3DE; background: #fff; display: grid; place-items: center; cursor: pointer; transition: all .15s; }
.check input::after { content: ""; width: 10px; height: 6px; border: 2.5px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .15s; }
.check input:checked { background: var(--night); border-color: var(--night); }
.check input:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.check input:focus-visible { box-shadow: var(--ring); }

/* Segmentli seçim */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 5px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; border-radius: 10px; padding: 8px 6px; display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--muted); font-family: var(--font-display); font-size: 14px; font-weight: 500; line-height: 1.2; transition: all .15s; }
.seg button small { font-family: var(--font-body); font-size: 11px; font-weight: 600; opacity: .85; }
.seg button:hover { color: var(--ink); background: #fff; }
.seg button.on { background: #fff; color: var(--sea); box-shadow: 0 0 0 2px var(--sky), 0 6px 14px -8px rgba(0, 119, 182, .5); }
.seg.row button { flex-direction: row; gap: 8px; justify-content: center; padding: 10px; }

/* Ayar satırı (ikon + açıklama + kontrol) */
.opt { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line-2); }
.opt .grow { flex: 1; min-width: 0; }
.opt b { display: block; font-family: var(--font-display); font-weight: 500; color: var(--ink); font-size: 14.5px; }
.opt small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; line-height: 1.45; }
.opt > .ico { color: var(--sea); }

/* ---------- Tablolar ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 700px; }
.table th {
  text-align: left; padding: 12px 16px;
  font-family: var(--font-display); font-weight: 500; font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); background: var(--surface-2);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table th:first-child { border-top-left-radius: 14px; }
.table th:last-child { border-top-right-radius: 14px; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--aqua-50); }
.table tbody tr.urgent { background: linear-gradient(90deg, rgba(255, 107, 107, .07), transparent 60%); }
.table tbody tr.urgent td:first-child { box-shadow: inset 3px 0 0 var(--coral); }
.table tbody tr.live { background: var(--sky-50); }
.table tbody tr.selected { background: var(--aqua-50); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .right { text-align: right; }
.person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person b { display: flex; align-items: center; gap: 6px; font-family: var(--font-display); font-weight: 500; color: var(--ink); font-size: 14.5px; }
.person small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.cell-2 b { display: block; color: var(--ink); font-weight: 700; }
.cell-2 small { display: block; color: var(--muted); font-size: 12.5px; }
.cell-2 .sea { color: var(--sea); font-weight: 600; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 4px 0; color: var(--muted); font-size: 13px; }
.pager { display: flex; gap: 6px; align-items: center; }
.pager button { min-width: 36px; height: 36px; padding: 0 10px; border-radius: 11px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-family: var(--font-display); font-weight: 500; }
.pager button:hover:not(:disabled) { border-color: var(--sky); color: var(--sea); }
.pager button.on { background: var(--night); color: #fff; border-color: var(--night); }
.pager button:disabled { opacity: .45; cursor: default; }
.pager .gap { color: var(--muted-2); padding: 0 2px; }

/* ---------- İlerleme ---------- */
.progress { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: var(--sky); transition: width .6s ease; }
.progress.thin { height: 6px; }
.progress.lg { height: 12px; }
.progress > i.sea { background: var(--sea); }
.progress > i.night { background: var(--night); }
.progress > i.ok { background: var(--ok); }
.progress > i.warn { background: var(--warn); }
.progress > i.coral { background: var(--coral); }
.progress > i.grad { background: linear-gradient(90deg, var(--night), var(--sea) 55%, var(--sky)); }

/* ---------- Sekmeler ---------- */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.tabs button { border: 0; background: transparent; height: 34px; padding: 0 13px; border-radius: 10px; display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-display); font-weight: 500; font-size: 13.5px; color: var(--muted); }
.tabs button:hover { color: var(--ink); }
.tabs button.on { background: var(--night); color: #fff; }
.tabs .count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center; font-size: 11.5px; background: var(--line-2); color: var(--muted); }
.tabs button.on .count { background: rgba(255, 255, 255, .18); color: #fff; }
.count.ok { background: var(--ok-50); color: var(--ok-700); }
.count.sky { background: var(--sky-50); color: var(--sea); }
.count.coral { background: var(--coral-50); color: var(--coral-700); }

/* ---------- Izgaralar ---------- */
.grid { display: grid; gap: 20px; }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main-side { grid-template-columns: minmax(0, 1fr) 370px; align-items: start; }
.g-split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
.g-settings { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.g-cust { grid-template-columns: minmax(0, 1fr) 370px; align-items: start; }
@media (max-width: 1600px) {
  .g-cust { grid-template-columns: minmax(0, 1fr); }
  .g-cust > .stack.side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
@media (max-width: 900px) { .g-cust > .stack.side { grid-template-columns: minmax(0, 1fr); } }
.filter-grid { grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(0, 1fr)); gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

/* ---------- KPI kartları ---------- */
.kpi { display: flex; flex-direction: column; gap: 10px; padding: 20px; }
.kpi-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.kpi-label { font-family: var(--font-display); font-size: 13.5px; font-weight: 500; color: var(--muted); }
.kpi-label.caps { font-size: 12px; letter-spacing: .07em; text-transform: uppercase; }
.kpi-value { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.kpi-value strong { font-family: var(--font-display); font-weight: 600; font-size: 38px; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi-value strong.coral { color: var(--coral-700); }
.kpi-value strong.ok { color: var(--ok-700); }
.kpi-value span { color: var(--muted); font-weight: 600; }
.kpi-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 13px; }
.kpi-foot b { color: var(--ink); }
.trend-up { color: var(--ok-700); font-weight: 700; display: inline-flex; align-items: center; gap: 2px; }
.spark { width: 84px; height: 26px; }

/* =========================================================
   Sayfa özel
   ========================================================= */

/* ---------- Karşılama (hero) ---------- */
.hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 24px;
  min-height: 176px; padding: 26px 30px; border-radius: 26px;
  color: #fff;
  background:
    radial-gradient(80% 140% at 100% 0%, rgba(144, 224, 239, .35), transparent 55%),
    linear-gradient(120deg, var(--night) 0%, var(--night-700) 38%, var(--sea) 100%);
  box-shadow: var(--shadow-2);
}
.hero .eyebrow { color: var(--aqua); }
.hero h1 { color: #fff; font-size: 30px; margin: 6px 0 6px; }
.hero p { color: rgba(255, 255, 255, .82); font-size: 15px; max-width: 620px; }
.hero p b { color: #fff; }
.hero-text { position: relative; z-index: 2; flex: 1; min-width: 0; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.hero-mascot { position: relative; z-index: 2; width: 150px; height: 150px; margin: -10px 0 -30px; image-rendering: auto; filter: drop-shadow(0 10px 20px rgba(3, 4, 94, .45)); }
.hero-bubble {
  position: absolute; z-index: 3; right: 150px; top: 26px;
  padding: 8px 14px; border-radius: 16px 16px 4px 16px;
  background: #fff; color: var(--night);
  font-family: var(--font-display); font-weight: 500; font-size: 13.5px;
  box-shadow: 0 10px 20px -10px rgba(3, 4, 94, .5);
  animation: bob 3.2s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.waves { position: absolute; left: 0; right: 0; bottom: -2px; height: 70px; z-index: 1; opacity: .9; pointer-events: none; }

/* ---------- WhatsApp bağlantı paneli ---------- */
.conn { display: grid; grid-template-columns: auto minmax(0, 1fr) 240px; gap: 24px; align-items: stretch; }
.qr-box { display: flex; gap: 18px; align-items: center; padding: 16px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line-2); }
.qr { position: relative; width: 148px; height: 148px; padding: 8px; border-radius: 14px; background: #fff; box-shadow: var(--shadow-1); flex-shrink: 0; }
.qr svg { width: 100%; height: 100%; display: block; }
.qr .qr-logo { position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; transform: translate(-50%, -50%); border-radius: 11px; background: var(--night); padding: 5px; }
.qr.expired svg { filter: blur(3px); opacity: .4; }
.qr-meta { width: 200px; display: flex; flex-direction: column; gap: 8px; }
.linked { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: 148px; height: 148px; border-radius: 14px; background: linear-gradient(160deg, #fff, var(--ok-50)); border: 1px solid var(--ok-100); text-align: center; flex-shrink: 0; }
.linked .ico { font-size: 44px; color: var(--ok); }
.linked b { font-family: var(--font-display); font-weight: 600; color: var(--ok-700); }
.linked small { color: var(--muted); font-size: 12px; }
.conn-mid { display: flex; flex-direction: column; justify-content: space-between; gap: 12px; min-width: 0; }
.conn-phone { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.conn-phone strong { font-family: var(--font-display); font-size: 24px; font-weight: 600; color: var(--ink); }
.telemetry { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 13px; }
.telemetry span { display: inline-flex; align-items: center; gap: 6px; }
.telemetry .ico { color: var(--sea); font-size: 17px; }
.conn-actions { display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.steps { display: grid; gap: 10px; counter-reset: s; }
.steps li { list-style: none; display: flex; gap: 10px; align-items: flex-start; color: var(--text); }
.steps li::before { counter-increment: s; content: counter(s); width: 24px; height: 24px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; background: var(--sky-50); color: var(--sea); font-family: var(--font-display); font-weight: 600; font-size: 13px; }
.steps { padding: 0; margin: 0; }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 4px solid var(--aqua-100); border-top-color: var(--sky); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Canlı akış ---------- */
.feed { display: flex; flex-direction: column; gap: 10px; }
.feed-item { display: flex; gap: 12px; padding: 13px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line-2); animation: feedIn .45s ease both; }
@keyframes feedIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.feed-item .grow { flex: 1; min-width: 0; }
.feed-item .top { display: flex; justify-content: space-between; gap: 8px; }
.feed-item b { font-family: var(--font-display); font-weight: 500; color: var(--ink); }
.feed-item time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.feed-item p { color: var(--muted); font-size: 13px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.feed-item .meta { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 12px; font-weight: 700; }
.meta.ok { color: var(--ok-700); }
.meta.sea { color: var(--sea); }
.meta.coral { color: var(--coral-700); }
.feed-item.error { background: var(--coral-50); border-color: var(--coral-100); }

/* ---------- Dağılım listesi ---------- */
.dist { display: flex; flex-direction: column; gap: 16px; }
.dist-row .row { justify-content: space-between; margin-bottom: 8px; font-size: 13.5px; }
.dist-row .row b { font-family: var(--font-display); font-weight: 500; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Rota banner ---------- */
.banner {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 22px 24px; border-radius: 22px; color: #fff;
  background: linear-gradient(110deg, var(--night), var(--sea));
}
.banner h3 { color: #fff; font-size: 19px; }
.banner p { color: rgba(255, 255, 255, .78); font-size: 13.5px; margin-top: 2px; }
.banner .grow { flex: 1; min-width: 220px; }
.banner .tile { background: rgba(255, 255, 255, .12); color: var(--aqua); }

/* ---------- WhatsApp önizleme ---------- */
.wa { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.wa-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #008069; color: #fff; }
.wa-head .avatar { background: #fff; color: #008069; }
.wa-head b { display: block; font-weight: 700; font-size: 15px; }
.wa-head small { display: block; opacity: .85; font-size: 12px; }
.wa-head .ico { color: #fff; opacity: .9; }
.wa-body {
  padding: 18px 16px 22px; min-height: 220px;
  background-color: #EFE7DE;
  background-image: radial-gradient(rgba(0, 0, 0, .05) 1px, transparent 1.2px), radial-gradient(rgba(0, 0, 0, .035) 1px, transparent 1.2px);
  background-size: 22px 22px, 22px 22px; background-position: 0 0, 11px 11px;
  display: flex; flex-direction: column; gap: 10px;
}
.wa-day { align-self: center; padding: 4px 12px; border-radius: 8px; background: #fff; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; color: #54656F; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); }
.wa-bubble { position: relative; align-self: flex-end; max-width: 88%; padding: 8px 10px 20px; border-radius: 10px 0 10px 10px; background: #D9FDD3; color: #111B21; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; box-shadow: 0 1px 1px rgba(0, 0, 0, .1); }
.wa-bubble::after { content: ""; position: absolute; right: -7px; top: 0; border: 8px solid transparent; border-top-color: #D9FDD3; border-left-color: #D9FDD3; border-right: 0; border-bottom-width: 6px; }
.wa-bubble .time { position: absolute; right: 8px; bottom: 4px; display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: #667781; }
.wa-bubble .time .ico { font-size: 16px; color: #53BDEB; }
.wa-bubble .var { background: rgba(0, 180, 216, .18); border-radius: 4px; padding: 0 3px; font-weight: 700; }
.wa-bubble.in { align-self: flex-start; background: #fff; border-radius: 0 10px 10px 10px; }
.wa-bubble.in::after { right: auto; left: -7px; border-top-color: #fff; border-left-color: transparent; border-right: 8px solid #fff; border-left: 0; }

/* ---------- Şablon listesi ---------- */
.tpl { display: block; width: 100%; text-align: left; padding: 18px; border-radius: 18px; background: var(--surface); border: 2px solid var(--line); box-shadow: var(--shadow-1); transition: border-color .15s, box-shadow .15s, transform .15s; cursor: pointer; }
.tpl:hover { border-color: var(--aqua); transform: translateY(-1px); }
.tpl.on { border-color: var(--sky); box-shadow: 0 0 0 4px rgba(0, 180, 216, .12), var(--shadow-1); }
.tpl.off { opacity: .72; }
.tpl-h { display: flex; align-items: center; gap: 10px; }
.tpl-h h3 { flex: 1; min-width: 0; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpl-trig { display: flex; align-items: center; gap: 6px; margin: 8px 0 12px; color: var(--sea); font-size: 12.5px; font-weight: 700; }
.tpl-snip { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: 13px; line-height: 1.5; }
.tpl-snip span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sched-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr) minmax(0, 1fr); gap: 12px; }
.tpl-foot { display: flex; align-items: center; gap: 14px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.tpl-foot span { display: inline-flex; align-items: center; gap: 4px; }
.tpl-foot .ok { color: var(--ok-700); font-weight: 700; }
.var-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.var-chip { border: 1px dashed #A9DCEA; background: #fff; color: var(--sea); height: 32px; padding: 0 11px; border-radius: 10px; display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12px; font-weight: 500; transition: all .15s; }
.var-chip:hover { border-style: solid; border-color: var(--sky); background: var(--sky-50); }
.var-chip .ico { font-size: 15px; }
.panel { padding: 16px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line-2); }
.tip { display: flex; gap: 12px; padding: 16px; border-radius: 18px; background: linear-gradient(135deg, var(--aqua-50), #fff); border: 1px solid var(--aqua-100); }
.tip img { width: 56px; height: 56px; flex-shrink: 0; }
.tip b { font-family: var(--font-display); font-weight: 500; color: var(--ink); }
.tip p { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ---------- Kuyruk / terminal ---------- */
.now-sending { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px; border-radius: 16px; background: var(--sky-50); border: 1px solid var(--aqua-100); }
.now-sending .grow { flex: 1; min-width: 220px; }
.now-sending code { font-family: var(--font-mono); font-size: 12px; background: #fff; border: 1px solid var(--aqua-100); padding: 2px 7px; border-radius: 7px; color: var(--sea); }
.terminal { border-radius: 16px; background: var(--night-900); color: #BFEFFF; padding: 14px 16px; font-family: var(--font-mono); font-size: 12px; line-height: 1.75; height: 170px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; box-shadow: inset 0 0 0 1px rgba(144, 224, 239, .12); }
.terminal .t-h { display: flex; justify-content: space-between; color: var(--aqua); margin-bottom: 4px; }
.terminal .ln { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: rgba(191, 239, 255, .8); }
.terminal .ln::before { content: "› "; color: var(--sky); }
.terminal .ln.ok { color: #7CF0C8; }
.terminal .ln.err { color: #FFB3B3; }
.mini-stat { padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2); }
.mini-stat small { display: block; color: var(--muted); font-size: 12px; font-family: var(--font-display); }
.mini-stat strong { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--ink); line-height: 1.2; margin-top: 2px; }
.mini-stat em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--ok-700); }
.shield-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.shield { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line-2); }
.shield h4 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.shield h4 .ico { color: var(--sea); }
.shield p { color: var(--muted); font-size: 12.5px; }
.range { display: flex; align-items: center; gap: 8px; }
.range .input-group { flex: 1; }
.range .input { padding-right: 34px; }

/* ---------- Ayarlar ---------- */
.logo-drop { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 16px; border-radius: 18px; background: var(--surface-2); border: 1px dashed #B9DCE8; }
.logo-prev { width: 180px; height: 72px; border-radius: 14px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.logo-prev img { max-height: 56px; max-width: 160px; object-fit: contain; }
.danger-zone { padding: 16px; border-radius: 18px; background: var(--coral-50); border: 1px solid var(--coral-100); }
.danger-zone .eyebrow { color: var(--coral-700); }
.savebar {
  position: sticky; bottom: 16px; z-index: 20;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 16px 14px 20px; border-radius: 20px;
  background: rgba(255, 255, 255, .95); backdrop-filter: blur(10px);
  border: 1px solid var(--line); box-shadow: var(--shadow-2);
}
.savebar .grow { flex: 1; min-width: 200px; display: flex; align-items: center; gap: 10px; color: var(--muted); }

/* ---------- Açılır menü ---------- */
.dropdown-wrap { position: relative; }
.dropdown { position: absolute; right: 0; top: calc(100% + 10px); width: 360px; max-width: calc(100vw - 24px); background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-2); padding: 8px; z-index: 60; animation: viewIn .2s ease both; }
.dd-h { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 10px; }
.dd-h b { font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: 15px; }
.dd-item { display: flex; gap: 10px; padding: 10px; border-radius: 12px; }
.dd-item:hover { background: var(--aqua-50); }
.dd-item p { font-size: 13px; color: var(--text); }
.dd-item time { font-size: 11.5px; color: var(--muted); }
.dd-item.unread p { font-weight: 700; }

/* ---------- Toast ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; min-width: 280px; max-width: 420px; padding: 12px 16px 12px 12px; border-radius: 16px; background: var(--night); color: #fff; box-shadow: var(--shadow-2); animation: toastIn .35s cubic-bezier(.2, 1.3, .5, 1) both; }
.toast.out { animation: toastOut .25s ease forwards; }
.toast img { width: 44px; height: 44px; margin: -6px 0; }
.toast .ico { color: var(--aqua); font-size: 24px; }
.toast.err .ico { color: var(--coral); }
.toast b { display: block; font-family: var(--font-display); font-weight: 600; }
.toast small { display: block; color: rgba(255, 255, 255, .75); font-size: 12.5px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; background: rgba(3, 4, 94, .45); backdrop-filter: blur(3px); animation: fade .2s ease both; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 24px; box-shadow: var(--shadow-2); animation: viewIn .25s ease both; }
.modal-h { display: flex; align-items: center; gap: 12px; padding: 20px 22px 0; }
.modal-h h3 { flex: 1; font-size: 19px; }
.modal-b { padding: 18px 22px; }
.modal-f { display: flex; justify-content: flex-end; gap: 10px; padding: 0 22px 22px; flex-wrap: wrap; }
.modal .mascot-confirm { display: flex; gap: 14px; align-items: center; }
.modal .mascot-confirm img { width: 72px; height: 72px; }

/* ---------- Boş durum ---------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 34px 16px; color: var(--muted); }
.empty img { width: 110px; height: 110px; margin-bottom: 6px; }
.empty b { font-family: var(--font-display); font-weight: 600; font-size: 17px; color: var(--ink); }

/* Hızlı kayıt kartı başlığı */
.quick-h { margin: -22px -22px 18px; padding: 20px 22px; border-radius: var(--r-card) var(--r-card) 0 0; color: #fff; background: linear-gradient(120deg, var(--night), var(--sea)); display: flex; align-items: center; gap: 12px; }
.quick-h h3 { color: #fff; font-size: 18px; flex: 1; }
.quick-h .ico { color: var(--aqua); }

.bulkbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 12px; border-radius: 14px; background: var(--night); color: #fff; animation: viewIn .2s ease both; }
.bulkbar b { font-family: var(--font-display); font-weight: 500; }

/* =========================================================
   Duyarlı düzen
   ========================================================= */
.only-mobile { display: none; }
.top-mark { width: 38px; height: 38px; border-radius: 11px; background: var(--night); place-items: center; }
.top-mark img { width: 30px; height: 30px; }

@media (max-width: 1480px) {
  .conn { grid-template-columns: auto minmax(0, 1fr); }
  .conn-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .conn-actions .btn { flex: 1; }
  .top-status .hide-lg { display: none; }
}
@media (max-width: 1280px) {
  .g-main-side { grid-template-columns: minmax(0, 1fr); }
  .g-split, .g-settings { grid-template-columns: minmax(0, 1fr); }
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shield-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-grid > .input-group { grid-column: 1 / -1; }
  .hide-md { display: none; }
}
@media (max-width: 1024px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w); transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-2); }
  .only-mobile { display: inline-grid; }
  .top-status { display: none; }
  .topbar { padding: 0 16px; }
  .content { padding: 20px 16px; }
}
@media (max-width: 720px) {
  .g-4, .g-3, .g-2, .shield-grid, .filter-grid, .sched-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .conn { grid-template-columns: minmax(0, 1fr); }
  .qr-box { flex-direction: column; align-items: stretch; }
  .qr, .linked { align-self: center; }
  .qr-meta { width: auto; }
  .hero { flex-direction: column; align-items: flex-start; padding: 22px; }
  .hero-mascot { position: absolute; right: -6px; bottom: 0; width: 110px; height: 110px; margin: 0; opacity: .95; }
  .hero-bubble { display: none; }
  .hero h1 { font-size: 24px; padding-right: 70px; }
  .page-head h1 { font-size: 26px; }
  .hide-sm { display: none; }
  .crumbs > span:first-child, .crumbs > .ico { display: none; }
  .kpi-value strong { font-size: 32px; }
  .toasts { left: 12px; right: 12px; align-items: stretch; }
  .toast { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Profil avatarı bağlantı olarak */
a.avatar, a.avatar:hover { color: var(--aqua); }
a.dd-item { color: inherit; }

/* WhatsApp QR ve bağlantı durumları */
.qr img { width: 100%; height: 100%; object-fit: contain; display: block; image-rendering: pixelated; }
.linked.off { background: linear-gradient(160deg, #fff, var(--coral-50)); border-color: var(--coral-100); }
.linked.off .ico { color: var(--coral); }
.linked.off b { color: var(--coral-700); }
.ico.spin { animation: spin 1s linear infinite; }
