/* ==========================================================================
   HackLink Panel v2 — arayüz teması (v2.16 "Aurora")
   Harici CSS/CDN bağımlılığı yoktur. Açık tema varsayılan, karanlık tema
   <html data-theme="dark"> ile devreye girer (tercih localStorage'da tutulur).
   ========================================================================== */

:root {
    /* Yüzeyler */
    --bg: #f2f5fa;
    --surface: #ffffff;
    --surface-2: #f7f9fc;
    --surface-3: #edf1f8;
    --border: #e3e9f2;
    --border-strong: #cbd6e6;

    /* Metin */
    --text: #0b1526;
    --text-2: #33415c;
    --muted: #66758c;

    /* Marka */
    --primary: #2f5df6;
    --primary-dark: #2350e0;
    --primary-ink: #1a3fc0;
    --primary-soft: #eef3ff;
    --primary-border: #cfdcff;
    --accent: #7a5cff;
    --primary-grad: linear-gradient(135deg, #4b74ff 0%, #2f5df6 55%, #5b48f0 100%);

    /* Durumlar */
    --success: #067647;
    --success-soft: #ecfdf3;
    --success-border: #abefc6;
    --warning: #b54708;
    --warning-soft: #fffaeb;
    --warning-border: #fedf89;
    --danger: #b42318;
    --danger-soft: #fef3f2;
    --danger-border: #fecdca;
    --info: #175cd3;
    --info-soft: #eff8ff;
    --info-border: #b2ddff;

    /* Kenar çubuğu */
    --sidebar: #0a1222;
    --sidebar-2: #070f1d;
    --sidebar-hover: rgba(255, 255, 255, .055);
    --sidebar-active: rgba(255, 255, 255, .09);
    --sidebar-text: #93a3ba;
    --sidebar-title: #55647d;

    /* Kod */
    --code-bg: #f8fafc;
    --code-text: #1e293b;
    --code-border: #e2e8f0;
    --code-dark-bg: #0b1424;
    --code-dark-text: #e2e8f0;

    /* Ölçü */
    --radius: 14px;
    --radius-sm: 9px;
    --shadow-xs: 0 1px 2px rgba(11, 21, 38, .05);
    --shadow-sm: 0 1px 2px rgba(11, 21, 38, .04), 0 10px 24px -18px rgba(11, 21, 38, .28);
    --shadow: 0 2px 4px rgba(11, 21, 38, .04), 0 18px 40px -24px rgba(11, 21, 38, .35);
    --shadow-lg: 0 30px 70px -32px rgba(7, 15, 29, .55);
    --ring: 0 0 0 3px rgba(47, 93, 246, .18);
    --topbar-bg: rgba(255, 255, 255, .78);
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

html[data-theme="dark"] {
    --bg: #070d18;
    --surface: #0d1727;
    --surface-2: #111d31;
    --surface-3: #16243b;
    --border: #1d2b43;
    --border-strong: #2c3d5a;

    --text: #e9eef8;
    --text-2: #c2cee1;
    --muted: #8a9bb4;

    --primary: #5b86ff;
    --primary-dark: #7ba1ff;
    --primary-ink: #bccdff;
    --primary-soft: rgba(91, 134, 255, .14);
    --primary-border: rgba(91, 134, 255, .34);
    --accent: #9b7bff;
    --primary-grad: linear-gradient(135deg, #6a92ff 0%, #4d7bff 55%, #8a6bff 100%);

    --success: #4ade80;
    --success-soft: rgba(34, 197, 94, .13);
    --success-border: rgba(74, 222, 128, .3);
    --warning: #fbbf24;
    --warning-soft: rgba(245, 158, 11, .14);
    --warning-border: rgba(251, 191, 36, .3);
    --danger: #f87171;
    --danger-soft: rgba(239, 68, 68, .13);
    --danger-border: rgba(248, 113, 113, .3);
    --info: #7cb2ff;
    --info-soft: rgba(59, 130, 246, .14);
    --info-border: rgba(124, 178, 255, .28);

    --sidebar: #060c17;
    --sidebar-2: #04080f;
    --sidebar-hover: rgba(255, 255, 255, .05);
    --sidebar-active: rgba(91, 134, 255, .18);
    --sidebar-text: #94a5bd;
    --sidebar-title: #4e5f78;

    --code-bg: #0b1524;
    --code-text: #d7e3f4;
    --code-border: #1f2d44;
    --code-dark-bg: #060d18;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 28px -20px rgba(0, 0, 0, .8);
    --shadow: 0 2px 6px rgba(0, 0, 0, .35), 0 24px 50px -28px rgba(0, 0, 0, .85);
    --shadow-lg: 0 34px 80px -34px rgba(0, 0, 0, .9);
    --ring: 0 0 0 3px rgba(91, 134, 255, .28);
    --topbar-bg: rgba(11, 21, 36, .76);
}

/* ------------------------------------------------------------------ temel */

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
    margin: 0;
    background-color: var(--bg);
    background-image:
        radial-gradient(80% 40% at 0% 0%, rgba(47, 93, 246, .05), transparent 60%),
        radial-gradient(60% 40% at 100% 0%, rgba(122, 92, 255, .045), transparent 60%);
    background-repeat: no-repeat;
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
html[data-theme="dark"] body {
    background-image:
        radial-gradient(80% 40% at 0% 0%, rgba(91, 134, 255, .08), transparent 60%),
        radial-gradient(60% 40% at 100% 0%, rgba(155, 123, 255, .06), transparent 60%);
}

a { color: var(--primary); text-decoration: none; transition: color .14s ease; }
a:hover { color: var(--primary-dark); }

h1, h2, h3, h4 {
    margin: 0;
    font-weight: 650;
    letter-spacing: -.018em;
    color: var(--text);
}

p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }

hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }

.icon { vertical-align: -3px; flex: none; }

::selection { background: rgba(47, 93, 246, .18); color: var(--text); }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--muted); background-clip: content-box; border: 3px solid transparent; }

