:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #152033;
  --muted: #64748b;
  --line: #dfe7f1;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --danger: #dc2626;
  --danger-soft: #fff1f2;
  --success: #0f9f6e;
  --success-soft: #ecfdf5;
  --warning: #b45309;
  --shadow: 0 14px 38px rgba(15, 23, 42, .09);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(37,99,235,.28); outline-offset: 2px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.topbar { position: sticky; top: 0; z-index: 50; min-height: 64px; display: flex; align-items: center; gap: 24px; padding: 0 28px; background: #0f172a; color: #e2e8f0; box-shadow: 0 4px 16px rgba(15, 23, 42, .2); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: #fff; white-space: nowrap; }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; color: #fff; background: linear-gradient(135deg, #2563eb, #7c3aed); font-weight: 900; box-shadow: 0 8px 24px rgba(37, 99, 235, .3); }
.brand-mark.small { width: 36px; height: 36px; border-radius: 11px; font-size: 12px; }
.nav { flex: 1; display: flex; align-items: center; gap: 4px; }
.nav a { padding: 9px 11px; border-radius: 9px; color: #cbd5e1; font-weight: 650; }
.nav a:hover, .nav a.active { color: #fff; background: rgba(255,255,255,.1); }
.nav .logout { margin-left: auto; color: #fecaca; }
.menu-toggle { display: none; margin-left: auto; border: 0; border-radius: 9px; padding: 7px 11px; color: #fff; background: rgba(255,255,255,.12); font-size: 21px; }

.page-shell { width: min(1460px, calc(100% - 36px)); margin: 26px auto 60px; }
.public-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.page-heading h1 { margin: 0; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.035em; }
.page-heading p { margin: 4px 0 0; color: var(--muted); }
.heading-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card, .panel, .sms-card, .table-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-card { min-height: 108px; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; }
.stat-card span { color: var(--muted); font-weight: 650; }
.stat-card strong { font-size: 29px; letter-spacing: -.04em; }
.stat-card.danger strong { color: var(--danger); }
.stat-card.success strong { color: var(--success); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(300px,.75fr); gap: 18px; align-items: start; }
.panel { padding: 18px; }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 13px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.panel-head h2 { font-size: 17px; margin: 0; }
.live-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--success); font-size: 12px; font-weight: 800; }
.live-badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(15,159,110,.12); }

.sms-list { display: grid; gap: 10px; max-height: 680px; overflow: auto; padding-right: 4px; }
.sms-card { padding: 14px; box-shadow: none; }
.sms-card.fresh { animation: fresh .9s ease; }
@keyframes fresh { from { transform: translateY(-6px); background: #eff6ff; } }
.sms-card-head { display: flex; justify-content: space-between; gap: 12px; }
.sms-card-head strong { color: var(--primary-dark); }
.sms-card-head time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.sms-meta { color: var(--muted); font-size: 12px; margin: 4px 0 6px; }
.sms-card p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.code-chip { margin-top: 10px; border: 1px solid #bfdbfe; border-radius: 9px; padding: 5px 10px; color: #1d4ed8; background: #eff6ff; font-weight: 850; letter-spacing: .04em; }

.table-card { overflow: hidden; }
.table-scroll { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 15px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { background: var(--surface-2); color: #475569; font-size: 12px; text-transform: uppercase; letter-spacing: .035em; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.phone-button { border: 0; padding: 0; background: transparent; color: var(--danger); font-weight: 850; white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.status { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 9px; font-size: 12px; font-weight: 800; background: #f1f5f9; color: #475569; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.online, .status.active, .status.sent, .status.delivered { color: var(--success); background: var(--success-soft); }
.status.offline, .status.expired, .status.failed, .status.cancelled { color: var(--danger); background: var(--danger-soft); }
.status.queued, .status.claimed, .status.processing { color: var(--warning); background: #fffbeb; }

.button { display: inline-flex; justify-content: center; align-items: center; gap: 7px; min-height: 38px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font-weight: 750; transition: .16s ease; }
.button:hover { transform: translateY(-1px); border-color: #bcc9d8; }
.button.primary { color: #fff; border-color: var(--primary); background: var(--primary); }
.button.primary:hover { background: var(--primary-dark); }
.button.danger { color: var(--danger); border-color: #fecaca; background: #fff; }
.button.success { color: var(--success); border-color: #a7f3d0; background: #fff; }
.button.small { min-height: 31px; padding: 5px 9px; font-size: 12px; }
.button.icon { width: 38px; padding: 0; font-size: 21px; }
.button.wide { width: 100%; }

.form-card { max-width: 900px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.form-grid h2 { grid-column: 1/-1; margin: 14px 0 -3px; font-size: 16px; }
.form-grid label, .field { display: grid; align-content: start; gap: 6px; color: #334155; font-weight: 700; }
.form-grid input, .form-grid select, .form-grid textarea, .field input, .field select, .field textarea { width: 100%; min-height: 42px; border: 1px solid #cbd5e1; border-radius: 10px; padding: 9px 11px; background: #fff; color: var(--text); outline: none; font-weight: 500; }
.form-grid textarea, .field textarea { min-height: 105px; resize: vertical; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.11); }
.span-2 { grid-column: 1/-1; }
.check-row { display: flex !important; grid-auto-flow: column; justify-content: start; align-items: center; gap: 9px !important; }
.check-row input { width: 18px !important; min-height: 18px !important; }
.sender-list { display: grid; gap: 9px; }
.sender-row { display: grid; grid-template-columns: 1fr 38px; gap: 8px; }
.help { color: var(--muted); font-size: 12px; font-weight: 500; }

.alert { margin: 0 0 14px; padding: 12px 14px; border: 1px solid; border-radius: 11px; }
.alert.success { color: #047857; border-color: #a7f3d0; background: var(--success-soft); }
.alert.danger { color: #b91c1c; border-color: #fecaca; background: var(--danger-soft); }
.alert.info { color: #1d4ed8; border-color: #bfdbfe; background: #eff6ff; }
.empty-state { padding: 34px 20px; border: 1px dashed #cbd5e1; border-radius: 13px; background: var(--surface-2); color: var(--muted); text-align: center; }
.countdown { color: var(--primary-dark); font-weight: 850; font-variant-numeric: tabular-nums; }
.countdown.unlimited { color: var(--success); }
.countdown.expired { color: var(--danger); }
.secret-box { padding: 15px; border: 1px solid #bfdbfe; border-radius: 11px; background: #eff6ff; overflow-wrap: anywhere; }
.secret-box code { color: #1e3a8a; font-weight: 750; }

.login-card { width: min(430px,100%); padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.login-card .brand-mark { margin: 0 auto 14px; }
.login-card h1 { text-align: center; margin: 0; font-size: 25px; }
.login-card > p { text-align: center; margin: 5px 0 22px; }
.login-card form { display: grid; gap: 14px; }
.login-card label { display: grid; gap: 6px; font-weight: 750; }
.login-card input { min-height: 44px; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 10px; }

.install-body { min-height: 100vh; background: linear-gradient(135deg,#eff6ff,#f8fafc 45%,#f5f3ff); }
.install-shell { min-height: 100vh; display: grid; place-items: center; padding: 30px 18px; }
.install-card { width: min(760px,100%); padding: 30px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.install-card > .brand-mark { margin: auto; }
.install-card > h1, .install-card > p { text-align: center; }
.install-card > h1 { margin: 13px 0 0; }
.install-card > p { margin: 3px 0 22px; }

@media (max-width: 1080px) {
  .topbar { padding: 0 18px; }
  .menu-toggle { display: block; }
  .nav { display: none; position: absolute; left: 12px; right: 12px; top: 58px; padding: 10px; border-radius: 13px; background: #111c32; box-shadow: var(--shadow); flex-direction: column; align-items: stretch; }
  .nav.open { display: flex; }
  .nav a { width: 100%; }
  .nav .logout { margin-left: 0; }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .page-shell { width: min(100% - 20px,1460px); margin-top: 16px; }
  .brand > span:last-child { display: none; }
  .page-heading { align-items: stretch; flex-direction: column; }
  .heading-actions .button { flex: 1; }
  .stats-grid { gap: 9px; }
  .stat-card { padding: 14px; min-height: 94px; }
  .stat-card strong { font-size: 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2, .form-grid h2 { grid-column: auto; }
  .form-card, .panel, .install-card { padding: 16px; }
  th, td { padding: 11px 12px; }
}


/* Compact order / service-send UI */
.nested-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface-2); }
.nested-card legend { padding: 0 7px; }
.order-layout { grid-template-columns: minmax(0,1.9fr) minmax(310px,.72fr); }
.compact-live { max-height: 760px; }
.order-summary .info-grid { display: grid; grid-template-columns: auto 1fr; gap: 9px 14px; align-items: baseline; }
.order-summary .info-grid span { color: var(--muted); font-size: 12px; }
.order-summary .info-grid strong { text-align: right; overflow-wrap: anywhere; }
.danger-text { color: var(--danger); }
.countdown-box { margin-top: 14px; padding: 13px; border-radius: 11px; background: #eff6ff; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.countdown-box span { color: var(--muted); font-size: 12px; font-weight: 700; }
.countdown-box strong { color: var(--primary-dark); font-size: 20px; font-variant-numeric: tabular-nums; }
.countdown-box.unlimited { background: var(--success-soft); }
.countdown-box.unlimited strong { color: var(--success); }
.mini-command { padding: 11px 0; border-bottom: 1px solid var(--line); }
.mini-command:last-child { border-bottom: 0; }
.mini-command > div { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.mini-command p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.mini-command small { display: block; margin-top: 5px; color: var(--muted); }
@media (max-width: 1080px) { .order-layout { grid-template-columns: 1fr; } }

.install-checks { margin: 0 0 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); display: grid; gap: 5px; font-size: 13px; }
.check-good { color: var(--success); font-weight: 750; }
.check-bad { color: var(--danger); font-weight: 750; }


/* Merkez SMS V1.0.2 — fixed desktop sidebar + personal service flow */
.app-layout { min-height: 100vh; display: block; }
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 80;
  width: 245px; height: 100vh; padding: 18px 14px;
  background: #0f172a; color: #e2e8f0;
  display: flex; flex-direction: column;
  box-shadow: 8px 0 24px rgba(15,23,42,.08);
}
.sidebar .brand { color:#fff; }
.sidebar-brand { display:flex; padding: 0 8px 18px; font-size: 16px; }
.side-nav { display: grid; grid-auto-flow: row; grid-template-columns: 1fr; gap: 4px; overflow-y: auto; padding-right: 2px; }
.side-nav > a { width:100%; min-height: 42px; display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px; color: #cbd5e1; font-weight: 700; }
.side-nav > a:hover, .side-nav > a.active { color: #fff; background: rgba(255,255,255,.1); }
.side-nav > a.active { box-shadow: inset 3px 0 0 #60a5fa; }
.nav-section { display:block; width:100%; margin: 16px 10px 5px; color: #64748b; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.sidebar-user { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid rgba(255,255,255,.1); display: grid; gap: 2px; }
.sidebar-user span { color: #94a3b8; font-size: 12px; }
.sidebar-user a { margin-top: 8px; color: #fecaca; font-weight: 750; }
.app-main { min-width: 0; margin-left:245px; }
.mobile-topbar { display: none; height: 58px; padding: 0 15px; background: #0f172a; color: #fff; align-items: center; gap: 12px; }
.menu-backdrop { display: none; }
.page-shell { width: min(1500px, calc(100% - 40px)); }
.service-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(250px,1fr)); gap: 14px; }
.service-card { position: relative; display: grid; gap: 12px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.service-card h2 { margin: 0; font-size: 19px; }
.service-card p { margin: 0; min-height: 42px; color: var(--muted); }
.service-card .service-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.service-card .availability { font-weight: 850; color: var(--success); }
.service-card .availability.none { color: var(--danger); }
.number-pool { display: grid; grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 8px; max-height: 310px; overflow: auto; padding: 4px; }
.number-pool label { padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.update-drop { border: 2px dashed #cbd5e1; border-radius: 14px; padding: 22px; background: var(--surface-2); }
.version-pill { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: #eff6ff; color: #1d4ed8; font-weight: 850; }
@media (max-width:1080px) {
  .app-layout { display:block; }
  .app-main { margin-left:0; }
  .mobile-topbar { display:flex; position:sticky; top:0; z-index:70; }
  .menu-toggle { display:inline-flex; align-items:center; justify-content:center; }
  .sidebar { position:fixed; left:0; top:0; width:260px; transform:translateX(-104%); transition:.18s ease; box-shadow:var(--shadow); }
  .sidebar.open { transform:translateX(0); }
  .menu-backdrop.open { display:block; position:fixed; inset:0; background:rgba(15,23,42,.45); z-index:75; }
  .page-shell { width:min(100% - 24px,1500px); margin-top:16px; }
}


/* Merkez SMS V1.0.3 — mobil düzen, sade menü ve NTTGame uyarıları */
.sidebar { overflow-x: hidden; }
.side-nav { overflow-x: hidden; min-width: 0; }
.side-nav > a, .side-nav > a span, .sidebar-user { min-width: 0; }
.side-nav > a span { overflow-wrap: anywhere; }
.nav-section { width: auto; margin: 16px 10px 5px; }
.dashboard-single { display: block; }
.alert.warning { color: #92400e; border-color: #fcd34d; background: #fffbeb; }
.ntt-warning a { text-decoration: underline; text-underline-offset: 2px; }
.status.warning { color: var(--warning); background: #fffbeb; }
.fixed-value { min-height: 42px; display: flex; align-items: center; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-weight: 800; color: #334155; }
.service-toolbar { margin: 0 0 14px; }
.service-toolbar input { width: min(420px,100%); min-height: 42px; padding: 9px 12px; border: 1px solid #cbd5e1; border-radius: 11px; background:#fff; outline:none; }
.service-toolbar input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.11); }
.usage-filter { margin-bottom: 16px; }

@media (max-width: 760px) {
  body { font-size: 13px; }
  .mobile-topbar { height: 54px; }
  .sidebar { width: min(86vw, 280px); padding: 14px 12px; }
  .sidebar-brand { padding-bottom: 12px; }
  .side-nav > a { min-height: 39px; padding: 8px 10px; }
  .nav-section { margin-top: 11px; }
  .page-shell { width: calc(100% - 16px); margin: 12px auto 36px; }
  .page-heading { margin-bottom: 14px; gap: 10px; }
  .page-heading h1 { font-size: 24px; }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-bottom: 12px; }
  .stat-card { min-height: 84px; padding: 12px; border-radius: 12px; }
  .stat-card strong { font-size: 23px; }
  .panel, .form-card, .service-card { border-radius: 12px; box-shadow: 0 6px 20px rgba(15,23,42,.06); }
  .panel { padding: 13px; }
  .service-grid { grid-template-columns: 1fr; gap: 10px; }
  .service-card { padding: 14px; gap: 9px; }
  .service-card p { min-height: 0; }
  .sms-list { max-height: none; padding-right: 0; }
  .sms-card { padding: 12px; }
  .sms-card-head { flex-wrap: wrap; }
  .form-grid { gap: 12px; }
  .number-pool { grid-template-columns: 1fr; max-height: 360px; }
  .row-actions { gap: 5px; }

  /* Mobilde tüm yönetim tablolarını kart görünümüne çevir. */
  .table-card { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .table-scroll { overflow: visible; }
  .responsive-table,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td { display: block; width: 100%; }
  .responsive-table thead { display: none; }
  .responsive-table tbody { display: grid; gap: 10px; }
  .responsive-table tr { padding: 5px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 6px 20px rgba(15,23,42,.05); }
  .responsive-table td { min-height: 38px; padding: 9px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(105px,38%) minmax(0,1fr); gap: 10px; align-items: center; overflow-wrap: anywhere; }
  .responsive-table td:last-child { border-bottom: 0; }
  .responsive-table td::before { content: attr(data-label); color: var(--muted); font-size: 11px; font-weight: 850; text-transform: uppercase; letter-spacing: .035em; }
  .responsive-table td.table-empty-cell { display: block; padding: 0; border: 0; }
  .responsive-table td.table-empty-cell::before { display: none; }
  .responsive-table .row-actions { justify-content: flex-start; }
  .responsive-table .phone-button { white-space: normal; text-align: left; }

  .order-layout { grid-template-columns: 1fr; }
  .order-summary .info-grid { grid-template-columns: minmax(90px,auto) 1fr; }
  .countdown-box { padding: 11px; }
}

@media (max-width: 420px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card span { font-size: 11px; }
  .stat-card strong { font-size: 21px; }
  .heading-actions { width:100%; }
  .heading-actions .button { width:100%; }
  .responsive-table td { grid-template-columns: 96px minmax(0,1fr); }
}


/* Merkez SMS V1.0.5 — servis stokları ve cihaz bazlı sıkı numara grupları */
.inline-form { display: inline-flex; margin: 0; }
.service-stock-line { margin-top: 3px; color: var(--success); font-size: 12px; font-weight: 800; }
.service-stock-line strong { font-size: 13px; }
.number-device-groups { display: grid; gap: 12px; }
.number-device-group { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: 0 6px 20px rgba(15,23,42,.05); }
.number-device-head { min-height: 46px; padding: 8px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #eef3f9; border-bottom: 1px solid var(--line); }
.number-device-head > div { min-width: 0; display: flex; align-items: baseline; gap: 9px; }
.number-device-head > div > strong { font-size: 15px; color: #1e293b; }
.number-device-head > div > span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.compact-number-table th,
.compact-number-table td { padding: 8px 11px; }
.compact-number-table th { font-size: 11px; }
.compact-number-table td { line-height: 1.35; }
.compact-number-table .status { padding: 3px 7px; font-size: 11px; }

@media (max-width: 760px) {
  .number-device-groups { gap: 9px; }
  .number-device-group { overflow: visible; border-radius: 11px; }
  .number-device-head { min-height: 42px; padding: 7px 10px; border-radius: 11px 11px 0 0; }
  .number-device-head > div { display: grid; gap: 0; }
  .number-device-group .table-scroll { overflow: visible; }
  .number-device-group .responsive-table tbody { padding: 8px; gap: 7px; }
  .number-device-group .responsive-table tr { padding: 3px 9px; box-shadow: none; }
  .number-device-group .responsive-table td { min-height: 34px; padding: 7px 0; }
}


/* Merkez SMS V1.0.6 — görünür toplu stok işlemi + daha sıkı cihaz grupları */
.service-stock-toolbar {
  margin: -4px 0 12px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #bbf7d0;
  border-radius: 11px;
  background: #f0fdf4;
}
.service-stock-toolbar > div { min-width: 0; display: grid; gap: 1px; }
.service-stock-toolbar > div > strong { color: #166534; font-size: 13px; }
.service-stock-toolbar > div > span { color: #4b5563; font-size: 11px; }
.stock-all-button { white-space: nowrap; }
.service-admin-table .service-stock-line { margin-top: 1px; font-size: 11px; }
.service-admin-table .service-stock-line strong { font-size: 12px; }
.number-device-groups { gap: 6px; }
.number-device-group { border-radius: 9px; box-shadow: 0 3px 10px rgba(15,23,42,.035); }
.number-device-head { min-height: 36px; padding: 5px 9px; gap: 8px; }
.number-device-head > div { gap: 7px; }
.number-device-head > div > strong { font-size: 13px; }
.number-device-head > div > span { font-size: 10px; }
.compact-number-table th,
.compact-number-table td { padding: 5px 8px; }
.compact-number-table th { font-size: 10px; }
.compact-number-table td { font-size: 12px; line-height: 1.2; }
.compact-number-table .muted.small { font-size: 10px; }
.compact-number-table .status { padding: 2px 6px; font-size: 10px; }
.compact-number-table .button.small { min-height: 27px; padding: 3px 8px; }

@media (max-width: 760px) {
  .service-stock-toolbar { margin-top: 0; padding: 10px; display: grid; gap: 8px; }
  .stock-all-button { width: 100%; white-space: normal; min-height: 36px; }
  .number-device-groups { gap: 5px; }
  .number-device-head { min-height: 34px; padding: 5px 8px; }
  .number-device-group .responsive-table tbody { padding: 5px; gap: 4px; }
  .number-device-group .responsive-table tr { padding: 1px 7px; border-radius: 8px; }
  .number-device-group .responsive-table td { min-height: 30px; padding: 5px 0; }
}


/* Merkez SMS V1.0.7 — saat dilimi / canlı durum / stok görünümü */

/* Merkez SMS V1.0.8 — kompakt servis kartları ve kullanım işlem düğmeleri */
.service-grid { grid-template-columns: repeat(auto-fill,minmax(205px,1fr)); gap: 10px; }
.service-card.compact-service-card { gap: 9px; padding: 13px 14px; min-height: 0; }
.service-card-head { display:flex; align-items:center; justify-content:space-between; gap:8px; min-width:0; }
.service-card-head h2 { font-size:17px; line-height:1.2; min-width:0; overflow-wrap:anywhere; }
.service-duration { flex:0 0 auto; white-space:nowrap; font-size:11px; }
.compact-service-card .availability { font-size:13px; line-height:1.2; margin-top:1px; }
.compact-service-card .button { min-height:38px; padding:8px 10px; }
.usage-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:10px; }
.usage-actions form { margin:0; }
.usage-actions .button { min-height:40px; }
@media (max-width:760px) {
  .service-toolbar { margin-bottom:9px; }
  .service-toolbar input { min-height:38px; }
  .service-grid { gap:7px; }
  .service-card.compact-service-card { padding:10px 11px; gap:7px; }
  .service-card-head h2 { font-size:16px; }
  .compact-service-card .button { min-height:36px; }
}
@media (max-width:390px) {
  .usage-actions { grid-template-columns:1fr; }
}

/* Merkez SMS V1.0.12 — servis arama, aktif SIM havuzu ve numara satır vurgusu */
.admin-service-search { margin: 0 0 10px; }
.admin-service-search input { width: min(460px,100%); }
.compact-number-table tbody tr td { transition: background-color .14s ease, box-shadow .14s ease; }
.compact-number-table tbody tr.number-row-highlight td {
  background: #fff7ed;
  box-shadow: inset 0 1px 0 #fdba74, inset 0 -1px 0 #fdba74;
}
.compact-number-table tbody tr.number-row-highlight td:first-child { box-shadow: inset 1px 0 0 #fdba74, inset 0 1px 0 #fdba74, inset 0 -1px 0 #fdba74; }
.compact-number-table tbody tr.number-row-highlight td:last-child { box-shadow: inset -1px 0 0 #fdba74, inset 0 1px 0 #fdba74, inset 0 -1px 0 #fdba74; }
.compact-number-table tbody tr.number-row-highlight .phone-button { color: #9a3412; transform: scale(1.025); }
@media (max-width:760px) {
  .admin-service-search { margin-bottom: 7px; }
  .admin-service-search input, .service-toolbar input[type="search"] { min-height: 44px; font-size: 16px; }
}

/* Merkez SMS V1.0.20 — NTTGame OTP numara uyarıcısı */
.number-with-otp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.otp-indicator {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 22px;
  padding: 1px 6px;
  border: 1px solid rgba(37, 99, 235, .28);
  border-radius: 999px;
  background: rgba(37, 99, 235, .08);
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.otp-indicator strong {
  margin-left: 3px;
  letter-spacing: .04em;
  font-size: 10px;
}
.otp-x {
  display: inline-block;
  font-size: 19px;
  line-height: 1;
  font-weight: 950;
  color: #2563eb;
  text-shadow: 0 0 7px rgba(37, 99, 235, .35);
  animation: otp-blue-blink 1.15s ease-in-out infinite;
}
.otp-x:nth-child(2) { animation-delay: .18s; }
.otp-x:nth-child(3) { animation-delay: .36s; }
.otp-warning {
  border-color: rgba(37, 99, 235, .6);
  background: rgba(37, 99, 235, .14);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .06);
}
@keyframes otp-blue-blink {
  0%, 100% { opacity: .28; transform: scale(.90); }
  48% { opacity: 1; transform: scale(1.12); }
}
@media (prefers-reduced-motion: reduce) {
  .otp-x { animation: none; opacity: 1; transform: none; }
}
@media (max-width: 720px) {
  .number-with-otp { gap: 5px; }
  .otp-indicator { padding: 1px 5px; }
  .otp-x { font-size: 17px; }
}


/* Merkez SMS V1.0.21 — SMS hızlı kopyalama */
.sms-copy-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px;align-items:center}
.code-chip.ntt-copy{max-width:100%;background:#e8f0ff;border-color:#8eb5ff;color:#174ea6;font-weight:800}
@media(max-width:700px){.sms-copy-actions{gap:4px}.sms-copy-actions .code-chip{min-height:34px;padding:6px 9px;font-size:12px}.sms-copy-actions .ntt-copy{flex:1 1 100%}}


/* Merkez SMS V2.0.1 — SMS popup ve canlı gönderim durumu */
body.modal-open { overflow: hidden; }
.sms-modal-backdrop[hidden] { display: none !important; }
.sms-modal-backdrop {
  position: fixed; inset: 0; z-index: 250;
  display: grid; place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, .58);
  backdrop-filter: blur(3px);
}
.sms-modal {
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
}
.sms-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.sms-modal-head h2 { margin: 0; font-size: 22px; }
.sms-modal-head p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.sms-modal-close { width: 38px; height: 38px; flex: 0 0 38px; border: 0; border-radius: 10px; background: var(--surface-2); color: #475569; font-size: 25px; line-height: 1; }
.sms-popup-form { margin: 0; }
.sms-popup-actions { display: flex; justify-content: flex-end; gap: 8px; }
.sms-send-progress { margin-top: 16px; padding: 14px; display: flex; align-items: center; gap: 12px; border: 1px solid #bfdbfe; border-radius: 12px; background: #eff6ff; }
.sms-send-progress[hidden] { display: none !important; }
.sms-send-progress strong { display: block; color: var(--primary-dark); }
.sms-send-progress p { margin: 2px 0 0; color: #475569; font-size: 12px; }
.sms-send-progress[data-state="sent"],
.sms-send-progress[data-state="delivered"] { border-color: #a7f3d0; background: var(--success-soft); }
.sms-send-progress[data-state="sent"] strong,
.sms-send-progress[data-state="delivered"] strong { color: var(--success); }
.sms-send-progress[data-state="failed"] { border-color: #fecaca; background: var(--danger-soft); }
.sms-send-progress[data-state="failed"] strong { color: var(--danger); }
.sms-send-spinner { width: 20px; height: 20px; flex: 0 0 20px; border: 3px solid rgba(37,99,235,.18); border-top-color: var(--primary); border-radius: 50%; animation: sms-spin .8s linear infinite; }
.sms-send-progress[data-state="sent"] .sms-send-spinner,
.sms-send-progress[data-state="delivered"] .sms-send-spinner,
.sms-send-progress[data-state="failed"] .sms-send-spinner { animation: none; border-color: currentColor; border-width: 2px; }
@keyframes sms-spin { to { transform: rotate(360deg); } }
@media (max-width: 640px) {
  .sms-modal-backdrop { padding: 10px; align-items: end; }
  .sms-modal { width: 100%; max-height: 88vh; padding: 16px; border-radius: 18px 18px 12px 12px; }
  .sms-popup-actions { display: grid; grid-template-columns: 1fr 1fr; }
}

/* Merkez SMS V2.0.2 — arama, kullanıcı logları ve bakım modu */
.sms-search-toolbar,
.number-search-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
}
.sms-search-toolbar input,
.number-search-toolbar input {
  width: min(520px, 100%);
  min-height: 40px;
}
.sms-search-toolbar .small,
.number-search-toolbar .small { flex: 0 1 auto; }
[data-number-row][hidden],
[data-number-group][hidden] { display: none !important; }

.maintenance-settings {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fff7f7;
}
.maintenance-settings.is-active {
  border-color: #ef4444;
  background: #fef2f2;
  box-shadow: inset 0 0 0 1px rgba(239,68,68,.10);
}
.maintenance-mode-label,
.maintenance-mode-label strong { color: #b91c1c; }
.maintenance-mode-label strong { letter-spacing: .035em; }
.maintenance-admin-badge {
  margin: 0 12px 10px;
  padding: 7px 9px;
  border: 1px solid #ef4444;
  border-radius: 9px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 900;
  text-align: center;
  letter-spacing: .045em;
}
.maintenance-public-message {
  max-width: 760px;
  margin: 16px auto;
  border-color: #fecaca;
  background: #fff7f7;
  color: #7f1d1d;
  font-size: 16px;
  line-height: 1.65;
}
.user-log-stats { margin-bottom: 14px; }
.user-sms-history { max-height: 760px; overflow: auto; padding-right: 4px; }
.status.warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

@media (max-width: 760px) {
  .sms-search-toolbar,
  .number-search-toolbar { display: grid; gap: 5px; }
  .sms-search-toolbar input,
  .number-search-toolbar input { width: 100%; min-height: 38px; }
  .maintenance-admin-badge { margin: 0 9px 8px; }
}


/* V2.0.3 - aile aktif servisleri / çoklu kullanım */
.service-active-note { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 10px; border:1px solid #bfdbfe; border-radius:10px; background:#eff6ff; font-size:12px; }
.service-active-note strong { color:#1d4ed8; }
.service-active-note a { color:#1d4ed8; font-weight:800; white-space:nowrap; }
.active-service-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(290px,1fr)); gap:14px; }
.active-service-card { display:grid; gap:13px; padding:17px; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface); box-shadow:var(--shadow); }
.active-service-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.active-service-card-head h2 { margin:3px 0 0; font-size:19px; }
.eyebrow { color:var(--muted); font-size:11px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
.active-service-number-row { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:11px 12px; border-radius:11px; background:var(--surface-2); }
.active-service-phone { border:0; padding:0; background:transparent; color:var(--danger); font-size:17px; font-weight:900; cursor:pointer; }
.active-service-meta { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.active-service-meta > div { display:grid; gap:3px; padding:10px; border:1px solid var(--line); border-radius:10px; background:#fff; }
.active-service-meta span { color:var(--muted); font-size:11px; font-weight:700; }
.active-service-meta strong { font-size:14px; }
.active-service-empty { grid-column:1/-1; display:grid; gap:12px; }
@media (max-width: 680px) {
  .active-service-grid { grid-template-columns:1fr; gap:9px; }
  .active-service-card { padding:13px; gap:10px; }
  .active-service-number-row { align-items:flex-start; flex-direction:column; }
  .service-active-note { align-items:flex-start; flex-direction:column; gap:4px; }
}

/* V2.0.21 — Admin Authenticator / TOTP */
.two-factor-shell{min-height:min(760px,calc(100vh - 70px));display:grid;place-items:center;padding:24px 12px}.two-factor-card{width:min(520px,100%);margin:0 auto}.two-factor-card h1,.two-factor-setup-panel h1{margin:8px 0 8px}.two-factor-form{display:grid;gap:14px;margin-top:18px}.two-factor-form label{display:grid;gap:7px;font-weight:700}.two-factor-form input{font-size:18px;letter-spacing:.04em}.two-factor-cancel{display:block;margin-top:14px;text-align:center;color:var(--muted,#64748b);font-size:13px}.two-factor-setup{width:100%}.two-factor-setup-panel{width:min(900px,100%);margin:0 auto}.two-factor-grid{display:grid;grid-template-columns:minmax(260px,320px) minmax(0,1fr);gap:24px;align-items:start;margin:18px 0}.two-factor-qr-wrap{text-align:center}.two-factor-qr{display:grid;place-items:center;min-height:280px;padding:12px;border:1px solid #d8dee9;border-radius:16px;background:#fff;overflow:auto}.two-factor-qr canvas{display:block;max-width:100%;height:auto;image-rendering:pixelated}.two-factor-qr.is-error{min-height:120px;color:#8a3b12;font-size:13px;line-height:1.5}.two-factor-steps ol{padding-left:20px;line-height:1.6}.two-factor-secret{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:7px 0 8px;padding:12px;border:1px dashed #aeb8c7;border-radius:12px;background:#f8fafc}.two-factor-secret code{font-size:16px;font-weight:800;letter-spacing:.08em;word-break:break-all}.two-factor-confirm-form{max-width:620px;margin:20px auto 0}.recovery-panel{max-width:820px}.recovery-codes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:18px 0}.recovery-codes code{display:block;padding:12px 14px;border:1px solid #d8dee9;border-radius:10px;background:#f8fafc;font-size:16px;font-weight:800;letter-spacing:.08em;text-align:center}.two-factor-system-card{margin-bottom:18px}.two-factor-system-body{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap}.two-factor-system-body p{margin:5px 0 0}.two-factor-security-form{max-width:760px}.two-factor-security-form input{font-size:16px}
@media(max-width:760px){.two-factor-grid{grid-template-columns:1fr}.two-factor-qr{min-height:240px}.recovery-codes{grid-template-columns:1fr}.two-factor-system-body{align-items:flex-start;flex-direction:column}.two-factor-system-body .row-actions{width:100%}.two-factor-system-body .button{flex:1}.two-factor-secret code{font-size:14px}}
