/* ==========================================================================
   Zevo Müşteri Takip — tasarım katmanı (admin.css + admin-modules.css üzerine)
   Tasarımın dosyalarına dokunulmaz; burada yalnızca müşteri takibine özel bileşenler var.
   Tüm renkler tasarımın değişkenlerinden türetilir → gece / gündüz modu kendiliğinden çalışır.

   Bileşen dizini (panelde canlı örnekler: Yardım → Arayüz kiti)
     .exp            bitiş sayacı rozeti (ok · soon · crit · over · off)
     .exp-track      dönem ilerleme çubuğu (kalan sürenin oranı)
     .cat-tile       hizmet türü ikon kutusu (--c ile renklenir)
     .svc-list       müşteri detayındaki hizmet satırları
     .amt            para tutarı (tabular rakam; .neg .pos .muted)
     .ch-grid        bildirim kanalı kartları (e-posta / SMS / Telegram) ve .ch-dot göstergeleri
     .due-list       genel bakıştaki "yaklaşan bitişler" listesi (büyük gün sayacı)
     .cal            yenileme takvimi (ay ızgarası; mobilde gün listesi)
     .var-chips      şablon değişkeni çipleri · .phone-mock/.sms-bubble/.tg-bubble önizleme · .seg-meter
     .ledger         hesap ekstresi tablosu (borç / alacak / bakiye)
     .aging          alacak yaşlandırma yığılmış çubuğu · .split-bar gelir / gider
     .line-items     fatura kalem düzenleyicisi
     .quick-grid     hızlı işlem kutuları · .stat-strip KPI şeridi · .tl-crm zaman çizelgesi
   ========================================================================== */

:root {
  --ch-email: #2f5bea;
  --ch-sms: #0d9488;
  --ch-telegram: #229ed9;
  --exp-ok: var(--success);
  --exp-soon: var(--warning);
  --exp-crit: var(--danger);
  --tabular: tabular-nums;
}
html[data-theme="dark"] {
  --ch-email: #7c9cff;
  --ch-sms: #2dd4bf;
  --ch-telegram: #4cc3f5;
}

/* ---------------------------------------------------------------- yardımcılar */
.amt { font-variant-numeric: var(--tabular); white-space: nowrap; font-weight: 600; }
.amt.neg { color: var(--danger); }
.amt.pos { color: var(--success); }
.amt.muted { color: var(--text-3); font-weight: 500; }
.amt small, .cur { font-size: .78em; color: var(--text-3); font-weight: 500; margin-left: 2px; }
.mono-sm { font-family: var(--mono); font-size: 12px; color: var(--text-3); }
.nowrap { white-space: nowrap; }
.gap-6 { gap: 6px; }
.w-100 { width: 100%; }
.mt-16 { margin-top: 16px; }
.text-3 { color: var(--text-3); }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hint-line { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 12.5px; }
.hint-line .ico { width: 15px; height: 15px; }
.inline-actions { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.inline-actions form { display: inline; margin: 0; }
/* Tasarımdaki ".card-flush .card-body { padding: 0 }" kuralı yalnızca doğrudan alt öğeye değil, iç içe tüm kartlara iniyor
   (sekmeli kartların içindeki kartlar ve tablosuz düz gövdeler kenara yapışıyordu). Dolgu yalnızca tablo / liste taşıyan gövdede sıfır kalır. */
.card-flush .card:not(.card-flush) > .card-body,
.card-flush > .card-body:not(:has(> .table-wrap, > table, > .list, > .svc-list, > .due-list, > .cal)),
.card-flush > form > .card-body:not(:has(> .table-wrap, > table, > .list)),
.card-flush > [data-tab-panel] > .card-body:not(:has(> .table-wrap, > table, > .list)) { padding: 20px; }
html[data-density="compact"] .card-flush .card:not(.card-flush) > .card-body,
html[data-density="compact"] .card-flush > .card-body:not(:has(> .table-wrap, > table, > .list, > .svc-list, > .due-list, > .cal)) { padding: 14px 16px; }
@media (max-width: 767px) {
  .card-flush .card:not(.card-flush) > .card-body,
  .card-flush > .card-body:not(:has(> .table-wrap, > table, > .list, > .svc-list, > .due-list, > .cal)),
  .card-flush > form > .card-body:not(:has(> .table-wrap, > table, > .list)),
  .card-flush > [data-tab-panel] > .card-body:not(:has(> .table-wrap, > table, > .list)) { padding: 16px; }
}
/* .entity-stats div kuralı (dolgu + sağ çizgi) iç içe div'lere de iniyordu */
.entity-stats div div { padding: 0; border: 0; }
.entity-stats .es-sub { display: block; margin-top: 4px; font-size: 12px; color: var(--text-3); }
/* ek kutusu (birim) tek satırda kalsın: "1 yıl", "gün kala" */
.input-group .addon { white-space: nowrap; }
/* simge + metin bağlantısı satır içinde */
.inline-link { display: inline-flex; align-items: center; gap: 4px; }
/* açılır "ekle" bölümü (details/summary) */
.add-toggle > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--accent); font-weight: 550; font-size: 13px; }
.add-toggle > summary::-webkit-details-marker { display: none; }
.add-toggle > summary .ico { transition: transform .15s; }
.add-toggle[open] > summary .ico { transform: rotate(45deg); }
@media (prefers-reduced-motion: reduce) { .add-toggle > summary .ico { transition: none; } }
/* çok satırlı onay kutuları (ör. "Telegram · Kanal kapalı") diğerleriyle aynı hizada başlasın */
.check-row { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: flex-start; }