/* ---------------------------------------------------------------- yerleşim */

.app { min-height: 100vh; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 260px;
    background-color: var(--sidebar);
    background-image:
        radial-gradient(120% 55% at 0% 0%, rgba(59, 107, 255, .22), transparent 58%),
        radial-gradient(90% 45% at 100% 0%, rgba(122, 92, 255, .16), transparent 62%),
        linear-gradient(180deg, var(--sidebar) 0%, #0a1526 52%, var(--sidebar-2) 100%);
    border-right: 1px solid rgba(255, 255, 255, .05);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    padding: 16px 14px 16px;
    z-index: 60;
    overflow-y: auto;
}
.sidebar::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(120, 150, 255, .45), transparent);
    pointer-events: none;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    color: #fff;
    font-weight: 650;
    font-size: 15px;
    letter-spacing: -.015em;
    padding: 6px 8px 18px;
    margin-bottom: 4px;
}
.sidebar-brand:hover { color: #fff; }
.sidebar-brand > span:last-child { min-width: 0; }
.sidebar-brand .logo {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: 11px;
    background: var(--primary-grad);
    color: #fff;
    flex: none;
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: 0 8px 20px -6px rgba(47, 93, 246, .65), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.sidebar-brand small {
    display: block;
    font-size: 9.5px;
    font-weight: 600;
    color: rgba(150, 166, 190, .72);
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-top: 3px;
}

.nav-group { margin-top: 6px; padding-top: 6px; }
.nav-title {
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--sidebar-title);
    padding: 12px 11px 7px;
    font-weight: 700;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 40px;
    padding: 9px 11px;
    border-radius: 10px;
    color: var(--sidebar-text);
    font-weight: 500;
    font-size: 13.5px;
    margin-bottom: 2px;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
    border: 1px solid transparent;
}
.nav-item .icon { opacity: .82; transition: opacity .15s ease, transform .15s ease; }
.nav-item:hover { background: var(--sidebar-hover); color: #eef3fb; }
.nav-item:hover .icon { opacity: 1; }
.nav-item.active {
    background: linear-gradient(90deg, rgba(59, 107, 255, .26) 0%, rgba(59, 107, 255, .08) 100%);
    color: #fff;
    border-color: rgba(110, 145, 255, .22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 8px 20px -16px rgba(0, 0, 0, .9);
    font-weight: 600;
}
.nav-item.active .icon { opacity: 1; }
.nav-item.active::before {
    content: "";
    position: absolute;
    left: -14px;
    top: 9px; bottom: 9px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, #7ba1ff, #4b74ff);
    box-shadow: 0 0 14px rgba(91, 134, 255, .85);
}
.nav-item .count {
    margin-left: auto;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .08);
    color: #e6edf9;
    font-size: 11px;
    font-weight: 650;
    padding: 0 7px;
    border-radius: 999px;
    min-width: 20px;
    line-height: 18px;
    text-align: center;
}
.nav-item.active .count { background: rgba(255, 255, 255, .16); }

.sidebar-foot {
    margin-top: auto;
    padding: 12px 12px 4px;
    margin-inline: 2px;
    font-size: 11.5px;
    color: var(--sidebar-title);
    line-height: 1.9;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 12px;
}
.sidebar-foot a { color: var(--sidebar-text); transition: color .14s ease; }
.sidebar-foot a:hover { color: #fff; }

.main {
    margin-left: 260px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky; top: 0; z-index: 40;
    display: flex; align-items: center; gap: 14px;
    background: var(--topbar-bg);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    backdrop-filter: blur(16px) saturate(150%);
    border-bottom: 1px solid var(--border);
    padding: 0 26px;
    min-height: 66px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset;
}
html[data-theme="dark"] .topbar { box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset; }
.topbar > div:first-of-type { min-width: 0; flex: 1 1 auto; }
.topbar h1 {
    font-size: 16px; font-weight: 650; letter-spacing: -.02em;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar .crumb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .crumb {
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 2px;
    display: flex; align-items: center; gap: 6px;
}
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 9px; }

/* Tema ve ikon düğmeleri */
.icon-btn {
    width: 36px; height: 36px;
    display: inline-grid; place-items: center;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
    box-shadow: var(--shadow-xs);
    transition: background .14s ease, border-color .14s ease, color .14s ease, transform .14s ease;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--border-strong); color: var(--text); transform: translateY(-1px); }
.icon-btn:focus-visible { outline: none; box-shadow: var(--ring); }

html[data-theme="dark"] .theme-ico-dark,
html:not([data-theme="dark"]) .theme-ico-light { display: none; }

.user-chip {
    display: flex; align-items: center; gap: 9px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px 14px 4px 4px;
    box-shadow: var(--shadow-xs);
    transition: border-color .14s ease, box-shadow .14s ease;
}
.user-chip:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.avatar {
    width: 30px; height: 30px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--primary-soft); color: var(--primary-ink);
    font-weight: 700; font-size: 11.5px;
    border: 1px solid var(--primary-border);
    flex: none;
}
.user-chip .who { font-size: 12.5px; font-weight: 600; line-height: 1.2; color: var(--text); }
.user-chip .who small { display: block; font-weight: 500; color: var(--muted); font-size: 10.5px; }

.content {
    padding: 26px 28px 44px;
    max-width: 1360px;
    width: 100%;
    flex: 1;
}

.page-head { display: flex; align-items: flex-end; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h2 { font-size: 22px; letter-spacing: -.026em; }
.page-head p { margin: 5px 0 0; color: var(--muted); font-size: 13px; max-width: 78ch; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ----------------------------------------------------------------- kartlar */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 18px;
    overflow: hidden;
}
.card-head {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px;
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 160%);
    min-height: 52px;
}
.card-head h3 { font-size: 14px; font-weight: 650; letter-spacing: -.012em; }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 20px; }
.card-body.tight { padding: 0; }
.card-foot {
    display: flex; gap: 10px; align-items: center;
    padding: 13px 20px; border-top: 1px solid var(--border); background: var(--surface-2);
}

