:root {
    --bg: #F4F4F5;
    --surface: #FFFFFF;
    --surface-2: #FAFAFB;
    --surface-3: #F0F0F2;
    --text: #1B1B1F;
    --muted: #6E6E76;
    --faint: #9A9AA0;
    --border: #E7E7EA;
    --border-strong: #D6D6DB;

    --accent: #A97914;
    --accent-soft: #F5EDD9;
    --accent-line: #C69121;
    --gold-a: #E6B53F;
    --gold-b: #C07D16;

    --danger: #C7091B;
    --danger-soft: #FDECEC;
    --danger-border: #F5C9CB;
    --ok: #1E7F45;
    --ok-soft: #E9F6EE;
    --ok-border: #BEE6C9;
    --info: #0B63C4;
    --info-soft: #EAF1FC;
    --info-border: #CDE0F7;
    --warn: #8A5B00;
    --warn-soft: #FBF2DF;
    --warn-border: #F0DBA5;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.09);
    --shadow-pop: 0 12px 40px rgba(0, 0, 0, 0.14);
    --ring: 0 0 0 3.5px rgba(198, 145, 33, 0.20);

    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;

    --font-display: 'Space Grotesk', system-ui, sans-serif;
    --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', Roboto, sans-serif;

    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 13.5px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }

.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
.ta-right { text-align: right; }
.ta-center { text-align: center; }
.muted { color: var(--muted); }

.shell {
    display: grid;
    grid-template-columns: 214px 1fr;
    min-height: 100vh;
}

/* ---------- sidebar ---------- */
.sidebar {
    background: var(--surface-2);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 14px 10px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 8px 14px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.brand-icon { width: 22px; height: 22px; display: block; }

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--gold-a), var(--gold-b));
    box-shadow: 0 2px 7px rgba(192, 125, 22, 0.28);
}
.logo-mark svg { width: 15px; height: 15px; display: block; }
.logo-mark-sm { width: 22px; height: 22px; border-radius: 7px; }
.logo-mark-sm svg { width: 13px; height: 13px; }

.brand-mark {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    letter-spacing: -0.02em;
}

.nav { display: flex; flex-direction: column; gap: 1px; flex: 1; }

.nav-label {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--faint);
    padding: 14px 10px 5px;
}
.nav-label:first-child { padding-top: 4px; }

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: var(--radius-xs);
    color: #33333A;
    font-weight: 500;
    font-size: 13px;
    transition: background 0.15s var(--ease), color 0.15s var(--ease);
}

.nav-ico { flex-shrink: 0; color: var(--faint); transition: color 0.15s var(--ease); }

.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item:hover .nav-ico { color: #55555C; }

.nav-item.is-active {
    background: var(--accent-soft);
    color: #5C4A16;
    font-weight: 600;
}
.nav-item.is-active .nav-ico { color: var(--accent); }

.sidebar-foot { margin-top: 12px; }

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border);
}

.avatar {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--text);
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.02em;
}

.user-chip-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.user-chip-meta b { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip-meta small { font-size: 11px; color: var(--muted); }

.brand-credit { padding: 12px 8px 2px; font-size: 11px; }
.brand-credit a { color: var(--faint); transition: color 0.15s var(--ease); }
.brand-credit a:hover { color: var(--text); }

/* ---------- main / topbar ---------- */
.main { display: flex; flex-direction: column; min-width: 0; }

.scrim {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 40;
}
.scrim[hidden] { display: none; }

.mobile-topbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    padding: 0 8px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    position: sticky;
    top: 0;
    z-index: 30;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid transparent;
    border-radius: var(--radius-xs);
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.icon-btn:hover { background: var(--surface-3); }

.mobile-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.02em;
}
.mobile-brand-icon { width: 20px; height: 20px; display: block; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 52px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.topbar-title { font-weight: 600; font-size: 14px; letter-spacing: -0.01em; }

.topbar-user { display: flex; align-items: center; gap: 10px; }
.user-name { font-weight: 500; font-size: 13px; }
.user-role {
    font-size: 11px;
    color: var(--muted);
    background: var(--surface-3);
    padding: 2px 9px;
    border-radius: 999px;
}

.content { padding: 20px; width: 100%; }

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 18px;
}