/* tasarımda .who-text span blok; içindeki küçük rozet ve kodlar satır içinde kalsın */
.who-text span span { display: inline-flex; align-items: center; vertical-align: middle; gap: 5px; font-size: inherit; }
.who-text span .badge { height: 20px; font-size: 11px; }

/* ---------------------------------------------------------------- bitiş sayacı */
.exp {
  --tone: var(--exp-ok);
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 650; white-space: nowrap; font-variant-numeric: var(--tabular);
  color: color-mix(in srgb, var(--tone) 88%, var(--text));
  background: color-mix(in srgb, var(--tone) 12%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tone) 22%, transparent);
}
.exp::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--tone); flex: none; }
.exp.soon { --tone: var(--exp-soon); }
.exp.crit, .exp.over { --tone: var(--exp-crit); }
.exp.over { background: var(--danger); color: #fff; box-shadow: none; }
.exp.over::before { background: #fff; }
.exp.crit::before { animation: exp-pulse 1.6s ease-in-out infinite; }
.exp.off { --tone: var(--text-3); }
.exp.lg { height: 30px; padding: 0 12px 0 10px; font-size: 13px; }
@keyframes exp-pulse { 50% { opacity: .35; transform: scale(.7); } }
@media (prefers-reduced-motion: reduce) { .exp.crit::before { animation: none; } }
.exp-cell { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.exp-cell small { color: var(--text-3); font-size: 12px; font-variant-numeric: var(--tabular); }

/* dönem ilerleme çubuğu: dolu kısım geçen süre, renk kalan süreye göre */
.exp-track { position: relative; height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; min-width: 80px; }
.exp-track > span { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--exp-ok); }
.exp-track.soon > span { background: var(--exp-soon); }
.exp-track.crit > span, .exp-track.over > span { background: var(--exp-crit); }
.exp-track.off > span { background: var(--text-3); }

/* ---------------------------------------------------------------- hizmet türü ikonu */
.cat-tile {
  --c: var(--accent);
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; flex: none;
  color: var(--c); background: color-mix(in srgb, var(--c) 13%, var(--surface));
}
.cat-tile .ico { width: 18px; height: 18px; }
.cat-tile.sm { width: 28px; height: 28px; border-radius: 8px; }
.cat-tile.sm .ico { width: 15px; height: 15px; }
.cat-tile.lg { width: 52px; height: 52px; border-radius: 14px; }
.cat-tile.lg .ico { width: 24px; height: 24px; }
.cat-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.cat-chip i { width: 8px; height: 8px; border-radius: 3px; background: var(--c, var(--accent)); }

/* ---------------------------------------------------------------- hizmet satırları (müşteri detayı) */
.svc-list { list-style: none; margin: 0; padding: 0; }
.svc-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 14px 20px; border-top: 1px solid var(--border); }
.svc-item:first-child { border-top: 0; }
.svc-item:hover { background: var(--surface-2); }
.svc-main { min-width: 0; }
.svc-main b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-main b a { color: inherit; text-decoration: none; }
.svc-main b a:hover { color: var(--accent); }
.svc-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.svc-when { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 128px; }
.svc-when .exp-track { width: 120px; }
.svc-price { text-align: right; min-width: 110px; }
.svc-price small { display: block; font-size: 12px; color: var(--text-3); }
.svc-item.is-off { opacity: .62; }
@media (max-width: 720px) {
  .svc-item { grid-template-columns: auto minmax(0, 1fr); gap: 10px 12px; padding: 14px 16px; }
  .svc-when, .svc-price { grid-column: 2; align-items: flex-start; text-align: left; min-width: 0; }
  .svc-when { flex-direction: row; align-items: center; }
}

/* ---------------------------------------------------------------- bildirim kanalı kartları */
.ch-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 860px) { .ch-grid { grid-template-columns: 1fr; } }
.ch-card {
  --c: var(--ch-email);
  position: relative; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: var(--r-lg);
  border: 1px solid var(--border); background: var(--surface);
}
.ch-card.sms { --c: var(--ch-sms); }
.ch-card.telegram { --c: var(--ch-telegram); }
.ch-card.on { border-color: color-mix(in srgb, var(--c) 45%, var(--border)); background: color-mix(in srgb, var(--c) 5%, var(--surface)); }
.ch-top { display: flex; align-items: center; gap: 10px; }
.ch-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--c); background: color-mix(in srgb, var(--c) 13%, var(--surface)); flex: none; }
.ch-ico .ico { width: 17px; height: 17px; }
.ch-top b { font-weight: 600; }
.ch-top .switch { margin-left: auto; }
.ch-to { font-size: 12.5px; color: var(--text-2); word-break: break-all; min-height: 18px; }
.ch-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.ch-state.warn { color: var(--warning); }
.ch-state.bad { color: var(--danger); }
.ch-state.ok { color: var(--success); }
.ch-state .ico { width: 14px; height: 14px; }
.ch-card.locked { opacity: .7; background: var(--surface-2); }

