/* ============================================================
   AXION Voice — Tasarım Sistemi v2 · "AI Operating System"
   İlham: Apple Intelligence · Linear · Stripe · Vercel
   ============================================================ */
:root {
  --bg: #06080D;
  --bg-2: #0A0E16;
  --card: #10141D;
  --card-2: #151A26;
  --glass: rgba(16, 20, 29, 0.58);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #F2F5FB;
  --muted: #8A93A8;
  --dim: #5A6478;
  --acc-1: #45B8FF;
  --acc-2: #8C7DFF;
  --grad: linear-gradient(135deg, #45B8FF, #8C7DFF);
  --grad-soft: linear-gradient(135deg, rgba(69,184,255,.14), rgba(140,125,255,.14));
  --ok: #3DDC97;
  --warn: #FFB454;
  --danger: #FF6B6B;
  --violet: #8C7DFF;
  --r-lg: 24px;
  --r-md: 18px;
  --r-sm: 12px;
  --t: 250ms;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 8px 28px rgba(0, 0, 0, 0.35);
  --font: -apple-system, "SF Pro Display", "SF Pro Text", "Inter", "Geist", BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  letter-spacing: 0.01em;
  background-image:
    radial-gradient(1200px 600px at 12% -8%, rgba(69, 184, 255, 0.07), transparent 60%),
    radial-gradient(1000px 560px at 92% -4%, rgba(140, 125, 255, 0.07), transparent 55%);
  background-repeat: no-repeat;
}
a { color: var(--acc-1); text-decoration: none; }
button { font-family: inherit; }
::selection { background: rgba(69, 184, 255, 0.3); }

/* ---- sayfa girişi: fade + slide ---- */
.page-enter { animation: pageIn 420ms var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.stagger > * { animation: pageIn 420ms var(--ease) both; }
.stagger > *:nth-child(2) { animation-delay: 60ms; }
.stagger > *:nth-child(3) { animation-delay: 120ms; }
.stagger > *:nth-child(4) { animation-delay: 180ms; }
.stagger > *:nth-child(5) { animation-delay: 240ms; }
.stagger > *:nth-child(6) { animation-delay: 300ms; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---- yüzeyler ---- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 24px;
  transition: border-color var(--t) var(--ease), transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}
.card.lg { border-radius: var(--r-lg); padding: 28px; }
.card.hover:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.glass {
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(1.4);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
/* hover ışık süpürmesi */
.light-sweep { position: relative; overflow: hidden; }
.light-sweep::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px 200px at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.06), transparent 60%);
  opacity: 0; transition: opacity var(--t) var(--ease);
}
.light-sweep:hover::after { opacity: 1; }

