/* DestekGO Yönetim V4.0 — Abonelik sayfaları (önek .ab-) */

/* Ayrıntı penceresi */
.ab-actions { gap: 6px; }
.ab-box { border: 1px solid var(--line); border-radius: 10px; }
.ab-box > .item { padding: 10px 14px; }
.modal .ledger { box-shadow: none; }

/* Takvim */
.ab-month { min-width: 120px; text-align: center; font-size: 14px; }
.ab-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-right: 6px; }
.ab-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 6px; }
.ab-legend i.end { background: var(--orange); }
.ab-legend i.start { background: var(--blue); }
.ab-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ab-cal .wd { font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; background: #fbfcfd; border-bottom: 1px solid var(--line); }
.ab-cal .cell { min-height: 98px; padding: 6px 6px 8px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ab-cal .cell:nth-child(7n) { border-right: 0; }
.ab-cal .cell.out { background: #fafbfc; }
.ab-cal .cell.out .n { color: var(--faint); }
.ab-cal .n { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; align-self: flex-start; padding: 0 5px; border-radius: 6px; line-height: 20px; }
.ab-cal .cell.today .n { background: var(--orange); color: #fff; }
.ab-ev { display: block; width: 100%; text-align: left; border: 0; cursor: pointer; font: 500 11.5px/1.3 var(--font); padding: 3px 6px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ab-ev.end { background: var(--orange-soft); color: var(--orange-ink); }
.ab-ev.start { background: var(--blue-soft); color: var(--blue); }
.ab-ev:hover { filter: brightness(.96); }
.ab-more { font-size: 11px; color: var(--muted); padding-left: 4px; }
.ab-cal-list { border-top: 1px solid var(--line); }

/* Portal onayı karşılaştırma */
.ab-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ab-compare section { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.ab-compare h4 { margin: 0 0 10px; font-size: 13px; color: var(--muted); font-weight: 600; }
.ab-compare .kv { grid-template-columns: 70px minmax(0, 1fr); }
.ab-compare dd.ab-chg { background: var(--amber-soft); color: #7a4800; border-radius: 5px; padding: 0 6px; font-weight: 600; }

/* Ayarlar */
.ab-split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.ab-form .field input[type=color] { padding: 4px; cursor: pointer; }
.ab-mailprev { --c: #173e68; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #f3f6fb; font-size: 13px; }
.ab-mailprev .hd { background: var(--c); color: #fff; padding: 14px 16px; }
.ab-mailprev .hd b { display: block; font-size: 17px; }
.ab-mailprev .hd small { font-size: 10.5px; opacity: .75; letter-spacing: .02em; }
.ab-mailprev .bd { background: #fff; margin: 12px; border-radius: 10px; padding: 14px 16px; }
.ab-mailprev h4 { margin: 0 0 6px; font-size: 14px; }
.ab-mailprev p { margin: 0 0 12px; color: var(--ink-2); }
.ab-mailprev .bt { display: inline-block; background: var(--c); color: #fff; border-radius: 7px; padding: 8px 12px; font-weight: 600; font-size: 12px; }
.ab-mailprev .ft { padding: 0 16px 12px; color: var(--muted); font-size: 12px; }
.ab-smsprev { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.ab-smsprev [data-pv] { white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  .ab-split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .ab-cal { display: none; }
  .ab-cal-list { border-top: 0; }
  .ab-legend { display: none; }
  .ab-compare { grid-template-columns: minmax(0, 1fr); }
  .ab-actions .btn { flex: 1 1 auto; justify-content: center; }
}

/* Mobil kartlarda ikinci satır (small) değerin altına iner; boş isteğe bağlı hücreler gizlenir */
@media (max-width: 860px) {
  .ab-t .tbl.cards td:not(.primary-cell) { flex-wrap: wrap; align-items: center; column-gap: 12px; row-gap: 0; }
  .ab-t .tbl.cards td:not(.primary-cell) > small { flex-basis: 100%; text-align: right; }
  .ab-t .tbl.cards td:not(.primary-cell):has(> .ab-none) { display: none; }
  .ab-t .tbl.cards td[data-label="Seç"] { position: absolute; right: 14px; margin-top: 2px; width: auto; }
  .ab-t .tbl.cards td[data-label="Seç"]::before { display: none; }
  .ab-t .tbl.cards tr { position: relative; }
  .ab-t .tbl.cards td.primary-cell { padding-right: 34px; }
}