/* liste satırındaki küçük kanal göstergeleri */
.ch-dots { display: inline-flex; gap: 4px; }
.ch-dot { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; color: var(--text-3); background: var(--surface-3); }
.ch-dot .ico { width: 12px; height: 12px; }
.ch-dot.on.email { color: var(--ch-email); background: color-mix(in srgb, var(--ch-email) 14%, var(--surface)); }
.ch-dot.on.sms { color: var(--ch-sms); background: color-mix(in srgb, var(--ch-sms) 14%, var(--surface)); }
.ch-dot.on.telegram { color: var(--ch-telegram); background: color-mix(in srgb, var(--ch-telegram) 14%, var(--surface)); }
.ch-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 550; color: var(--c, var(--text-2)); }
.ch-badge.email { --c: var(--ch-email); } .ch-badge.sms { --c: var(--ch-sms); } .ch-badge.telegram { --c: var(--ch-telegram); }
.ch-badge .ico { width: 14px; height: 14px; }

/* ---------------------------------------------------------------- yaklaşan bitişler */
.due-list { list-style: none; margin: 0; padding: 0; }
.due-item { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 20px; border-top: 1px solid var(--border); }
.due-item:first-child { border-top: 0; }
.due-day {
  --tone: var(--exp-ok);
  display: flex; flex-direction: column; align-items: center; justify-content: center; height: 46px; border-radius: 12px;
  background: color-mix(in srgb, var(--tone) 12%, var(--surface)); color: color-mix(in srgb, var(--tone) 85%, var(--text));
  font-variant-numeric: var(--tabular);
}
.due-day b { font-size: 18px; line-height: 1; font-weight: 750; }
.due-day small { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; margin-top: 3px; font-weight: 650; }
.due-day.soon { --tone: var(--exp-soon); }
.due-day.crit { --tone: var(--exp-crit); }
.due-day.over { --tone: var(--exp-crit); background: var(--danger); color: #fff; }
.due-body { min-width: 0; }
.due-body b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.due-body span { display: block; font-size: 12.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.due-side { display: flex; align-items: center; gap: 8px; }
@media (max-width: 560px) { .due-item { grid-template-columns: 46px minmax(0, 1fr); padding: 11px 16px; } .due-side { grid-column: 2; } }

/* ---------------------------------------------------------------- KPI şeridi ve hızlı işlemler */
.stat-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1280px) { .stat-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat-strip .kpi-value { font-size: 22px; font-variant-numeric: var(--tabular); }
.kpi-sub { margin-top: 6px; font-size: 12.5px; color: var(--text-3); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.kpi-sub b { color: var(--text-2); font-weight: 600; }
.kpi a.kpi-link { position: absolute; inset: 0; border-radius: inherit; }
.kpi { position: relative; }
.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 900px) { .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.quick {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r-lg); border: 1px solid var(--border);
  background: var(--surface); color: var(--text); text-decoration: none; font-weight: 550; font-size: 13.5px; transition: border-color .15s, transform .15s;
}
.quick:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); transform: translateY(-1px); }
.quick .cat-tile { width: 32px; height: 32px; }
@media (prefers-reduced-motion: reduce) { .quick { transition: none; } .quick:hover { transform: none; } }

