:root {
    color-scheme: light;
    --bg: #f3f6f5;
    --surface: #ffffff;
    --surface-soft: #f8faf9;
    --surface-tint: #eef6f4;
    --text: #17231d;
    --muted: #66746c;
    --muted-2: #87938c;
    --primary: #056064;
    --primary-dark: #03494c;
    --primary-soft: #e3f2f0;
    --sidebar-start: #064f52;
    --sidebar-end: #033d40;
    --success: #16794d;
    --success-soft: #e8f6ee;
    --danger: #b42318;
    --danger-soft: #fdefed;
    --warning: #916000;
    --warning-soft: #fff4d7;
    --border: #dce5e0;
    --border-strong: #c9d6cf;
    --shadow-sm: 0 2px 8px rgba(23, 48, 36, .04);
    --shadow: 0 12px 34px rgba(23, 48, 36, .075);
    --radius-sm: 10px;
    --radius: 15px;
    --radius-lg: 20px;
    --sidebar-width: 270px;
    --control-height: 42px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: none; }
a:focus-visible { outline: 3px solid rgba(5, 96, 100, .18); outline-offset: 2px; border-radius: 5px; }
svg { display: block; }

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    z-index: 40;
    width: var(--sidebar-width);
    height: 100vh;
    min-height: 0;
    padding: 18px 14px 14px;
    display: flex;
    flex-direction: column;
    color: #fff;
    background:
        radial-gradient(circle at 15% 0%, rgba(94, 210, 198, .14), transparent 34%),
        linear-gradient(180deg, var(--sidebar-start), var(--sidebar-end));
    box-shadow: 10px 0 34px rgba(2, 49, 51, .08);
    overflow: hidden;
}

.sidebar-head { display: flex; align-items: center; gap: 8px; }
.brand {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 5px 7px 17px;
    color: #fff;
    text-decoration: none;
}
.brand:hover { color: #fff; }
.brand-logo {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 14px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}
.brand-copy { min-width: 0; }
.brand-copy strong,
.brand-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-copy strong { font-size: 15px; letter-spacing: .01em; }
.brand-copy small { margin-top: 2px; color: rgba(232, 249, 246, .67); font-size: 12px; }
.sidebar-close {
    display: none;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    background: rgba(255, 255, 255, .1);
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.sidebar-nav {
    min-height: 0;
    flex: 1;
    padding: 2px 3px 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .22) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .22); border-radius: 999px; }
.nav-group + .nav-group { margin-top: 14px; }
.nav-label {
    display: block;
    padding: 0 12px 6px;
    color: rgba(220, 244, 240, .52);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 42px;
    margin: 2px 0;
    padding: 9px 11px;
    border-radius: 11px;
    color: rgba(239, 251, 249, .84);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 580;
    transition: background .16s ease, color .16s ease, transform .16s ease;
}
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, .09); transform: translateX(1px); }
.nav-link.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(255, 255, 255, .17), rgba(255, 255, 255, .1));
    box-shadow: inset 3px 0 0 #91ddd3;
}
.nav-icon { width: 19px; height: 19px; flex: 0 0 19px; opacity: .9; }
.nav-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-link:first-child .nav-icon svg path:first-child { fill: currentColor; stroke: none; }

.sidebar-footer {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 36px;
    align-items: center;
    gap: 9px;
    padding: 13px 7px 3px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}