/* --------------------------------------------------------------- metrikler */

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }

.stat {
    --stat-accent: var(--primary);
    --stat-soft: var(--primary-soft);
    --stat-border: var(--primary-border);
    position: relative;
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 140%);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 17px 20px 18px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.stat::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: var(--radius) var(--radius) 0 0;
    background: linear-gradient(90deg, var(--stat-accent), transparent 85%);
    opacity: .85;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); }

.stat .label {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .1em;
}
.stat .value {
    font-size: 26px;
    font-weight: 700;
    margin-top: 7px;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
    color: var(--text);
    line-height: 1.15;
}
.stat .hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.stat .hint a { font-weight: 600; }
.stat .ico {
    position: absolute; top: 16px; right: 16px;
    width: 36px; height: 36px;
    display: grid; place-items: center;
    border-radius: 10px;
    background: var(--stat-soft);
    color: var(--stat-accent);
    border: 1px solid var(--stat-border);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
}
html[data-theme="dark"] .stat .ico { box-shadow: none; }
.stat.green { --stat-accent: var(--success); --stat-soft: var(--success-soft); --stat-border: var(--success-border); }
.stat.blue  { --stat-accent: var(--info);    --stat-soft: var(--info-soft);    --stat-border: var(--info-border); }
.stat.amber { --stat-accent: var(--warning); --stat-soft: var(--warning-soft); --stat-border: var(--warning-border); }

/* ---------------------------------------------------------------- tablolar */

.table-wrap { width: 100%; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.table-wrap::-webkit-scrollbar { height: 8px; }
.table-wrap::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }
.table th:first-child, .table td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child { padding-right: 20px; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.table th {
    text-align: left;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--muted);
    font-weight: 700;
    padding: 11px 12px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.table td {
    padding: 12px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--text-2);
    transition: background .12s ease;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--surface-2); }