.page-title { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.page-desc { color: var(--muted); margin: 3px 0 0; font-size: 13px; }

/* ---------- stat cards ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.stat-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }

.stat-top { display: flex; align-items: flex-start; justify-content: space-between; }
.stat-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    flex-shrink: 0;
}
.stat-ico svg { width: 15px; height: 15px; }
.stat-ico-gold { background: rgba(198, 145, 33, 0.12); color: var(--accent); }
.stat-ico-blue { background: rgba(47, 111, 237, 0.11); color: #2554b0; }
.stat-ico-green { background: rgba(46, 158, 91, 0.12); color: #1f7a44; }
.stat-ico-amber { background: rgba(217, 138, 31, 0.13); color: #9a5a12; }
.stat-ico-violet { background: rgba(120, 90, 200, 0.12); color: #6a4fb0; }
.stat-ico-slate { background: rgba(90, 100, 114, 0.14); color: #4a515c; }

.stat-label { font-size: 12px; color: var(--muted); font-weight: 500; }
.stat-value { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.03em; margin-top: 5px; }
.stat-sub { font-size: 11.5px; color: var(--faint); }
.stat-grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- card ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-head { padding: 13px 15px; border-bottom: 1px solid var(--border); }
.card-title { font-size: 13.5px; font-weight: 600; margin: 0; }

.empty-state { padding: 44px 16px; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------- dashboard groups ---------- */
.dash-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dash-bulk { display: flex; gap: 8px; flex-wrap: wrap; }
.dash-panel { border-bottom: 1px solid var(--border); padding: 6px 0; }
.dash-panel:last-child { border-bottom: 0; }
.dash-panel-head { font-family: var(--font-display); font-weight: 600; font-size: 13.5px; padding: 10px 15px 4px; letter-spacing: -0.01em; }
.dash-provider { padding: 4px 15px 8px 22px; }
.dash-provider-name { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.dash-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; border-top: 1px solid var(--border); }
.dash-row:first-of-type { border-top: 0; }
.dash-type { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; flex-shrink: 0; }
.dash-type-refill { color: var(--info); background: var(--info-soft); border: 1px solid var(--info-border); }
.dash-type-cancel { color: var(--warn); background: var(--warn-soft); border: 1px solid var(--warn-border); }
.dash-count { font-size: 12px; font-weight: 600; color: var(--text); flex-shrink: 0; min-width: 28px; }
.dash-ids { flex: 1; font-size: 12px; color: #44444A; background: var(--surface-3); padding: 4px 9px; border-radius: var(--radius-xs); overflow-x: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dash-copy { flex-shrink: 0; }

/* ---- dashboard panel kartları ---- */
.section-head { margin: 22px 0 12px; }
.section-title { font-family: var(--font-display); font-size: 16px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.section-desc { font-size: 12.5px; color: var(--muted); margin: 2px 0 0; }
.panel-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.panel-card {
    text-align: left;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 14px 16px;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease), transform 0.06s var(--ease);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.panel-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow-md); }
.panel-card:active { transform: translateY(1px); }
.panel-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.panel-card-name { font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.panel-card-total { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--accent); }
.panel-card-stats { display: flex; flex-wrap: wrap; gap: 6px; }
.pc-stat { font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 999px; }
.pc-stat b { font-weight: 700; }
.pc-refill { color: var(--info); background: var(--info-soft); }
.pc-cancel { color: var(--warn); background: var(--warn-soft); }
.panel-card-foot { font-size: 11.5px; color: var(--faint); }

.pd-title-sub { font-family: var(--font); font-size: 12.5px; font-weight: 400; color: var(--muted); margin-left: 8px; }
.pd-mini { font-family: var(--font); font-size: 11px; font-weight: 600; padding: 4px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-xs); background: var(--surface); color: var(--muted); cursor: pointer; transition: all 0.12s var(--ease); white-space: nowrap; }
.pd-mini:hover { color: var(--text); border-color: var(--faint); }
.pd-mini-tr, .pd-mini-en { color: #8A6512; background: var(--accent-soft); border-color: transparent; }
.pd-mini-tr:hover, .pd-mini-en:hover { background: #EFE4C8; color: var(--accent); }

/* ---- panel detay: master-detail ---- */
.pd2 { display: flex; height: 100%; min-height: 0; }
.pd2-rail { width: 260px; flex-shrink: 0; border-right: 1px solid var(--border); overflow-y: auto; padding: 8px; background: var(--surface-2); }
.pd2-rail-head { font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--faint); padding: 6px 8px 8px; }
.pd2-prov { display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; padding: 9px 10px; border: 0; background: transparent; border-radius: var(--radius-sm); cursor: pointer; font-family: inherit; transition: background 0.12s var(--ease); margin-bottom: 2px; }
.pd2-prov:hover { background: var(--surface-3); }
.pd2-prov.is-active { background: var(--accent-soft); }
.pd2-prov-name { font-size: 12.5px; font-weight: 600; color: var(--text); font-family: ui-monospace, 'SF Mono', Menlo, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd2-prov.is-active .pd2-prov-name { color: var(--accent); }
.pd2-prov-meta { display: flex; gap: 5px; }
.pd2-chip { font-size: 10.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; }
.pd2-chip-refill { color: var(--info); background: var(--info-soft); }
.pd2-chip-cancel { color: var(--warn); background: var(--warn-soft); }

.pd2-detail { flex: 1; min-width: 0; overflow-y: auto; padding: 20px 24px 40px; }
.pd2-dhead { margin-bottom: 16px; }
.pd2-dtitle { font-family: var(--font-display); font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.pd2-dsub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.pd2-block { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.pd2-block-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.pd2-block-title { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; }
.pd2-block-title b { font-family: var(--font-display); font-size: 16px; }
.pd2-dot { width: 8px; height: 8px; border-radius: 50%; }
.pd2-dot-refill { background: var(--info); }
.pd2-dot-cancel { background: var(--warn); }
.pd2-block-since { font-size: 12px; color: var(--warn); font-weight: 500; }
.pd2-block-acts { margin-left: auto; display: inline-flex; gap: 6px; }
.pd2-svcs { padding: 4px 0; }
.pd2-svc { padding: 8px 14px; }
.pd2-svc + .pd2-svc { border-top: 1px solid var(--border); }
.pd2-svc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.pd2-svc-id { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 1px 6px; border-radius: 4px; flex-shrink: 0; }
.pd2-svc-name { font-size: 12.5px; font-weight: 600; color: var(--text); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd2-svc-cat { font-size: 11px; color: var(--faint); white-space: nowrap; flex-shrink: 0; }
.pd2-svc-num { font-family: var(--font-display); font-weight: 700; font-size: 13px; color: var(--muted); flex-shrink: 0; }
.pd2-ids { display: block; font-size: 11.5px; color: #55555C; background: var(--surface-3); padding: 5px 9px; border-radius: var(--radius-xs); white-space: nowrap; overflow-x: auto; line-height: 1.5; font-variant-numeric: tabular-nums; cursor: pointer; }
.pd2-ids:hover { background: var(--accent-soft); }
.pd2-empty { padding: 20px; text-align: center; color: var(--faint); font-size: 12.5px; }
@media (max-width: 720px) {
    .pd2 { flex-direction: column; height: auto; }
    .pd2-rail { width: 100%; border-right: 0; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 4px; }
    .pd2-rail-head { width: 100%; }
    .pd2-prov { width: auto; flex-direction: row; align-items: center; gap: 8px; }
}

/* ---- full-screen modal ---- */
.modal-full { padding: 0; align-items: stretch; justify-content: stretch; }
.modal-full .modal-panel { max-width: none; max-height: none; width: 100vw; height: 100vh; border: 0; border-radius: 0; box-shadow: none; }
.modal-full .modal-body { padding: 0; overflow: hidden; }
.modal-full .modal-head { padding: 16px 24px; }
.modal-full .modal-title { font-size: 18px; }
.modal-full .modal-body { padding: 20px 24px 40px; width: 100%; overflow-y: auto; flex: 1; min-height: 0; }
#panelDetailModal .pd-providers { display: grid; grid-template-columns: repeat(auto-fill, minmax(440px, 1fr)); gap: 10px; align-items: start; }
@media (max-width: 720px) { #panelDetailModal .pd-providers { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
    .modal-full .modal-head { padding: 14px 16px; }
    .modal-full .modal-body { padding: 16px 16px 32px; }
    .pd-row-head { flex-wrap: wrap; }
    .pd-msg-btns { margin-left: 0; width: 100%; }
}

/* ---------- tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; min-width: 640px; }

.table th {
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
    padding: 8px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
    white-space: nowrap;
}

.table td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background 0.12s var(--ease); }
.table tbody tr:hover { background: var(--surface-2); }

/* ---------- badges & pills ---------- */
.tag {
    font-size: 11.5px;
    font-weight: 500;
    border: 1px solid var(--border-strong);
    padding: 2px 8px;
    border-radius: var(--radius-xs);
    background: var(--surface);
}

.badge-group { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: 6px; vertical-align: middle; }

.count-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    color: #44444A;
    background: var(--surface-3);
    border: 1px solid var(--border);
    padding: 1px 8px;
    border-radius: 999px;
    vertical-align: middle;
    font-variant-numeric: tabular-nums;
}
.count-badge b { font-weight: 700; color: var(--text); }
.count-empty { color: var(--faint); font-style: italic; }

.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; }
.status-active { color: var(--ok); }
.status-active::before { background: var(--ok); }
.status-inactive { color: var(--muted); }
.status-inactive::before { background: var(--border-strong); }

.check {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-xs);
    border: 1px solid transparent;
}
.check-ok { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-border); }
.check-fail { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-border); }
.check-time { font-size: 11.5px; margin-left: 6px; white-space: nowrap; color: var(--muted); }

.label-hint { font-weight: 400; color: var(--muted); font-size: 11.5px; }

.form-divider {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    padding-top: 8px;
    margin-top: 4px;
    border-top: 1px solid var(--border);
}

.row-actions { display: inline-flex; gap: 4px; justify-content: flex-end; }

/* ---------- buttons ---------- */
.btn {
    font-family: var(--font);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 7px 13px;
    cursor: pointer;
    transition: background 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease), transform 0.06s var(--ease);
    line-height: 1;
    white-space: nowrap;
}
.btn:active { transform: translateY(0.5px); }

