:root {
  --bg: #f5f6f8; --card: #fff; --text: #1a1d23; --muted: #6b7280; --line: #e5e7eb;
  --brand: #0b3d91; --ok: #15803d; --warn: #b45309; --bad: #b91c1c;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: var(--brand); color: #fff; padding: 20px 14px; display: flex; flex-direction: column; gap: 4px; }
.side h1 { font-size: 16px; margin: 0 0 18px 8px; }
.side a { color: #fff; padding: 9px 12px; border-radius: 8px; font-size: 14px; }
.side a:hover, .side a.on { background: rgba(255,255,255,.16); text-decoration: none; }
.side .spacer { flex: 1; }
.mockinfo { font-size: 12px; opacity: .8; padding: 0 8px 8px; }
.main { padding: 28px; max-width: 1200px; width: 100%; }
.main h2 { margin: 0 0 18px; font-size: 20px; }

.notice { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; }
.notice.ok { background: #dcfce7; color: var(--ok); }
.notice.bad { background: #fee2e2; color: var(--bad); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 22px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.card small { color: var(--muted); display: block; margin-bottom: 4px; }
.card b { font-size: 24px; }

.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); font-size: 13px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: #fafafa; color: var(--muted); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.actions { white-space: nowrap; }
.actions form { display: inline; }

.badge { padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.ACTIVE { background: #dcfce7; color: var(--ok); }
.badge.SUSPENDED { background: #fef3c7; color: var(--warn); }
.badge.DEACTIVATED { background: #fee2e2; color: var(--bad); }
.badge.READY { background: #e0e7ff; color: #3730a3; }

.bar { height: 8px; background: #eceef2; border-radius: 99px; overflow: hidden; min-width: 120px; }
.bar i { display: block; height: 100%; background: var(--brand); }
.bar i.warn { background: #f59e0b; }
.bar i.bad { background: var(--bad); }

.filters { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.pager { display: flex; gap: 16px; align-items: center; margin-top: 14px; font-size: 13px; }
input, select, button { font: inherit; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
button { cursor: pointer; }
button.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
button.mini { padding: 4px 9px; font-size: 12px; }

.formbox { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 20px; max-width: 380px; display: grid; gap: 12px; }
.formbox label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }

.login { min-height: 100vh; display: grid; place-items: center; }
.login form { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 26px; width: 320px; max-width: 92vw; display: grid; gap: 12px; }
.login h1 { margin: 0; font-size: 18px; }
.err { color: var(--bad); font-size: 13px; }

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .side h1 { width: 100%; margin: 0 0 6px; }
  .side .spacer { display: none; }
  .main { padding: 16px; }
}

/* --- Hat kullanıcıları / süre takibi --- */
.muted { color: var(--muted); }
.small { font-size: 12px; }
.txt-ok { color: var(--ok); }
.txt-bad { color: var(--bad); }
h3 { font-size: 16px; margin: 22px 0 10px; }
.btn { display: inline-block; padding: 8px 13px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); font-size: 14px; }
.btn:hover { text-decoration: none; background: #f3f4f6; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.toolbar, .inline-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.presets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.presets a { font-size: 13px; padding: 5px 11px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--text); }
.presets a.on, .presets a:hover { background: var(--brand); border-color: var(--brand); color: #fff; text-decoration: none; }
.exportbox { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13px; background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 8px; padding: 9px 12px; margin-bottom: 12px; }
.badge.d-ok { background: #dcfce7; color: var(--ok); }
.badge.d-soon { background: #fef3c7; color: var(--warn); }
.badge.d-expired { background: #fee2e2; color: var(--bad); }
tr.row-soon td { background: #fffbeb; }
tr.row-expired td { background: #fef2f2; }
tr.row-bad td { background: #fef2f2; }
button.wa { background: #25d366; border-color: #25d366; color: #fff; }
button.danger { color: var(--bad); border-color: #fca5a5; }
.card.link { color: var(--text); }
.card.link:hover { text-decoration: none; border-color: var(--brand); }
.card.c-soon { background: #fffbeb; border-color: #fcd34d; }
.card.c-expired { background: #fef2f2; border-color: #fca5a5; }
.card b.sm { font-size: 14px; word-break: break-all; }
.formbox.wide { max-width: 640px; }
.formbox .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.formbox .row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.formbox label.check { display: flex; gap: 8px; align-items: center; color: var(--text); }
.formbox input, .formbox select { width: 100%; }
.formbox label.check input { width: auto; }
.twocol { display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 1fr); gap: 22px; align-items: start; }
.help { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 4px 20px 10px; font-size: 14px; line-height: 1.5; }
.help ol { padding-left: 18px; }
@media (max-width: 900px) {
  .twocol { grid-template-columns: 1fr; }
  .formbox .row2, .formbox .row3 { grid-template-columns: 1fr; }
}

.whoami { font-size: 13px; padding: 0 8px 10px; line-height: 1.35; }
.whoami small { opacity: .75; }
.badge.role-admin { background: #e0e7ff; color: #3730a3; }
.badge.role-staff { background: #e0f2fe; color: #075985; }
.badge.role-dealer { background: #fef3c7; color: var(--warn); }
.btn.mini { padding: 4px 9px; font-size: 12px; }
.help ul { padding-left: 18px; }
.kb { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: 11px; font-weight: 700; cursor: help; vertical-align: middle; }
.kb-ok { background: #dcfce7; color: var(--ok); }
.kb-mismatch { background: #fee2e2; color: var(--bad); }
.kb-pending { background: #fef3c7; color: var(--warn); }
.kb-none { background: #f3f4f6; color: var(--muted); }
.txt-warn { color: var(--warn); }
.toolbar form { display: inline; }

/* ===== Akdeniz Technology marka teması (logo renkleri: kırmızı #D52F2A, grafit #3E3E3E) ===== */
:root {
  --bg: #F3F3F4; --card: #fff; --text: #26282C; --muted: #5C6068; --line: #E4E5E7;
  --brand: #1F2226;          /* grafit: menü, başlıklar */
  --accent: #C62B26;         /* logo kırmızısı: ana butonlar, aktif menü */
  --accent-dark: #A8231F;
}
body { font-family: 'Archivo', system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); }
a { color: var(--accent-dark); }

.shell { grid-template-columns: 248px 1fr; }
.side { background: var(--brand); padding: 26px 16px; gap: 3px; }
.side .brand { display: block; padding: 2px 6px 20px; margin-bottom: 14px; border-bottom: 1px solid #33373D; }
.side .brand:hover { background: none; }
.side .brand img { display: block; width: 196px; max-width: 100%; height: auto; }
.side a { color: #C3C6CC; font-weight: 500; display: flex; align-items: center; gap: 12px; min-height: 42px; box-sizing: border-box; }
.side a::before { content: ""; width: 8px; height: 8px; border-radius: 2px; transform: rotate(45deg); background: #4A4F57; flex: none; }
.side a.brand::before { display: none; }
.side a:hover { background: #2A2E33; color: #fff; }
.side a.on { background: #2D3137; color: #fff; font-weight: 700; }
.side a.on::before { background: var(--accent); }
.side form button.mini { background: transparent; color: #C3C6CC; border-color: #3A3F46; }
.side form button.mini:hover { color: #fff; border-color: #5A6069; }
.whoami { color: #fff; }
.whoami small { color: #9AA0A8; opacity: 1; }
.mockinfo { align-self: flex-start; margin: 0 8px 10px; padding: 3px 9px; border-radius: 4px; background: #3A2A12; color: #F6C97A; font-size: 11px; font-weight: 700; letter-spacing: .04em; opacity: 1; }

.main { padding: 30px 40px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--accent-dark); margin-bottom: 4px; }
.main h2 { font-size: 28px; font-weight: 800; color: var(--brand); margin-bottom: 20px; }
h3 { font-weight: 800; color: var(--brand); }

button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
button.primary:hover, .btn.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.presets a.on, .presets a:hover { background: var(--brand); border-color: var(--brand); }

.card { border-radius: 12px; padding: 16px 20px; }
.card b { font-size: 30px; font-weight: 800; color: var(--brand); font-variant-numeric: tabular-nums; }
.card.c-soon b, .card.c-expired b { color: var(--accent-dark); }
table { border-radius: 12px; overflow: hidden; }
th { text-transform: uppercase; letter-spacing: .05em; font-size: 11.5px; background: #FAFAFA; }
.badge.READY { background: #ECEDEF; color: #3E4148; }
.exportbox { background: #F6F6F7; border-color: var(--line); }
.bar i { background: var(--brand); }

/* Giriş sayfası */
.login2 { min-height: 100vh; display: flex; flex-wrap: wrap; background: var(--bg); }
.login2 .hero { flex: 1 1 440px; background: var(--brand); color: #fff; padding: 56px; box-sizing: border-box; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.login2 .hero img { display: block; width: 300px; max-width: 100%; height: auto; }
.login2 .hero .line { width: 56px; height: 4px; border-radius: 2px; background: var(--accent); margin-bottom: 18px; }
.login2 .hero h1 { margin: 0 0 16px; font-size: 40px; line-height: 1.15; font-weight: 800; max-width: 460px; }
.login2 .hero p { margin: 0; font-size: 16px; line-height: 1.6; color: #C3C6CC; max-width: 460px; }
.login2 .hero small { font-size: 13px; color: #9AA0A8; }
.login2 .side-form { flex: 1 1 420px; padding: 56px 24px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; }
.login2 form { width: 100%; max-width: 380px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 36px; box-sizing: border-box; display: flex; flex-direction: column; gap: 16px; }
.login2 form h2 { margin: 0; font-size: 22px; font-weight: 800; color: var(--brand); }
.login2 form .sub { margin: -10px 0 4px; font-size: 14px; color: var(--muted); }
.login2 label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: #3E4148; }
.login2 input { font-size: 15px; min-height: 46px; padding: 0 14px; }
.login2 button.primary { min-height: 48px; font-size: 15px; }
.login2 .foot { font-size: 13px; color: var(--muted); text-align: center; }

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side .brand { width: 100%; margin-bottom: 6px; padding-bottom: 12px; }
  .side .brand img { width: 160px; }
  .side a::before { display: none; }
  .main { padding: 18px 16px; }
  .login2 .hero { padding: 32px 24px; gap: 24px; }
  .login2 .hero h1 { font-size: 28px; }
  .login2 .hero img { width: 220px; }
}
.side a.brand { border-radius: 0; min-height: 0; }
@media (max-width: 760px) {
  .login2 .hero p, .login2 .hero small { display: none; }
  .login2 .side-form { padding: 28px 16px; }
}
.kb-algo { background: #E8EEF6; color: #2F4A6B; }

.kfbox { display: grid; gap: 6px; padding: 12px; border: 1px dashed #C9CBCF; border-radius: 10px; background: #FAFAFA; }
.kfbox small { font-size: 12px; }
.kf-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 4px; font-size: 11px; font-weight: 700; background: #ECEDEF; color: #3E4148; vertical-align: middle; }
a.kf-tag:hover { background: var(--brand); color: #fff; text-decoration: none; }

.ocrbox { margin-top: 4px; padding: 12px; border-radius: 8px; background: #fff; border: 1px solid var(--line); font-size: 13px; display: grid; gap: 8px; justify-items: start; }
.ocr-head { font-weight: 700; color: var(--brand); }
.ocr-table { border: 0; width: auto; font-size: 13px; }
.ocr-table th, .ocr-table td { border: 0; padding: 3px 12px 3px 0; background: none; text-transform: none; letter-spacing: 0; font-size: 13px; }
.ocr-wait::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: ocrspin .8s linear infinite; vertical-align: -2px; }
@keyframes ocrspin { to { transform: rotate(360deg); } }
input.ocr-filled { background: #FFF8DB; border-color: #E0B000; }
.ocrbox[hidden] { display: none; }
input.need-fill { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(198,43,38,.18); }
.ocrbox { display: block; line-height: 1.5; }
.ocrbox .ocr-table { margin: 6px 0 10px; }
.ocr-raw { margin-top: 8px; } .ocr-raw pre { white-space: pre-wrap; font-size: 11px; background: #F6F6F7; padding: 8px; border-radius: 6px; max-height: 220px; overflow: auto; }

/* Kimlik küçük resmi ve görüntüleyici */
.kf-cell { width: 92px; }
.kf-thumb { display: inline-block; line-height: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; }
.kf-thumb img { width: 84px; height: 54px; object-fit: cover; display: block; }
.kf-thumb:hover { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(198,43,38,.2); }
.kf-pdf { display: inline-block; padding: 14px 18px; border: 1px solid var(--line); border-radius: 6px; font-weight: 700; font-size: 12px; background: #fff; }
.kf-ov { position: fixed; inset: 0; z-index: 1000; background: rgba(15,16,18,.92); display: none; flex-direction: column; }
.kf-ov.on { display: flex; }
.kf-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; color: #fff; font-size: 14px; }
.kf-bar button, .kf-bar a { margin-left: 6px; padding: 7px 12px; border-radius: 6px; border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08); color: #fff; font: inherit; cursor: pointer; text-decoration: none; }
.kf-bar button:hover, .kf-bar a:hover { background: rgba(255,255,255,.2); }
.kf-stage { flex: 1; overflow: auto; display: flex; align-items: center; justify-content: center; padding: 12px; }
.kf-stage img { max-width: 100%; max-height: calc(100vh - 80px); cursor: zoom-in; transition: transform .2s; background: #fff; }
.kf-ov.zoom .kf-stage { align-items: flex-start; justify-content: flex-start; }
.kf-ov.zoom .kf-stage img { max-width: none; max-height: none; width: 200%; cursor: zoom-out; }
.kf-edit { display: grid; gap: 6px; justify-items: start; }
.kf-edit img { max-width: 360px; width: 100%; border: 1px solid var(--line); border-radius: 8px; cursor: zoom-in; background: #fff; }
td.mono { white-space: nowrap; }

/* Hat atama */
.assignbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 12px; margin: 0 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 14px; }
.assignbar select { min-width: 220px; }
.assignbar .pastebox { flex-basis: 100%; }
.assignbar .pastebox summary { cursor: pointer; color: var(--brand); font-size: 13px; }
.assignbar textarea { width: 100%; max-width: 520px; margin-top: 6px; font-family: ui-monospace, monospace; display: block; }
th.chk, td.chk { width: 34px; text-align: center; }
td.chk input, th.chk input { width: 16px; height: 16px; }
tr.sel td { background: #FFF6F5; }
.badge.STOCK { background: #ECEDEF; color: #3E4148; }
.badge.DEALER { background: #E8EEF6; color: #2F4A6B; }
.la-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 12px; border: 1px dashed var(--line); border-radius: 10px; }
.la-mode h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--brand); }
.la-mode textarea { width: 100%; font-family: ui-monospace, monospace; }
@media (max-width: 760px) { .la-mode { grid-template-columns: 1fr; } }
.la-prev { max-height: 420px; overflow: auto; }
.la-bad td { background: #FFF1F0; }
.la-sum { font-size: 14px; }

/* Hat sorgulama */
.qbox { display: flex; gap: 10px; margin-bottom: 10px; max-width: 900px; }
.qbox input { flex: 1; font-size: 17px; padding: 12px 14px; }
.qlist { display: grid; gap: 12px; max-width: 1100px; }
.qcard { background: #fff; border: 1px solid var(--line); border-left: 4px solid #C9CCD1; border-radius: 10px; padding: 14px 16px; }
.qcard.q-soon { border-left-color: #E0B000; }
.qcard.q-expired { border-left-color: var(--bad); }
.qcard.q-ok { border-left-color: var(--ok); }
.qhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.qgsm { font-size: 20px; font-weight: 700; letter-spacing: .02em; }
.qsub { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; font-size: 13px; }
.qactions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.qactions form { margin: 0; }
.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 18px; }
.qgrid > div { display: grid; gap: 2px; align-content: start; }
.qgrid span { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: #6B6F76; }
.qgrid b { font-weight: 600; font-size: 14px; }
.qhit { margin-top: 10px; font-size: 12px; color: #6B6F76; }
@media (max-width: 600px) { .qbox { flex-direction: column; } }
.qgrid .kf-thumb, .qgrid .kf-pdf { justify-self: start; }
.pricesum { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; padding: 10px 12px; margin: 0 0 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.price-cell { white-space: nowrap; }
.pricebox input[readonly] { background: #F3F4F6; color: #555; }

/* =====================================================================
   v9 TASARIM — kırmızı menü, simetrik ızgara, büyük harf başlıklar
   ===================================================================== */
:root {
  --red: #C62B26; --red-d: #A8231F; --red-dd: #8A1C18;
  --ink: #1F2226; --bg: #EEEFF1; --line: #DEE0E3; --muted: #5C6068;
  --h: 40px;               /* tüm kutu / buton yüksekliği */
  --gap: 16px;             /* tüm ızgara boşlukları */
  --r: 10px;               /* köşe yuvarlaklığı */
}
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); }

/* ---------- Büyük harf (Türkçe kurala göre: i → İ) ---------- */
.side a, .navlabel, .whoami, .side button,
.pagehead, .main h3, .main h4, .cardgroup,
th, td, label, button, .btn, .card small, .badge, .kf-tag,
.presets a, .pager, .notice, select, option,
.assignbar, .exportbox, .pricesum, .la-sum, .qgsm, .qsub, .qgrid span, .qgrid b,
.login2 h1, .login2 form h2, .login2 label, .login2 .sub, .err { text-transform: uppercase; }
/* Bunlar olduğu gibi kalsın: kod/numara, e-posta, kullanıcı adı, yazılan metin */
.mono, td.email, input, textarea, .ocr-raw pre { text-transform: none; }

/* ---------- Yan menü: kırmızı ---------- */
.shell { grid-template-columns: 252px minmax(0, 1fr); }
.side { background: var(--red); padding: 20px 14px; gap: 4px; box-shadow: inset -1px 0 0 rgba(0,0,0,.12); }
.side .brand { background: #fff; border-radius: var(--r); padding: 14px 16px; margin: 0 0 18px; border: 0; display: block; }
.side a.brand { min-height: 0; }
.side .brand:hover { background: #fff; }
.side .brand img { width: 100%; max-width: 200px; margin: 0 auto; }
.navlabel { font-size: 11px; font-weight: 700; letter-spacing: .14em; color: rgba(255,255,255,.65); padding: 0 12px 6px; }
.side a:not(.brand) { color: #fff; font-size: 13px; font-weight: 600; letter-spacing: .04em; min-height: 42px; padding: 0 12px; border-radius: 8px; gap: 12px; }
.side a:not(.brand)::before { background: rgba(255,255,255,.55); }
.side a:not(.brand):hover { background: var(--red-d); color: #fff; }
.side a.on, .side a.on:hover { background: #fff; color: var(--red-d); font-weight: 800; box-shadow: 0 2px 6px rgba(0,0,0,.15); }
.side a.on::before { background: var(--red); }
.whoami { color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .03em; padding: 12px; margin: 0 0 8px; border-top: 1px solid rgba(255,255,255,.25); }
.whoami small { color: rgba(255,255,255,.75); font-weight: 500; }
.mockinfo { margin: 0 12px 10px; background: var(--red-dd); color: #FFE08A; }
.side form { padding: 0 12px; }
.side form button.mini { width: 100%; min-height: 36px; background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); font-weight: 700; letter-spacing: .06em; }
.side form button.mini:hover { background: #fff; color: var(--red-d); border-color: #fff; }

/* ---------- Ana alan ve sayfa başlığı ---------- */
.main { padding: 32px 36px 48px; max-width: 1480px; }
.pagehead { position: relative; padding-bottom: 14px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.pagehead::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 64px; height: 3px; border-radius: 2px; background: var(--red); }
.eyebrow { font-size: 11.5px; letter-spacing: .16em; color: var(--red); margin-bottom: 6px; }
.main .pagehead h2 { margin: 0; font-size: 26px; line-height: 1.15; letter-spacing: .02em; color: var(--ink); }
.main h3 { font-size: 14px; letter-spacing: .08em; margin: 28px 0 12px; }
.cardgroup { font-size: 11.5px; font-weight: 800; letter-spacing: .14em; color: var(--muted); margin: 0 0 10px; display: flex; align-items: center; gap: 12px; }
.cardgroup::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Kartlar: eşit genişlik ve yükseklik ---------- */
.cards { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--gap); margin-bottom: 24px; }
.cards.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { min-height: 112px; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; padding: 18px 20px; border-radius: var(--r); border: 1px solid var(--line); border-top: 4px solid var(--ink); }
.card small { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; color: var(--muted); margin: 0; line-height: 1.35; }
.card b { font-size: 32px; line-height: 1; }
.card.link { transition: border-color .15s, box-shadow .15s; }
.card.link:hover { border-color: var(--line); border-top-color: var(--red); box-shadow: 0 4px 14px rgba(0,0,0,.07); }
.card.st-ACTIVE { border-top-color: var(--ok); }
.card.st-SUSPENDED { border-top-color: #E0A000; }
.card.st-READY { border-top-color: #6B7280; }
.card.st-DEACTIVATED { border-top-color: var(--red); }
.card.c-soon { background: #FFFBEB; border-color: #F4D58A; border-top-color: #E0A000; }
.card.c-expired { background: #FEF2F2; border-color: #F5B5B2; border-top-color: var(--red); }

/* ---------- Form elemanları: hepsi aynı yükseklikte ---------- */
input, select, button, .btn { border-radius: 8px; border-color: #CFD2D6; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, button, .btn { min-height: var(--h); }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select { padding: 0 12px; background: #fff; }
input[type=file] { padding: 7px 10px; background: #fff; width: 100%; }
textarea { border: 1px solid #CFD2D6; border-radius: 8px; padding: 10px 12px; }
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 16px; font-size: 13px; font-weight: 700; letter-spacing: .05em; line-height: 1.2; white-space: nowrap; }
button:hover, .btn:hover { border-color: var(--ink); }
button.mini, .btn.mini { min-height: 30px; padding: 0 10px; font-size: 11px; }
button.primary, .btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
button.primary:hover, .btn.primary:hover { background: var(--red-d); border-color: var(--red-d); }
button.wa { background: #1DA851; border-color: #1DA851; }
button.wa:hover { background: #168A42; border-color: #168A42; }

/* Filtreler: eşit sütunlu ızgara */
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: var(--gap); }
.filters > * { width: 100%; min-width: 0; }
.toolbar, .inline-actions { gap: 10px; margin-bottom: var(--gap); }
.presets { gap: 8px; margin-bottom: 12px; }
.presets a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; border-color: #CFD2D6; }
.presets a.on, .presets a:hover { background: var(--red); border-color: var(--red); color: #fff; }

/* Bilgi şeritleri: aynı kutu dili */
.exportbox, .pricesum, .assignbar { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--ink); border-radius: var(--r); padding: 10px 16px; min-height: 54px; gap: 8px 12px; font-size: 12.5px; letter-spacing: .03em; margin-bottom: var(--gap); }
.assignbar { border-left-color: var(--red); }
.notice { border-radius: var(--r); border-left: 4px solid currentColor; padding: 12px 16px; font-weight: 600; font-size: 13px; letter-spacing: .03em; }

/* Formlar: etiketler üstte, kutular hizalı */
.formbox { padding: 24px; gap: 16px; border-radius: var(--r); max-width: 440px; }
.formbox.wide { max-width: 800px; }
.formbox label, .login2 label { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; color: #3E4148; gap: 6px; }
.formbox .row2, .formbox .row3 { gap: var(--gap); align-items: end; }
.formbox label.check { font-size: 12px; }
.twocol { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.twocol > .formbox { max-width: none; }
.help { border-radius: var(--r); border-top: 4px solid var(--ink); padding: 8px 22px 14px; }
.help h3 { margin-top: 14px; }
.la-mode { gap: var(--gap); border-radius: var(--r); }
.la-mode h4 { font-size: 12px; letter-spacing: .08em; }
.kfbox { border-radius: var(--r); }

/* ---------- Tablolar ---------- */
.tablewrap { border-radius: var(--r); border: 1px solid var(--line); background: #fff; }
.tablewrap > table { border: 0; border-radius: 0; }
table { font-size: 12.5px; }
th { background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .08em; padding: 12px 14px; border-bottom: 0; }
th.chk input { accent-color: var(--red); }
td { padding: 11px 14px; white-space: nowrap; letter-spacing: .02em; }
td small { letter-spacing: .03em; }
tbody tr:nth-child(even) { background: #F8F8F9; }
tbody tr:hover { background: #FFF4F3; }
td.chk input { accent-color: var(--red); }
td a { font-weight: 600; }
.actions { text-align: right; }
.actions form, .actions .btn { margin-left: 4px; }
.badge { display: inline-block; border-radius: 6px; padding: 4px 9px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; white-space: nowrap; line-height: 1.2; }
.kf-tag { letter-spacing: .05em; }
.pager { justify-content: center; gap: 12px; font-weight: 700; font-size: 12px; letter-spacing: .06em; }
.pager a { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border: 1px solid #CFD2D6; border-radius: 8px; background: #fff; color: var(--ink); }
.pager a:hover { border-color: var(--red); color: var(--red); text-decoration: none; }
p.muted.small { margin-top: 12px; line-height: 1.55; }

/* Hat sorgulama */
.qbox input { min-height: 48px; }
.qbox button { min-height: 48px; padding: 0 24px; }
.qcard { border-radius: var(--r); border-left-width: 5px; }
.qgrid span { letter-spacing: .08em; }

/* ---------- Giriş sayfası ---------- */
.login2 .hero { background: var(--red); }
.logoplate { background: #fff; border-radius: 12px; padding: 18px 22px; align-self: flex-start; }
.logoplate img { display: block; width: 280px; max-width: 100%; height: auto; }
.login2 .hero .line { background: #fff; }
.login2 .hero h1 { font-size: 36px; letter-spacing: .02em; }
.login2 .hero p { color: rgba(255,255,255,.88); }
.login2 .hero small { color: rgba(255,255,255,.75); letter-spacing: .06em; }
.login2 form { border-top: 4px solid var(--red); }
.login2 form h2 { letter-spacing: .04em; }

/* ---------- Duyarlı (tablet / telefon) ---------- */
@media (max-width: 1100px) {
  .cards.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .twocol { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { flex-direction: row; flex-wrap: wrap; padding: 12px; gap: 6px; }
  .side .brand { width: 100%; margin-bottom: 6px; padding: 10px; }
  .side .brand img { max-width: 170px; }
  .navlabel, .side .spacer { display: none; }
  .side a:not(.brand) { min-height: 36px; padding: 0 10px; font-size: 12px; }
  .side a:not(.brand)::before { display: none; }
  .whoami { width: 100%; border-top: 1px solid rgba(255,255,255,.25); margin: 4px 0 0; padding: 8px 4px; }
  .side form { padding: 0; }
  .side form button.mini { width: auto; }
  .main { padding: 18px 16px 32px; }
  .main .pagehead h2 { font-size: 21px; }
  .card { min-height: 96px; padding: 14px 16px; }
  .card b { font-size: 26px; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logoplate img { width: 210px; }
  .login2 .hero h1 { font-size: 26px; }
}
@media (max-width: 480px) {
  .cards.c4, .cards { grid-template-columns: minmax(0, 1fr); }
  .filters { grid-template-columns: minmax(0, 1fr); }
}

/* v9 ince ayar */
input, select, textarea { font-size: 13.5px; }
.whoami .uname { text-transform: none; }
.filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.filters > button { grid-column: -2 / -1; }
td { padding: 10px 12px; }
th { padding: 12px 12px; }
td.wrap { white-space: normal; min-width: 150px; max-width: 220px; line-height: 1.35; }
td.kf-cell { width: 1%; }
@media (max-width: 1100px) { .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .filters { grid-template-columns: minmax(0, 1fr); } .filters > button { grid-column: auto; } }
.shell { grid-template-columns: 236px minmax(0, 1fr); }
.main { padding: 30px 28px 48px; }
td { white-space: normal; letter-spacing: 0; line-height: 1.35; }
td.mono, td.actions, td.price-cell, td.chk, td.kf-cell, td.email { white-space: nowrap; }
td a { white-space: nowrap; }
td.wrap a { white-space: normal; }
th { letter-spacing: .05em; padding: 12px 10px; }
td { padding: 10px 10px; }
td.wrap { min-width: 130px; max-width: 200px; }
td.mono, .mono { font-size: 11.5px; letter-spacing: 0; }
.badge { padding: 4px 7px; letter-spacing: .04em; }
td button.mini, td .btn.mini { padding: 0 8px; letter-spacing: .03em; }
th.chk, td.chk { width: 36px; padding-left: 12px; padding-right: 6px; }
td.actions form, td.actions .btn { margin-left: 3px; }
.tablewrap td:last-child, .tablewrap th:last-child { padding-right: 12px; }
td.kf-cell { padding-left: 8px; padding-right: 8px; }
.main { padding-left: 24px; padding-right: 24px; }
td { white-space: nowrap; }
td.wrap { white-space: normal; }
td.wrap.dt { min-width: 92px; max-width: 110px; }
td.wrap .badge { margin-top: 2px; }
td.wrap { max-width: 190px; }
table { font-size: 12px; }
th { padding-left: 9px; padding-right: 9px; }
td { padding-left: 9px; padding-right: 9px; }
td.wrap.tf { min-width: 60px; max-width: 80px; }

/* Mobil (en sonda kalmalı) */
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .main { padding: 18px 14px 32px; }
  .side { padding: 12px; }
  .side .brand { padding: 10px; }
  .cards.c4, .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card { min-height: 92px; padding: 12px 14px; }
  .card b { font-size: 24px; }
  .card small { font-size: 10.5px; }
}
/* Telefon / GSM sütunları: eşit genişlikte rakamlar, dar yazı */
td.num { font-family: inherit; font-size: 12.5px; font-variant-numeric: tabular-nums; letter-spacing: 0; }
td.actions button.wa { padding: 0 9px; }
td.wrap.dt { min-width: 100px; max-width: 120px; }
td.wrap.dt { min-width: 96px; }
td.wrap { min-width: 120px; max-width: 170px; }
td button.wa { padding: 0 8px; font-size: 10.5px; }

/* Tarife fiyat tablosu */
.pricetable .tablewrap { margin: 0; }
.pricetable table th:first-child, .pricetable table td:first-child { width: 34%; }
.pricetable td input { width: 100%; min-height: 36px; text-align: right; font-variant-numeric: tabular-nums; }
.pricetable tr.genel td { background: #F6F6F7; }
.pricetable tr.genel td b { color: var(--muted); }
td small.kf-tag { margin-left: 0; margin-top: 3px; }
th, td { padding-left: 8px; padding-right: 8px; }

/* Direkt Satış */
.direct { display: grid; gap: 22px; max-width: 1100px; }
.dstep { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: var(--r); padding: 18px 20px 20px; display: grid; gap: 12px; }
.dstep-h { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.dstep-h span { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--red); color: #fff; font-size: 13px; letter-spacing: 0; }
.dstep .qbox { max-width: none; margin: 0; }
.dlist { max-height: 380px; overflow: auto; }
.dlist thead th { position: sticky; top: 0; z-index: 1; }
.dsel { padding: 12px 14px; border-radius: 8px; background: #FFF6F5; border: 1px solid #F5C6C3; font-size: 13px; line-height: 1.5; }
.formbox.flat { border: 0; padding: 0; max-width: none; background: none; }
.dperson { padding: 12px 14px; border: 1px dashed #C9CBCF; border-radius: 8px; background: #FAFAFA; display: grid; gap: 10px; font-size: 13px; }
.dperson-h { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; text-transform: uppercase; letter-spacing: .03em; }
.dperson .tablewrap { max-height: 220px; overflow: auto; }
.acctbox { border: 1px solid #F5C6C3; background: #FFF8F7; border-radius: var(--r); padding: 12px 16px 14px; display: grid; gap: 12px; margin: 0; }
.acctbox[hidden] { display: none; }
.acctbox legend { padding: 0 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--red-d); }
small.uname { text-transform: none; }
.login2 .forgot { align-self: center; font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--red-d); }
.login2 .okmsg { padding: 10px 12px; border-radius: 8px; background: #DCFCE7; color: var(--ok); font-size: 13px; font-weight: 600; }
.login2 .foot a { color: var(--red-d); font-weight: 700; }
.login2 form .btn.primary { min-height: 48px; }
.login2 .sub b.uname { text-transform: none; }
/* Mesajlar: şifre / kullanıcı adı / e-posta içerebilir — büyük harfe çevrilmez */
.notice { text-transform: none; letter-spacing: 0; }
.login2 .sub { text-transform: none; }
.maillog td { text-transform: none; max-width: none; }

/* Ödemeler: kırmızı = işlenmedi, yeşil = işlendi */
tbody tr.pay-todo, tbody tr.pay-todo:hover { background: #FDE8E7; }
tbody tr.pay-todo td:first-child { box-shadow: inset 5px 0 0 var(--red); }
tbody tr.pay-done, tbody tr.pay-done:hover { background: #E3F6E8; }
tbody tr.pay-done td:first-child { box-shadow: inset 5px 0 0 var(--ok); }
tbody tr.pay-failed, tbody tr.pay-pending { color: var(--muted); }
.paybadge { display: inline-block; padding: 5px 10px; border-radius: 6px; font-size: 11px; font-weight: 800; letter-spacing: .06em; white-space: nowrap; color: #fff; }
.pb-todo { background: var(--red); }
.pb-done { background: var(--ok); }
.pb-failed, .pb-pending { background: #9CA3AF; }
.payamt { font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }
td.paydesc { min-width: 180px; max-width: 280px; }
.procform { display: inline-flex !important; gap: 6px; align-items: center; }
.procform .pnote { min-height: 30px !important; width: 150px; font-size: 12px; padding: 0 8px !important; }
button.okbtn { background: var(--ok); border-color: var(--ok); color: #fff; }
button.okbtn:hover { background: #116B32; border-color: #116B32; }
.card.paycard-todo { border-top-color: var(--red); }
.card.paycard-done { border-top-color: var(--ok); }
a.notice.paynotice { display: block; text-decoration: none; color: var(--bad); margin-bottom: 18px; }
/* Ödeme sayfası */
.login2 form.payform { max-width: 460px; }
.payform fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px 14px; margin: 0; display: grid; gap: 12px; }
.payform legend { padding: 0 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--red-d); }
.payform .row2, .payform .row3 { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; align-items: end; }
.payform .row3 { grid-template-columns: 1fr 1fr 1fr; }
.payform label.check { flex-direction: row; align-items: flex-start; gap: 8px; font-weight: 500; text-transform: none; line-height: 1.4; }
.payform label.check input { min-height: 0; margin-top: 3px; }
.payform select { min-height: 46px; }
.paylogos { text-align: center; font-size: 11px; letter-spacing: .08em; color: var(--muted); }
.login2 .btn.paylink { min-height: 44px; }
.payok, .payfail { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; font-weight: 800; color: #fff; background: var(--ok); }
.payfail { background: var(--red); }
@media (max-width: 480px) { .payform .row2, .payform .row3 { grid-template-columns: 1fr; } }
.login2 .err { text-transform: none; letter-spacing: 0; }
.payform fieldset { min-width: 0; }
.payform input, .payform select { width: 100%; min-width: 0; box-sizing: border-box; }
.payform label.check input { width: auto; }
.uname { text-transform: none !important; }
.newpw { background: #FFF8E1; border: 1px solid #F0D58A; border-left: 4px solid #E0A000; border-radius: var(--r); padding: 14px 16px; margin-bottom: 16px; display: grid; gap: 8px; font-size: 13.5px; }
.newpw-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.newpw-row span { width: 110px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.newpw code { font-family: ui-monospace, Menlo, monospace; font-size: 15px; font-weight: 700; padding: 4px 10px; background: #fff; border: 1px solid #E6D9A8; border-radius: 6px; user-select: all; }
.newpw small { color: #6B5A1E; }

/* Sağ üstte büyük "Ödeme Yap" butonu */
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pagehead-t { min-width: 0; }
a.paybig { display: inline-flex; align-items: center; gap: 12px; padding: 14px 26px; min-height: 58px; border-radius: 12px;
  background: linear-gradient(180deg, #1FAA55, #168A42); color: #fff; font-size: 17px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; text-decoration: none; box-shadow: 0 6px 18px rgba(22,138,66,.35), inset 0 -2px 0 rgba(0,0,0,.15);
  border: 2px solid #12753A; transition: transform .12s, box-shadow .12s; white-space: nowrap; }
a.paybig:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 9px 22px rgba(22,138,66,.45), inset 0 -2px 0 rgba(0,0,0,.15); }
a.paybig:focus-visible { outline: 3px solid #0E5C2C; outline-offset: 2px; }
a.paybig svg { flex: none; }
@media (max-width: 760px) {
  .pagehead { align-items: stretch; }
  a.paybig { width: 100%; justify-content: center; min-height: 52px; font-size: 16px; order: -1; }
}
.dchannel { border-top-color: var(--ink); }
.dchannel .row2 { align-items: end; }
#mfwrap { transition: opacity .15s; }

/* ===== v6: sade bayi ekranı, rol menüsü, mobil menü ===== */
.cards.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px 20px 18px; margin-bottom: 18px; }
.box > p { line-height: 1.55; }
details.box { padding: 0; }
details.box > summary.box-title { cursor: pointer; list-style: none; padding: 14px 20px; font-weight: 800; color: var(--accent-dark); }
details.box > summary::-webkit-details-marker { display: none; }
details.box[open] > summary.box-title { border-bottom: 1px solid var(--line); }
details.box > .formbox { border: 0; max-width: none; }
.formbox textarea { width: 100%; font: inherit; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; }
.acctbox { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 12px; display: grid; gap: 10px; }
.acctbox legend { font-weight: 700; color: var(--brand); padding: 0 6px; }
.acctbox[hidden] { display: none; }
.acctbox label.check { align-items: flex-start; }

/* Menü sayaçları */
.navbadge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: auto; border-radius: 999px; background: var(--accent); color: #fff; font-style: normal; font-size: 11.5px; font-weight: 800; }
.navlinks { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.sidetop { display: block; }
.menubtn { display: none; }

/* Bayi hat listesi: masaüstünde tablo gibi, telefonda kart */
.hl { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.hl-head, .hl-row > summary { display: grid; grid-template-columns: 1.15fr 1.6fr .8fr .9fr 1fr; gap: 12px; align-items: center; padding: 11px 16px; }
.hl-head { background: #FAFAFA; color: var(--muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--line); }
.hl-row { border-bottom: 1px solid var(--line); }
.hl-row:last-child { border-bottom: 0; }
.hl-row > summary { cursor: pointer; list-style: none; font-size: 14px; }
.hl-row > summary::-webkit-details-marker { display: none; }
.hl-row > summary:hover { background: #FAFAFA; }
.hl-row[open] > summary { background: #F6F6F7; font-weight: 600; }
.hl-yellow > summary { background: #FFFBEB; }
.hl-red > summary, .hl-expired > summary { background: #FEF2F2; }
.hl-detail { padding: 6px 16px 16px; background: #FCFCFC; }
.hl-detail dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 18px; margin: 8px 0 12px; }
.hl-detail dl .wide { grid-column: 1 / -1; }
.hl-detail dt { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.hl-detail dd { margin: 2px 0 0; font-size: 14px; }
.hl-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.hl-actions form { display: inline; }
.hl-empty { padding: 18px 16px; margin: 0; }
.hl-search { display: flex; gap: 8px; margin-bottom: 12px; }
.hl-search input { flex: 1; min-width: 0; min-height: 44px; }
.hl-excel { margin: -4px 0 12px; }
.badge.st-ok { background: #dcfce7; color: var(--ok); }
.badge.st-yellow { background: #fef3c7; color: var(--warn); }
.badge.st-red, .badge.st-expired { background: #fee2e2; color: var(--bad); }
.badge.st-none { background: #ECEDEF; color: #3E4148; }
.badge.tl-pending { background: #fef3c7; color: var(--warn); }
.badge.tl-approved { background: #dcfce7; color: var(--ok); }
.badge.tl-rejected { background: #fee2e2; color: var(--bad); }
.badge.d-dealer { background: #E8EEF6; color: #2F4A6B; }

@media (max-width: 760px) {
  /* Mobil: üstte logo + Menü butonu; menü açılınca alt alta liste (butonlar üst üste yığılmaz) */
  .side { flex-direction: column; align-items: stretch; padding: 10px 14px; position: sticky; top: 0; z-index: 50; }
  .sidetop { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .side .brand { width: auto; border: 0; margin: 0; padding: 4px 0; }
  .side .brand img { width: 150px; }
  .menubtn { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 14px; background: var(--accent); border: 0; color: #fff; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; border-radius: 8px; }
  .menubtn .navbadge { background: #fff; color: var(--accent-dark); }
  .navlinks { display: none; padding-top: 10px; }
  .side.open .navlinks { display: flex; }
  .side a { min-height: 46px; font-size: 15px; }
  .cards.c3, .cards.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card b { font-size: 24px; }
  .main h2 { font-size: 22px; }
  .presets { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .presets a { white-space: nowrap; }
  .hl-head { display: none; }
  .hl-row > summary { grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 14px; }
  .hl-row > summary .hl-gsm { grid-column: 1; font-size: 14px; font-weight: 700; }
  .hl-row > summary .hl-st { grid-column: 2; grid-row: 1; text-align: right; }
  .hl-row > summary .hl-cust { grid-column: 1 / -1; }
  .hl-row > summary .hl-pkg, .hl-row > summary .hl-end { font-size: 13px; color: var(--muted); }
  .hl-row > summary .hl-end { text-align: right; }
  .hl-detail dl { grid-template-columns: 1fr 1fr; }
  /* Tablo → kart */
  table.stack thead { display: none; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { border-bottom: 1px solid var(--line); padding: 8px 4px; }
  table.stack td { border: 0; padding: 4px 10px; }
  table.stack td[data-l]::before { content: attr(data-l); display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
}
.hl-row > summary, .hl-head, .hl-detail dt, .box-title, .acctbox legend, .menubtn { text-transform: uppercase; }
.hl-row > summary .mono { text-transform: none; }
@media (max-width: 760px) {
  .side { padding: 8px 12px; }
  .side .brand { padding: 6px 10px; background: #fff; border-radius: 8px; }
  .side .brand img { width: 130px; }
  .menubtn { background: #fff; color: var(--red-d); }
  .menubtn .navbadge { background: var(--red); color: #fff; }
}
.side a:not(.on) .navbadge { background: #fff; color: var(--red-d); }
a.cname { color: var(--ink); }
a.cname:hover b { color: var(--red-d); text-decoration: underline; }
.hl-back { margin: -8px 0 14px; font-size: 13px; font-weight: 700; }

/* Doğum tarihi hızlı giriş */
input.dogum-input { letter-spacing: .5px; font-variant-numeric: tabular-nums; }
input.dogum-input.dogum-hata { border-color: #c62828 !important; background: #fff4f4; }

/* Direkt Satış — çoklu hat (satır satır) */
.dtabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.qbox.brow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.qbox.brow input { flex: 1 1 280px; }
.bulkwrap { max-height: 70vh; overflow: auto; }
table.bulk th { position: sticky; top: 0; z-index: 1; white-space: nowrap; }
table.bulk td { padding: 4px 5px; vertical-align: top; }
table.bulk input, table.bulk select { min-height: 34px; padding: 4px 7px; font-size: 13px; width: 100%; box-sizing: border-box; }
table.bulk .w-tc { min-width: 118px; } table.bulk .w-ad { min-width: 110px; } table.bulk .w-tel { min-width: 125px; }
table.bulk .w-dt { min-width: 105px; } table.bulk .w-fy { min-width: 80px; } table.bulk .w-not { min-width: 110px; }
table.bulk select { min-width: 80px; }
table.bulk tr.bsold td { background: #fff8e1; }
table.bulk tr.berr td { background: #fdecec; }
.txt-bad { color: #c62828; font-weight: 600; }

/* WhatsApp */
button.wa.wa-early { background: #fff; color: #1DA851; border-color: #1DA851; }
button.wa.wa-early:hover { background: #e9f9ef; color: #168A42; }
pre.tpl { white-space: pre-wrap; word-break: break-all; background: #f4f5f7; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font-size: 12px; margin: 6px 0; }
.formbox label.chk { display: flex; gap: 8px; align-items: center; font-weight: 700; }
.formbox label.chk input { width: 18px; height: 18px; min-height: 0; accent-color: var(--red); }
.cards.c5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .cards.c5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cards.c5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.wa-inline { margin-top: 4px; }
.wa-inline form { display: inline-block; }

/* Bayi silme kutusu: ekranın ortasında açılan pencere (tabloda kesilmesin) */
.delbox { display: inline-block; vertical-align: top; }
.delbox > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; color: var(--bad); border-color: #fca5a5; }
.delbox > summary::-webkit-details-marker { display: none; }
.delbox[open] > summary::before { content: ""; position: fixed; inset: 0; background: rgba(20, 22, 26, .45); z-index: 900; cursor: default; }
.delbox[open] > form { position: fixed; z-index: 901; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100vw - 32px));
  display: grid; gap: 10px; padding: 20px; white-space: normal; text-align: left; background: #fff; border-radius: 10px; border-top: 4px solid var(--bad);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.delbox form h4 { margin: 0; font-size: 15px; }
.delbox form p { margin: 0; font-size: 13px; line-height: 1.45; }
.delbox .check { font-size: 13px; display: flex; gap: 8px; align-items: flex-start; }
.delbox .delbtns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 4px; }

/* Yenile / kapat */
.badge.d-closing { background: #e5e7eb; color: #374151; }
tr.row-closing td { background: #f3f4f6; color: #4b5563; }
.renewbtns { display: flex; gap: 6px; flex-wrap: wrap; }
.renewbtns .mini.dark { background: #374151; color: #fff; border-color: #374151; }
.bulkbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.bulkbar input[type=date], .bulkbar input[type=text] { width: auto; }
.la-excel { padding: 12px; margin-bottom: 12px; border: 2px solid var(--brand); border-radius: 10px; }
.la-excel h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); }
.la-excel input[type=file] { max-width: 100%; }

/* ===== v58: açılır menü grupları (Hatlar / Ayarlar) ===== */
.navgroup { border-radius: 8px; }
.navgroup > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px;
  border-radius: 8px; color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; user-select: none; }
.navgroup > summary::-webkit-details-marker { display: none; }
.navgroup > summary::before { content: ""; width: 8px; height: 8px; border-radius: 2px; transform: rotate(45deg); background: rgba(255,255,255,.55); flex: none; }
.navgroup > summary:hover { background: var(--red-d); }
.navgroup .navcaret { margin-left: auto; width: 8px; height: 8px; border-right: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s; flex: none; }
.navgroup > summary .navbadge + .navcaret { margin-left: 8px; }
.navgroup[open] > summary { background: var(--red-d); }
.navgroup[open] .navcaret { transform: rotate(-135deg) translate(-2px, -2px); }
.navgroup[open] > summary .navbadge { display: none; }   /* açıkken sayaçlar alt satırlarda */
.navsub { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 6px 14px; padding-left: 8px; border-left: 2px solid rgba(255,255,255,.35); }
.navsub a:not(.brand) { min-height: 36px; font-size: 12.5px; font-weight: 600; }
.navsub a:not(.brand)::before { width: 5px; height: 5px; border-radius: 50%; transform: none; }
@media (max-width: 760px) {
  .navgroup > summary { min-height: 46px; font-size: 15px; }
  .navgroup > summary::before { display: none; }
  .navsub a:not(.brand) { min-height: 44px; font-size: 14px; }
}

/* ===== v58: sağ üstte Hat Sorgula (lacivert, kırmızı menüden ayrışsın) ===== */
.hsorgu { margin-left: auto; display: grid; gap: 5px; width: min(380px, 100%); }
.hsorgu label { font-size: 11px; font-weight: 800; letter-spacing: .14em; color: #0B3D91; display: flex; align-items: center; gap: 6px; }
.hsorgu label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #0B3D91; }
.hsorgu-row { display: flex; border: 2px solid #0B3D91; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 4px 14px rgba(11,61,145,.16); }
.hsorgu-row:focus-within { box-shadow: 0 0 0 3px rgba(11,61,145,.25); }
.hsorgu input { flex: 1; min-width: 0; border: 0; border-radius: 0; min-height: 44px; padding: 0 12px; font-size: 14px; background: #fff; }
.hsorgu input:focus { outline: 0; }
.hsorgu button { border: 0; border-radius: 0; background: #0B3D91; color: #fff; min-width: 52px; display: grid; place-items: center; cursor: pointer; padding: 0 14px; }
.hsorgu button:hover { background: #082D6C; }
@media (max-width: 760px) {
  .hsorgu { width: 100%; margin-left: 0; }
}

/* ===== v58: Hat raporu tam liste ===== */
.badge.u-yes { background: #dcfce7; color: var(--ok); }
.badge.u-no { background: #ECEDEF; color: #3E4148; }
.rptbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin: 18px 0 10px; }
.rptbar h3 { margin: 0 !important; }
.rptwrap { max-height: 70vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.rptwrap table { border: 0; }
.rptwrap thead th { position: sticky; top: 0; z-index: 1; }
@media (max-width: 760px) {
  .shell { grid-template-rows: auto 1fr; }   /* kısa sayfalarda kırmızı üst şerit uzamasın */
  .navlinks > a:not(.brand) { min-height: 46px; font-size: 14px; padding: 0 12px; }
  .navgroup > summary { font-size: 14px; }
}
.filters .btn.primary { text-align: center; }

/* Dondurulmuş hatlar (yedek SIM bekleyen) */
.badge.d-frozen { background: #dbeafe; color: #1e40af; }
tr.row-frozen td { background: #eff6ff; }

/* Bayiler listesi: işlem butonları sığmayınca alt satıra geçsin (tablo sağa taşmasın) */
td.actions .actgrid { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; align-items: center; min-width: 150px; max-width: 250px; margin-left: auto; white-space: normal; }
td.actions .actgrid > form, td.actions .actgrid > .btn, td.actions .actgrid > details { margin: 0; }
td.actions .actgrid form { display: inline-flex; }

/* v7-71: hızlı işlem düğmeleri (Yenile / Kapat) */
.hl6 .hl-head, .hl6 .hl-row > summary { grid-template-columns: 1.1fr 1.5fr .7fr .9fr .9fr 1.3fr; }
.hl-qa, .qa { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.hl-qa form, .qa form { display: inline; margin: 0; }
.hl-qa .btn.mini, .qa .btn.mini { text-transform: none; }
@media (max-width: 760px) {
  .hl6 .hl-row > summary { grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 14px; }
  .hl6 .hl-row > summary .hl-qa { grid-column: 1 / -1; margin-top: 6px; }
}