.table tbody tr:hover td:first-child { box-shadow: inset 2px 0 0 var(--primary); }
.table td strong, .table td b, .table td .strong { color: var(--text); font-weight: 650; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table td.num { color: var(--text); font-weight: 600; }
.table .actions { text-align: right; white-space: nowrap; }
.table .sub { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; font-weight: 400; }
.table .mono { font-size: 12px; }
.table .domain { font-weight: 650; color: var(--text); word-break: break-all; }

/* ---------------------------------------------------------------- rozetler */

.badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.55;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
    vertical-align: middle;
    letter-spacing: .005em;
}
.badge-primary { background: var(--primary-soft); color: var(--primary-ink); border-color: var(--primary-border); }
.badge-success { background: var(--success-soft); color: var(--success); border-color: var(--success-border); }
.badge-warning { background: var(--warning-soft); color: var(--warning); border-color: var(--warning-border); }
.badge-danger  { background: var(--danger-soft);  color: var(--danger);  border-color: var(--danger-border); }
.badge-info    { background: var(--info-soft);    color: var(--info);    border-color: var(--info-border); }
.badge-neutral, .badge-muted { background: var(--surface-3); color: var(--muted); border-color: var(--border); }

/* ---------------------------------------------------------------- düğmeler */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 36px;
    padding: 0 15px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .12s ease, filter .15s ease;
    background: var(--surface-2);
    color: var(--text-2);
    box-shadow: var(--shadow-xs);
}
.btn:hover { color: var(--text); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.btn-primary {
    background: var(--primary-grad);
    border-color: rgba(30, 70, 214, .55);
    color: #fff;
    box-shadow: 0 6px 16px -8px rgba(47, 93, 246, .85), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn-primary:hover { color: #fff; filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 10px 22px -10px rgba(47, 93, 246, .9), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-primary:active { transform: translateY(0); filter: brightness(.98); }

.btn-outline { background: var(--surface); border-color: var(--border-strong); color: var(--text-2); }
.btn-outline:hover { background: var(--surface-2); border-color: var(--muted); color: var(--text); transform: translateY(-1px); }

.btn-success { background: linear-gradient(180deg, #12935a, #067647); border-color: #056b3f; color: #fff; box-shadow: 0 6px 16px -10px rgba(6, 118, 71, .8), inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn-success:hover { color: #fff; filter: brightness(1.06); }

.btn-danger { background: linear-gradient(180deg, #d13a2c, #b42318); border-color: #9c1d13; color: #fff; box-shadow: 0 6px 16px -10px rgba(180, 35, 24, .8), inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn-danger:hover { color: #fff; filter: brightness(1.06); }

.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); box-shadow: none; }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

.btn-danger-ghost { background: transparent; color: var(--danger); border-color: var(--danger-border); box-shadow: none; }
.btn-danger-ghost:hover { background: var(--danger-soft); color: var(--danger); }

.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 7px; }
.btn-block { width: 100%; }
.full { width: 100%; }

/* ----------------------------------------------------------------- formlar */

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field + .field { margin-top: 12px; }
.form-grid .field + .field { margin-top: 0; }
.field > label, .label {
    font-size: 12px;
    font-weight: 650;
    color: var(--text-2);
    letter-spacing: .005em;
}
.field .hint, .hint { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; line-height: 1.55; }
.field .error, .error { font-size: 12px; color: var(--danger); font-weight: 500; }

.input {
    width: 100%;
    min-height: 40px;
    padding: 9px 12px;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    box-shadow: inset 0 1px 2px rgba(11, 21, 38, .04);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
    appearance: none;
}
html[data-theme="dark"] .input { box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35); }
.input::placeholder { color: var(--muted); opacity: .8; }
.input:hover { border-color: var(--muted); }
.input:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); background: var(--surface); }
textarea.input { min-height: 100px; resize: vertical; line-height: 1.6; }
select.input {
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 17px) calc(50% - 2px), calc(100% - 12px) calc(50% - 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 34px;
    cursor: pointer;
}
.input[type="checkbox"], .input[type="radio"] { width: 16px; height: 16px; min-height: 0; accent-color: var(--primary); box-shadow: none; cursor: pointer; }
input[type="file"].input { padding: 7px 10px; line-height: 1.6; }

.check {
    display: flex; align-items: flex-start; gap: 9px;
    font-size: 13px; font-weight: 500; color: var(--text-2);
    cursor: pointer; user-select: none; line-height: 1.5;
}
.check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--primary); flex: none; }
.check span { min-width: 0; }

.toolbar {
    display: flex; gap: 9px; align-items: center; flex-wrap: wrap;
    padding: 13px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}
.toolbar .search { position: relative; flex: 1 1 240px; min-width: 180px; }
.toolbar .search .icon { position: absolute; left: 12px; top: 12px; color: var(--muted); pointer-events: none; }
.toolbar .search input { padding-left: 36px; }

/* ---------------------------------------------------------------- uyarılar */