.grid { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.small { font-size: 12.5px; }
h1, h2, h3 { font-weight: 650; letter-spacing: -0.025em; }
.eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hr { height: 1px; background: var(--line); border: none; margin: 18px 0; }

/* ---- form ---- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
input, select, textarea {
  font-family: inherit; font-size: 15px; color: var(--text);
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 0 16px; height: 48px; outline: none;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), background var(--t) var(--ease);
}
textarea { padding: 13px 16px; height: auto; min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  border-color: rgba(69, 184, 255, 0.55);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 0 0 4px rgba(69, 184, 255, 0.12);
}
select option { background: var(--bg-2); color: var(--text); }
input::placeholder, textarea::placeholder { color: var(--dim); }

/* ---- butonlar: Gradient / Secondary / Ghost · 48px ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  height: 48px; padding: 0 24px; border-radius: 14px; border: none;
  font-size: 14.5px; font-weight: 650; letter-spacing: 0.01em; cursor: pointer;
  color: #061018; background: var(--grad);
  box-shadow: 0 10px 30px rgba(69, 184, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), opacity var(--t), filter var(--t);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 38px rgba(69, 184, 255, 0.38), inset 0 1px 0 rgba(255,255,255,.35); filter: brightness(1.05); }
.btn:active { transform: translateY(0) scale(0.99); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; filter: none; }
.btn.secondary {
  color: var(--text); background: var(--card-2);
  border: 1px solid var(--line-2); box-shadow: none;
}
.btn.secondary:hover { background: #1A2030; box-shadow: var(--shadow-sm); }
.btn.ghost { color: var(--muted); background: transparent; border: 1px solid transparent; box-shadow: none; }
.btn.ghost:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); box-shadow: none; }
.btn.danger { color: #2A0808; background: linear-gradient(135deg, #FF6B6B, #FF8E8E); box-shadow: 0 10px 30px rgba(255, 107, 107, 0.25); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 11px; }
.btn.icon { width: 48px; padding: 0; }
.btn.icon.sm { width: 36px; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---- rozetler ---- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 650; letter-spacing: 0.02em;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line);
  color: var(--muted);
}
.badge.ok { color: var(--ok); background: rgba(61, 220, 151, 0.09); border-color: rgba(61, 220, 151, 0.28); }
.badge.warn { color: var(--warn); background: rgba(255, 180, 84, 0.09); border-color: rgba(255, 180, 84, 0.28); }
.badge.danger { color: var(--danger); background: rgba(255, 107, 107, 0.1); border-color: rgba(255, 107, 107, 0.3); }
.badge.info { color: var(--acc-1); background: rgba(69, 184, 255, 0.09); border-color: rgba(69, 184, 255, 0.28); }
.badge.violet { color: var(--violet); background: rgba(140, 125, 255, 0.1); border-color: rgba(140, 125, 255, 0.3); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); flex: none; transition: background var(--t); }
.dot.on { background: var(--ok); box-shadow: 0 0 10px rgba(61, 220, 151, 0.9); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--grad-soft); border: 1px solid var(--line-2);
  font-size: 13px; font-weight: 700; color: var(--text);
}

/* ---- AI Küresi (login + cihaz ortak) ---- */
.ai-orb {
  --size: 120px;
  width: var(--size); height: var(--size); border-radius: 50%; position: relative; cursor: pointer;
  background:
    radial-gradient(circle at 30% 26%, rgba(255, 255, 255, 0.75), transparent 32%),
    radial-gradient(circle at 68% 74%, rgba(69, 184, 255, 0.9), transparent 58%),
    radial-gradient(circle at 40% 65%, rgba(140, 125, 255, 0.95), transparent 62%),
    linear-gradient(135deg, #45B8FF, #8C7DFF);
  box-shadow: 0 0 60px rgba(96, 154, 255, 0.4), 0 0 140px rgba(140, 125, 255, 0.22), inset 0 0 34px rgba(255, 255, 255, 0.28);
  transition: transform var(--t) var(--ease), box-shadow 400ms var(--ease), filter 400ms var(--ease);
  animation: orbDrift 9s ease-in-out infinite;
}
.ai-orb::before {
  content: ""; position: absolute; inset: -14px; border-radius: 50%;
  border: 1.5px solid rgba(96, 154, 255, 0.25);
  animation: orbRing 3.2s var(--ease) infinite;
}
.ai-orb::after {
  content: ""; position: absolute; inset: 10%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.5), transparent 45%);
  filter: blur(6px); opacity: .8;
}
@keyframes orbDrift { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-7px) scale(1.015); } }
@keyframes orbRing { 0% { transform: scale(0.94); opacity: 1; } 100% { transform: scale(1.42); opacity: 0; } }
.ai-orb.listening { animation: orbPulse 1.1s ease-in-out infinite; box-shadow: 0 0 80px rgba(61, 220, 151, 0.5), inset 0 0 34px rgba(255, 255, 255, 0.3); }
.ai-orb.thinking { animation: orbSpin 1.4s linear infinite; filter: hue-rotate(36deg) saturate(1.2); }
.ai-orb.speaking { animation: orbPulse 0.55s ease-in-out infinite; }
@keyframes orbPulse { 50% { transform: scale(1.07); } }
@keyframes orbSpin { to { transform: rotate(360deg); } }

/* ---- KPI hero (3 büyük gösterge) ---- */
.kpi-hero { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.kpi-hero .kpi { padding: 26px 28px; position: relative; overflow: hidden; }
.kpi-hero .kpi .n {
  font-size: 44px; font-weight: 700; letter-spacing: -0.04em; line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.kpi-hero .kpi .n small { font-size: 17px; font-weight: 600; color: var(--muted); letter-spacing: -0.01em; }
.kpi-hero .kpi .l { font-size: 12px; font-weight: 650; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; margin-top: 8px; }
.kpi-hero .kpi .s { margin-top: 10px; font-size: 12.5px; }
@media (max-width: 900px) { .kpi-hero { grid-template-columns: 1fr; } }

/* ---- tablo (sade, ince çizgi) ---- */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left; font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--dim);
  padding: 10px 14px; border-bottom: 1px solid var(--line);
}
td { padding: 13px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.045); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255, 255, 255, 0.018); }

/* ============================================================
   Dynamic Island bildirimleri (toast YOK)
   ============================================================ */
