/* TIM WMS — AXION × Apple tasarım sistemi */
:root {
  --bg: #05060A; --surface: #10131B; --surface2: #161A25; --surface3: #1D2230;
  --border: rgba(255,255,255,.07); --border2: rgba(255,255,255,.13);
  --text: #F2F5FA; --muted: #8B93A7; --dim: #5A6274;
  --mint: #34D399; --cyan: #22D3EE; --blue: #3B82F6; --purple: #A78BFA;
  --red: #F87171; --amber: #FBBF24; --peri: #93B4F8; --teal: #2DD4BF;
  --r: 20px; --r-sm: 12px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI Variable', 'Segoe UI', Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(1100px 500px at 85% -10%, rgba(34,211,238,.045), transparent 60%),
                    radial-gradient(900px 500px at -10% 110%, rgba(167,139,250,.05), transparent 60%);
  background-attachment: fixed;
}
#app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }

.glass { background: rgba(16,19,27,.72); backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); border: 1px solid var(--border); }

/* ---------- sidebar ---------- */
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 22px 14px; border-right: 1px solid var(--border); }
.brand { display: flex; gap: 12px; align-items: center; padding: 4px 8px; }
.brand-orb { width: 42px; height: 42px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 32% 28%, #3b4b66 0%, #10131B 58%, #05060A 100%);
  border: 1px solid var(--border2);
  box-shadow: 0 0 22px rgba(34,211,238,.35), inset 0 0 14px rgba(147,180,248,.25);
  animation: orbPulse 4s ease-in-out infinite; }