.alert {
    display: flex; gap: 11px; align-items: flex-start;
    padding: 12px 15px;
    border-radius: 11px;
    border: 1px solid var(--border);
    border-left-width: 3px;
    margin-bottom: 15px;
    font-size: 13px;
    line-height: 1.55;
    background: var(--surface);
    color: var(--text-2);
    box-shadow: var(--shadow-xs);
}
.alert .icon { margin-top: 2px; }
.alert > div { min-width: 0; }
.alert-success { background: linear-gradient(90deg, var(--success-soft), var(--surface) 90%); border-color: var(--success-border); border-left-color: var(--success); color: var(--success); }
.alert-danger  { background: linear-gradient(90deg, var(--danger-soft), var(--surface) 90%);  border-color: var(--danger-border);  border-left-color: var(--danger);  color: var(--danger); }
.alert-warning { background: linear-gradient(90deg, var(--warning-soft), var(--surface) 90%); border-color: var(--warning-border); border-left-color: var(--warning); color: var(--warning); }
.alert-info    { background: linear-gradient(90deg, var(--info-soft), var(--surface) 90%);    border-color: var(--info-border);    border-left-color: var(--info);    color: var(--info); }
.alert .close {
    margin-left: auto; background: none; border: 0; color: inherit;
    opacity: .55; cursor: pointer; padding: 0 2px; font-size: 17px; line-height: 1;
    transition: opacity .14s ease;
}
.alert .close:hover { opacity: 1; }

/* -------------------------------------------------------------- boş durum */

.empty { padding: 40px 22px; text-align: center; color: var(--muted); }
.empty .ico {
    width: 54px; height: 54px; margin: 0 auto 14px;
    display: grid; place-items: center;
    border-radius: 16px;
    background: var(--surface-2);
    border: 1px dashed var(--border-strong);
    color: var(--muted);
}
.empty h4 { font-size: 14.5px; color: var(--text); margin-bottom: 5px; }
.empty p { margin: 0 auto 13px; font-size: 12.5px; max-width: 46ch; line-height: 1.6; }
.empty .btn { margin-top: 2px; }

/* --------------------------------------------------------------- sayfalama */

.pager { display: flex; gap: 5px; padding: 13px 18px; border-top: 1px solid var(--border); flex-wrap: wrap; align-items: center; }
.pager-item {
    min-width: 33px; height: 33px; padding: 0 9px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    font-size: 12.5px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    box-shadow: var(--shadow-xs);
    transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.pager-item:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.pager-item.active { background: var(--primary-grad); border-color: transparent; color: #fff; box-shadow: 0 6px 14px -8px rgba(47, 93, 246, .9); }
.pager-item.disabled { opacity: .45; pointer-events: none; }

/* ---------------------------------------------------------------- sekmeler */

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs .tab {
    padding: 10px 14px; font-size: 13px; font-weight: 600; color: var(--muted);
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    white-space: nowrap; transition: color .14s ease, border-color .14s ease;
}
.tabs .tab:hover { color: var(--text); }
.tabs .tab.active { color: var(--primary-ink); border-bottom-color: var(--primary); }

/* ----------------------------------------------------------------- yardımcı */

.kv { display: grid; grid-template-columns: 160px 1fr; gap: 10px 16px; font-size: 13px; }
.kv dt { color: var(--muted); font-weight: 500; }
.kv dd { margin: 0; font-weight: 600; color: var(--text); word-break: break-word; }

.chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 10px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--border);
    font-size: 12px; color: var(--text-2); font-weight: 600;
    vertical-align: middle; white-space: nowrap; flex: none;
    box-shadow: var(--shadow-xs);
    transition: border-color .14s ease, color .14s ease;
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip strong { font-variant-numeric: tabular-nums; }

.mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--muted); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 18px; }
.mb-0 { margin-bottom: 0; }
.flex { display: flex; gap: 10px; align-items: center; }
.flex-between { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.strong { font-weight: 650; color: var(--text); }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid-2 > *, .grid-3 > * { min-width: 0; }

/* ------------------------------------------------------------- özel kutular */

.bank-box {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 15px 17px;
    white-space: pre-line;
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-2);
}

.ref-box {
    display: flex; align-items: center; gap: 10px;
    background: var(--code-dark-bg); color: var(--code-dark-text);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: var(--radius-sm); padding: 10px 14px;
    font-family: var(--mono);
    font-size: 13.5px; letter-spacing: .05em;
    box-shadow: var(--shadow-sm);
}
.ref-box button {
    margin-left: auto; background: rgba(255, 255, 255, .1); border: 0; color: #fff;
    border-radius: 6px; padding: 5px 10px; cursor: pointer; font-family: inherit; font-size: 11.5px; font-weight: 600;
    transition: background .14s ease;
}
.ref-box button:hover { background: rgba(255, 255, 255, .2); }

