/* ============================================================
   Kulis SMS Panel — "Bright Ops" tasarim sistemi (sablon uyumlu)
   Palet:  zemin #F5F5F6 | yuzey #FFF | turuncu #F97316
           yesil #16A34A | kirmizi #EF4444 | skor #F5B325
   Tip:    Inter (tum arayuz) / JetBrains Mono (telefon, ID)
   ============================================================ */

:root {
  --bg: #F1F2F4;
  --surface: #FFFFFF;
  --surface-2: #F7F7F8;
  --ink: #17191C;
  --ink-soft: #5C6370;
  --ink-faint: #9AA1AC;
  --line: #E9EAEC;
  --line-soft: #F2F2F4;

  --accent: #F97316;
  --accent-ink: #DD5F0B;
  --accent-soft: #FFF3EA;
  --green: #16A34A;
  --green-soft: #EAF7EF;
  --red: #EF4444;
  --red-soft: #FDEDED;
  --coral: #EF4444;             /* eski isimle uyumluluk */
  --coral-soft: #FDEDED;
  --amber: #F5B325;
  --amber-soft: #FDF6E3;
  --blue: #3B82F6;
  --blue-soft: #EEF3FE;

  --r-lg: 16px;
  --r-md: 10px;
  --r-sm: 8px;
  --shadow: 0 1px 2px rgba(23,25,28,.04), 0 10px 30px -14px rgba(23,25,28,.08);
  --shadow-soft: 0 1px 2px rgba(23,25,28,.04);

  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: var(--body);
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--accent-soft); }

.hidden { display: none !important; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* ---------------- Login ---------------- */
.login {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  background:
    radial-gradient(70rem 34rem at 85% -10%, rgba(249,115,22,.10), transparent 60%),
    var(--bg);
}
.login__card {
  background: var(--surface);
  padding: 40px 36px 32px;
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  width: min(380px, 92vw);
  text-align: center;
}
.login__card h1 { font-size: 20px; font-weight: 700; margin: 14px 0 4px; letter-spacing: -.02em; }
.login__card p { color: var(--ink-soft); margin: 0 0 22px; font-size: 14px; }
.login__card input {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: 12px; font-size: 14.5px; margin-bottom: 12px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.login__card input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* Marka isareti */
.sigmark {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--accent); color: #fff;
  display: inline-grid; place-items: center;
  font-weight: 800; font-size: 19px; letter-spacing: -.02em;
}
.sigmark::after { content: "\2731"; font-size: 17px; }
.sigmark i { display: none; }
.sidebar .sigmark { width: 34px; height: 34px; border-radius: 10px; font-size: 16px; }

/* ---------------- Shell ---------------- */
.app { display: grid; grid-template-columns: 244px 1fr; min-height: 100vh; }

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 20px 14px 18px;
  display: flex; flex-direction: column; gap: 8px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 18px; }
.brand b { font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.brand b span { color: var(--ink-faint); font-weight: 500; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav .nav-label {
  font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-faint); padding: 14px 10px 7px;
}
.nav button {
  position: relative;
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 9.5px 10px; border: none; background: none; border-radius: 10px;
  color: var(--ink-soft); font-size: 13.5px; font-weight: 500; text-align: left;
  transition: background .15s, color .15s;
}
.nav button:hover { background: var(--surface-2); color: var(--ink); }
.nav button.active { background: #F1F1F3; color: var(--ink); font-weight: 600; }
.nav button.active svg { color: var(--accent); opacity: 1; }
.nav button svg { width: 17px; height: 17px; flex: none; opacity: .75; }

.manager {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 15px;
}
.manager .m-label { font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.manager .m-value { font-family: var(--mono); font-size: 19px; font-weight: 600; color: var(--ink); margin-top: 5px; letter-spacing: -.02em; }
.manager .m-foot { display: flex; align-items: center; gap: 7px; margin-top: 10px; font-size: 12px; color: var(--ink-faint); }
.manager .m-foot .live { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(22,163,74,.15); }

/* ---------------- Main ---------------- */
.main { padding: 26px 32px 64px; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 22px; flex-wrap: wrap;
}
.topbar h2 { font-size: 21px; font-weight: 700; margin: 0; letter-spacing: -.02em; }
.topbar .sub { display: block; color: var(--ink-faint); font-size: 12.5px; margin-top: 2px; font-weight: 500; }
.balance-chip {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--line);
  padding: 8px 15px; border-radius: 999px; box-shadow: var(--shadow-soft);
}
.balance-chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.balance-chip span:last-child { font-family: var(--mono); font-weight: 600; font-size: 13.5px; }

/* ---------------- Cards & grid ---------------- */
.grid { display: grid; gap: 14px; }
.dash-grid { grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); align-items: stretch; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft);
  padding: 20px 22px;
}
.card h3 { margin: 0; font-size: 14.5px; font-weight: 700; letter-spacing: -.01em; }
.card .muted { color: var(--ink-faint); font-size: 12.5px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }

