:root {
  --primary: #01abef;
  --primary-ink: #0087bd;   /* açık zemin üzerinde metin için koyulaştırılmış ton */
  --primary-soft: #e1f5fd;
  --accent: #ff7a50;
  --accent-soft: #ffe9e1;
  --success: #1fbf8f;
  --success-soft: #dcf6ee;
  --danger: #e5484d;
  --danger-soft: #fde4e4;
  --warning: #f5a524;
  --warning-soft: #fef1d9;
  --bg: #f7f7fc;
  --surface: #ffffff;
  --text: #1d1b2c;
  --muted: #7a7891;
  --border: #ecebf3;
  --shadow: 0 6px 24px rgba(0, 70, 110, .06);
  --radius: 16px;
  --sidebar-w: 270px;
  --bar-h: 60px;
  --sky-top: #bfe3fb;
  --sky-bottom: #eef8ff;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-bottom) 70%) var(--bg);
  min-height: 100vh;
  color: var(--text);
  font-size: 14px;
  letter-spacing: .2px;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.ico { width: 18px; height: 18px; flex-shrink: 0; }
.cico { width: 26px; height: 26px; flex-shrink: 0; overflow: visible; }
.cled { fill: #4ade80; animation: cblink 1.4s steps(2, jump-none) infinite; }
.cled2 { fill: #60a5fa; animation-duration: .9s; }
@keyframes cblink { 0% { opacity: 1; } 100% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .cled, .breathe span, .beat { animation: none !important; } .beat { stroke-dashoffset: 0; } }

/* ---------- Arka plan sahnesi (status.netesta.com ile aynı) ---------- */
.scene { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; user-select: none; }
#app { position: relative; z-index: 1; }
#icon-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Üst menü (status / IP ve Stok Takibi ile aynı) ---------- */
.appbar {
  position: sticky; top: 0; z-index: 30; height: var(--bar-h);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 0 24px; background: linear-gradient(90deg, #0c1f3a, #163a66); color: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .18);
}
.appbar .brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.appbar .brand a { display: flex; }
.appbar .logo { height: 40px; width: auto; display: block; }
.appbar h1 {
  font-size: 18px; margin: 0; display: flex; align-items: center; gap: 8px; font-weight: 600;
  padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, .25); white-space: nowrap; min-width: 0;
}
.breathe span { display: inline-block; animation: breathe 4s ease-in-out infinite; letter-spacing: .4px; }
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: .82; text-shadow: 0 0 0 rgba(74, 222, 128, 0); }
  50% { transform: scale(1.04); opacity: 1; text-shadow: 0 0 14px rgba(74, 222, 128, .55); }
}
.beat {
  width: 34px; height: 18px; flex-shrink: 0; fill: none; stroke: #4ade80; stroke-width: 2.2; stroke-linecap: round;
  stroke-linejoin: round; stroke-dasharray: 70; stroke-dashoffset: 70; animation: beat 2s linear infinite;
  filter: drop-shadow(0 0 3px rgba(74, 222, 128, .7));
}
@keyframes beat { 0% { stroke-dashoffset: 70; } 55% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -70; } }
/* Header canlı simgesi: kabin LED'leri + iki yönlü paket akışı + internet halkası */
.netanim { width: 70px; height: 27px; flex-shrink: 0; overflow: visible; }
.na-rack { fill: #1e293b; stroke: rgba(255, 255, 255, .35); stroke-width: .8; }
.na-unit { fill: #334155; }
.na-led { fill: #4ade80; animation: na-blink 1.6s steps(2, jump-none) infinite; }
.na-led.l2 { fill: #60a5fa; animation-duration: .9s; }
.na-led.l3 { animation-duration: 2.3s; animation-delay: -.7s; }
.na-cable { stroke: rgba(125, 211, 252, .35); stroke-width: 1.2; stroke-dasharray: 2 2; }
.na-pkt { opacity: 0; }
.na-pkt.out { fill: #4ade80; filter: drop-shadow(0 0 2px #4ade80); animation: na-out 2.4s ease-in-out infinite; }
.na-pkt.out.d2 { animation-delay: -1.2s; }
.na-pkt.in { fill: #7dd3fc; filter: drop-shadow(0 0 2px #7dd3fc); animation: na-in 2.4s ease-in-out infinite; animation-delay: -.6s; }
.na-globe { fill: rgba(1, 171, 239, .18); stroke: #7dd3fc; stroke-width: 1.2; }
.na-meridian { fill: none; stroke: #7dd3fc; stroke-width: .8; opacity: .7; }
.na-ring { fill: none; stroke: #7dd3fc; stroke-width: 1; transform-box: fill-box; transform-origin: center; animation: na-ring 2.4s ease-out infinite; }
@keyframes na-blink { 0% { opacity: 1; } 100% { opacity: .25; } }
@keyframes na-out { 0% { transform: translateX(0); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateX(25px); opacity: 0; } }
@keyframes na-in { 0% { transform: translateX(0); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateX(-25px); opacity: 0; } }
@keyframes na-ring { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.7); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .na-led, .na-pkt, .na-ring { animation: none !important; } .na-pkt { opacity: .8; } }

.header-actions { display: flex; align-items: center; gap: 10px; }
.appbar .search {
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); box-shadow: none;
  color: rgba(255, 255, 255, .7); padding: 8px 14px; width: 260px;
}
.appbar .search input { color: #fff; }
.appbar .search input::placeholder { color: rgba(255, 255, 255, .6); }
.bar-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .08); color: #fff; display: grid; place-items: center; position: relative;
}
.bar-btn .dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.appbar .avatar { width: 38px; height: 38px; background: rgba(255, 255, 255, .15); color: #fff; border: 1px solid rgba(255, 255, 255, .25); }

.page-head { margin-bottom: 24px; }
.page-head h2 { margin: 0; font-size: 22px; font-weight: 600; }
.page-head .sub { color: #4b5b70; margin-top: 2px; }
.page-head .sub em { color: var(--accent); font-style: normal; }
.page-head .sub a { color: var(--primary-ink); }
body:not([data-sky="day"]) .page-head h2 { color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
body:not([data-sky="day"]) .page-head .sub,
body:not([data-sky="day"]) .page-head .sub a { color: rgba(255, 255, 255, .85); }
body:not([data-sky="day"]) .tabs a:not(.active) { background: rgba(255, 255, 255, .9); }

/* ---------- Layout ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 28px 18px 20px;
  display: flex; flex-direction: column;
  position: fixed; top: var(--bar-h); bottom: 0; left: 0;
  overflow-y: auto;
  z-index: 20;
  transition: transform .2s;
}
.logo-plate {
  display: inline-flex; align-items: center; background: linear-gradient(90deg, #0c1f3a, #163a66);
  border-radius: 10px; padding: 10px 16px; margin-bottom: 12px;
}
.logo-plate img { display: block; height: 30px; width: auto; }

.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-label { font-size: 11px; text-transform: uppercase; color: var(--muted); padding: 16px 12px 6px; letter-spacing: 1px; }
.nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 10px;
  color: #4a4860; font-weight: 500;
  position: relative;
}
.nav a:hover { background: var(--bg); }
.nav a.active { color: var(--primary-ink); background: var(--primary-soft); }
.nav a .count {
  margin-left: auto; font-size: 11px; background: var(--bg); color: var(--muted);
  border-radius: 20px; padding: 1px 8px;
}
.nav a.active .count { background: #fff; color: var(--primary-ink); }

.promo {
  margin-top: 20px; background: var(--primary); color: #fff;
  border-radius: var(--radius); padding: 20px;
}
.promo h4 { margin: 0 0 6px; font-size: 15px; }
.promo p { margin: 0 0 14px; opacity: .85; font-size: 12.5px; line-height: 1.6; }
.promo a { display: block; text-align: center; background: #fff; color: var(--primary-ink); border-radius: 10px; padding: 9px; font-weight: 500; }

.main { flex: 1; margin-left: var(--sidebar-w); padding: 28px 36px 32vh; min-width: 0; }

.topbar { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.topbar h1 { margin: 0; font-size: 22px; font-weight: 600; }
.topbar .sub { color: var(--muted); margin-top: 2px; }
.topbar .sub em { color: var(--accent); font-style: normal; }
.topbar .spacer { flex: 1; }
.search {
  display: flex; align-items: center; gap: 8px; background: var(--surface);
  border-radius: 12px; padding: 10px 14px; width: 280px; color: var(--muted);
  box-shadow: var(--shadow);
}
.search input { border: 0; outline: 0; background: transparent; font: inherit; width: 100%; color: var(--text); }
.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; border: 0; background: var(--surface);
  display: grid; place-items: center; color: var(--muted); box-shadow: var(--shadow); position: relative;
}
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 600;
}
.menu-toggle { display: none; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
.grid > * { min-width: 0; }
.grid-main { grid-template-columns: minmax(0, 2.4fr) minmax(0, 1fr); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 12px; }
.card-head h3 { margin: 0; font-size: 17px; font-weight: 600; }
.link { color: var(--primary-ink); font-weight: 500; font-size: 13px; }

.welcome {
  background: var(--accent-soft); border-radius: var(--radius); padding: 32px;
  display: flex; justify-content: space-between; align-items: center; gap: 24px; overflow: hidden;
}
.welcome h2 { margin: 0 0 12px; font-size: 21px; font-weight: 600; }
.welcome p { margin: 0; line-height: 1.8; color: #3d3b52; max-width: 520px; }
.welcome-art { width: 200px; flex-shrink: 0; }

.stat .stat-ico {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 26px;
}
.stat .stat-ico .cico { width: 34px; height: 34px; }
.badge-sq .cico { width: 28px; height: 28px; }
.stat .label { font-weight: 600; letter-spacing: 1px; font-size: 13px; }
.stat .value { font-size: 28px; font-weight: 600; margin: 4px 0 2px; }
.stat .meta { color: var(--muted); font-size: 13px; }
.stat .bar { height: 5px; border-radius: 4px; background: var(--border); margin-top: 22px; overflow: hidden; }
.stat .bar span { display: block; height: 100%; border-radius: 4px; }
.tone-primary .stat-ico { background: var(--primary-soft); color: var(--primary-ink); }
.tone-primary .value { color: var(--primary-ink); }
.tone-primary .bar span { background: var(--primary); }
.tone-accent .stat-ico { background: var(--accent-soft); color: var(--accent); }
.tone-accent .value { color: var(--accent); }
.tone-accent .bar span { background: var(--accent); }

.balance {
  background: var(--accent); color: #fff; border-radius: var(--radius); padding: 26px;
  display: flex; align-items: center; gap: 22px;
}
.ring {
  width: 92px; height: 92px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; position: relative;
}
.ring::after { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: var(--accent); }
.ring b { position: relative; z-index: 1; font-size: 24px; }
.balance .lbl { opacity: .9; font-size: 13px; }
.balance .amt { font-size: 24px; font-weight: 600; margin: 2px 0 10px; }
.balance .btn-light { background: #fff; color: var(--accent); }

.threat {
  background: var(--primary); color: #fff; border-radius: var(--radius); padding: 26px;
}
.threat h3 { margin: 0 0 16px; font-size: 17px; line-height: 1.5; font-weight: 600; }
.threat ul { margin: 0; padding: 0; list-style: none; }
.threat li { padding: 9px 0; border-top: 1px solid rgba(255,255,255,.12); display: flex; justify-content: space-between; font-size: 13.5px; }
.threat li span { opacity: .8; }

/* ---------- Kayan duyuru şeridi (IP ve Stok Takibi ile aynı) ---------- */
.ticker {
  overflow: hidden; padding: 10px 0; margin: 0 0 22px; border-radius: 10px;
  color: #1e3a52; background: linear-gradient(90deg, rgba(1, 171, 239, .14), rgba(255, 122, 80, .12)), rgba(255, 255, 255, .75);
  box-shadow: var(--shadow);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.ticker-track { display: flex; width: max-content; animation: ticker 22s linear infinite; }
.ticker-track span {
  display: inline-flex; align-items: center; gap: 10px; padding-right: 120px;
  white-space: nowrap; font-weight: 500; letter-spacing: .1px;
}
.ticker-track small { color: var(--muted); font-weight: 500; }
.ticker .tag {
  font-size: 11px; font-weight: 700; letter-spacing: .6px; color: #fff; padding: 2px 9px;
  border-radius: 99px; background: linear-gradient(135deg, #01abef, #0b6fb8);
}
.ticker .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex: none;
  box-shadow: 0 0 0 0 rgba(1, 171, 239, .5); animation: tpulse 1.8s ease-out infinite;
}
@keyframes tpulse { to { box-shadow: 0 0 0 8px rgba(1, 171, 239, 0); } }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Sunucu izleme paneli ---------- */
.monitor {
  position: relative; overflow: hidden; border-radius: var(--radius); padding: 26px 28px; color: #fff;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 28px; align-items: center;
  background:
    radial-gradient(circle at 88% 50%, rgba(1, 171, 239, .25), transparent 45%),
    linear-gradient(135deg, #0c1f3a 0%, #163a66 100%);
  box-shadow: 0 10px 30px rgba(12, 31, 58, .25);
}
.monitor::before {  /* ince ızgara deseni */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 22px 22px;
}
.monitor > * { position: relative; }
.mon-hello { color: rgba(255, 255, 255, .75); font-size: 16px; margin-bottom: 12px; }
.mon-hello b { color: #fff; font-weight: 600; }
.monitor h3 { margin: 2px 0 14px; font-size: 20px; font-weight: 600; }
.mon-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.mon-stat {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 12px; flex: 1; min-width: 0; max-width: 240px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12);
}
.mon-stat i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.mon-stat b { display: block; font-size: 28px; line-height: 1.1; font-weight: 700; font-variant-numeric: tabular-nums; }
.mon-stat span { font-size: 12px; color: rgba(255, 255, 255, .7); }
.mon-stat.up { border-color: rgba(74, 222, 128, .35); }
.mon-stat.up b { color: #4ade80; }
.mon-stat.up i { background: #4ade80; animation: gpulse 1.8s ease-out infinite; }
.mon-stat.down { border-color: rgba(248, 113, 113, .5); background: rgba(248, 113, 113, .1); }
.mon-stat.down b { color: #f87171; }
.mon-stat.down i { background: #f87171; animation: rpulse 1.2s ease-out infinite; }
.mon-stat.zero b { color: rgba(255, 255, 255, .55); }
.mon-stat.zero i { background: rgba(255, 255, 255, .3); }
@keyframes gpulse { 0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .6); } 100% { box-shadow: 0 0 0 9px rgba(74, 222, 128, 0); } }
@keyframes rpulse { 0% { box-shadow: 0 0 0 0 rgba(248, 113, 113, .7); } 100% { box-shadow: 0 0 0 9px rgba(248, 113, 113, 0); } }
.mon-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; padding: 3px 10px; border-radius: 99px;
  background: rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .85); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chip i { width: 6px; height: 6px; border-radius: 50%; background: #4ade80; flex: none; }
.chip.down { background: rgba(248, 113, 113, .15); color: #fecaca; }
.chip.down i { background: #f87171; }
.mon-empty { color: rgba(255, 255, 255, .7); margin: 0; }

.mon-links { display: flex; gap: 10px; grid-column: 1; }
.mon-btn {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; flex: 1; min-width: 0; max-width: 300px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18); color: #fff; font-weight: 600;
  transition: background .2s, transform .2s;
}
.mon-btn:hover { background: rgba(255, 255, 255, .14); transform: translateX(2px); }
.mon-btn.primary { background: linear-gradient(135deg, #01abef, #0b7fc7); border-color: transparent; box-shadow: 0 6px 18px rgba(1, 171, 239, .35); }
.mon-btn.primary:hover { background: linear-gradient(135deg, #18b8f5, #0b7fc7); }
.mon-btn span { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; font-size: 13.5px; white-space: nowrap; }
.mon-btn small { font-weight: 400; font-size: 10.5px; opacity: .75; }
.mon-btn .beat { width: 30px; }
.mon-btn > .ico:first-child { width: 22px; height: 22px; color: #7dd3fc; }
.mon-btn > .ico:last-child { opacity: .7; }

/* Radar */
.radar {
  --sweep: 4s; width: 170px; height: 170px; grid-column: 2; grid-row: 1 / span 2; border-radius: 50%; position: relative; flex: none; overflow: hidden;
  background: radial-gradient(circle, #0f3a33 0%, #0a2a2a 60%, #071d1f 100%);
  border: 2px solid rgba(74, 222, 128, .45);
  box-shadow: 0 0 0 6px rgba(74, 222, 128, .06), 0 0 30px rgba(74, 222, 128, .25), inset 0 0 30px rgba(0, 0, 0, .6);
}
.radar-grid {
  position: absolute; inset: 0; border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 21%, rgba(74, 222, 128, .28) 21.5% 22%, transparent 22.5% 43%, rgba(74, 222, 128, .28) 43.5% 44%, transparent 44.5% 65%, rgba(74, 222, 128, .28) 65.5% 66%, transparent 66.5%),
    linear-gradient(rgba(74, 222, 128, .22), rgba(74, 222, 128, .22)) center / 1px 100% no-repeat,
    linear-gradient(rgba(74, 222, 128, .22), rgba(74, 222, 128, .22)) center / 100% 1px no-repeat;
}
.radar-sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(74, 222, 128, 0) 0deg, rgba(74, 222, 128, 0) 270deg, rgba(74, 222, 128, .12) 320deg, rgba(74, 222, 128, .55) 359deg, rgba(190, 255, 210, .9) 360deg);
  animation: radar-spin var(--sweep) linear infinite;
}
@keyframes radar-spin { to { transform: rotate(360deg); } }
.radar-core { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #bbf7d0; box-shadow: 0 0 10px #4ade80; }
.blip {
  position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%;
  animation: blip var(--sweep) linear infinite;
}
.blip.up { background: #4ade80; box-shadow: 0 0 8px #4ade80; }
.blip.down { background: #f87171; box-shadow: 0 0 10px #f87171; animation-name: blip-down; }
@keyframes blip { 0% { opacity: 1; transform: scale(1.5); } 12% { opacity: .9; transform: scale(1); } 70%, 100% { opacity: .25; transform: scale(.9); } }
@keyframes blip-down { 0% { opacity: 1; transform: scale(1.8); } 15% { opacity: 1; transform: scale(1.1); } 60%, 100% { opacity: .6; transform: scale(1); } }

@media (prefers-reduced-motion: reduce) { .ticker-track, .ticker .pulse, .radar-sweep, .blip, .mon-stat i { animation: none !important; } }

/* ---------- Lists / tables ---------- */
.mini-list { display: flex; flex-direction: column; gap: 16px; }
.mini-item { display: flex; align-items: center; gap: 14px; }
.badge-sq {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  font-weight: 600; font-size: 13px; flex-shrink: 0;
}
.mini-item .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-item .s { color: var(--muted); font-size: 12.5px; }
.mini-item .r { margin-left: auto; text-align: right; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px; padding: 0 14px 12px; white-space: nowrap; }
td { padding: 14px; border-top: 1px solid var(--border); white-space: nowrap; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #fbfbfe; }
td .primary { font-weight: 600; }
td .secondary { color: var(--muted); font-size: 12.5px; }

.pill { display: inline-block; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.pill.ok { background: var(--success-soft); color: #128a66; }
.pill.bad { background: var(--danger-soft); color: var(--danger); }
.pill.warn { background: var(--warning-soft); color: #a86b00; }
.pill.muted { background: var(--bg); color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 10px;
  padding: 10px 18px; font-weight: 500; background: var(--bg); color: var(--text);
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn:disabled { opacity: .6; cursor: default; }

.tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tabs a { padding: 8px 16px; border-radius: 10px; background: var(--surface); color: var(--muted); font-weight: 500; box-shadow: var(--shadow); }
.tabs a.active { background: var(--primary); color: #fff; }

.empty { text-align: center; color: var(--muted); padding: 40px 10px; }
.notice {
  display: flex; gap: 12px; align-items: flex-start; background: var(--primary-soft); color: #005a80;
  border-radius: 12px; padding: 14px 16px; line-height: 1.6;
}

/* ---------- Service detail ---------- */
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.kv div span { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 3px; }
.kv div b { font-weight: 500; word-break: break-all; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Invoice ---------- */
.pay-result { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 12px; margin-bottom: 18px; max-width: 860px; line-height: 1.6; }
.pay-result .ico { width: 22px; height: 22px; margin-top: 2px; }
.pay-result.ok { background: var(--success-soft); color: #0f6b4f; }
.pay-result.bad { background: var(--danger-soft); color: #9b1c1f; }
.pay-result.wait { background: var(--warning-soft); color: #7a4e00; }
.pay-result .muted { opacity: .75; }
.inv-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.inv-toolbar .spacer { flex: 1; }
.invoice-doc { max-width: 860px; padding: 44px; }
.inv-top { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 36px; flex-wrap: wrap; }
.inv-top h2 { margin: 0; font-size: 28px; color: var(--primary-ink); }
.inv-top .no { color: var(--muted); }
.inv-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 30px; line-height: 1.7; }
.inv-parties h5 { margin: 0 0 6px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 1px; font-size: 11.5px; }
.inv-dates { display: flex; gap: 40px; margin-bottom: 28px; flex-wrap: wrap; }
.inv-dates span { display: block; color: var(--muted); font-size: 12.5px; }
.invoice-doc td { white-space: normal; }
.inv-totals { margin-left: auto; width: 300px; margin-top: 18px; }
.inv-totals div { display: flex; justify-content: space-between; padding: 7px 0; }
.inv-totals .grand { border-top: 2px solid var(--text); margin-top: 6px; padding-top: 12px; font-size: 17px; font-weight: 600; }
.stamp { font-size: 20px; font-weight: 700; padding: 6px 18px; border: 3px solid; border-radius: 8px; transform: rotate(-6deg); display: inline-block; }
.stamp.ok { color: var(--success); }
.stamp.bad { color: var(--danger); }

/* ---------- Login ---------- */
.login-wrap { min-height: calc(100vh - var(--bar-h)); display: grid; grid-template-columns: 1fr 1fr; }
.login-side { background: linear-gradient(160deg, rgba(1, 171, 239, .92), rgba(0, 120, 180, .92)); color: #fff; padding: 60px; display: flex; flex-direction: column; justify-content: center; }
.login-side h2 { font-size: 30px; margin: 0 0 16px; }
.login-side p { opacity: .85; line-height: 1.8; max-width: 440px; }
.login-form { display: grid; place-items: center; padding: 40px 20px; }
.login-form form { width: 100%; max-width: 420px; background: var(--surface); border-radius: var(--radius); box-shadow: 0 10px 40px rgba(15, 40, 70, .12); padding: 36px; }
.login-form h1 { margin: 0 0 6px; font-size: 24px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font: inherit; background: var(--surface);
}
.field input:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.success { background: var(--success-soft); color: #0f6b4f; padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; line-height: 1.5; }
.btn-block { width: 100%; justify-content: center; padding: 12px; }
.error { background: var(--danger-soft); color: var(--danger); padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; }
.demo-bar { background: var(--warning-soft); color: #7a4e00; text-align: center; padding: 8px 12px; font-size: 12.5px; border-radius: 10px; margin-bottom: 20px; }
.login-wrap + .demo-bar, body > #app > .demo-bar { border-radius: 0; margin: 0; }

.loading { padding: 60px; text-align: center; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .grid-main { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .monitor { grid-template-columns: minmax(0, 1fr); padding: 22px; }
  .monitor .radar { grid-row: auto; grid-column: auto; justify-self: center; width: 160px; height: 160px; }
  .mon-btn, .mon-stat { max-width: none; }
  .mon-links { flex-direction: column; }
  .mon-btn { min-width: 0; }
  .mon-stat { min-width: 0; flex: 1; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; padding: 20px 16px 40px; }
  .menu-toggle { display: grid; }
  .appbar { padding: 0 12px; }
  .appbar .search { display: none; }
  .appbar h1 { display: none; }
  .appbar .logo { height: 32px; }
  .welcome-art { display: none; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-side { display: none; }
  .inv-parties { grid-template-columns: 1fr; }
  .invoice-doc { padding: 24px; }
}
@media (max-width: 1100px) { .appbar .search { width: 190px; } }
@media (max-width: 560px) {
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .topbar h1 { font-size: 18px; }
  .inv-totals { width: 100%; }
}

@media print {
  .sidebar, .appbar, .scene, .page-head, .inv-toolbar, .demo-bar { display: none !important; }
  .main { margin: 0; padding: 0; }
  body { background: #fff; }
  .card { box-shadow: none; }
}

/* ---------- Destek talepleri ---------- */
.ticket-form .field select, .ticket-form .field textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; font: inherit; background: var(--surface);
}
.ticket-form .field textarea { resize: vertical; line-height: 1.6; }
.ticket-form .field select:focus, .ticket-form .field textarea:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
.thread { display: flex; flex-direction: column; gap: 14px; }
.msg { border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; background: var(--surface); max-width: 90%; }
.msg.staff { background: var(--primary-soft); border-color: #bfe8fb; margin-left: auto; }
.msg-head { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.msg-head b { color: var(--text); }
.msg-body { white-space: pre-wrap; word-break: break-word; line-height: 1.65; }