.chat {
    display: flex; flex-direction: column; gap: 11px;
    padding: 18px; max-height: 480px; overflow-y: auto; background: var(--surface-2);
}
.msg {
    max-width: 76%;
    padding: 11px 14px;
    border-radius: 13px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
    font-size: 13px;
    white-space: pre-line;
    color: var(--text-2);
}
.msg .meta { display: block; font-size: 10.5px; color: var(--muted); margin-top: 6px; letter-spacing: .01em; }
.msg .text { line-height: 1.6; }
.msg.admin {
    align-self: flex-end;
    background: var(--primary-grad);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 10px 24px -16px rgba(47, 93, 246, .9);
}
.msg.admin .meta { color: rgba(255, 255, 255, .72); }
.msg.user { align-self: flex-start; border-bottom-left-radius: 5px; }
.msg.admin { border-bottom-right-radius: 5px; }

.banner {
    position: relative;
    display: flex; gap: 16px; align-items: center;
    background-color: var(--sidebar);
    background-image:
        radial-gradient(90% 120% at 0% 0%, rgba(59, 107, 255, .3), transparent 60%),
        radial-gradient(70% 100% at 100% 50%, rgba(122, 92, 255, .22), transparent 65%);
    color: #fff;
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.banner h3 { font-size: 15.5px; color: #fff; letter-spacing: -.015em; }
.banner p { margin: 4px 0 0; color: #b9c6d8; font-size: 12.5px; }
.banner .btn {
    margin-left: auto;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .2);
    box-shadow: none;
    flex: none;
}
.banner .btn:hover { background: rgba(255, 255, 255, .18); color: #fff; }

/* -------------------------------------------------------------- kod blokları */

.code-box {
    background: var(--code-bg);
    color: var(--code-text);
    border: 1px solid var(--code-border);
    border-radius: var(--radius-sm);
    padding: 13px 15px; margin: 0;
    font-family: var(--mono);
    font-size: 12px; line-height: 1.7;
    overflow-x: auto;
    white-space: pre;
}
.card-body code {
    background: var(--surface-3);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 5px; padding: 1px 6px;
    font-family: var(--mono); font-size: 11.5px;
}

/* ---------------------------------------------------------------- site seçimi */

.site-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.site-tile:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.site-tile input { width: 16px; height: 16px; accent-color: var(--primary); flex: 0 0 auto; }
.site-tile-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.site-tile-body strong { font-size: 13.5px; font-weight: 650; word-break: break-all; color: var(--text); }
.site-tile-body small { color: var(--muted); font-size: 11.5px; }
.site-tile:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary-border) inset; }
.site-tile:has(input:not(:checked)) { opacity: .72; }

/* ------------------------------------------------------------------- giriş */

.auth-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 40px 18px;
    background-color: var(--sidebar);
    background-image:
        radial-gradient(70% 55% at 15% 0%, rgba(59, 107, 255, .34), transparent 62%),
        radial-gradient(60% 50% at 95% 15%, rgba(122, 92, 255, .26), transparent 62%),
        radial-gradient(80% 60% at 50% 110%, rgba(30, 70, 214, .18), transparent 65%),
        linear-gradient(180deg, #0a1222 0%, #070f1d 100%);
}
.auth-wrap::before {
    content: "";
    position: fixed; inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(70% 60% at 50% 40%, #000 30%, transparent 85%);
    -webkit-mask-image: radial-gradient(70% 60% at 50% 40%, #000 30%, transparent 85%);
    pointer-events: none;
}
.auth-card {
    position: relative;
    width: 100%;
    max-width: 430px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 32px 30px 26px;
    box-shadow: var(--shadow-lg);
}
.auth-card::before {
    content: "";
    position: absolute; top: 0; left: 22px; right: 22px;
    height: 3px; border-radius: 0 0 3px 3px;
    background: var(--primary-grad);
    opacity: .9;
}
.auth-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 22px; }
.auth-brand .logo {
    width: 42px; height: 42px; border-radius: 12px;
    display: grid; place-items: center;
    background: var(--primary-grad); color: #fff;
    box-shadow: 0 10px 24px -10px rgba(47, 93, 246, .8), inset 0 1px 0 rgba(255, 255, 255, .25);
    flex: none;
}
.auth-brand strong { font-size: 15.5px; display: block; line-height: 1.2; letter-spacing: -.015em; }
.auth-brand small { display: block; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-top: 2px; }
.auth-card h2 { font-size: 20px; margin-bottom: 4px; letter-spacing: -.025em; }
.auth-card .lead { color: var(--muted); font-size: 12.5px; margin: 0 0 20px; }
.auth-card form { margin-top: 2px; }
.auth-card .btn { margin-top: 6px; height: 40px; }
.auth-foot { margin-top: 18px; text-align: center; font-size: 12.5px; color: var(--muted); }
.auth-foot a { font-weight: 600; }

/* ------------------------------------------------------------------ portal */

body.portal { background: var(--surface); }

.portal-nav {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; gap: 10px;
    padding: 0 30px;
    min-height: 68px;
    background: color-mix(in srgb, var(--surface) 82%, transparent);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
    border-bottom: 1px solid var(--border);
}
html[data-theme="dark"] .portal-nav { background: rgba(13, 23, 39, .8); }
.portal-brand { display: flex; align-items: center; gap: 10px; font-weight: 650; color: var(--text); font-size: 15px; letter-spacing: -.015em; }
.portal-brand:hover { color: var(--text); }
.portal-brand .logo {
    width: 32px; height: 32px; border-radius: 9px;
    display: grid; place-items: center;
    background: var(--primary-grad); color: #fff;
    box-shadow: 0 8px 18px -8px rgba(47, 93, 246, .8), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.portal-links { display: flex; gap: 2px; margin-left: 28px; }
.portal-links a {
    color: var(--muted); font-size: 13px; font-weight: 600;
    padding: 8px 12px; border-radius: 8px;
    transition: color .14s ease, background .14s ease;
}
.portal-links a:hover { color: var(--text); background: var(--surface-2); }
.portal-nav .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.portal-wrap { position: relative; z-index: 1; max-width: 1140px; margin: 0 auto; padding: 0 26px; }
.portal-wrap::before {
    content: "";
    position: absolute;
    top: -68px; left: 0; right: 0;
    height: 760px;
    background:
        radial-gradient(45% 55% at 30% 22%, rgba(47, 93, 246, .16), transparent 65%),
        radial-gradient(40% 50% at 78% 12%, rgba(122, 92, 255, .14), transparent 65%);
    pointer-events: none;
    z-index: -1;
}
html[data-theme="dark"] .portal-wrap::before {
    background:
        radial-gradient(45% 55% at 30% 22%, rgba(91, 134, 255, .2), transparent 65%),
        radial-gradient(40% 50% at 78% 12%, rgba(155, 123, 255, .16), transparent 65%);
}

.portal-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
    gap: 52px;
    align-items: center;
    padding: 72px 0 64px;
}
.portal-hero h1 {
    font-size: 42px;
    line-height: 1.08;
    letter-spacing: -.038em;
    margin-bottom: 16px;
    font-weight: 700;
}
.portal-hero .lead {
    font-size: 15px;
    color: var(--muted);
    line-height: 1.75;
    max-width: 52ch;
    margin: 0 0 26px;
}
.portal-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.portal-actions .btn { height: 42px; padding: 0 18px; font-size: 13.5px; }
.portal-kicker {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .11em;
    color: var(--primary-ink);
    background: var(--primary-soft);
    border: 1px solid var(--primary-border);
    padding: 5px 11px; border-radius: 999px;
    margin-bottom: 18px;
    box-shadow: 0 1px 2px rgba(47, 93, 246, .08);
}
.portal-stats { display: flex; gap: 34px; margin-top: 34px; flex-wrap: wrap; }
.portal-stats div { min-width: 100px; position: relative; }
.portal-stats div + div::before {
    content: "";
    position: absolute; left: -17px; top: 4px; bottom: 4px;
    width: 1px; background: var(--border);
}
.portal-stats strong { display: block; font-size: 24px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.portal-stats span { font-size: 12px; color: var(--muted); font-weight: 500; }

.portal-login {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 26px 26px 24px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.portal-login::before {
    content: "";
    position: absolute; top: 0; left: 0; right: 0;
    height: 3px; background: var(--primary-grad);
}
.portal-login h2 { font-size: 18px; margin-bottom: 4px; letter-spacing: -.02em; }
.portal-login .lead { font-size: 12.5px; color: var(--muted); margin: 0 0 18px; }
.portal-login .field { margin-bottom: 12px; }
.portal-login .field + .field { margin-top: 0; }
.portal-login .btn { margin-top: 4px; height: 40px; }
.portal-login .foot {
    margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--border);
    font-size: 12px; color: var(--muted); text-align: center; line-height: 1.8;
}

.portal-section { padding: 54px 0; border-top: 1px solid var(--border); }
.portal-section > h2 { font-size: 26px; letter-spacing: -.028em; }
.portal-section > p.section-lead { color: var(--muted); font-size: 14px; margin: 7px 0 28px; max-width: 62ch; }

.portal-prices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.portal-price {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.portal-price::before {
    content: "";
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--primary-grad);
    opacity: 0; transition: opacity .18s ease;
}
.portal-price:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.portal-price:hover::before { opacity: 1; }
.portal-price .domain { font-weight: 650; font-size: 14.5px; word-break: break-all; letter-spacing: -.01em; }
.portal-price .amount { font-size: 26px; font-weight: 700; letter-spacing: -.03em; margin: 10px 0 3px; font-variant-numeric: tabular-nums; }
.portal-price .amount small { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.portal-price .meta { font-size: 12px; color: var(--muted); }
.portal-price .badge { margin-top: 12px; }

.portal-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.portal-step {
    position: relative;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    transition: border-color .18s ease, box-shadow .18s ease;
}
.portal-step:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.portal-step .n {
    width: 30px; height: 30px; border-radius: 9px;
    display: grid; place-items: center;
    background: var(--primary-grad); color: #fff;
    font-size: 12.5px; font-weight: 700;
    margin-bottom: 12px;
    box-shadow: 0 8px 18px -10px rgba(47, 93, 246, .9), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.portal-step h4 { font-size: 14px; margin-bottom: 5px; }
.portal-step p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.65; }

.portal-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 24px; }
.portal-feature { display: flex; gap: 12px; }
.portal-feature .ico {
    width: 38px; height: 38px; flex: none;
    display: grid; place-items: center;
    border-radius: 11px;
    background: var(--primary-soft); border: 1px solid var(--primary-border);
    color: var(--primary);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
}
html[data-theme="dark"] .portal-feature .ico { box-shadow: none; }
.portal-feature h4 { font-size: 13.5px; margin-bottom: 3px; }
.portal-feature p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.6; }

.portal-foot {
    border-top: 1px solid var(--border);
    padding: 24px 0 38px;
    display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
    font-size: 12px; color: var(--muted);
}
.portal-foot .right { margin-left: auto; display: flex; gap: 16px; }

/* -------------------------------------------------------------- toplu işlem */

.bulk-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 11px 15px;
    margin: 0 0 15px;
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-xs);
}
.bulk-all {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    color: var(--text-2);
}
.bulk-all input { cursor: pointer; accent-color: var(--primary); }
.bulk-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.bulk-actions .btn[disabled] { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* ---------------------------------------------------------------- duyarlı */

.sidebar-toggle { display: none; }
.overlay { display: none; }

@media (max-width: 1100px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-2 { grid-template-columns: 1fr; }
    .portal-hero { grid-template-columns: 1fr; gap: 34px; padding: 52px 0 46px; }
    .portal-hero h1 { font-size: 36px; }
}

@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); transition: transform .22s ease; width: 272px; }
    body.nav-open .sidebar { transform: none; box-shadow: 0 30px 70px rgba(2, 6, 23, .55); }
    body.nav-open .overlay { display: block; position: fixed; inset: 0; background: rgba(8, 15, 29, .55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); z-index: 50; }
    .main { margin-left: 0; }
    .sidebar-toggle { display: inline-flex; }
    .content { padding: 18px 16px 32px; }
    .topbar { padding: 10px 16px; min-height: 62px; }
    .topbar h1 { font-size: 15px; }
    .user-chip .who { display: none; }
    .user-chip { padding: 3px; }
    .grid-3 { grid-template-columns: 1fr; }
    .portal-prices, .portal-steps, .portal-features { grid-template-columns: 1fr; }
    .portal-links { display: none; }
    .portal-nav { padding: 0 18px; }
    .portal-hero h1 { font-size: 30px; }
    .portal-stats div + div::before { display: none; }
}