.btn-sm { padding: 5px 9px; font-size: 12px; }
.btn-block { width: 100%; }

.btn-primary { background: var(--text); color: #fff; }
.btn-primary:hover { background: #000; }

.btn-ghost { background: var(--surface); color: #44444A; border-color: var(--border-strong); }
.btn-ghost:hover { color: var(--text); border-color: var(--faint); background: var(--surface-2); }

.btn-accent { background: var(--accent-soft); color: #8A6512; border-color: transparent; }
.btn-accent:hover { background: #EFE4C8; color: var(--accent); }

.btn-danger { background: var(--danger); color: #fff; border-color: transparent; }
.btn-danger:hover { background: #A50713; }

.btn svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 5px; }
.btn-sm svg { width: 13px; height: 13px; margin-right: 4px; }

.btn.is-disabled { opacity: 0.5; pointer-events: none; }

/* ---------- subtabs ---------- */
.subtabs { display: flex; gap: 2px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.subtab {
    padding: 8px 13px;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.subtab:hover { color: var(--text); }
.subtab.is-active { color: var(--text); font-weight: 600; border-bottom-color: var(--accent-line); }

/* ---------- filters ---------- */
.filter-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 13px; }
.filter-bar label { color: var(--muted); font-weight: 500; }
.filter-bar select {
    font-family: var(--font);
    font-size: 13px;
    padding: 7px 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
}

.regex-cell {
    display: inline-block;
    max-width: 360px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
    font-size: 12px;
    background: var(--surface-3);
    padding: 2px 7px;
    border-radius: var(--radius-xs);
    color: #44444A;
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}

.modal-panel.modal-wide { max-width: 680px; }
.modal-panel.modal-xl { max-width: 1180px; width: 96vw; }

#defineModal .table-wrap { max-height: 60vh; overflow-y: auto; }
#defineModal .svc-name,
#defineModal .cell-clip { max-width: none; white-space: normal; word-break: break-word; }
#defineModal .table.compact { min-width: 860px; }

.regex-tester { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; background: var(--surface-2); }
.rt-head { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.rt-row { display: flex; gap: 8px; }
.rt-row input { flex: 1; }
.rt-result { margin-top: 10px; font-size: 13px; font-weight: 500; padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid transparent; }
.rt-result[hidden] { display: none; }
.rt-ok { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-border); }
.rt-fail { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-border); }

.svc-toolbar { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.svc-toolbar .field-provider { min-width: 220px; }
.svc-toolbar .field-provider select { width: 100%; }
.svc-workspace { margin-top: 16px; }

.bulk-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 11px 15px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px;
}
.bulk-assign { display: flex; align-items: center; gap: 8px; }
.bulk-select {
    font-family: var(--font);
    font-size: 13px;
    padding: 7px 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    min-width: 130px;
}
.bulk-select:disabled { background: var(--surface-3); color: var(--muted); }

.svc-filters { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.svc-search {
    flex: 1;
    min-width: 240px;
    font-family: var(--font);
    font-size: 13.5px;
    padding: 9px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
}
.svc-search:focus { outline: none; border-color: var(--accent-line); box-shadow: var(--ring); }
.svc-check-filter { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }

.inline-check { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); cursor: pointer; }

.perm-matrix { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.perm-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.perm-screen { font-weight: 600; color: var(--text); min-width: 168px; font-size: 13px; }
.perm-actions { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.perm-act input:disabled + span { opacity: .4; }

.tbar-spacer { flex: 1; }
.perpage-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.perpage-label .bulk-select { min-width: 72px; padding: 5px 8px; }
.table-toolbar { flex-wrap: wrap; gap: 10px; }

.svc-name { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-cat { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12.5px; }

.assign-platform, .assign-category {
    font-family: var(--font);
    font-size: 12.5px;
    padding: 5px 7px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    max-width: 140px;
}

.mini-badge {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 600;
    color: var(--ok);
    background: var(--ok-soft);
    border: 1px solid var(--ok-border);
    border-radius: var(--radius-xs);
    padding: 0 5px;
    margin-left: 4px;
    vertical-align: middle;
}

.feat-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    width: 15px;
    height: 15px;
    line-height: 15px;
    text-align: center;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
}
.feat-refill { color: var(--info); background: var(--info-soft); border: 1px solid var(--info-border); }
.feat-cancel { color: var(--warn); background: var(--warn-soft); border: 1px solid var(--warn-border); }
.warranty-tag { display: inline-block; margin-left: 5px; font-size: 10.5px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: 4px; padding: 1px 6px; vertical-align: middle; white-space: nowrap; }

/* Kompakt tablo: birleşik hücre alt-satırı */
.cell-sub { display: block; font-size: 11px; color: var(--faint); margin-top: 2px; line-height: 1.3; }
.cell-date { font-size: 12.5px; color: var(--text); white-space: nowrap; }
.wr-ok { color: var(--ok); font-weight: 600; }
.wr-exp { color: var(--danger); font-weight: 600; }
.cell-actions { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.link-badge {
    display: inline-block;
    max-width: 260px;
    white-space: normal;
    word-break: break-all;
    line-height: 1.35;
    vertical-align: middle;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--ok);
    background: var(--ok-soft);
    border: 1px solid var(--ok-border);
    border-radius: var(--radius-xs);
    padding: 2px 8px;
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}
.link-badge:hover { background: #DCF0E3; text-decoration: none; }
.cell-actions { max-width: 280px; }

.table-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 15px;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
}

.row-saved { background: var(--ok-soft); }
.row-saved:hover { background: #E0F1E6; }
.row-saved td:nth-child(2) { box-shadow: inset 3px 0 0 var(--ok); }

.filter-grid { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.filter-grid .field { min-width: 150px; }
.filter-grid .field-grow { flex: 1; min-width: 200px; }
.filter-grid select, .filter-grid input {
    font-family: var(--font);
    font-size: 13px;
    padding: 8px 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    width: 100%;
}
.filter-actions { display: flex; gap: 8px; }

.edit-svc-name { font-size: 13.5px; padding: 8px 10px; background: var(--surface-3); border-radius: var(--radius-sm); word-break: break-word; }
.field-method { max-width: 120px; }

/* ---------- search / orders ---------- */
.search-card { padding: 16px; overflow: visible; }
.search-form { display: flex; flex-direction: column; gap: 14px; }
.search-row { display: grid; grid-template-columns: 1fr 220px; gap: 14px; align-items: start; }
.field-ids { min-width: 0; }
.search-form textarea {
    font-family: var(--font);
    font-size: 13.5px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    width: 100%;
    resize: vertical;
    line-height: 1.5;
    transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.search-form textarea:focus, .field-provider select:focus {
    outline: none;
    border-color: var(--accent-line);
    box-shadow: var(--ring);
}
.field-hint { font-size: 12px; color: var(--muted); }
.search-actions { display: flex; gap: 8px; }

.summary {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    padding: 12px 15px;
    margin-top: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    color: var(--muted);
}
.summary[hidden], .notfound[hidden] { display: none; }
.sum-item b { font-family: var(--font-display); color: var(--text); font-weight: 600; font-size: 15px; margin-right: 3px; }

.alert-info { background: var(--info-soft); color: var(--info); border-color: var(--info-border); margin-top: 12px; margin-bottom: 0; }
.alert-info b { font-weight: 700; }

.notfound {
    margin-top: 12px;
    padding: 11px 15px;
    background: var(--warn-soft);
    border: 1px solid var(--warn-border);
    border-radius: var(--radius);
    font-size: 13px;
}
.nf-label { font-weight: 600; color: var(--warn); }

.results-card { margin-top: 16px; }
.results-card[hidden], .alert[hidden] { display: none; }

.table-toolbar, .skel-toolbar {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}
.sel-count { font-size: 12.5px; color: var(--muted); font-weight: 500; }

.table.compact th, .table.compact td { padding: 8px 11px; font-size: 12.5px; vertical-align: middle; }
.table.compact { min-width: 940px; }

.group-row td {
    background: var(--surface-3);
    padding: 7px 11px;
    border-bottom: 1px solid var(--border);
    border-top: 1px solid var(--border);
}
.group-row:first-child td { border-top: 0; }
.gh-provider { font-weight: 700; font-size: 12.5px; }
.gh-sep { color: var(--border-strong); margin: 0 8px; }
.gh-service { font-size: 12.5px; color: #44444A; }
.gh-sid { color: var(--muted); font-size: 12px; }
.gh-count { float: right; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.col-check { width: 34px; text-align: center; }
.col-check input { cursor: pointer; }
.cell-clip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ext-id { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; white-space: nowrap; }
.order-link { color: var(--text); font-weight: 600; text-decoration: none; border-bottom: 1px dashed var(--border-strong); }
.order-link:hover { color: var(--accent); border-bottom-color: var(--accent-line); }
.ticket-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.ticket-link:hover { text-decoration: underline; }
.warn-tag { background: var(--warn-soft); border-color: var(--warn-border); color: var(--warn); }

.def-badge {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--ok);
    background: var(--ok-soft);
    border: 1px solid var(--ok-border);
    padding: 1px 8px;
    border-radius: var(--radius-xs);
    white-space: nowrap;
}
.row-undef td { background: #FFFCF5; }
.dup-badge { display: inline-block; margin-left: 6px; font-size: 10.5px; font-weight: 600; color: var(--warn); background: var(--warn-soft); border: 1px solid var(--warn-border); border-radius: 4px; padding: 0 6px; vertical-align: middle; white-space: nowrap; }

/* ---- kompakt takip tablosu ---- */
.tracking-table { min-width: 1000px; }
.tracking-table td { vertical-align: top; }
.tag-xs { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 4px; vertical-align: middle; }
.info-tag { color: var(--info); background: var(--info-soft); border-color: var(--info-border); }
.order-cell .order-no { font-weight: 600; font-size: 13px; }
.cell-svc { max-width: 300px; }
.cell-svc .svc-name { display: block; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-link { max-width: 240px; }
.rapid-num { font-weight: 600; }
.tab-count { display: inline-block; min-width: 16px; padding: 0 5px; margin-left: 4px; font-size: 10.5px; font-weight: 700; border-radius: 999px; background: var(--surface-3); color: var(--muted); }

/* ---- aranabilir / çoklu seçici ---- */
.ss { position: relative; }
.label-hint { font-size: 10.5px; font-weight: 400; color: var(--faint); }
.filter-grid .field-sm { max-width: 110px; }
.ss-input { width: 100%; font-family: var(--font); font-size: 13px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
.ss-input:focus { outline: none; border-color: var(--accent-line); box-shadow: var(--ring); }
/* çoklu: chip'li kontrol */
.ss-multi .ss-control { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 38px; padding: 4px 6px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
.ss-multi .ss-control:focus-within { border-color: var(--accent-line); box-shadow: var(--ring); }
.ss-multi .ss-input { flex: 1; min-width: 90px; width: auto; border: 0; padding: 3px 4px; box-shadow: none; }
.ss-multi .ss-input:focus { box-shadow: none; }
.ss-chips { display: contents; }
.ss-chip { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--accent); background: var(--accent-soft); border-radius: var(--radius-xs); padding: 2px 4px 2px 7px; font-family: ui-monospace, 'SF Mono', Menlo, monospace; }
.ss-chip-x { border: 0; background: transparent; color: var(--accent); font-size: 14px; line-height: 1; cursor: pointer; padding: 0 2px; opacity: 0.7; }
.ss-chip-x:hover { opacity: 1; }
.ss-menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 20; min-width: 100%; max-width: 460px; width: max-content; max-height: 320px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); padding: 4px; }
.ss-opt { display: flex; align-items: center; gap: 6px; padding: 7px 9px; font-size: 12.5px; border-radius: var(--radius-xs); cursor: pointer; white-space: normal; word-break: break-word; line-height: 1.4; }
.ss-opt:hover { background: var(--surface-2); }
.ss-opt[hidden] { display: none; }
.ss-check { width: 15px; height: 15px; flex-shrink: 0; border: 1.5px solid var(--border-strong); border-radius: 4px; position: relative; }
.ss-opt.is-sel { background: var(--accent-soft); }
.ss-opt.is-sel .ss-check { background: var(--accent); border-color: var(--accent); }
.ss-opt.is-sel .ss-check::after { content: '✓'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 10px; font-weight: 700; }
.ss-id { display: inline-block; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 11px; font-weight: 600; color: var(--muted); background: var(--surface-3); padding: 0 5px; border-radius: 4px; margin-right: 2px; flex-shrink: 0; }
.subtab.is-active .tab-count { background: var(--accent-soft); color: var(--accent); }

/* ---- canlı log ilerleme modalı ---- */
.modal-center { align-items: center; }
.progress-panel { width: 100%; max-width: 460px; padding: 20px; }
.progress-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.progress-spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--surface-3); border-top-color: var(--accent); animation: acspin 0.7s linear infinite; flex-shrink: 0; }
.progress-spinner.is-done { border: none; animation: none; background: var(--ok); position: relative; }
.progress-spinner.is-done::after { content: '✓'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 700; }
@keyframes acspin { to { transform: rotate(360deg); } }
.progress-headtext { flex: 1; min-width: 0; }
.progress-title { font-family: var(--font-display); font-size: 15px; font-weight: 600; margin: 0; }
.progress-sub { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.progress-track { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-bottom: 12px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--gold-a), var(--gold-b)); border-radius: 999px; transition: width 0.25s var(--ease); }
.modal-panel.progress-panel-lg { max-width: 1100px; width: 92vw; max-height: 90vh; }
.progress-panel-lg .progress-log { max-height: 68vh; font-size: 13.5px; }
.progress-panel-lg .log-line { padding: 8px 12px; }
.progress-panel-lg .progress-title { font-size: 18px; }
.progress-panel-lg .plive { font-size: 13px; padding: 4px 12px; }
.progress-live-stats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.plive { font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 999px; background: var(--surface-3); color: var(--muted); }
.plive b { font-family: var(--font-display); font-weight: 700; margin-right: 3px; }
.plive-ok b { color: var(--ok); }
.plive-ready b { color: var(--info); }
.plive-warn b { color: var(--warn); }
.plive-fail b { color: var(--danger); }
.plive-quota { background: var(--danger-soft); color: var(--danger); }
.plive-quota b { color: var(--danger); }
.log-svc { font-size: 11px; color: var(--faint); }
.log-nums { font-size: 12px; color: var(--muted); }
.log-nums b { color: var(--text); }
.log-miss { color: var(--warn); font-weight: 600; }
.log-done { color: var(--ok); font-weight: 600; }
.log-linkrow { width: 100%; margin-top: 3px; font-size: 11px; color: var(--faint); }
.log-link { color: var(--ok); font-family: ui-monospace, 'SF Mono', Menlo, monospace; word-break: break-all; }
.log-link:hover { text-decoration: underline; }
.progress-log .log-line { flex-wrap: wrap; }
.log-line.log-quota { background: var(--danger-soft); font-weight: 600; }
.log-line.log-quota .log-msg { color: var(--danger); }
.progress-log { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.log-line { display: flex; align-items: baseline; gap: 8px; padding: 5px 8px; border-radius: 6px; animation: acfade 0.2s var(--ease); }
.log-line.ok { background: var(--ok-soft); }
.log-line.ready { background: var(--info-soft); }
.log-line.warn { background: var(--warn-soft); }
.log-line.fail { background: var(--danger-soft); }
.log-line.info { background: var(--surface-2); color: var(--muted); }
.log-line::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; align-self: center; }
.log-line.ok::before { background: var(--ok); }
.log-line.ready::before { background: var(--info); }
.log-line.warn::before { background: var(--warn); }
.log-line.fail::before { background: var(--danger); }
.log-line.info::before { background: var(--faint); }
.log-order { font-weight: 600; flex-shrink: 0; }
.log-msg { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes acfade { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.progress-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.progress-summary { display: flex; flex-wrap: wrap; gap: 6px; }
.sum-chip { font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.sum-ok { color: var(--ok); background: var(--ok-soft); }
.sum-warn { color: var(--warn); background: var(--warn-soft); }
.sum-fail { color: var(--danger); background: var(--danger-soft); }

.cell-panel .cell-sub { display: block; }
.manual-status { font-size: 11.5px; padding: 3px 6px; border: 1px solid var(--danger-border); border-radius: var(--radius-xs); background: var(--surface); color: var(--text); margin-top: 3px; }
.manual-status:focus { outline: none; border-color: var(--danger); box-shadow: 0 0 0 3px rgba(199,9,27,0.12); }
.row-actions { flex-wrap: wrap; gap: 4px; }
.order-cell .cell-sub { display: block; margin-top: 2px; }

/* ---- ince özet şeridi ---- */
.stat-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 10px 15px; margin-bottom: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; }
.strip-item { color: var(--muted); white-space: nowrap; }
.strip-item b { font-family: var(--font-display); font-weight: 700; font-size: 16px; color: var(--text); margin-right: 3px; }
.strip-total b { color: var(--accent); }
.strip-sep { width: 1px; height: 18px; background: var(--border); }
.strip-muted { margin-left: auto; font-size: 12px; color: var(--faint); }
@media (max-width: 620px) { .strip-muted { margin-left: 0; width: 100%; } }
.row-dup td { background: #FFFBF0; }
.row-dup:hover td { background: #FEF6E0; }
.row-dup td:first-child { box-shadow: inset 3px 0 0 var(--accent-line); }

.status-pill {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 999px;
    border: 1px solid transparent;
    text-transform: capitalize;
}
.sp-ok { color: var(--ok); background: var(--ok-soft); border-color: var(--ok-border); }
.sp-fail { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-border); }
.sp-warn { color: var(--warn); background: var(--warn-soft); border-color: var(--warn-border); }
.sp-muted { color: var(--muted); background: var(--surface-3); border-color: var(--border); }

.og-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    display: block;
    margin-bottom: 2px;
}
.og-value { font-size: 13.5px; word-break: break-word; }
.og-link { color: var(--ok); text-decoration: none; word-break: break-all; }
.og-link:hover { text-decoration: underline; }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.dg-cell { min-width: 0; }
.dg-link { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }

.tm-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.tm-messages { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; max-height: 320px; overflow-y: auto; }
.tm-msg { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--surface-2); }
.tm-msg-head { display: flex; justify-content: space-between; font-size: 11.5px; font-weight: 600; margin-bottom: 5px; }
.tm-msg-body { font-size: 13px; white-space: pre-wrap; word-break: break-word; }
.tm-empty { margin-top: 14px; }
.tm-loading { display: flex; flex-direction: column; gap: 8px; }

.skel { display: block; background: linear-gradient(90deg, #ECECEF 25%, #F5F5F7 37%, #ECECEF 63%); background-size: 400% 100%; border-radius: var(--radius-xs); animation: skel 1.3s ease infinite; }
.skel-line { height: 12px; }
.skel-box { width: 16px; height: 16px; border-radius: 4px; }
.skel-rows { padding: 4px 0; }
.skel-row { display: flex; align-items: center; gap: 16px; padding: 12px 15px; border-bottom: 1px solid var(--border); }
.skel-row:last-child { border-bottom: 0; }
@keyframes skel { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- auth ---------- */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
    background:
        radial-gradient(1200px 600px at 50% -10%, #FFFFFF 0%, var(--bg) 60%);
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 358px;
    padding: 30px 28px;
}

.auth-head { margin-bottom: 22px; text-align: center; }
.auth-logo { height: 44px; width: auto; display: block; margin: 0 auto; }
.auth-sub { color: var(--muted); margin: 12px 0 0; font-size: 13px; }
.error-logo { width: 56px; height: 56px; display: inline-block; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }

.auth-credit {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 11.5px;
}
.auth-credit a { color: var(--muted); }
.auth-credit a:hover { color: var(--text); }

/* ---------- fields ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field label { font-size: 12.5px; font-weight: 500; color: var(--muted); }

.field input, .field select, .field textarea {
    font-family: var(--font);
    font-size: 13.5px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 9px 11px;
    transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
    width: 100%;
}

.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--accent-line);
    box-shadow: var(--ring);
}

.field-error { font-size: 12px; color: var(--danger); min-height: 0; }

.alert {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 16px;
    border: 1px solid transparent;
}
.alert-error { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-border); }

/* ---------- modal ---------- */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 60px 16px;
    z-index: 50;
    animation: modal-fade 0.16s var(--ease);
}
.modal[hidden] { display: none; }
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }

.modal-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-pop);
    width: 100%;
    max-width: 440px;
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    animation: modal-rise 0.2s var(--ease);
}
@keyframes modal-rise { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 18px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.modal-title { font-family: var(--font-display); font-size: 15px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }

.modal-close {
    border: 0;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.15s var(--ease);
}
.modal-close:hover { color: var(--text); }

.modal-body { padding: 18px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; flex: 1; min-height: 0; }
.modal-body textarea { resize: vertical; max-height: 40vh; }
.modal-sub { color: var(--muted); margin: 0; font-size: 13px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }

.modal-confirm { max-width: 400px; }
.confirm-msg { font-size: 13.5px; color: #3A3A40; line-height: 1.5; }
.confirm-msg b { color: var(--text); font-weight: 700; }
.confirm-check { margin-top: 4px; padding: 9px 11px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; color: var(--text); cursor: pointer; }
.confirm-list {
    margin: 10px 0 2px;
    max-height: 200px;
    overflow-y: auto;
    font-family: ui-monospace, 'SF Mono', Menlo, monospace;
    font-size: 12.5px;
    color: #55555C;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 9px 11px;
    line-height: 1.7;
    word-break: break-word;
}

.error-code { font-family: var(--font-display); font-size: 44px; font-weight: 700; margin: 16px 0 4px; letter-spacing: -0.03em; }
.error-text { color: var(--muted); margin: 0 0 20px; }

/* ---------- toast ---------- */
.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: rgba(29, 29, 31, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--shadow-pop);
    z-index: 60;
    max-width: 320px;
    animation: toast-in 0.22s var(--ease);
}
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.toast[hidden] { display: none; }
.toast.is-error { background: rgba(199, 9, 27, 0.95); }

/* ---------- focus visibility ---------- */
:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 2px; }
.btn:focus-visible, .nav-item:focus-visible { outline-offset: 1px; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
    .content { padding: 18px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
    .shell { display: block; min-height: 100vh; }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 260px;
        max-width: 84vw;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform 0.24s var(--ease);
    }
    .shell.is-open .sidebar {
        transform: translateX(0);
        box-shadow: var(--shadow-pop);
    }

    .mobile-topbar { display: grid; grid-template-columns: 36px 1fr 36px; }
    .mobile-topbar .mobile-brand { justify-self: center; }
    .topbar { display: none; }

    .content { padding: 16px; max-width: none; }
    .page-head { flex-direction: column; align-items: flex-start; gap: 12px; }
    .page-head .btn { width: 100%; }
    .stat-grid { gap: 10px; }

    /* ---- takip tablosu → mobil kart ---- */
    .tracking-table { min-width: 0; }
    .tracking-table thead { display: none; }
    .tracking-table, .tracking-table tbody, .tracking-table tr, .tracking-table td { display: block; width: 100%; }
    .tracking-table tr {
        position: relative;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        box-shadow: var(--shadow-sm);
        padding: 12px 14px 12px 44px;
        margin-bottom: 10px;
    }
    .tracking-table tr:hover { background: var(--surface); }
    .tracking-table td { border: 0 !important; padding: 4px 0; text-align: left !important; }
    .tracking-table td.col-check { position: absolute; top: 12px; left: 14px; padding: 0; width: auto; }
    /* etiketli satırlar */
    .tracking-table td[data-label]::before {
        content: attr(data-label);
        display: block;
        font-size: 10.5px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        color: var(--faint);
        margin-bottom: 1px;
    }
    /* sipariş satırı büyük, etiketsiz */
    .tracking-table td.order-cell { padding-top: 0; }
    .tracking-table td.order-cell::before { display: none; }
    .tracking-table td.order-cell .order-no { font-size: 15px; }
    .tracking-table .cell-svc, .tracking-table .cell-svc .svc-name { max-width: none; white-space: normal; }
    .tracking-table .cell-clip { max-width: none; white-space: normal; }
    .tracking-table .link-badge { max-width: 100%; }
    .tracking-table td[data-actions], .tracking-table td:last-child { padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--border) !important; }
    .tracking-table .row-actions { justify-content: flex-start; }
    .tracking-table .row-actions .btn { flex: 1; min-width: 0; }
    .stat-strip { font-size: 12px; gap: 8px; }
    .strip-muted { margin-left: 0; width: 100%; }
    .filter-grid .field { min-width: 100%; }
    .subtabs { overflow-x: auto; }
}

@media (max-width: 720px) {
    .search-row { grid-template-columns: 1fr; }
    .detail-grid, .tm-meta { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
    .content { padding: 12px; }
    .stat-grid { grid-template-columns: 1fr; }
    .field-row { grid-template-columns: 1fr; }
    .auth-card { padding: 24px 20px; }
    .modal { padding: 20px 12px; align-items: flex-end; }
    .modal-panel { max-width: none; border-radius: 14px 14px 0 0; }
}

@media (min-width: 861px) {
    .scrim { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* Hatalı Linkler sekmesi + toolbar */
.subtab-err.is-active{color:#b42318;border-color:#b42318}
.tab-count-err{background:#fee4e2;color:#b42318}
.err-actions{display:inline-flex;align-items:center;gap:8px}
.err-actions .input-sm{padding:5px 8px;border:1px solid var(--border,#e4e4e7);border-radius:8px;font-size:13px;background:#fff}

/* Kontrol modalı: tekrar dene + tam tıklanabilir link */
.log-retry{margin-left:6px;padding:1px 8px;font-size:11px;border:1px solid #f0a; border-color:var(--accent,#5A4FFF);color:var(--accent,#5A4FFF);background:#fff;border-radius:6px;cursor:pointer}
.log-retry:hover{background:var(--accent,#5A4FFF);color:#fff}
.log-linkbtn{display:inline-block;margin-top:3px;padding:2px 8px;font-size:12px;background:#eef;border:1px solid #ccd;border-radius:6px;color:#334;text-decoration:none;word-break:break-all}
.log-linkbtn:hover{background:#dde}

/* Tekrar dene: satır içi loading */
.log-line.log-loading{opacity:.55;position:relative}
.log-line.log-loading::after{content:'⟳';display:inline-block;margin-left:6px;animation:logspin .8s linear infinite}
@keyframes logspin{to{transform:rotate(360deg)}}

/* Onay modalı: ticket tipi seçici */
.confirm-select{display:flex;align-items:center;gap:8px;margin:10px 0 2px;font-size:13px}
.confirm-select select{padding:5px 8px;border:1px solid var(--border,#e4e4e7);border-radius:8px;font-size:13px;background:#fff}