.admin-avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-weight: 800;
}
.admin-meta { min-width: 0; }
.admin-meta strong,
.admin-meta span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-meta strong { font-size: 12.5px; }
.admin-meta span { color: rgba(231, 247, 244, .6); font-size: 11px; }
.logout-form { margin: 0; }
.logout-button {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    color: rgba(255, 255, 255, .78);
    background: transparent;
    cursor: pointer;
}
.logout-button:hover { color: #fff; background: rgba(255, 255, 255, .11); }
.logout-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.main { min-width: 0; min-height: 100vh; padding: 0 28px 20px; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 25;
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 -28px 22px;
    padding: 16px 28px;
    background: rgba(243, 246, 245, .91);
    border-bottom: 1px solid rgba(220, 229, 224, .78);
    backdrop-filter: blur(14px);
}
.topbar-title { min-width: 0; display: flex; align-items: center; gap: 12px; }
.topbar h1 { margin: 0; font-size: clamp(23px, 2vw, 29px); line-height: 1.15; letter-spacing: -.025em; }
.topbar p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.topbar-user {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(255, 255, 255, .82);
    color: var(--muted);
    font-size: 12px;
    box-shadow: var(--shadow-sm);
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #24a46d; box-shadow: 0 0 0 3px #daf3e7; }
.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}
.menu-button span { display: block; width: 18px; height: 2px; margin: 4px auto; border-radius: 99px; background: var(--text); }

.page-content { width: min(100%, 1580px); margin: 0 auto; }
.admin-footer {
    width: min(100%, 1580px);
    margin: 28px auto 0;
    padding: 17px 3px 0;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    border-top: 1px solid var(--border);
    color: var(--muted-2);
    font-size: 11px;
}

.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.card {
    min-width: 0;
    padding: 19px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.card:hover { border-color: #d4dfd9; }
.card h2 { margin: 0 0 13px; font-size: 18px; letter-spacing: -.01em; }
.card h3 { margin: 19px 0 8px; font-size: 15px; }
.card p:first-child { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.stat { position: relative; overflow: hidden; }
.stat::after {
    content: "";
    position: absolute;
    right: -24px;
    top: -26px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(5, 96, 100, .08), rgba(5, 96, 100, 0));
    pointer-events: none;
}
.stat span { color: var(--muted); font-size: 12.5px; }
.stat strong { display: block; margin-top: 7px; font-size: 27px; line-height: 1.15; letter-spacing: -.035em; }
.stat small { display: block; margin-top: 6px; }
.section { margin-top: 22px; }
.section-head {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 11px;
}
.section-head > div { min-width: 0; }
.section-head h2 { margin: 0; font-size: 18px; line-height: 1.3; letter-spacing: -.015em; }
.section-head p { margin: 3px 0 0; }

.btn {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: #fff;
    background: var(--primary);
    text-decoration: none;
    font-weight: 700;
    line-height: 1.15;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}
.btn:hover { color: #fff; background: var(--primary-dark); box-shadow: 0 7px 16px rgba(5, 96, 100, .15); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.secondary { color: #274238; background: #edf2ef; border-color: #e0e8e3; }
.btn.secondary:hover { color: #173229; background: #e3ece7; box-shadow: none; }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: #941d14; box-shadow: 0 7px 16px rgba(180, 35, 24, .14); }
.btn.small { min-height: 33px; padding: 7px 10px; border-radius: 9px; font-size: 12px; }

.filters {
    display: grid;
    grid-template-columns: minmax(210px, 1.5fr) repeat(3, minmax(145px, .75fr)) auto auto;
    gap: 9px;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, .7);
    box-shadow: var(--shadow-sm);
}
.filters input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.filters select,
.field input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.field select,
.field textarea,
.admin-note,
.table input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.table select {
    width: 100%;
    min-width: 0;
    min-height: var(--control-height);
    padding: 9px 11px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    outline: none;
    color: var(--text);
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.filters input:not([type="checkbox"]):not([type="radio"]):focus,
.filters select:focus,
.field input:not([type="checkbox"]):not([type="radio"]):focus,
.field select:focus,
.field textarea:focus,
.admin-note:focus,
.table input:not([type="checkbox"]):not([type="radio"]):focus,
.table select:focus {
    border-color: #4ca8a6;
    box-shadow: 0 0 0 3px rgba(5, 96, 100, .11);
}
input::placeholder, textarea::placeholder { color: #98a49e; }

/* Seçim kutuları normal metin alanı kurallarından ayrıdır. */
input[type="checkbox"],
input[type="radio"] {
    width: 19px !important;
    height: 19px !important;
    min-width: 19px !important;
    min-height: 19px !important;
    max-width: 19px;
    padding: 0 !important;
    margin: 0;
    border-radius: 5px;
    accent-color: var(--primary);
    box-shadow: none !important;
    cursor: pointer;
    flex: 0 0 19px;
}
input[type="radio"] { border-radius: 50%; }
.checkbox-line {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-height: 44px;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #fbfcfb;
    cursor: pointer;
}
.checkbox-line input { margin-top: 1px; }
.checkbox-line span { min-width: 0; display: grid; gap: 2px; }
.checkbox-line strong { font-size: 13px; color: #294038; }
.checkbox-line small { color: var(--muted); font-weight: 500; line-height: 1.35; }
.checkbox-line:hover { border-color: #c7d8cf; background: #f7faf8; }

.table-wrap {
    position: relative;
    max-width: 100%;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    scrollbar-width: thin;
    scrollbar-color: #c2d0c8 transparent;
}
.table-wrap::-webkit-scrollbar { height: 9px; width: 9px; }
.table-wrap::-webkit-scrollbar-thumb { border: 2px solid #fff; border-radius: 99px; background: #c2d0c8; }
.table-wrap.has-overflow::after {
    content: "Yatay kaydırabilirsiniz →";
    position: sticky;
    left: 100%;
    bottom: 5px;
    display: block;
    width: max-content;
    margin: -25px 7px 5px auto;
    padding: 3px 8px;
    border-radius: 999px;
    color: #5d6d64;
    background: rgba(241, 246, 243, .93);
    font-size: 10px;
    pointer-events: none;
}
.table { width: 100%; min-width: 820px; border-collapse: separate; border-spacing: 0; }
.table th,
.table td { padding: 12px 13px; text-align: left; vertical-align: top; border-bottom: 1px solid #ebf0ed; }
.table th {
    position: sticky;
    top: 0;
    z-index: 2;
    color: #5d6b63;
    background: #f8faf9;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .015em;
    white-space: nowrap;
}
.table td { line-height: 1.42; overflow-wrap: anywhere; }
.table tbody tr { transition: background .12s ease; }
.table tbody tr:hover { background: #fbfdfc; }
.table tr:last-child td { border-bottom: 0; }
.table strong { font-weight: 750; }
.table .btn { vertical-align: top; }
.page-devices .table { min-width: 1220px; }
.page-devices .table th:nth-child(1) { min-width: 175px; }
.page-devices .table th:nth-child(2) { min-width: 220px; }
.page-devices .table th:nth-child(3) { min-width: 190px; }
.page-accounts .account-table { min-width: 1180px; }
.page-deletions .table { min-width: 1080px; }
.page-errors .table { min-width: 1050px; }
.page-smart-notifications .table { min-width: 980px; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 23px;
    padding: 3px 8px;
    border-radius: 999px;
    color: var(--primary);
    background: var(--primary-soft);
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}
.badge.error,
.badge.suspended { color: var(--danger); background: var(--danger-soft); }
.badge.warning { color: var(--warning); background: var(--warning-soft); }
.alert {
    margin-bottom: 17px;
    padding: 13px 15px;
    border: 1px solid #cce9d9;
    border-radius: 12px;
    color: #155c3d;
    background: var(--success-soft);
}
.alert.error { color: #8f2119; background: var(--danger-soft); border-color: #f2d1ce; }
.alert.warning { color: #765000; background: var(--warning-soft); border-color: #f2dfaa; }

.form-card { width: 100%; max-width: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { min-width: 0; display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label,
.field > span { font-size: 12.5px; font-weight: 750; color: #34483e; }
.field textarea { min-height: 112px; resize: vertical; line-height: 1.5; }
.field code,
.card code { padding: 2px 6px; border-radius: 6px; color: #315147; background: #edf3ef; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 17px; }
.actions:empty { display: none; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 16px; align-items: start; }
.detail-grid.equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.metrics-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.page-ads .page-content, .page-versions .page-content, .page-app-settings .page-content, .page-errors .page-content { max-width: 1320px; }
.page-ads .ad-form-stack { display: grid; gap: 16px; margin-top: 18px; }
.page-ads .ad-form-stack .section { margin-top: 0; }
.page-versions .version-help { position: sticky; top: 108px; }
.page-errors .error-detail { margin-top: 18px; }
.table-link { color: #075f63; font-weight: 700; text-decoration: none; }
.table-link:hover { color: #03494c; text-decoration: none; }
.kv { display: grid; grid-template-columns: minmax(120px, 155px) minmax(0, 1fr); gap: 9px 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { min-width: 0; margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.toggle-field {
    min-height: 72px;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fbfcfb;
    cursor: pointer;
    transition: border-color .14s ease, background .14s ease;
}
.toggle-field:hover { border-color: #c7d8cf; background: #f7faf8; }
.toggle-field input { width: 19px; height: 19px; flex: 0 0 19px; margin: 2px 0 0; accent-color: var(--primary); }
.toggle-field span { min-width: 0; display: grid; gap: 3px; }
.toggle-field strong { font-size: 13px; }
.toggle-field small { color: var(--muted); line-height: 1.35; }

.pagination { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; margin-top: 13px; }
.pagination a,
.pagination span {
    min-width: 36px;
    min-height: 36px;
    display: inline-grid;
    place-items: center;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 9px;
    color: #3c5147;
    background: #fff;
    text-decoration: none;
}
.pagination a:hover { border-color: #bfcfc6; background: #f8faf9; }
.pagination .current { color: #fff; background: var(--primary); border-color: var(--primary); }
.empty { padding: 32px !important; text-align: center !important; color: var(--muted); }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 11px; overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.danger-text { color: var(--danger); }
.token-wrap { overflow-wrap: anywhere; word-break: break-word; }

.log-box {
    max-height: 480px;
    overflow: auto;
    padding: 16px;
    border-radius: 12px;
    color: #dce9df;
    background: #111915;
    white-space: pre-wrap;
    word-break: break-word;
    font: 12px/1.58 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.admin-note { min-height: 108px; resize: vertical; }
.meter { height: 9px; margin-top: 13px; overflow: hidden; border-radius: 999px; background: #e6eeea; }
.meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #087378, #34a99f); }
.section-note { margin-top: 10px; }

/* Giriş ekranı */
.login-page,
.install-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 12% 12%, rgba(40, 168, 158, .13), transparent 34%),
        linear-gradient(140deg, #e9f5f3, #f8faf9);
}
.login-box,
.install-box {
    width: min(100%, 500px);
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: 0 22px 60px rgba(4, 67, 68, .13);
}
.install-box { width: min(100%, 780px); }
.login-box h1,
.install-box h1 { margin: 0 0 7px; letter-spacing: -.025em; }
.login-box p,
.install-box p { margin: 0 0 22px; color: var(--muted); }
.auth-logo { width: 76px; height: 76px; display: block; margin: 0 0 17px; border-radius: 22px; object-fit: cover; box-shadow: 0 12px 28px rgba(0, 73, 76, .18); }

/* Cihaz ve hesap ayrıntıları */
.device-detail-top { align-items: flex-start; }
.device-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 18px 0 12px; }
.card .kv + .actions { flex-wrap: wrap; }
.table td .badge + .badge { margin-left: 4px; }
.account-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 18px;
    padding: 23px;
    border-radius: 18px;
    color: #fff;
    background: radial-gradient(circle at 90% 10%, rgba(122, 224, 212, .22), transparent 34%), linear-gradient(135deg, #064f52, #087277);
    box-shadow: 0 15px 36px rgba(0, 73, 76, .16);
}
.account-hero h2 { margin: 9px 0 5px; color: #fff; font-size: 26px; }
.account-hero p { margin: 0 0 5px; color: #e0f1ef; }
.account-hero small { color: #bee1de; }
.account-hero .badge { color: var(--primary); background: #fff; }
.account-hero-search { min-width: min(100%, 510px); justify-content: flex-end; margin: 0; }
.account-hero-search input { min-width: 240px; }
.account-hero .btn { color: var(--primary-dark); background: #fff; }
.account-hero .btn.secondary { color: #fff; background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .15); }
.account-metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 18px; }
.account-metrics .card,
.account-summary-grid .card { padding: 16px; }
.account-metrics .stat strong { font-size: 23px; }
.account-table .badge + .badge { margin: 4px 0 0 4px; }
.account-detail-hero { align-items: center; }
.account-detail-layout { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 18px; align-items: start; }
.account-detail-layout > aside { position: sticky; top: 102px; display: grid; gap: 16px; }
.account-detail-layout > section { min-width: 0; }
.account-health h2,
.account-detail-layout .card h2 { margin: 0 0 12px; font-size: 17px; }
.health-row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid #edf0ee; }
.health-row:last-child { border-bottom: 0; }
.account-summary-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 14px; }
.payment-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 15px; }
.payment-summary > div { padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: #fbfcfb; }
.payment-summary span { display: block; color: var(--muted); font-size: 12px; }
.payment-summary strong { display: block; margin-top: 5px; font-size: 18px; }
.account-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.account-tab { padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; color: #405148; background: #fff; text-decoration: none; font-weight: 700; }
.account-tab:hover,
.account-tab.active { color: #fff; border-color: var(--primary); background: var(--primary); }
.account-detail-layout .section { margin-top: 0; }
.account-detail-layout .table { min-width: 900px; }

.sidebar-backdrop { position: fixed; inset: 0; z-index: 35; background: rgba(10, 26, 20, .44); backdrop-filter: blur(2px); }
.sidebar-backdrop[hidden] { display: none; }
.link-button { border: 0; padding: 0; color: var(--primary); background: none; text-decoration: none; font-weight: 700; cursor: pointer; }

@media (max-width: 1320px) {
    :root { --sidebar-width: 248px; }
    .main { padding-inline: 22px; }
    .topbar { margin-inline: -22px; padding-inline: 22px; }
    .account-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .account-detail-layout { grid-template-columns: 1fr; }
    .account-detail-layout > aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .account-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1120px) {
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filters { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
    .filters input:first-child { grid-column: span 2; }
    .device-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
    .app-shell { display: block; }
    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(86vw, 292px);
        height: 100dvh;
        transform: translateX(-104%);
        transition: transform .22s ease;
        box-shadow: 18px 0 42px rgba(2, 49, 51, .24);
    }
    .sidebar-open { overflow: hidden; }
    .sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-close,
    .menu-button { display: block; }
    .main { padding-inline: 18px; }
    .topbar { min-height: 78px; margin-inline: -18px; padding-inline: 18px; }
    .topbar-user { display: none; }
}

@media (max-width: 760px) {
    .main { padding-inline: 13px; }
    .topbar { margin-inline: -13px; margin-bottom: 16px; padding: 13px; }
    .topbar h1 { font-size: 22px; }
    .topbar p { display: none; }
    .page-content { width: 100%; }
    .grid,
    .detail-grid,
    .form-grid,
    .account-detail-layout > aside,
    .account-summary-grid,
    .payment-summary,
    .device-stat-grid { grid-template-columns: 1fr; }
    .field.full { grid-column: auto; }
    .filters { grid-template-columns: 1fr; padding: 10px; }
    .filters input:first-child { grid-column: auto; }
    .filters .btn { width: 100%; }
    .section-head { align-items: flex-start; }
    .section-head > .actions,
    .section-head > form { margin-top: 0; }
    .card { padding: 16px; }
    .table { min-width: 720px; }
    .actions { align-items: stretch; }
    .actions .btn { flex: 1 1 auto; }
    .kv { grid-template-columns: 1fr; gap: 2px; }
    .kv dd { margin-bottom: 8px; }
    .account-hero { display: block; padding: 19px; }
    .account-hero-search { display: grid; justify-content: stretch; margin-top: 15px; }
    .account-hero-search input { min-width: 0; }
    .account-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .account-tab { text-align: center; }
    .admin-footer { display: block; text-align: center; }
    .admin-footer span { display: block; }
}

@media (max-width: 470px) {
    .grid { grid-template-columns: 1fr; }
    .topbar-title { gap: 9px; }
    .menu-button { width: 39px; height: 39px; }
    .section-head { display: block; }
    .section-head > :last-child:not(:first-child) { margin-top: 8px; }
    .section-head .btn { width: 100%; }
    .account-tabs { grid-template-columns: 1fr; }
}


@media (max-width: 980px) {
    .page-versions .version-help { position: static; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Sayfa içi küçük yardımcı sınıflar */
.stats-spaced { margin-bottom: 18px; }
.actions-compact { margin: 0; }
.field-spaced,
.form-spaced { margin-top: 14px; }
.narrow-card { max-width: 760px; }
.summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 10px 0;
    border-bottom: 1px solid #edf0ee;
}
.summary-row:last-of-type { border-bottom: 0; }
.table-action-stack { min-width: 220px; display: grid; gap: 7px; }
.table-action-inline { display: inline-flex; flex-wrap: wrap; gap: 6px; vertical-align: middle; }
.table-action-stack input { min-height: 36px; }

@media (max-width: 760px) {
    .actions-compact { margin-top: 8px; }
    .table-action-stack { min-width: 190px; }
}
