/* WhatsMarketing — panel */

/* Giriş ekranı */
.auth { min-height:100vh; display:grid; grid-template-columns:minmax(0, 440px) minmax(0, 1fr); background:var(--bg); }
.auth-brand { padding:40px 44px; display:flex; flex-direction:column; justify-content:space-between; background:var(--side-bg); border-right:1px solid var(--side-line); color:var(--side-text); }
.auth-brand .logo { color:var(--side-ink); }
.auth-brand h2 { color:var(--side-ink); font-size:26px; line-height:1.2; letter-spacing:-.02em; max-width:16ch; margin-bottom:22px; }
.auth-brand li { display:flex; gap:10px; margin-bottom:12px; font-size:14px; }
.auth-brand li svg { width:16px; height:16px; flex:none; margin-top:3px; color:var(--brand); }
.auth-brand small { color:var(--side-faint); font-size:12px; }
.auth-form { display:grid; place-items:center; padding:32px; }
.auth-box { width:min(360px, 100%); }
.auth-box h1 { font-size:22px; letter-spacing:-.02em; margin-bottom:4px; }
.auth-box > p { color:var(--muted); margin-bottom:24px; }
.auth-box input { height:40px; }
.auth-err { background:var(--red-soft); color:var(--red); padding:9px 12px; border-radius:var(--radius-sm); margin-bottom:16px; font-size:13px; }
.auth-foot { margin-top:20px; text-align:center; font-size:13px; }
.auth-foot a { color:var(--muted); text-decoration:none; }
.auth-foot a:hover { color:var(--ink); }
@media (max-width:860px) { .auth { grid-template-columns:1fr; } .auth-brand { display:none; } }