/* ---------------------------------------------------------------- gelir / gider ve yaşlandırma çubukları */
.split-bar, .aging { display: flex; height: 12px; border-radius: 8px; overflow: hidden; background: var(--surface-3); }
.split-bar span, .aging span { height: 100%; min-width: 2px; }
.split-bar .in { background: var(--success); }
.split-bar .out { background: color-mix(in srgb, var(--danger) 75%, var(--surface)); }
.aging .a0 { background: color-mix(in srgb, var(--warning) 55%, var(--surface)); }
.aging .a1 { background: var(--warning); }
.aging .a2 { background: color-mix(in srgb, var(--danger) 70%, var(--warning)); }
.aging .a3 { background: var(--danger); }
.legend-row { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 12.5px; color: var(--text-2); }
.legend-row span { display: inline-flex; align-items: center; gap: 6px; }
.legend-row i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend-row b { font-variant-numeric: var(--tabular); }

/* ---------------------------------------------------------------- yenileme takvimi */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--border); }
.cal-h { padding: 10px 12px; font-size: 11.5px; font-weight: 650; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--border); }
.cal-d { min-height: 118px; padding: 8px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-d:nth-child(7n) { border-right: 0; }
.cal-d.out { background: var(--surface-2); }
.cal-d.out .cal-n { color: var(--text-3); }
.cal-d.today { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-d.wkend { background: color-mix(in srgb, var(--surface-2) 60%, var(--surface)); }
.cal-n { font-size: 12.5px; font-weight: 650; font-variant-numeric: var(--tabular); display: flex; justify-content: space-between; align-items: center; }
.cal-n em { font-style: normal; font-size: 11px; color: var(--text-3); font-weight: 500; }
.cal-ev {
  --c: var(--accent);
  display: flex; align-items: center; gap: 5px; padding: 3px 6px; border-radius: 6px; font-size: 11.5px; line-height: 1.3; text-decoration: none;
  color: var(--text); background: color-mix(in srgb, var(--c) 11%, var(--surface)); border-left: 3px solid var(--c); min-width: 0;
}
.cal-ev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev:hover { background: color-mix(in srgb, var(--c) 20%, var(--surface)); }
.cal-ev.inv { --c: var(--warning); }
.cal-ev.done { opacity: .55; text-decoration: line-through; }
.cal-more { font-size: 11.5px; color: var(--text-3); padding-left: 4px; }
.cal-list { display: none; list-style: none; margin: 0; padding: 0; }
@media (max-width: 760px) {
  .cal { display: none; }
  .cal-list { display: block; }
  .cal-list > li { padding: 12px 16px; border-top: 1px solid var(--border); }
  .cal-list > li > b { display: block; font-size: 13px; margin-bottom: 6px; }
  .cal-list .cal-ev { margin-top: 4px; font-size: 13px; padding: 6px 8px; }
}

/* ---------------------------------------------------------------- şablon düzenleyici */
.var-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.var-chip {
  display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 9px; border-radius: 7px; border: 1px dashed var(--border-strong);
  background: var(--surface-2); color: var(--text-2); font-family: var(--mono); font-size: 12px; cursor: pointer;
}
.var-chip:hover, .var-chip:focus-visible { border-style: solid; border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.var-group { display: block; width: 100%; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin: 8px 0 2px; }
.var-group:first-child { margin-top: 0; }
.tpl-tabs { display: flex; gap: 6px; flex-wrap: wrap; }

.phone-mock {
  width: min(320px, 100%); margin: 0 auto; border-radius: 30px; padding: 14px 12px 18px; background: var(--surface-3);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow);
}
.phone-mock .pm-bar { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--text-3); padding: 0 8px 10px; }
.phone-mock .pm-screen { min-height: 260px; border-radius: 20px; padding: 14px 12px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.phone-mock .pm-from { text-align: center; font-size: 12px; color: var(--text-3); font-weight: 600; margin-bottom: 4px; }
.sms-bubble, .tg-bubble {
  max-width: 88%; padding: 9px 12px; border-radius: 16px; font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-word;
}
.sms-bubble { align-self: flex-start; background: var(--surface-3); color: var(--text); border-bottom-left-radius: 5px; }
.tg-screen { background: color-mix(in srgb, var(--ch-telegram) 10%, var(--surface)) !important; }
.tg-bubble { align-self: flex-start; background: var(--surface); color: var(--text); border-bottom-left-radius: 5px; box-shadow: var(--shadow-sm); }
.tg-bubble time { display: block; text-align: right; font-size: 10.5px; color: var(--text-3); margin-top: 4px; }
.seg-meter { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 12.5px; color: var(--text-2); margin-top: 8px; font-variant-numeric: var(--tabular); }
.seg-meter b { font-weight: 650; }
.seg-meter .warn { color: var(--warning); }
.seg-meter .bad { color: var(--danger); }
.tpl-off { position: relative; }
.tpl-off::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--surface) 55%, transparent); pointer-events: none; border-radius: inherit; }