@keyframes orbPulse { 0%,100% { box-shadow: 0 0 18px rgba(34,211,238,.25), inset 0 0 12px rgba(147,180,248,.2);} 50% { box-shadow: 0 0 30px rgba(34,211,238,.5), inset 0 0 18px rgba(147,180,248,.35);} }
.brand-name { font-size: 19px; font-weight: 800; letter-spacing: .5px; }
.brand-name span { color: var(--cyan); }
.brand-sub { font-size: 11px; color: var(--muted); }
#nav { display: flex; flex-direction: column; gap: 4px; }
#nav a { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 13.5px; transition: all .18s; border: 1px solid transparent; }
#nav a:hover { color: var(--text); background: rgba(255,255,255,.04); }
#nav a.active { color: var(--cyan); background: rgba(34,211,238,.08); border-color: rgba(34,211,238,.22); }
.nico { width: 20px; text-align: center; font-size: 15px; opacity: .9; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.sim-box { border-radius: var(--r-sm); padding: 12px; font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 10px; }
.sim-row { display: flex; align-items: center; gap: 8px; }
.sim-row .switch { margin-left: auto; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 8px var(--mint); animation: blink 2s infinite; }
.live-dot.off { background: var(--muted); box-shadow: none; animation: none; }
.sim-box.locked input { cursor: not-allowed; opacity: .55; }
.reset-demo-btn { width: 100%; justify-content: center; border-color: var(--border2); background: rgba(248,113,113,.06); color: var(--muted); }
.reset-demo-btn:hover { color: var(--red); border-color: rgba(248,113,113,.45); }
@keyframes blink { 50% { opacity: .4; } }
input[type=range] { width: 100%; accent-color: var(--cyan); }
.switch { position: relative; display: inline-block; width: 36px; height: 21px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .knob { position: absolute; inset: 0; background: var(--surface3); border-radius: 20px; transition: .2s; border: 1px solid var(--border2); }
.switch .knob:before { content: ''; position: absolute; width: 15px; height: 15px; left: 2px; top: 2px; border-radius: 50%; background: var(--muted); transition: .2s; }
.switch input:checked + .knob { background: rgba(52,211,153,.25); border-color: var(--mint); }
.switch input:checked + .knob:before { transform: translateX(15px); background: var(--mint); }
.me { border-radius: var(--r-sm); padding: 10px 12px; display: flex; align-items: center; gap: 10px; }

/* ---------- topbar / layout ---------- */
#main { display: flex; flex-direction: column; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; padding: 14px 26px; border-left: none; border-right: none; border-top: none; }
.topbar h1 { font-size: 21px; font-weight: 800; letter-spacing: -.2px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.clock { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.view { padding: 24px 26px 60px; display: flex; flex-direction: column; gap: 20px; animation: fadeUp .3s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px);} to { opacity: 1; transform: none;} }

/* ---------- bileşenler ---------- */
.btn { font: inherit; font-weight: 700; border: 1px solid var(--border2); background: var(--surface2); color: var(--text); border-radius: 999px; padding: 9px 18px; cursor: pointer; transition: all .15s; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.btn:hover { border-color: var(--cyan); transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn.accent { background: linear-gradient(120deg, var(--cyan), var(--blue)); color: #04121a; border: none; box-shadow: 0 4px 18px rgba(34,211,238,.25); }
.btn.mint { background: linear-gradient(120deg, var(--mint), var(--teal)); color: #04160e; border: none; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); padding: 8px 10px; }
.btn.ghost:hover { color: var(--text); transform: none; }
.btn.danger { background: rgba(248,113,113,.12); border-color: rgba(248,113,113,.4); color: var(--red); }
.btn.sm { padding: 6px 12px; font-size: 12px; }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(34,211,238,.48); outline-offset: 2px; }
.badge { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; padding: 0 4px; }
#notifBtn { position: relative; font-size: 16px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; }
.card h3 { font-size: 15px; font-weight: 800; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.card h3 .sub { font-weight: 600; color: var(--muted); font-size: 12px; margin-left: auto; }
.grid { display: grid; gap: 16px; }

.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 18px 20px; transition: border-color .2s; }
.stat:hover { border-color: var(--border2); }
.stat .num { font-size: 30px; font-weight: 800; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.stat .lbl { color: var(--muted); font-size: 12.5px; margin-top: 2px; font-weight: 600; }
.stat.c-mint .num { color: var(--mint);} .stat.c-cyan .num { color: var(--cyan);} .stat.c-blue .num { color: var(--blue);} .stat.c-purple .num { color: var(--purple);} .stat.c-red .num { color: var(--red);} .stat.c-amber .num { color: var(--amber);}

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid var(--border2); color: var(--muted); background: var(--surface2); white-space: nowrap; }
.pill.mint { color: var(--mint); border-color: rgba(52,211,153,.35); background: rgba(52,211,153,.08);}
.pill.cyan { color: var(--cyan); border-color: rgba(34,211,238,.35); background: rgba(34,211,238,.08);}
.pill.blue { color: var(--peri); border-color: rgba(59,130,246,.4); background: rgba(59,130,246,.1);}
.pill.purple { color: var(--purple); border-color: rgba(167,139,250,.4); background: rgba(167,139,250,.1);}
.pill.red { color: var(--red); border-color: rgba(248,113,113,.4); background: rgba(248,113,113,.1);}
.pill.amber { color: var(--amber); border-color: rgba(251,191,36,.4); background: rgba(251,191,36,.1);}
.pill.dim { color: var(--dim); }

.chipbar { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font: inherit; font-size: 12.5px; font-weight: 700; padding: 7px 16px; border-radius: 999px; border: 1px solid var(--border2); background: transparent; color: var(--muted); cursor: pointer; transition: all .15s; }
.chip:hover { color: var(--text); }
.chip.on { color: var(--mint); border-color: var(--mint); background: rgba(52,211,153,.08); }

.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; color: #05060A; flex: none; }
.avatar.lg { width: 52px; height: 52px; font-size: 17px; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: .6px; font-weight: 700; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr { cursor: pointer; transition: background .12s; }
.tbl tbody tr:hover { background: rgba(255,255,255,.025); }
.mono { font-family: ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace; font-size: 12px; }

.progress { height: 6px; border-radius: 4px; background: var(--surface3); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--cyan), var(--mint)); transition: width .4s ease; }

input, select, textarea { font: inherit; color: var(--text); background: var(--surface2); border: 1px solid var(--border2); border-radius: 12px; padding: 10px 14px; outline: none; transition: border-color .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--cyan); }
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }

/* ---------- toast ---------- */
#toasts { position: fixed; top: 70px; right: 22px; z-index: 100; display: flex; flex-direction: column; gap: 10px; width: 340px; }
.toast { background: rgba(22,26,37,.92); backdrop-filter: blur(16px); border: 1px solid var(--border2); border-left: 3px solid var(--cyan); border-radius: 14px; padding: 13px 16px; box-shadow: 0 12px 40px rgba(0,0,0,.5); animation: slideIn .25s ease; font-size: 13px; }
.toast.warn { border-left-color: var(--amber); }
.toast.task { border-left-color: var(--mint); }
.toast b { display: block; margin-bottom: 2px; }
.toast .sub { color: var(--muted); font-size: 12px; }
@keyframes slideIn { from { opacity: 0; transform: translateX(24px);} to { opacity: 1; transform: none;} }
.toast.out { animation: slideOut .3s ease forwards; }
@keyframes slideOut { to { opacity: 0; transform: translateX(24px);} }

/* ---------- modal & drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(3,4,8,.6); backdrop-filter: blur(4px); z-index: 60; display: grid; place-items: center; animation: fade .2s; }
.overlay.reset-overlay { z-index: 100; }
@keyframes fade { from { opacity: 0;} }
.modal { width: min(880px, 94vw); max-height: 88vh; overflow: auto; background: var(--surface); border: 1px solid var(--border2); border-radius: 24px; padding: 26px; animation: pop .25s cubic-bezier(.34,1.4,.64,1); }
@keyframes pop { from { opacity: 0; transform: scale(.95) translateY(10px);} }
.modal h2 { font-size: 18px; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.reset-warning { border: 1px solid rgba(248,113,113,.3); background: rgba(248,113,113,.07); border-radius: 14px; padding: 14px 16px; color: var(--muted); }
.reset-warning b { color: var(--red); display: block; margin-bottom: 5px; }
.reset-list { margin: 14px 0 18px 20px; color: var(--muted); font-size: 13px; }
.reset-list li { margin: 5px 0; }
.reset-confirm { margin-top: 14px; }
.reset-confirm input { width: 100%; margin-top: 7px; letter-spacing: 1px; font-weight: 800; }
.reset-status { min-height: 22px; margin-top: 10px; color: var(--muted); font-size: 12.5px; }
.reset-status.error { color: var(--red); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 94vw); background: var(--surface); border-left: 1px solid var(--border2); z-index: 70; padding: 24px; overflow-y: auto; animation: drIn .28s cubic-bezier(.3,1.1,.5,1); box-shadow: -30px 0 60px rgba(0,0,0,.45); }
@keyframes drIn { from { transform: translateX(60px); opacity: 0; } }

/* ---------- assistant ---------- */
.assistant { position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 92vw); z-index: 80; display: flex; flex-direction: column; border-left: 1px solid var(--border2); animation: drIn .28s cubic-bezier(.3,1.1,.5,1); }
.assistant-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.assistant-head .sub { font-size: 11.5px; color: var(--cyan); }
.assistant-head button { margin-left: auto; }
.ai-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; background: linear-gradient(135deg, var(--cyan), var(--blue)); color: #fff; }
.assistant-body { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 11px 15px; border-radius: 18px; font-size: 13.5px; white-space: pre-wrap; animation: fadeUp .25s; }
.msg.bot { background: var(--surface2); border: 1px solid var(--border); border-bottom-left-radius: 6px; align-self: flex-start; }
.msg.user { background: linear-gradient(120deg, rgba(34,211,238,.2), rgba(59,130,246,.22)); border: 1px solid rgba(34,211,238,.3); border-bottom-right-radius: 6px; align-self: flex-end; }
.assistant-chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 18px 10px; }
.assistant-input { display: flex; gap: 8px; padding: 14px 18px 18px; border-top: 1px solid var(--border); }
.assistant-input input { flex: 1; border-radius: 999px; }
.assistant-input .btn { padding: 9px 16px; }

