/* Veilox — koyu, cam görünümlü panel; arkada dönen dünya */
:root {
  --bg: #070b14;
  --bg2: #0c1424;
  --glass: rgba(16, 26, 46, .72);
  --glass-strong: rgba(18, 30, 54, .9);
  --line: rgba(111, 182, 255, .16);
  --line-strong: rgba(111, 182, 255, .32);
  --text: #e6eefb;
  --muted: #8a9bb8;
  --accent: #6fb6ff;
  --accent2: #9b7bff;
  --ok: #4ad295;
  --warn: #f2c14e;
  --bad: #ff6b6b;
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: radial-gradient(1200px 800px at 50% 40%, #0f1d38 0%, var(--bg) 70%) fixed, var(--bg);
  color: var(--text); font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased;
}
#globe { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
#app { position: relative; z-index: 1; min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.glass { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 10px 40px rgba(0, 0, 0, .35); }

/* marka */
.brand { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--text); }
.brand b { font-size: 26px; letter-spacing: .32em; font-weight: 800; }
.brand.small b { font-size: 16px; letter-spacing: .28em; }
.mark { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 0 18px rgba(111, 182, 255, .55); position: relative; flex: none; }
.mark::after { content: ""; position: absolute; inset: 6px; border: 2px solid rgba(255, 255, 255, .85); border-top: 0; border-radius: 0 0 50% 50%; }
.brand.small .mark { width: 20px; height: 20px; border-radius: 6px; }
.brand.small .mark::after { inset: 4px; }

/* form */
.input { width: 100%; height: 44px; border-radius: 10px; border: 1px solid var(--line-strong); background: rgba(5, 10, 20, .6);
  color: var(--text); padding: 0 14px; font: inherit; outline: none; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(111, 182, 255, .18); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: rgba(111, 182, 255, .08); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { border-color: var(--accent); }
.btn.primary { height: 44px; background: linear-gradient(135deg, #3b8ff0, #7a5cf0); border: 0; color: #fff; }
.btn.primary:disabled { opacity: .6; cursor: progress; }
.btn.ghost { background: none; }
.error { color: var(--bad); min-height: 18px; font-size: 13px; }

/* giriş */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login { width: min(380px, 100%); padding: 34px 28px 28px; display: flex; flex-direction: column; gap: 12px; }
.login p { margin: -4px 0 10px; }

/* üst çubuk */
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 12px 22px;
  background: rgba(7, 11, 20, .72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.back { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line-strong); display: flex; align-items: center; justify-content: center;
  color: var(--text); font-size: 18px; }
.back:hover { border-color: var(--accent); }

.page { max-width: 1400px; margin: 0 auto; padding: 28px 22px 60px; }
.title { font-size: 30px; font-weight: 800; letter-spacing: -.01em; }

/* şirket kartları */
.tenants { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; margin-top: 22px; }
.tenant { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 28px 22px 22px; color: var(--text); text-align: center;
  transition: transform .2s, border-color .2s, box-shadow .2s; }
.tenant:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 18px 50px rgba(0, 0, 0, .5), 0 0 0 1px rgba(111, 182, 255, .2); }
.tenant h2 { font-size: 19px; }
.logo-box { width: 100%; height: 170px; border-radius: 14px; background: #fff; display: flex; align-items: center; justify-content: center; padding: 18px; }
.logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-box.big { width: 150px; height: 110px; flex: none; padding: 10px; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; width: 100%; }
.kpi { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; text-align: left; display: flex; flex-direction: column; }
.kpi b { font-size: 18px; }
.kpi span { color: var(--muted); font-size: 12px; }
.kpi.ok b { color: var(--ok); }

/* özet */
.tenant-head { display: flex; align-items: center; gap: 18px; padding: 18px; flex-wrap: wrap; }
.tenant-head h1 { font-size: 26px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 18px 0; }
.stat { background: var(--glass); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.stat b { font-size: 22px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 12px; }
.stat.ok b { color: var(--ok); } .stat.warn b { color: var(--warn); } .stat.bad b { color: var(--bad); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; }
.card { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.card h4 { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.bars { display: flex; flex-direction: column; gap: 7px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 48px; gap: 10px; align-items: center; font-size: 13px; }
.bar-row b { text-align: right; font-variant-numeric: tabular-nums; }
.bar-label { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar, .progress { display: block; height: 8px; border-radius: 99px; background: rgba(111, 182, 255, .1); overflow: hidden; }
.bar i, .progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.sub { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--line); padding-top: 8px; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.kv span { color: var(--muted); min-width: 0; }
.table { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.row:last-child { border-bottom: 0; }
.order-name { display: flex; flex-direction: column; min-width: 0; }
.order-name .note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; min-width: 64px; }
.progress { width: 90px; flex: none; }
.pct { width: 38px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.pill { font-size: 11px; font-weight: 700; border-radius: 99px; padding: 1px 9px; border: 1px solid var(--line-strong); color: var(--accent); white-space: nowrap; }
.pill.s-hata { color: var(--bad); border-color: rgba(255, 107, 107, .4); }
.pill.s-ok, .pill.s-tamamlandi, .pill.s-montaj, .pill.s-sahada_montaj { color: var(--ok); border-color: rgba(74, 210, 149, .4); }
.pill.s-depo, .pill.s-kalibrasyon, .pill.s-saha_onay { color: var(--warn); border-color: rgba(242, 193, 78, .4); }
.pill.s-sub { color: var(--accent2); border-color: rgba(155, 123, 255, .4); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini-stats .stat { padding: 8px 10px; }
.mini-stats .stat b { font-size: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; border: 1px solid var(--line-strong); border-radius: 99px; padding: 2px 10px; }
.chip.on { border-color: rgba(74, 210, 149, .5); color: var(--ok); }
.activity { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow: auto; }
.act { display: grid; grid-template-columns: 92px 1fr; gap: 10px; font-size: 13px; }
.act .when { color: var(--muted); font-size: 12px; }

@media (max-width: 720px) {
  .page { padding: 18px 14px 40px; }
  .grid { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 110px 1fr 40px; }
  .tenants { grid-template-columns: 1fr; }
  .logo-box.big { width: 110px; height: 80px; }
  .tenant-head h1 { font-size: 20px; }
  .progress { width: 56px; }
}
@media (prefers-reduced-motion: reduce) { .tenant { transition: none; } }