/* şablon listesi: olay × kanal matrisi */
.tpl-matrix td.ch { width: 120px; text-align: center; }
.tpl-cell { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 8px; text-decoration: none; font-size: 12.5px; font-weight: 550; color: var(--text-2); border: 1px solid var(--border); background: var(--surface); }
.tpl-cell:hover { border-color: var(--accent); color: var(--accent); }
.tpl-cell.on::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
.tpl-cell.off { color: var(--text-3); }
.tpl-cell.off::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--border-strong); }
.tpl-cell.na { border-style: dashed; color: var(--text-3); pointer-events: none; }

/* ---------------------------------------------------------------- hesap ekstresi */
.ledger td.num, .ledger th.num { text-align: right; font-variant-numeric: var(--tabular); white-space: nowrap; }
.ledger tr.open-row td { background: var(--surface-2); font-weight: 600; }
.ledger .debit { color: var(--text); }
.ledger .credit { color: var(--success); }
.ledger tfoot td { font-weight: 700; border-top: 2px solid var(--border-strong); }

/* ---------------------------------------------------------------- fatura kalemleri */
.line-items { width: 100%; border-collapse: separate; border-spacing: 0; }
.line-items th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3); padding: 0 8px 8px; }
.line-items td { padding: 4px; vertical-align: top; }
.line-items td:first-child { padding-left: 0; }
.line-items .input { height: 38px; }
.line-items .c-desc { width: 46%; }
.line-items .c-qty { width: 9%; }
.line-items .c-price { width: 17%; }
.line-items .c-tax { width: 10%; }
.line-items .c-total { width: 14%; text-align: right; }
.line-items .c-total output { display: block; padding-top: 9px; font-weight: 650; font-variant-numeric: var(--tabular); white-space: nowrap; }
.line-items .c-rm { width: 40px; }
.line-items .li-period { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 3px; padding-left: 2px; }
.totals-box { display: grid; grid-template-columns: 1fr auto; gap: 8px 24px; font-size: 13.5px; font-variant-numeric: var(--tabular); max-width: 360px; margin-left: auto; }
.totals-box dt { color: var(--text-2); }
.totals-box dd { margin: 0; text-align: right; font-weight: 600; }
.totals-box .grand { font-size: 17px; font-weight: 750; color: var(--text); padding-top: 8px; border-top: 1px solid var(--border); }
@media (max-width: 760px) {
  .line-items thead { display: none; }
  .line-items tr { display: grid; grid-template-columns: 1fr 1fr 40px; gap: 6px; padding: 10px 0; border-top: 1px solid var(--border); }
  .line-items td { padding: 0; width: auto !important; }
  .line-items .c-desc { grid-column: 1 / -1; }
  .line-items .c-total { text-align: left; }
  .line-items .c-total output { padding-top: 10px; }
}