/* ---------- görev panosu ---------- */
.board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: start; }
.board .col { background: rgba(16,19,27,.5); border: 1px solid var(--border); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.board .col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); display: flex; justify-content: space-between; padding: 2px 6px; }
.tcard { background: var(--surface2); border: 1px solid var(--border2); border-radius: 14px; padding: 12px; cursor: pointer; transition: all .15s; }
.tcard:hover { border-color: var(--cyan); transform: translateY(-1px); }
.tcard .t { font-weight: 700; font-size: 13px; margin: 6px 0 4px; }
.tcard .d { color: var(--muted); font-size: 12px; }
.tcard .foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; }

/* ---------- adım listesi ---------- */
.steps { display: flex; flex-direction: column; gap: 6px; }
.step { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 12px; background: var(--surface2); border: 1px solid var(--border); font-size: 13px; }
.step.done { opacity: .5; }
.step.cur { border-color: var(--cyan); background: rgba(34,211,238,.07); }
.step .ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; flex: none; background: var(--surface3); color: var(--muted); }
.step.done .ic { background: rgba(52,211,153,.2); color: var(--mint); }
.step.cur .ic { background: rgba(34,211,238,.2); color: var(--cyan); }

/* ---------- irsaliye tarayıcı ---------- */
.scan-wrap { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--border2); background: #0b0d14; }
.scan-wrap img { width: 100%; display: block; }
.scanline { position: absolute; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--cyan), transparent); box-shadow: 0 0 24px 6px rgba(34,211,238,.5); animation: scan 2.2s ease-in-out infinite; }
@keyframes scan { 0% { top: 2%; } 50% { top: 96%; } 100% { top: 2%; } }
.xfield { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--surface2); border: 1px solid var(--border); animation: fadeUp .3s ease both; }
.xfield .k { color: var(--muted); font-size: 12px; width: 90px; flex: none; }
.xfield .v { font-weight: 700; font-size: 13px; flex: 1; }
.conf { font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.conf.hi { color: var(--mint); background: rgba(52,211,153,.12); }
.conf.md { color: var(--amber); background: rgba(251,191,36,.12); }

/* ---------- harita ---------- */
.map-svg { width: 100%; height: auto; }
.map-cell { transition: opacity .2s; cursor: pointer; }
.map-cell:hover { opacity: .8; stroke: var(--cyan); stroke-width: 2; }
.legend { display: flex; gap: 14px; align-items: center; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; vertical-align: -2px; margin-right: 5px; }

/* ---------- misc ---------- */
.row { display: flex; align-items: center; gap: 10px; }
.spread { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.muted { color: var(--muted); } .dim { color: var(--dim); }
.sm { font-size: 12px; } .xs { font-size: 11px; }
.feed { display: flex; flex-direction: column; gap: 2px; max-height: 420px; overflow-y: auto; }
.feed-item { display: flex; gap: 10px; padding: 9px 6px; border-bottom: 1px solid var(--border); font-size: 12.5px; align-items: flex-start; animation: fadeUp .3s; }
.feed-item:last-child { border-bottom: none; }
.feed-item .time { color: var(--dim); font-size: 11px; flex: none; width: 40px; font-variant-numeric: tabular-nums; padding-top: 1px; }
.feed-item .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; margin-top: 5px; }
.spark { display: block; }
.ring { transform: rotate(-90deg); }
.empty { text-align: center; color: var(--dim); padding: 40px 20px; font-size: 13px; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