/* Uygulama iskeleti */
.app { display:grid; grid-template-columns:232px minmax(0, 1fr); min-height:100vh; }
.app > div:last-child { min-width:0; }
.scrim { display:none; position:fixed; inset:0; background:rgba(0,0,0,.55); z-index:20; }
.side { background:var(--side-bg); border-right:1px solid var(--side-line); display:flex; flex-direction:column; position:sticky; top:0; height:100vh; color:var(--side-text); }
.side .logo { height:56px; padding:0 16px; color:var(--side-ink); flex:none; }
/* Hesap türü: sahip için dolu şerit, kullanıcı için sade satır */
.side-role { margin:0 12px 6px; padding:6px 10px; border-radius:var(--radius-sm); font-size:11px; font-weight:650; text-transform:uppercase; letter-spacing:.07em; color:var(--side-faint); border:1px solid var(--side-line); }
.app[data-role=owner] .side-role { background:var(--accent); border-color:var(--accent); color:var(--on-accent); }
.nav { padding:4px 8px; overflow:auto; flex:1; }
.nav h3 { font-size:11px; text-transform:uppercase; letter-spacing:.07em; color:var(--side-faint); font-weight:600; padding:16px 8px 6px; }
.nav a { display:flex; align-items:center; gap:10px; height:34px; padding:0 8px; border-radius:var(--radius-sm); color:var(--side-text); text-decoration:none; font-weight:500; margin-bottom:1px; }
.nav a svg { width:16px; height:16px; flex:none; opacity:.8; }
.nav a:hover { background:var(--side-hover); color:var(--side-ink); }
.nav a.active { background:var(--side-active); color:var(--side-ink); font-weight:600; box-shadow:inset 2px 0 0 var(--accent); }
.nav a.active svg { color:var(--brand-dark); opacity:1; }
.nav .count { margin-left:auto; font-size:11.5px; color:var(--side-faint); font-variant-numeric:tabular-nums; }
.nav a.active .count { color:var(--side-text); }
.lic { display:block; margin:8px 12px 12px; padding:10px 12px; border:1px solid var(--side-line); border-radius:var(--radius-sm); text-decoration:none; color:var(--side-text); }
.lic:hover { border-color:var(--edge-strong); }
.lic span { font-size:11px; text-transform:uppercase; letter-spacing:.07em; color:var(--side-faint); font-weight:600; }
.lic b { float:right; color:var(--side-ink); font-size:13px; font-variant-numeric:tabular-nums; }
.lic .bar { margin:8px 0 6px; background:var(--side-active); }
.lic small { font-size:11.5px; color:var(--side-faint); }
.lic.warn .bar > div { background:var(--amber); } .lic.warn b { color:var(--amber); }
.lic.err .bar > div { background:var(--red); } .lic.err b { color:var(--red); }
.userbox { border-top:1px solid var(--side-line); padding:10px 12px; display:flex; align-items:center; gap:9px; }
.avatar { width:30px; height:30px; border-radius:50%; background:var(--side-active); color:var(--side-ink); display:grid; place-items:center; font-weight:650; font-size:11.5px; flex:none; }
.app[data-role=owner] .avatar { background:var(--brand); color:var(--on-brand); }
.userbox .who { min-width:0; flex:1; line-height:1.3; }
.userbox .who b { display:block; color:var(--side-ink); font-weight:600; font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.userbox .who span { font-size:11.5px; color:var(--side-faint); }
.iconbtn { width:30px; height:30px; display:grid; place-items:center; border-radius:var(--radius-sm); border:none; background:none; color:var(--muted); cursor:pointer; flex:none; }
.iconbtn:hover { background:var(--surface-3); color:var(--ink); }
.side .iconbtn { color:var(--side-text); }
.side .iconbtn:hover { background:var(--side-hover); color:var(--side-ink); }
.iconbtn svg { width:16px; height:16px; }

.top { height:56px; background:var(--top-bg); backdrop-filter:blur(8px); border-bottom:1px solid var(--line); display:flex; align-items:center; gap:12px; padding:0 28px; position:sticky; top:0; z-index:10; }
.top h1 { font-size:15px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.top .crumb { color:var(--muted); text-decoration:none; font-weight:500; }
.top a.crumb:hover { color:var(--ink); }
.top .crumb.sep { color:var(--faint); margin:0 2px; }
.top .spacer { flex:1; }
.role-chip { display:inline-flex; align-items:center; height:22px; padding:0 8px; border-radius:5px; background:var(--accent); color:var(--on-accent); font-size:11px; font-weight:650; text-transform:uppercase; letter-spacing:.07em; }
#menuBtn { display:none; }
.main { padding:24px 28px 56px; max-width:1440px; }
.main:focus { outline:none; }
.banner { display:flex; gap:10px; align-items:center; padding:10px 14px; border-radius:var(--radius); margin-bottom:16px; font-weight:500; }
.banner.warn { background:var(--amber-soft); color:var(--amber); }
.banner.err { background:var(--red-soft); color:var(--red); }
.banner svg { width:18px; height:18px; flex:none; }
.banner span { flex:1; }
.banner .btn { color:var(--ink); }
.license .btn { margin-top:10px; }
@media (max-width:960px) {
  .app { grid-template-columns:minmax(0, 1fr); }
  .side { position:fixed; z-index:30; width:256px; transform:translateX(-100%); transition:transform .18s; }
  .app.menu-open .side { transform:none; box-shadow:var(--shadow-lg); }
  .app.menu-open .scrim { display:block; }
  #menuBtn { display:grid; }
  .top { padding:0 14px; }
  .main { padding:16px 14px 44px; }
}
@media (max-width:520px) { #quickNew { display:none; } }

/* Kartlar */
.card { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); margin-bottom:16px; min-width:0; }
.card-head { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:48px; padding:8px 16px; border-bottom:1px solid var(--line); flex-wrap:wrap; }
.card-head h2 { font-size:13.5px; font-weight:600; }
.card-head a:not(.btn) { font-size:12.5px; font-weight:550; text-decoration:none; }
.card-head a:not(.btn):hover { text-decoration:underline; }
.card-body { padding:16px; }
.card > .table-wrap:last-child, .card > div > .table-wrap:last-child { border-radius:0 0 var(--radius) var(--radius); }
.card > .table-wrap:first-child { border-radius:var(--radius); }
.grid-2 { display:grid; grid-template-columns:minmax(0, 1.75fr) minmax(0, 1fr); gap:16px; align-items:start; }
@media (max-width:1100px) { .grid-2 { grid-template-columns:1fr; gap:0; } }
.toolbar { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-bottom:14px; }
.toolbar .grow { flex:1; }
.toolbar input[type=search] { width:280px; max-width:100%; }
.toolbar select { width:auto; }

/* Gösterge şeridi: tek kutu, aralarında ince çizgi */
.kpis { display:grid; grid-template-columns:repeat(auto-fit, minmax(170px, 1fr)); gap:1px; background:var(--line); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); overflow:hidden; margin-bottom:16px; }
.kpi { background:var(--surface); padding:14px 16px 15px; display:flex; flex-direction:column; min-width:0; }
.kpi-label { display:flex; align-items:center; gap:7px; font-size:12px; font-weight:500; color:var(--muted); }
.kpi-label svg { width:14px; height:14px; flex:none; color:var(--faint); }
.kpi.err .kpi-label svg { color:var(--red); }
.kpi.warn .kpi-label svg { color:var(--amber); }
.kpi-value { font-size:24px; font-weight:650; color:var(--ink); letter-spacing:-.02em; line-height:1.25; margin-top:6px; font-variant-numeric:tabular-nums; }
.kpi small { font-size:12px; color:var(--faint); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.kpi .delta { font-weight:600; }
.kpi .delta.up { color:var(--green); } .kpi .delta.down { color:var(--red); }

/* Tablolar */
.table-wrap { overflow:auto; }
.table-wrap.tall { max-height:560px; }
table { width:100%; border-collapse:collapse; font-size:13px; }
th, td { text-align:left; padding:10px 16px; border-bottom:1px solid var(--line-soft); white-space:nowrap; vertical-align:middle; }
thead th { background:var(--surface-2); color:var(--muted); font-weight:550; font-size:12px; padding-top:8px; padding-bottom:8px; position:sticky; top:0; z-index:1; border-bottom-color:var(--line); }
tbody tr:last-child td { border-bottom:none; }
tbody tr:hover { background:var(--hover); }
th.r, td.r { text-align:right; font-variant-numeric:tabular-nums; }
td.num { font-variant-numeric:tabular-nums; color:var(--ink); font-weight:500; }
td.wrap { white-space:normal; min-width:220px; }
td.acts { text-align:right; }
td.acts .actions { justify-content:flex-end; flex-wrap:nowrap; }
td .sub { display:block; font-size:12px; color:var(--muted); font-weight:400; margin-top:1px; }
.lnk { font-weight:550; color:var(--ink); text-decoration:none; }
a.lnk:hover { color:var(--brand-dark); text-decoration:underline; }
.neg { color:var(--red); font-weight:600; }
.actions { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.empty { text-align:center; padding:40px 20px; color:var(--muted); }
.empty h3 { font-size:14px; margin-bottom:4px; }
.empty .btn { margin-top:14px; }
.prog { min-width:160px; }
.prog > div { display:flex; align-items:center; gap:10px; }
.prog span { font-size:12px; color:var(--muted); font-variant-numeric:tabular-nums; }
.bar { flex:1; height:6px; background:var(--surface-3); border-radius:3px; overflow:hidden; min-width:70px; }
.bar > div { height:100%; background:var(--brand); border-radius:3px; }
.bar.ok > div { background:var(--green); } .bar.err > div { background:var(--red); }
.note { padding:10px 14px; border-radius:var(--radius-sm); background:var(--amber-soft); color:var(--amber); font-size:13px; margin-bottom:16px; }

/* Grafik */
.chart svg { width:100%; height:auto; display:block; }
.chart text { font:11px var(--font); fill:var(--faint); }
.chart-sum { display:flex; gap:28px; flex-wrap:wrap; margin-bottom:14px; }
.chart-sum div { display:flex; flex-direction:column; }
.chart-sum span { font-size:12px; color:var(--muted); }
.chart-sum b { font-size:20px; font-weight:650; color:var(--ink); letter-spacing:-.02em; font-variant-numeric:tabular-nums; }
.legend { display:flex; gap:14px; flex-wrap:wrap; font-size:12px; color:var(--muted); }
.legend i { display:inline-block; width:9px; height:9px; border-radius:2px; margin-right:6px; vertical-align:-1px; }
.legend b { color:var(--ink); font-variant-numeric:tabular-nums; }

/* Dağılım çubuğu */
.stack { display:flex; gap:2px; height:8px; border-radius:4px; overflow:hidden; background:var(--surface-3); margin-bottom:12px; }
.stack > div { height:100%; min-width:2px; }
.c-read { background:var(--green); } .c-delivered { background:var(--brand); } .c-sent { background:var(--chart-soft); } .c-pending { background:var(--edge-strong); } .c-fail { background:var(--red); }

/* Sekmeler */
.tabs { display:flex; gap:2px; padding:0 10px; border-bottom:1px solid var(--line); overflow-x:auto; }
.tab { font:inherit; font-weight:550; color:var(--muted); background:none; border:none; border-bottom:2px solid transparent; padding:12px 8px 10px; cursor:pointer; white-space:nowrap; display:flex; gap:7px; align-items:center; }
.tab:hover { color:var(--ink); }
.tab[aria-selected=true] { color:var(--ink); border-bottom-color:var(--brand); }
.tab .n { font-size:11.5px; background:var(--surface-3); border-radius:4px; padding:1px 6px; font-weight:600; font-variant-numeric:tabular-nums; }
.tab[aria-selected=true] .n { background:var(--brand-soft); color:var(--brand-ink); }
.tab.neg-tab .n { background:var(--red-soft); color:var(--red); }
.tabbar { display:flex; gap:8px; align-items:center; padding:10px 16px; border-bottom:1px solid var(--line-soft); flex-wrap:wrap; }
.tabbar input { width:260px; max-width:100%; }

/* Gitmeyen nedenleri */
.reasons { display:grid; grid-template-columns:repeat(auto-fit, minmax(230px, 1fr)); gap:10px; padding:12px 16px; border-bottom:1px solid var(--line-soft); background:var(--surface-2); }
.reason { text-align:left; font:inherit; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-sm); padding:10px 12px; cursor:pointer; color:inherit; }
.reason:hover { border-color:var(--edge-strong); }
.reason[aria-pressed=true] { border-color:var(--red); box-shadow:0 0 0 3px var(--red-soft); }
.reason b { display:flex; justify-content:space-between; gap:8px; color:var(--ink); font-size:13px; }
.reason b span { color:var(--red); font-variant-numeric:tabular-nums; }
.reason p { font-size:12.5px; color:var(--muted); margin-top:4px; line-height:1.45; }

/* Hatlar */
.lines { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:16px; }
.line { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); padding:16px; display:flex; flex-direction:column; gap:12px; border-top:3px solid var(--green); }
.line:not(.bad):not(:has(.tag.ok)) { border-top-color:var(--amber); }
.line.bad { border-top-color:var(--red); }
.card-body .line { background:var(--surface-2); }
.line-head { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.line-head h3 { font-size:14px; }
.line .phone { font-size:17px; font-weight:600; color:var(--ink); font-variant-numeric:tabular-nums; }
.line .usage span { display:block; font-size:12px; color:var(--muted); margin-top:6px; }
.line-alert { background:var(--red-soft); border-radius:var(--radius-sm); padding:10px 12px; font-size:12.5px; }
.line-alert b { color:var(--red); display:block; margin-bottom:2px; }
.line-alert p { margin:2px 0 0; color:var(--text); }
.line-nums { display:grid; grid-template-columns:repeat(3, 1fr); margin:0; border:1px solid var(--line); border-radius:var(--radius-sm); }
.line-nums div { padding:8px 10px; border-right:1px solid var(--line); }
.line-nums div:last-child { border-right:none; }
.line-nums dt { font-size:11.5px; color:var(--muted); }
.line-nums dd { margin:1px 0 0; font-size:15px; font-weight:600; color:var(--ink); font-variant-numeric:tabular-nums; }
.line-nums small { font-size:11.5px; font-weight:500; color:var(--muted); }
.line .sub { font-size:12px; color:var(--faint); }
.line .qr { text-align:center; }
.line .qr img { width:200px; max-width:100%; border-radius:var(--radius-sm); padding:8px; background:#fff; border:1px solid var(--line); }
.line .actions { margin-top:auto; padding-top:2px; }
.mini-lines li { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:10px 16px; border-bottom:1px solid var(--line-soft); }
.mini-lines li:last-child { border-bottom:none; }
.mini-lines b { color:var(--ink); font-weight:550; display:block; }
.mini-lines .sub { display:block; font-size:12px; color:var(--muted); }
.inline-form { display:flex; gap:8px; flex-wrap:wrap; }
.inline-form input { width:240px; height:34px; }
.card-head .inline-form input { height:28px; font-size:12.5px; }

/* Kampanya oluşturma ve detay */
.split { display:grid; grid-template-columns:minmax(0, 1fr) 330px; gap:16px; align-items:start; }
@media (max-width:1100px) { .split { grid-template-columns:1fr; } }
.row2 { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
@media (max-width:620px) { .row2 { grid-template-columns:1fr; } }
.line-pick { display:grid; grid-template-columns:repeat(auto-fill, minmax(200px, 1fr)); gap:8px; }
.line-opt { display:flex; gap:10px; align-items:center; padding:9px 12px; border:1px solid var(--edge); border-radius:var(--radius-sm); background:var(--field); cursor:pointer; }
.line-opt:hover { border-color:var(--edge-strong); }
.line-opt:has(input:checked) { border-color:var(--brand); background:var(--brand-soft); }
.line-opt input { flex:none; }
.line-opt b { display:block; color:var(--ink); font-weight:550; font-size:13px; }
.line-opt small { color:var(--muted); font-size:12px; }
.line-opt.off { opacity:.6; cursor:not-allowed; }
.line-opt.off:hover { border-color:var(--edge); }
.line-opt.off small { color:var(--red); }
.line-stats { display:grid; grid-template-columns:repeat(auto-fit, minmax(210px, 1fr)); gap:1px; background:var(--line); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; margin:0 0 16px; }
.line-stat { display:flex; flex-wrap:wrap; gap:4px 8px; align-items:center; padding:11px 16px; background:var(--surface); font-size:13px; }
.line-stat b { color:var(--ink); font-weight:600; }
.line-stat span:last-child { flex-basis:100%; color:var(--muted); font-size:12.5px; }
.btn-row { display:grid; grid-template-columns:120px 1fr 1.4fr; gap:8px; margin-bottom:8px; }
@media (max-width:620px) { .btn-row { grid-template-columns:1fr; } }
.form-foot { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:4px; padding-top:16px; border-top:1px solid var(--line-soft); flex-wrap:wrap; }
.sticky { position:sticky; top:72px; }
/* Sohbet önizlemesi WhatsApp'ın kendi renkleriyle çizilir, görünümden bağımsızdır */
.chat { background:#0b141a; padding:16px 12px 20px; min-height:200px; border-radius:0 0 var(--radius) var(--radius); }
.bubble { background:#202c33; border-radius:0 8px 8px 8px; max-width:270px; box-shadow:0 1px 1px rgba(0,0,0,.4); overflow:hidden; }
.bubble-text { padding:8px 10px 6px; white-space:pre-wrap; word-break:break-word; font-size:13.5px; color:#e9edef; }
.bubble-text.ph { color:#8696a0; }
.bubble-time { text-align:right; font-size:10.5px; color:#8696a0; padding:0 8px 5px; }
.bubble-btn { border-top:1px solid #2f3b43; text-align:center; padding:9px 8px; color:#53bdeb; font-weight:500; font-size:13.5px; }
.head-row { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; flex-wrap:wrap; margin-bottom:16px; }
.head-row h2 { font-size:20px; letter-spacing:-.02em; }
.meta { display:flex; gap:6px 14px; flex-wrap:wrap; align-items:center; color:var(--muted); font-size:12.5px; margin-top:6px; }

/* Lisans, ayarlar, görünüm seçimi */
.license { display:flex; gap:20px; align-items:center; flex-wrap:wrap; }
.license .days { font-size:32px; font-weight:650; color:var(--ink); letter-spacing:-.03em; line-height:1; }
.license .days small { font-size:13px; font-weight:500; color:var(--muted); margin-left:4px; letter-spacing:0; }
.plan-row { display:grid; grid-template-columns:1.2fr 90px 1fr 1.6fr auto auto; gap:8px; align-items:center; margin-bottom:8px; }
.plan-row label { display:flex; gap:7px; align-items:center; font-size:12.5px; white-space:nowrap; }
@media (max-width:820px) { .plan-row { grid-template-columns:1fr 1fr; } }
.chips { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:12px; }
.chip { font:inherit; font-weight:550; font-size:12.5px; height:28px; padding:0 10px; border-radius:var(--radius-sm); border:1px solid var(--edge); background:var(--surface); color:var(--ink); cursor:pointer; }
.chip:hover { border-color:var(--brand); color:var(--brand-dark); }
.themes { display:grid; grid-template-columns:repeat(auto-fit, minmax(170px, 1fr)); gap:10px; }
.theme { font:inherit; text-align:left; padding:0; border:1px solid var(--edge); border-radius:var(--radius); background:var(--surface); color:var(--ink); cursor:pointer; overflow:hidden; }
.theme:hover { border-color:var(--edge-strong); }
.theme[aria-pressed=true] { border-color:var(--brand); box-shadow:var(--ring); }
.theme i { display:grid; grid-template-columns:30% 1fr; height:64px; }
.theme i s { display:block; }
.theme i s:last-child { display:grid; place-items:center; }
.theme i u { width:46%; height:10px; border-radius:3px; }
.theme b { display:block; padding:8px 12px; font-size:13px; font-weight:550; border-top:1px solid var(--line); }

/* Diyalog ve bildirim */
dialog { border:1px solid var(--edge); border-radius:10px; padding:0; width:min(440px, calc(100vw - 32px)); background:var(--surface); box-shadow:var(--shadow-lg); color:var(--text); }
dialog::backdrop { background:rgba(0,0,0,.55); }
.modal-head { padding:18px 20px 0; }
.modal-head h2 { font-size:15px; }
.modal-body { padding:10px 20px 2px; }
.modal-body > p { color:var(--muted); margin-bottom:12px; }
.modal-err { margin:0 20px; padding:8px 12px; border-radius:var(--radius-sm); background:var(--red-soft); color:var(--red); font-size:13px; }
.modal-foot { display:flex; justify-content:flex-end; gap:8px; padding:14px 20px; margin-top:12px; border-top:1px solid var(--line); background:var(--surface-2); border-radius:0 0 10px 10px; }
.pw-row { display:flex; gap:8px; }
.toasts { position:fixed; right:16px; bottom:16px; display:flex; flex-direction:column; gap:8px; z-index:60; width:min(380px, calc(100vw - 32px)); }
.toast { background:var(--surface); color:var(--ink); border:1px solid var(--edge); border-left:3px solid var(--muted); padding:10px 14px; border-radius:var(--radius-sm); box-shadow:var(--shadow-lg); font-size:13px; animation:toast-in .16s ease-out; }
.toast.err { border-left-color:var(--red); }
.toast.ok { border-left-color:var(--green); }
@keyframes toast-in { from { opacity:0; transform:translateY(6px); } }

/* ── Gösterge paneli ─────────────────────────────────────────────── */
.dash-head { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:14px; }
.seg { display:flex; padding:2px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); }
.seg button { font:inherit; font-size:12px; font-weight:600; height:28px; padding:0 13px; border:none; border-radius:8px; background:none; color:var(--muted); cursor:pointer; font-variant-numeric:tabular-nums; }
.seg button:hover { color:var(--ink); }
.seg button[aria-pressed=true] { background:var(--surface); color:var(--ink); box-shadow:0 1px 2px rgba(0,0,0,.12), 0 0 0 1px var(--line); }
.stats { display:grid; grid-template-columns:repeat(5, minmax(0, 1fr)); gap:12px; margin-bottom:16px; }
@media (max-width:1180px) { .stats { grid-template-columns:repeat(2, minmax(0, 1fr)); } .stats > :last-child { grid-column:1 / -1; } }
.stat { position:relative; overflow:hidden; display:flex; flex-direction:column; text-align:left; font:inherit; color:inherit; padding:14px 16px; min-height:104px; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); }
button.stat { cursor:pointer; transition:transform .12s, border-color .12s, box-shadow .12s; }
button.stat:hover { transform:translateY(-1px); border-color:var(--edge); }
.stat.on { border-color:var(--brand); box-shadow:var(--ring), var(--shadow); }
.stat.on .stat-label::after { content:""; width:6px; height:6px; border-radius:50%; background:var(--accent); margin-left:auto; }
.stat-label { display:flex; align-items:center; font-size:12px; font-weight:500; color:var(--muted); }
.stat-val { font-size:26px; font-weight:650; color:var(--ink); letter-spacing:-.03em; line-height:1.25; margin-top:4px; font-variant-numeric:tabular-nums; }
.stat-delta { margin-top:2px; font-size:11.5px; position:relative; z-index:1; }
.delta { font-weight:600; }
.delta.up { color:var(--green); } .delta.down { color:var(--red); } .delta.flat { color:var(--faint); font-weight:500; }
.vs { color:var(--faint); margin-left:5px; }
.spark { position:absolute; right:14px; top:40px; pointer-events:none; }
.spark-line { fill:none; stroke:var(--brand); stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.spark-fill { fill:rgba(var(--brand-rgb),.12); }
.ring { position:absolute; right:14px; top:30px; transform:rotate(-90deg); }
.ring-bg { fill:none; stroke:var(--surface-3); stroke-width:5; }
.ring-fg { fill:none; stroke:var(--brand); stroke-width:5; stroke-linecap:round; }
@media (max-width:620px) { .spark, .ring { display:none; } }
.dash-2 { display:grid; grid-template-columns:minmax(0, 1fr) 330px; gap:16px; align-items:start; }
.dash-3 { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:16px; align-items:stretch; }
.dash-3 > .card { display:flex; flex-direction:column; }
@media (max-width:1180px) { .dash-2, .dash-3 { grid-template-columns:minmax(0, 1fr); gap:0; } }
.card-top { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding:14px 18px 8px; }
.card-top h2 { font-size:13.5px; font-weight:600; }
.card-top .hint { font-size:12px; color:var(--faint); }
.card-pad { padding:4px 18px 18px; }
.switch-l { display:flex; align-items:center; gap:8px; font-size:12px; color:var(--muted); cursor:pointer; white-space:nowrap; }
.switch { position:relative; width:30px; height:18px; border:none; border-radius:9px; background:var(--edge); cursor:pointer; padding:0; transition:background .12s; }
.switch::after { content:""; position:absolute; top:2px; left:2px; width:14px; height:14px; border-radius:50%; background:#fff; box-shadow:0 1px 2px rgba(0,0,0,.3); transition:left .12s; }
.switch[aria-checked=true] { background:var(--brand); }
.switch[aria-checked=true]::after { left:14px; }

/* Ana grafik */
.chart-box { position:relative; padding:0 6px 8px; touch-action:pan-y; }
.chart-box .grid { stroke:var(--line); }
.chart-box .cur { fill:none; stroke:var(--brand); stroke-width:2.2; stroke-linecap:round; }
.chart-box .prev { fill:none; stroke:var(--faint); stroke-width:1.5; stroke-dasharray:4 4; }
.chart-box .dot { fill:var(--accent); stroke:var(--surface); stroke-width:2; }
.chart-box .fill-a { stop-color:var(--brand); stop-opacity:.26; }
.chart-box .fill-b { stop-color:var(--brand); stop-opacity:0; }
.cross { position:absolute; top:12px; bottom:36px; width:1px; background:var(--edge-strong); pointer-events:none; margin-left:6px; }
.tip { position:absolute; top:10px; width:176px; margin-left:6px; padding:9px 11px; background:var(--surface); border:1px solid var(--edge); border-radius:10px; box-shadow:var(--shadow-lg); font-size:12px; pointer-events:none; z-index:2; }
.tip small { display:block; color:var(--faint); font-size:11px; margin-bottom:3px; }
.tip p { display:flex; align-items:center; gap:6px; color:var(--ink); }
.tip p.p { color:var(--muted); margin-top:2px; }
.tip p b { margin-left:auto; font-variant-numeric:tabular-nums; }
.tip i { width:8px; height:2px; background:var(--faint); }
.tip i.a { height:8px; border-radius:50%; background:var(--brand); }

/* Canlı akış */
.live { display:inline-flex; align-items:center; gap:7px; height:26px; padding:0 10px; border:1px solid var(--line); border-radius:13px; font-size:12px; color:var(--muted); white-space:nowrap; }
.live b { color:var(--ink); font-variant-numeric:tabular-nums; }
.live i { position:relative; width:8px; height:8px; border-radius:50%; background:var(--green); }
.live i::after { content:""; position:absolute; inset:0; border-radius:50%; background:var(--green); animation:ping 1.8s cubic-bezier(0,0,.2,1) infinite; }
@keyframes ping { from { transform:scale(1); opacity:.7; } to { transform:scale(2.6); opacity:0; } }
.feed { padding:2px 10px 10px; }
.feed li { display:flex; align-items:center; gap:11px; padding:8px; border-radius:var(--radius-sm); }
.feed li:hover { background:var(--hover); }
.feed li.empty { justify-content:center; padding:40px 8px; }
.feed .ic { width:28px; height:28px; border-radius:8px; display:grid; place-items:center; flex:none; background:var(--surface-3); color:var(--muted); }
.feed .ic svg { width:14px; height:14px; }
.feed .ic.ok { background:var(--green-soft); color:var(--green); }
.feed .ic.info { background:var(--brand-soft); color:var(--brand-ink); }
.feed .ic.acc { background:var(--accent); color:var(--on-accent); }
.feed .ic.err { background:var(--red-soft); color:var(--red); }
.feed .ic.warn { background:var(--amber-soft); color:var(--amber); }
.feed div { min-width:0; line-height:1.35; }
.feed p { font-size:12.5px; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.feed p b { color:var(--ink); font-weight:600; }
.feed small { display:block; font-size:11.5px; color:var(--faint); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* Huni, dağılım, yoğunluk */
.funnel { padding:4px 18px 18px; display:flex; flex-direction:column; gap:12px; }
.funnel li > div:first-child { display:flex; justify-content:space-between; align-items:baseline; font-size:12px; margin-bottom:6px; }
.funnel span { color:var(--muted); }
.funnel b { color:var(--ink); font-weight:600; font-variant-numeric:tabular-nums; }
.funnel em { font-style:normal; font-weight:500; font-size:11px; color:var(--faint); margin-left:8px; }
.fbar { height:22px; border-radius:6px; background:var(--surface-3); overflow:hidden; }
.fbar > div { height:100%; border-radius:6px; background:linear-gradient(90deg, var(--brand), var(--c3)); }
.donut { display:flex; align-items:center; gap:16px; padding:4px 18px 18px; }
.donut-svg { position:relative; flex:none; }
.donut-svg svg { display:block; transform:rotate(-90deg); }
.donut-svg > div { position:absolute; inset:0; display:grid; place-content:center; text-align:center; line-height:1.2; pointer-events:none; }
.donut-svg b { font-size:15px; font-weight:650; color:var(--ink); font-variant-numeric:tabular-nums; }
.donut-svg span { font-size:10.5px; color:var(--faint); }
.donut ul { flex:1; min-width:0; display:flex; flex-direction:column; gap:7px; }
.donut li { display:flex; align-items:center; gap:8px; font-size:12px; }
.donut li i { width:8px; height:8px; border-radius:3px; flex:none; }
.donut li span { flex:1; min-width:0; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.donut li b { color:var(--ink); font-weight:600; font-variant-numeric:tabular-nums; }
.heat { display:grid; grid-template-rows:repeat(7, 1fr); grid-auto-flow:column; grid-auto-columns:1fr; gap:3px; }
.heat i, .scale i { aspect-ratio:1; border-radius:3px; background:var(--surface-3); }
.heat i.none { background:none; }
.l1 { background:rgba(var(--brand-rgb),.25) !important; } .l2 { background:rgba(var(--brand-rgb),.48) !important; } .l3 { background:rgba(var(--brand-rgb),.74) !important; } .l4 { background:var(--brand) !important; }
.heat-foot { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-top:10px; font-size:11.5px; color:var(--faint); }
.heat-foot b { color:var(--ink); font-variant-numeric:tabular-nums; }
.scale { display:flex; align-items:center; gap:3px; }
.scale i { width:10px; }
.mini3 { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; margin-top:14px; }
.mini3 div { padding:9px 10px; border:1px solid var(--line); border-radius:10px; background:var(--surface-2); min-width:0; }
.mini3 span { display:block; font-size:10.5px; text-transform:uppercase; letter-spacing:.06em; color:var(--faint); }
.mini3 b { display:block; font-size:14px; font-weight:650; color:var(--ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-variant-numeric:tabular-nums; }
.mini3 small { display:block; font-size:10.5px; color:var(--faint); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.kv { padding:0 18px 12px; }
.kv li { display:flex; justify-content:space-between; gap:10px; padding:8px 0; border-bottom:1px solid var(--line-soft); font-size:13px; }
.kv li:last-child { border-bottom:none; }
.kv span { color:var(--muted); }
.kv b { color:var(--ink); font-weight:600; font-variant-numeric:tabular-nums; }
.kv b.neg { color:var(--red); }

/* ── Yazı ayarı ──────────────────────────────────────────────────── */
.top h1 { font-size:16px; font-weight:700; letter-spacing:-.02em; }
.top .crumb { font-weight:600; }
.nav a { font-weight:600; font-size:13px; }
.nav a.active { font-weight:700; }
.nav h3, .side-role, .role-chip, .lic span, .mini3 span { font-weight:700; letter-spacing:.08em; }
.card-head h2, .card-top h2 { font-size:14px; font-weight:700; letter-spacing:-.01em; }
.stat-label, .kpi-label { font-weight:600; }
.stat-val { font-size:28px; font-weight:800; letter-spacing:-.04em; }
.kpi-value { font-weight:800; letter-spacing:-.035em; }
.delta { font-weight:700; }
thead th { font-weight:700; font-size:11.5px; letter-spacing:.01em; }
td { font-weight:500; }
.lnk, .mini-lines b, .line-opt b { font-weight:700; }
.head-row h2 { font-size:22px; font-weight:800; letter-spacing:-.03em; }
.line-head h3 { font-weight:700; }
.line .phone { font-weight:700; letter-spacing:-.01em; }
.line-nums dd, .donut-svg b, .mini3 b, .kv b, .funnel b, .chart-sum b { font-weight:700; }
.license .days { font-weight:800; }
.auth-brand h2 { font-size:30px; font-weight:800; letter-spacing:-.035em; }
.auth-box h1 { font-size:24px; font-weight:800; letter-spacing:-.03em; }
.modal-head h2 { font-size:16px; }
.chart text { font:500 10.5px var(--font); }
.seg button { font-weight:700; }
.tab { font-weight:650; }
.empty h3 { font-weight:700; }

/* ── Mağaza ──────────────────────────────────────────────────────── */
.products { display:grid; grid-template-columns:repeat(auto-fill, minmax(240px, 1fr)); gap:16px; margin-bottom:16px; }
.product { position:relative; display:flex; flex-direction:column; padding:20px; background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); }
.product.featured { border-color:var(--brand); box-shadow:var(--ring), var(--shadow); }
.product .flag { position:absolute; top:-10px; left:16px; height:20px; padding:0 9px; display:inline-flex; align-items:center; border-radius:10px; background:var(--accent); color:var(--on-accent); font-size:11px; font-weight:700; }
.product h3 { font-size:16px; font-weight:800; letter-spacing:-.02em; }
.product .lines { font-size:12.5px; color:var(--muted); margin-bottom:14px; }
.product .price { font-size:30px; font-weight:800; color:var(--ink); letter-spacing:-.04em; line-height:1.2; }
.product .price.ask { font-size:18px; letter-spacing:-.02em; padding:7px 0; }
.product .note { font-size:12.5px; color:var(--muted); margin:6px 0 18px; min-height:19px; padding:0; background:none; border-radius:0; }
.product .btn { margin-top:auto; height:38px; }
.nav .count { font-weight:700; }
.app[data-role=owner] .nav a[data-nav=orders] .count { min-width:20px; height:20px; padding:0 6px; display:inline-grid; place-items:center; border-radius:10px; background:var(--accent); color:var(--on-accent); font-size:11px; }
.modal-body .btn.block { margin-bottom:6px; }

/* Kredi ve havuz */
.poolbox { border:1px solid var(--line); border-left:3px solid var(--edge-strong); border-radius:var(--radius-sm); padding:12px 14px; background:var(--surface-2); margin-bottom:16px; }
.poolbox.ok { border-left-color:var(--green); } .poolbox.warn { border-left-color:var(--amber); }
.poolbox-top { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:6px; }
.poolbox-top > span:first-child { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.07em; color:var(--muted); }
.poolbox p { font-size:13px; color:var(--text); } .poolbox small { display:block; margin-top:6px; font-size:12px; color:var(--muted); }
.field .poolbox, .card-pad .poolbox:last-child { margin-bottom:0; }
.credit-big { display:flex; align-items:baseline; gap:8px; margin-bottom:14px; }
.credit-big b { font-size:30px; font-weight:800; letter-spacing:-.03em; color:var(--ink); font-variant-numeric:tabular-nums; }
.credit-big span { color:var(--muted); font-size:13px; }
b.pos { color:var(--green); } b.neg { color:var(--red); }
.lic.err b { color:var(--red); }
.prod-row { grid-template-columns:minmax(120px,1.3fr) 92px 100px minmax(100px,1fr) minmax(120px,1.6fr) auto auto; }
@media (max-width:900px) { .prod-row { grid-template-columns:1fr 1fr; } }

/* Hat telefonu hatırlatması */
.phone-seen { display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:12.5px; color:var(--muted); }
.phone-seen.due { background:var(--amber-soft); color:var(--text); border-radius:var(--radius-sm); padding:10px 12px; }
.phone-seen.due b { color:var(--amber); }