/* ---------------------------------------------------------------- zaman çizelgesi (müşteri) */
.tl-crm li { padding-bottom: 18px; }
.tl-crm .tl-body { font-size: 13.5px; line-height: 1.55; }
.tl-crm .tl-body p { margin: 2px 0 0; white-space: pre-wrap; word-break: break-word; }
.tl-crm .tl-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.tl-crm .tl-head b { font-weight: 600; }
.tl-crm .pinned { color: var(--warning); }
.note-composer { display: grid; gap: 10px; }
.note-composer .segmented button, .note-composer .segmented label { font-size: 12.5px; }

/* ---------------------------------------------------------------- müşteri başlığı */
.cust-head .avatar-lg { font-size: 19px; }
.cust-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cust-contact { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 13px; color: var(--text-2); }
.cust-contact a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.cust-contact a:hover { color: var(--accent); }
.cust-contact .ico { width: 14px; height: 14px; color: var(--text-3); }
.cust-contact > span { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 640px) {
  .cust-head .entity-head, .entity-head.wrap-sm { flex-wrap: wrap; align-items: flex-start; gap: 12px; }
  .cust-head .entity-head .avatar-lg { width: 48px; height: 48px; font-size: 16px; }
  .cust-head .entity-head > .grow { flex: 1 1 calc(100% - 120px); }
}
.entity-stats.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 900px) { .entity-stats.five { grid-template-columns: repeat(2, minmax(0, 1fr)); } .entity-stats.five div:nth-child(2n) { border-right: 0; } }

/* ---------------------------------------------------------------- yenileme penceresi önizlemesi */
.renew-preview { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; padding: 14px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--border); }
.renew-preview div small { display: block; font-size: 11.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.renew-preview div b { font-size: 16px; font-variant-numeric: var(--tabular); }
.renew-preview .ico { color: var(--text-3); }
.renew-preview .to b { color: var(--success); }

/* ---------------------------------------------------------------- durum ve uyarı şeritleri */
.banner-mini { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--r); font-size: 13px; background: var(--info-soft); color: var(--info); }
.banner-mini.warning { background: var(--warning-soft); color: var(--warning); }
.banner-mini.danger { background: var(--danger-soft); color: var(--danger); }
.banner-mini a { color: inherit; font-weight: 650; }
.banner-mini .ico { flex: none; }
.cron-box { font-family: var(--mono); font-size: 12.5px; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); border: 1px solid var(--border); word-break: break-all; }

/* ---------------------------------------------------------------- arayüz kiti sayfası */
.kit-swatch { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; font-size: 12.5px; }
.kit-swatch i { width: 44px; height: 32px; border-radius: 8px; border: 1px solid var(--border); }
.kit-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------------------------------------------------------------- baskı (proforma, ekstre) */
.print-doc .doc-meta { font-size: 13px; color: var(--text-2); line-height: 1.7; }
.print-doc .doc-title { font-size: 22px; letter-spacing: -.01em; margin: 0; }
.print-doc .paid-stamp { display: inline-block; padding: 4px 12px; border: 2px solid var(--success); color: var(--success); border-radius: 8px; font-weight: 800; letter-spacing: .08em; transform: rotate(-4deg); }
.print-doc .bank-box { margin-top: 18px; padding: 12px 14px; border-radius: var(--r); background: var(--surface-2); font-size: 12.5px; white-space: pre-line; }
.print-doc img.doc-logo { max-height: 40px; max-width: 200px; }
@media print {
  html[data-theme="dark"] { color-scheme: light; }
  .print-doc { box-shadow: none !important; border: 0 !important; margin: 0 !important; max-width: none !important; }
  .print-doc .bank-box { background: #f5f5f5; }
}

/* giriş ve şifre sıfırlama: yerleşik doğrulama görseli (Captcha::widget) */
.captcha img[data-captcha] { display: block; width: 160px; height: 56px; border: 1px solid var(--border); border-radius: 8px; }
.captcha .captcha-refresh { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text-2); font-size: 18px; line-height: 1; cursor: pointer; }
.captcha .captcha-refresh:hover { color: var(--text); border-color: var(--border-strong, var(--border)); }
.captcha .captcha-refresh:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.captcha > .input { flex: 1 1 100%; }