#ax-island-wrap {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 500; display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none; width: min(480px, calc(100vw - 32px));
}
.ax-island {
  pointer-events: auto; display: flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 10px 18px 10px 14px; max-width: 100%;
  background: rgba(8, 10, 16, 0.86);
  backdrop-filter: blur(30px) saturate(1.5); -webkit-backdrop-filter: blur(30px) saturate(1.5);
  border: 1px solid var(--line-2); border-radius: 26px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  animation: islandIn 480ms cubic-bezier(0.34, 1.3, 0.5, 1) both;
}
.ax-island.out { animation: islandOut 320ms var(--ease) both; }
@keyframes islandIn { from { transform: translateY(-64px) scale(0.82); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes islandOut { to { transform: translateY(-56px) scale(0.86); opacity: 0; } }
.ax-island .ic {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: var(--grad-soft); border: 1px solid var(--line);
}
.ax-island .ic svg { width: 17px; height: 17px; }
.ax-island .tx { min-width: 0; flex: 1; }
.ax-island .tx .t1 { font-size: 13.5px; font-weight: 650; line-height: 1.3; }
.ax-island .tx .t2 { font-size: 12px; color: var(--muted); line-height: 1.35; margin-top: 1px; }
.ax-island.ok .ic { color: var(--ok); border-color: rgba(61, 220, 151, 0.35); background: rgba(61, 220, 151, 0.1); }
.ax-island.danger .ic { color: var(--danger); border-color: rgba(255, 107, 107, 0.4); background: rgba(255, 107, 107, 0.12); }
.ax-island.warn .ic { color: var(--warn); border-color: rgba(255, 180, 84, 0.4); background: rgba(255, 180, 84, 0.1); }
.ax-island.info .ic, .ax-island .ic { color: var(--acc-1); }

/* ============================================================
   Rail Sidebar — dar ikon, hover'da genişler
   ============================================================ */
.ax-rail {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 100;
  width: 76px; padding: 18px 14px; display: flex; flex-direction: column; gap: 6px;
  background: rgba(8, 11, 17, 0.82);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--line);
  transition: width 280ms var(--ease), box-shadow 280ms var(--ease), background 280ms var(--ease);
  overflow: hidden; white-space: nowrap;
}
.ax-rail:hover { width: 248px; box-shadow: 40px 0 90px rgba(0, 0, 0, 0.5); background: rgba(8, 11, 17, 0.94); }
.ax-rail .r-brand { display: flex; align-items: center; gap: 12px; padding: 6px 6px 18px; }
.ax-rail .r-orb {
  width: 36px; height: 36px; border-radius: 50%; flex: none;
  background: var(--grad);
  box-shadow: 0 0 22px rgba(96, 154, 255, 0.55), inset 0 0 10px rgba(255, 255, 255, 0.35);
}
.ax-rail .r-title { opacity: 0; transform: translateX(-6px); transition: all 240ms var(--ease) 40ms; }
.ax-rail:hover .r-title { opacity: 1; transform: none; }
.ax-rail .r-title b { font-size: 15px; letter-spacing: -0.02em; display: block; }
.ax-rail .r-title span { font-size: 11px; color: var(--muted); }
.ax-rail .r-item {
  display: flex; align-items: center; gap: 13px; height: 46px; padding: 0 12px;
  border-radius: 13px; color: var(--muted); font-size: 14px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent; text-decoration: none;
  transition: background var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t);
}
.ax-rail .r-item svg { width: 21px; height: 21px; flex: none; }
.ax-rail .r-item .r-label { opacity: 0; transform: translateX(-6px); transition: all 240ms var(--ease) 60ms; }
.ax-rail:hover .r-item .r-label { opacity: 1; transform: none; }
.ax-rail .r-item:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.ax-rail .r-item.active {
  color: var(--text); background: var(--grad-soft);
  border-color: rgba(96, 154, 255, 0.35);
}
.ax-rail .r-item.active svg { color: var(--acc-1); }
.ax-rail .r-foot { margin-top: auto; }
.ax-rail .r-user { display: flex; align-items: center; gap: 11px; padding: 10px 6px; }
.ax-rail .r-user .r-label { min-width: 0; }
.ax-rail .r-user .nm { font-size: 13px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; }
.ax-rail .r-user .rl { font-size: 11px; color: var(--muted); }
.rail-page { margin-left: 76px; min-height: 100vh; }

/* ---- modal ---- */
.modal-back {
  position: fixed; inset: 0; z-index: 300; display: none;
  align-items: flex-start; justify-content: center; padding: 6vh 18px;
  background: rgba(3, 4, 8, 0.72); backdrop-filter: blur(10px); overflow: auto;
}
.modal-back.open { display: flex; }
.modal {
  width: 100%; max-width: 680px; background: var(--bg-2);
  border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 30px;
  box-shadow: var(--shadow); animation: pageIn 300ms var(--ease);
}

/* ---- yardımcılar ---- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; padding: 7px 13px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.045); border: 1px solid var(--line); color: var(--muted);
  cursor: pointer; transition: all var(--t) var(--ease); white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: var(--line-2); background: rgba(255, 255, 255, 0.07); }
.chip.acc { color: var(--acc-1); background: rgba(69, 184, 255, 0.08); border-color: rgba(69, 184, 255, 0.26); }
.kv { font-size: 12px; color: var(--muted); }
.skeleton { background: linear-gradient(90deg, var(--card), var(--card-2), var(--card)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.18); }
::-webkit-scrollbar-track { background: transparent; }