@media (max-width: 620px) {
    .stats { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .page-head h2 { font-size: 19px; }
    .page-head .actions { margin-left: 0; width: 100%; }
    .banner { flex-direction: column; align-items: flex-start; }
    .banner .btn { margin-left: 0; }
    .kv { grid-template-columns: 1fr; gap: 1px 0; }
    .kv dt { margin-top: 9px; }
    .msg { max-width: 92%; }
    .portal-nav .btn-sm { display: none; }
    .portal-hero { padding: 40px 0 34px; }
    .portal-hero h1 { font-size: 26px; }
    .portal-login { padding: 22px 20px; border-radius: 14px; }
    .bulk-bar { gap: 10px; }
    .bulk-actions { margin-left: 0; width: 100%; }
    .bulk-actions .btn { flex: 1 1 auto; }
    .auth-card { padding: 26px 22px 22px; border-radius: 16px; }
}

/* ------------------------------------------------------- hareket ve yazdırma */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
    .stat:hover, .portal-price:hover, .site-tile:hover, .btn-primary:hover { transform: none; }
}

@media print {
    .sidebar, .topbar, .page-head .actions, .pager, .toolbar, .bulk-bar, .icon-btn { display: none !important; }
    .main { margin: 0; }
    .card { box-shadow: none; border-color: #ccc; }
    body { background: #fff; background-image: none; }
}