/* Metrik seridi: tek kart, dikey ayracli hucreler (sablon gibi) */
.metric-strip { display: grid; grid-template-columns: repeat(4, 1fr); padding: 0; overflow: hidden; }
.metric-strip.cols-3 { grid-template-columns: repeat(3, 1fr); }
.metric-cell {
  padding: 18px 20px 16px; position: relative;
  display: flex; flex-direction: column; gap: 8px;
}
.metric-cell + .metric-cell { border-left: 1px solid var(--line-soft); }
.metric-cell .label { color: var(--ink-soft); font-size: 12.5px; font-weight: 500; }
.metric-cell .value-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.metric-cell .value { font-size: 26px; font-weight: 700; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.metric-cell .m-spark { width: 84px; height: 30px; flex: none; }
.metric-cell .m-spark svg { display: block; width: 100%; height: 100%; }
@media (max-width: 980px) { .metric-strip { grid-template-columns: repeat(2, 1fr); } .metric-cell:nth-child(3) { border-left: none; border-top: 1px solid var(--line-soft); } .metric-cell:nth-child(4) { border-top: 1px solid var(--line-soft); } }

/* Chart bits */
.chart-wrap { height: 290px; margin-top: 14px; }
.big-figure { font-family: var(--mono); font-size: 14.5px; font-weight: 600; }

/* Rozetler: cerceveli chip (sablon gibi) */
.pill {
  font-size: 10.5px; padding: 3px 9px; border-radius: 6px; font-weight: 600;
  display: inline-block; letter-spacing: .05em; text-transform: uppercase;
  border: 1px solid var(--line); color: var(--ink-soft); background: var(--surface);
}
.pill.blue  { border-color: #C9D8FD; color: var(--blue); background: var(--blue-soft); }
.pill.teal, .pill.green { border-color: #BFE5CC; color: var(--green); background: var(--green-soft); }
.pill.amber { border-color: #F2DCA3; color: #B07E0A; background: var(--amber-soft); }

/* ---------------- Forms ---------------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 7px; }
.field .hint { color: var(--ink-faint); font-weight: 400; font-size: 12px; }
input[type=text], input[type=password], input[type=number], input[type=datetime-local], textarea, select {
  width: 100%; padding: 10px 13px;
  border: 1.5px solid var(--line); border-radius: var(--r-md);
  font-size: 14px; font-family: inherit; outline: none;
  background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea { resize: vertical; min-height: 100px; }
#f-phones { font-family: var(--mono); font-size: 13.5px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .row { grid-template-columns: 1fr; } }
.counter { color: var(--ink-faint); font-size: 12px; text-align: right; margin-top: 5px; font-family: var(--mono); }

/* Dugmeler: hap bicimi, turuncu birincil (sablon gibi) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 10px;
  padding: 10px 17px; font-size: 13.5px; font-weight: 600;
  background: #111418; color: #fff;
  box-shadow: 0 1px 2px rgba(17,20,24,.18);
  transition: background .15s, transform .1s;
}
.btn:hover { background: #26292E; }
.btn.accent { background: var(--accent); box-shadow: 0 1px 2px rgba(221,95,11,.28); }
.btn.accent:hover { background: #EA6A0F; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn.ghost {
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); box-shadow: var(--shadow-soft);
}
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { padding: 6.5px 13px; font-size: 12.5px; }

/* ---------------- Table ---------------- */
.table-wrap { overflow-x: auto; margin: 4px -22px -20px; padding: 0 22px 8px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
th {
  color: var(--ink-faint); font-weight: 600; font-size: 10.5px;
  text-transform: uppercase; letter-spacing: .1em;
  border-bottom: 1px solid var(--line);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--surface-2); }
td.mono, td .mono { font-family: var(--mono); font-size: 12.5px; }

/* Durum rozetleri: cerceveli chip */
td .status {
  font-size: 10.5px; padding: 3px 9px; border-radius: 6px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  text-transform: uppercase; letter-spacing: .05em;
  border: 1px solid var(--line); background: var(--surface);
}
td .status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.st-delivered { border-color: #BFE5CC; color: var(--green); background: var(--green-soft); }
.st-sent, .st-read { border-color: #C9D8FD; color: var(--blue); background: var(--blue-soft); }
.st-not_delivered, .st-error, .st-rejected, .st-low_balance { border-color: #F6C6C6; color: var(--red); background: var(--red-soft); }
.st-moderation, .st-created, .st-planned { border-color: #F2DCA3; color: #B07E0A; background: var(--amber-soft); }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar input { max-width: 250px; }
.toolbar .muted { font-family: var(--mono); font-size: 12px; }

/* ---------------- Toast & durumlar ---------------- */
.toast {
  position: fixed; right: 22px; bottom: 22px; z-index: 60; max-width: 380px;
  background: var(--ink); color: #F6F6F7;
  padding: 12px 17px; border-radius: 12px;
  box-shadow: 0 16px 48px -12px rgba(23,25,28,.35);
  font-size: 13.5px; opacity: 0; transform: translateY(10px);
  transition: opacity .22s, transform .22s; pointer-events: none;
  border-left: 3px solid var(--accent);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.err { border-left-color: var(--red); }
.toast.ok { border-left-color: var(--green); }

.empty, .loading { color: var(--ink-faint); text-align: center; padding: 40px; font-size: 14px; }
.loading::before {
  content: ""; display: block; width: 22px; height: 22px; margin: 0 auto 12px;
  border: 2.5px solid var(--line); border-top-color: var(--accent); border-radius: 50%;
  animation: spinld .7s linear infinite;
}
@keyframes spinld { to { transform: rotate(360deg); } }

.result-box {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 15px 16px; margin-top: 18px;
  font-size: 12.5px; white-space: pre-wrap; word-break: break-word;
  font-family: var(--mono); line-height: 1.7;
}
.result-box b { font-family: var(--body); font-size: 13.5px; }
.notice { background: var(--amber-soft); border: 1px solid #F2DCA3; color: #8A650C; padding: 12px 14px; border-radius: var(--r-md); font-size: 13px; margin-bottom: 18px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------- Mesajlar: canli istatistik ---------------- */
.livebar { padding: 16px 20px; position: relative; overflow: hidden; }
.live-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.live-title { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 9px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(22,163,74,.5); animation: pulse 1.8s infinite; }
.live-dot.off { background: var(--ink-faint); animation: none; box-shadow: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.4); } 70% { box-shadow: 0 0 0 7px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }

.stat-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.stat-cell { background: var(--surface); padding: 12px 16px; }
.stat-cell .s-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px; }
.stat-cell .s-val { font-size: 19px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .stat-strip { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .stat-strip { grid-template-columns: repeat(2, 1fr); } }

/* Sekmeler: gri hap kapsayici, beyaz aktif sekme (tasarimdaki gibi) */
.tabs { display: inline-flex; gap: 2px; background: #F1F1F3; border-radius: 10px; padding: 3px; }
.tab {
  border: none; background: none; padding: 7px 13px;
  font-size: 13px; font-weight: 600; color: var(--ink-soft);
  border-radius: 8px; position: relative; transition: background .15s, color .15s;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); background: var(--surface); box-shadow: 0 1px 2px rgba(17,20,24,.08); }
.tab.active::after { display: none; }

/* Sayfa boyutu segmenti */
.pagesize { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.pagesize button { border: none; background: var(--surface); padding: 6px 13px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); font-family: var(--mono); }
.pagesize button + button { border-left: 1px solid var(--line); }
.pagesize button.active { background: #111418; color: #fff; }

/* Kampanya satirlari ve detay */
tr.camp-row { cursor: pointer; }
tr.camp-row.open { background: var(--accent-soft); }
.camp-link { color: var(--accent-ink); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(249,115,22,.35); text-underline-offset: 3px; }
tr.camp-row:hover .camp-link { text-decoration-color: var(--accent); }
tr.camp-detail td { background: var(--surface-2); padding: 16px 18px; }
.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 22px; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.kv span { color: var(--ink-soft); }

/* Veritabani ad linki */
.db-link { color: var(--accent-ink); font-weight: 600; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(249,115,22,.35); text-underline-offset: 3px; }
.db-link:hover { text-decoration-color: var(--accent); }

/* ---------------- Kullanici cipi & avatar ---------------- */
.user-chip {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--line);
  padding: 6px 7px 6px 7px; border-radius: 999px; box-shadow: var(--shadow-soft);
  font-weight: 600; font-size: 13px;
}
.avatar {
  width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 12px;
}
.avatar.sm { width: 22px; height: 22px; font-size: 11px; vertical-align: middle; margin-right: 4px; }
.user-chip button {
  border: none; background: var(--surface-2); color: var(--ink-soft);
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  transition: background .15s, color .15s;
}
.user-chip button:hover { background: var(--red-soft); color: var(--red); }

/* ---------------- Canli istatistik animasyonlari ---------------- */
.spin { animation: rot .6s ease; }
@keyframes rot { to { transform: rotate(360deg); } }

.stat-cell.bump { animation: bump .7s ease; }
@keyframes bump {
  0% { background: var(--accent-soft); }
  30% { background: var(--accent-soft); }
  100% { background: var(--surface); }
}
.stat-cell.bump .s-val { animation: valpop .45s ease; }
@keyframes valpop { 30% { transform: translateY(-2px) scale(1.04); } 100% { transform: none; } }

.eq { display: inline-flex; align-items: flex-end; gap: 2.5px; height: 14px; margin-left: 2px; }
.eq i { width: 3px; border-radius: 2px; background: var(--accent); animation: eqb 1s ease-in-out infinite; }
.eq i:nth-child(1) { height: 40%; animation-delay: 0s; }
.eq i:nth-child(2) { height: 90%; animation-delay: .15s; }
.eq i:nth-child(3) { height: 60%; animation-delay: .3s; }
.eq i:nth-child(4) { height: 100%; animation-delay: .45s; }
@keyframes eqb { 0%, 100% { transform: scaleY(.45); } 50% { transform: scaleY(1); } }

.livebar.sending::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2.5px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  background-size: 40% 100%; background-repeat: no-repeat;
  animation: sweep 1.6s linear infinite;
}
@keyframes sweep { 0% { background-position: -40% 0; } 100% { background-position: 140% 0; } }
.livebar.sending .stat-strip { border-color: rgba(249,115,22,.4); }

@media (prefers-reduced-motion: reduce) {
  .spin, .stat-cell.bump, .stat-cell.bump .s-val, .eq i, .livebar.sending::before, .live-dot, .loading::before { animation: none !important; }
  * { transition: none !important; }
}

/* ---------------- SMS Gonder: profesyonel duzen ---------------- */
.send-grid { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1000px) { .send-grid { grid-template-columns: 1fr; } }

/* Segmentli kanal secimi */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg button {
  border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px;
  padding: 11px 14px; text-align: left; display: flex; flex-direction: column; gap: 1px;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.seg button b { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.seg button span { font-size: 12px; color: var(--ink-faint); }
.seg button:hover { border-color: #DDD; }
.seg button.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px rgba(249,115,22,.08); }
.seg button.active b { color: var(--accent-ink); }
.seg.small button { padding: 8px 12px; border-radius: 10px; }

/* Ozet karti */
.summary { position: sticky; top: 20px; }
.summary h3 { margin-bottom: 10px; }
.sum-list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.sum-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 14px; font-size: 13px; background: var(--surface);
}
.sum-row + .sum-row { border-top: 1px solid var(--line-soft); }
.sum-row span { color: var(--ink-soft); }
.sum-row b { font-weight: 600; }
.sum-row.total { background: var(--accent-soft); }
.sum-row.total span { color: var(--accent-ink); font-weight: 600; }
.sum-row.total b { color: var(--accent-ink); font-size: 15px; }

/* ============================================================
   Cusana "Widgets" dili — kenar cubugu ekleri ve widget izgarasi
   ============================================================ */
.side-search {
  display: flex; align-items: center; gap: 8px;
  background: #F4F4F6; border: 1px solid var(--line); border-radius: 10px;
  padding: 7px 10px; margin: 0 2px 6px;
}
.side-search svg { width: 14px; height: 14px; color: var(--ink-faint); flex: none; }
.side-search input {
  border: none; background: none; padding: 0; font-size: 13px; outline: none; box-shadow: none !important;
  width: 100%; color: var(--ink);
}
.side-search input::placeholder { color: var(--ink-faint); }
.side-search kbd {
  font-family: var(--body); font-size: 10.5px; color: var(--ink-faint);
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; background: var(--surface);
}
.brand { justify-content: space-between; }
.brand .brand-l { display: flex; align-items: center; gap: 10px; }
.brand .chev { color: var(--ink-faint); }

.side-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 8px 4px; margin-top: 6px; border-top: 1px solid var(--line-soft);
}
.side-user .avatar { width: 30px; height: 30px; font-size: 12.5px; }
.side-user .su-name { font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.side-user .su-role { font-size: 11.5px; color: var(--ink-faint); }
.side-user button {
  margin-left: auto; border: none; background: none; color: var(--ink-faint);
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
}
.side-user button:hover { background: var(--red-soft); color: var(--red); }

.tabbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.section-title { font-size: 15px; font-weight: 700; margin: 6px 0 12px; letter-spacing: -.01em; }

.widget-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 26px; }
@media (max-width: 1280px) { .widget-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .widget-grid { grid-template-columns: 1fr; } }

.widget {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 12px;
}
.widget-inner {
  background: var(--surface); border-radius: 12px;
  box-shadow: 0 1px 2px rgba(17,20,24,.05), 0 10px 24px -14px rgba(17,20,24,.25);
  padding: 12px 13px; min-height: 148px; display: flex; flex-direction: column; gap: 8px;
}
.widget-title { font-size: 13.5px; font-weight: 700; color: var(--ink); margin-top: 2px; }
.widget-desc { font-size: 12px; color: var(--ink-faint); line-height: 1.45; margin-top: -8px; }

.w-head { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; font-weight: 600; color: var(--ink-soft); }
.w-head i { font-style: normal; color: var(--ink-faint); }
.kpi { display: flex; align-items: baseline; gap: 8px; font-size: 22px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.kpi small { font-size: 11px; color: var(--ink-faint); font-weight: 500; letter-spacing: 0; }
.trend { font-size: 10.5px; font-weight: 700; padding: 2px 6px; border-radius: 6px; }
.trend.up { color: var(--green); background: var(--green-soft); }
.trend.down { color: var(--red); background: var(--red-soft); }
.trend.flat { color: var(--ink-faint); background: #F1F1F3; }
.w-sub { font-size: 11px; color: var(--ink-faint); line-height: 1.4; }
.w-sub b { color: var(--ink); font-weight: 600; }
.w-chart { margin-top: auto; }
.w-chart svg { display: block; width: 100%; height: auto; }

.w-rows { display: flex; flex-direction: column; gap: 6px; }
.w-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; font-size: 11.5px; }
.w-row .dot { width: 7px; height: 7px; border-radius: 2px; }
.w-row .lbl { color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-row .val { font-weight: 600; font-variant-numeric: tabular-nums; }
.w-row .val small { color: var(--ink-faint); font-weight: 500; margin-left: 4px; }
.hbar { height: 6px; background: #EEEEF0; border-radius: 3px; overflow: hidden; }
.hbar i { display: block; height: 100%; border-radius: 3px; }
.donut-wrap { display: grid; grid-template-columns: 84px 1fr; gap: 10px; align-items: center; }
.ring-wrap { display: flex; align-items: center; gap: 12px; }
.ring-wrap .kpi { font-size: 20px; }

/* ============================================================
   CUSANA teması — ana tasarim (kabuk + widget galerisi)
   ============================================================ */
:root {
  --bg: #F3F4F6;
  --surface-2: #F7F8F9;
  --line: #E9EAEC;
  --line-soft: #F0F1F3;
  --ink: #1A1D21;
  --ink-soft: #626871;
  --ink-faint: #9AA0A9;
  --dark: #1A1D21;
  --green: #22B573;
  --green-soft: #E8F7EF;
  --blue: #5B8DEF;
  --blue-soft: #EAF0FD;
  --tile: #F5F6F7;
}
body { font-size: 13.5px; }

/* --- Kenar cubugu --- */
.app { grid-template-columns: 236px 1fr; }
.sidebar { background: var(--surface-2); border-right: 1px solid var(--line); padding: 18px 12px 14px; gap: 6px; }
.brand { padding: 2px 6px 14px; gap: 9px; }
.brand b { font-size: 14.5px; }
.brand .chev { width: 14px; height: 14px; color: var(--ink-faint); margin-left: auto; }
.sigmark { width: 28px; height: 28px; border-radius: 8px; font-size: 15px; }
.sigmark::after { content: "✱"; font-weight: 700; }
.sidebar .sigmark { width: 28px; height: 28px; border-radius: 8px; font-size: 15px; }
.login .sigmark { width: 40px; height: 40px; border-radius: 12px; font-size: 20px; }

.navsearch {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 9px;
  padding: 7px 10px; margin: 0 2px 8px; color: var(--ink-faint);
}
.navsearch svg { width: 14px; height: 14px; flex: none; }
.navsearch input { border: none; outline: none; background: none; flex: 1; font-size: 13px; padding: 0; color: var(--ink); min-width: 0; }
.navsearch input:focus { box-shadow: none; }
.navsearch kbd { font-family: var(--body); font-size: 10.5px; color: var(--ink-faint); background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }

.nav .nav-label { padding: 12px 10px 6px; font-size: 10px; }
.nav button { padding: 8.5px 10px; border-radius: 8px; font-size: 13.5px; color: var(--ink-soft); }
.nav button.active { background: #E9EBEE; color: var(--ink); }
.nav button.active svg { color: var(--ink); }
.nav button svg { width: 16px; height: 16px; }
.nav button.hidden { display: none !important; }

.sidefoot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.balance-mini {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px;
}
.balance-mini .bm-label { font-size: 11px; color: var(--ink-faint); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.balance-mini .bm-val { font-size: 13.5px; font-weight: 600; }
.userrow {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 8px; border-top: 1px solid var(--line); margin-top: 2px;
}
.userrow .avatar { width: 28px; height: 28px; font-size: 12px; background: var(--dark); }
.userrow .ur-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; flex: 1; }
.userrow .ur-text b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.userrow .ur-text span { font-size: 11px; }
.userrow button {
  border: none; background: none; color: var(--ink-faint); width: 26px; height: 26px;
  border-radius: 7px; display: grid; place-items: center;
}
.userrow button:hover { background: var(--red-soft); color: var(--red); }
.manager { display: none; }

/* --- Ust cubuk & dugmeler --- */
.main { padding: 22px 28px 60px; }
.topbar { margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.topbar h2 { font-size: 18px; }
.btn { border-radius: 9px; padding: 9px 16px; font-size: 13px; background: var(--dark); box-shadow: none; }
.btn:hover { background: #2A2E34; }
.btn.dark { background: var(--dark); }
.btn.ghost { background: var(--surface); }
.btn.small { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
.balance-chip { border-radius: 9px; padding: 7px 13px; }
.pagesize { border-radius: 8px; }
.pagesize button.active { background: var(--dark); }
.tab.active { color: var(--ink); }
.tab.active::after { display: none; }

/* Segmentli sekmeler (Cusana: gri kutu + beyaz aktif) */
.tabs { background: var(--tile); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; }
.tab { padding: 6px 12px; border-radius: 7px; font-size: 13px; }
.tab.active { background: var(--surface); box-shadow: 0 1px 2px rgba(0,0,0,.06); }

/* ---------------- API Ayarlari ---------------- */
.api-row { display: flex; align-items: center; gap: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.api-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.api-dot.ok { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.api-dot.bad { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.howto { margin: 12px 0 0; padding-left: 20px; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.howto li::marker { color: var(--ink-faint); font-weight: 600; }

/* ---------------- SMS Yukleme ---------------- */
.stepno { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--dark); color: #fff; font-size: 11px; font-weight: 700; margin-right: 6px; vertical-align: 1px; }
.pkgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin-top: 12px; }
.pkg { border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 12px 12px 10px; text-align: left; display: flex; flex-direction: column; gap: 1px; transition: border-color .15s, background .15s; }
.pkg b { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.pkg span { font-size: 11px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .08em; }
.pkg em { font-style: normal; font-size: 12.5px; color: var(--ink-soft); margin-top: 6px; font-family: var(--mono); }
.pkg:hover { border-color: #D6D8DC; }
.pkg.active { border-color: var(--dark); background: #F4F4F5; }
.pkg.custom { cursor: default; gap: 6px; }
.pkg.custom input { padding: 7px 9px; font-family: var(--mono); }

.wallets { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.wallet { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; padding: 10px 12px; text-align: left; transition: border-color .15s, background .15s; }
.wallet .coin { width: 40px; height: 40px; border-radius: 10px; background: var(--dark); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 11px; }
.wallet > div { display: flex; flex-direction: column; }
.wallet b { font-size: 13.5px; }
.wallet em { font-style: normal; font-size: 13px; color: var(--ink-soft); }
.wallet.active { border-color: var(--dark); background: #F4F4F5; }
.wallet.active .coin { background: var(--accent); }

.paybox .pay-grid { display: grid; grid-template-columns: 200px 1fr; gap: 20px; margin-top: 14px; }
@media (max-width: 800px) { .paybox .pay-grid { grid-template-columns: 1fr; } }
.qr { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: grid; place-items: center; }
.qr svg { width: 100%; height: auto; }
.pay-info { display: flex; flex-direction: column; gap: 6px; }
.pay-row { display: flex; gap: 12px; font-size: 13px; align-items: baseline; }
.pay-row span { color: var(--ink-soft); min-width: 60px; }
.addr { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; }
.addr code { font-family: var(--mono); font-size: 12px; word-break: break-all; flex: 1; }
.pill.red { border-color: #F6C6C6; color: var(--red); background: var(--red-soft); }

.wrow { display: flex; gap: 8px; align-items: center; }
.wrow input[type=text] { padding: 8px 10px; }

/* ---------------- Telefon giris satirlari ---------------- */
.phone-rows { display: flex; flex-direction: column; gap: 8px; }
.phone-row { display: grid; grid-template-columns: 130px 1fr auto; gap: 8px; align-items: center; }
.phone-row .cc { padding: 9px 10px; }
.phone-row .num { font-family: var(--mono); }
.linkbtn { border: none; background: none; color: var(--blue); font-weight: 600; font-size: 13px; padding: 8px 2px; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
.chk { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; }
.chk input { width: 16px; height: 16px; margin: 0; }

/* Aktif gonderim seridi */
.jobbar { background: var(--accent-soft); border: 1px solid #F8D9BF; border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.jobbar .jb-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; }

/* Satir menusu */
.dots { padding: 4px 8px !important; line-height: 0; color: var(--ink-soft); }
.dots:hover { color: var(--ink); }
.rowmenu { position: fixed; z-index: 80; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px -10px rgba(26,29,33,.25); padding: 6px; min-width: 190px; display: flex; flex-direction: column; }
.rowmenu button { border: none; background: none; text-align: left; padding: 8px 10px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; }
.rowmenu button:hover { background: var(--surface-2); }
