/* Wysteria Admin · 250px simetrik sidebar standardı */

@font-face {
    font-family: 'Syne';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../fonts/syne-latin-ext.woff2') format('woff2');
}
@font-face {
    font-family: 'Hanken Grotesk';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/hanken-grotesk-latin-ext.woff2') format('woff2');
}
@font-face {
    font-family: 'JetBrains Mono';
    font-style: normal;
    font-weight: 100 800;
    font-display: swap;
    src: url('../fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
}

:root {
    --font-display: 'Syne', sans-serif;
    --font-body: 'Hanken Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --bg: #0a0612;
    --surface: #140d24;
    --surface-2: #1a1130;
    --text: #f0eaf9;
    --muted: #9d90bc;
    --accent: #a78bfa;
    --accent-strong: #8b5cf6;
    --line: rgba(167, 139, 250, 0.14);
    --line-strong: rgba(167, 139, 250, 0.3);
    --danger: #f87171;
    --ok: #34d399;
}

*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- Sidebar (250px sabit) ---------- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 250px;
    background: var(--surface);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    z-index: 90;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.sb-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1.3rem 1.4rem;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.02rem;
}
.sb-brand svg { width: 26px; height: 26px; color: var(--accent); }
.sb-brand em { font-style: normal; color: var(--accent); }
.sb-nav { flex: 1; overflow-y: auto; padding: 1rem 0.8rem; }
.sb-group { margin-bottom: 1.4rem; }
.sb-group-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    color: var(--muted);
    padding: 0 0.7rem 0.5rem;
}
.sb-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.7rem;
    border-radius: 9px;
    color: var(--muted);
    font-size: 0.92rem;
    transition: background 0.2s, color 0.2s;
}
.sb-link i { font-style: normal; width: 18px; text-align: center; color: var(--accent); font-size: 0.85rem; }
.sb-link:hover { background: var(--surface-2); color: var(--text); }
.sb-link.aktif { background: rgba(139, 92, 246, 0.16); color: var(--text); }
.sb-foot {
    padding: 1rem 1.4rem;
    border-top: 1px solid var(--line);
    font-size: 0.78rem;
    color: var(--muted);
    word-break: break-all;
}
.sb-toggle {
    display: none;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 100;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
}
.sb-toggle span { display: block; width: 18px; height: 2px; background: var(--text); margin: 4px auto; }

/* ---------- İçerik ---------- */
.content {
    margin-left: 250px;
    padding: 2.2rem 2.4rem 4rem;
    max-width: 1200px;
}
.content-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.6rem;
    flex-wrap: wrap;
}
.content-head h1 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 2rem;
    margin: 0;
}
.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.22em;
    color: var(--accent);
    margin: 0 0 0.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--accent-strong);
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 0.65rem 1.3rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.2s, box-shadow 0.3s, background 0.3s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -12px rgba(139, 92, 246, 0.5); }
.btn-small { padding: 0.45rem 1rem; font-size: 0.82rem; }
.btn-ghost { background: transparent; border: 1px solid var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); box-shadow: none; }
.btn.full { width: 100%; }

.flash {
    border: 1px solid var(--line-strong);
    border-left: 3px solid var(--ok);
    background: rgba(52, 211, 153, 0.08);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
}
.flash-err { border-left-color: var(--danger); background: rgba(248, 113, 113, 0.08); }

/* KPI */
.kpi-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2.4rem;
}
.kpi {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 1.3rem 1.4rem;
    background: var(--surface);
}
.kpi-num {
    display: block;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 2.2rem;
    color: var(--accent);
    line-height: 1;
}
.kpi-label { color: var(--muted); font-size: 0.85rem; }

/* Tablo */
.table-wrap {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    overflow: hidden;
}
.table-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.3rem;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
    gap: 0.8rem;
}
.table-head-row h2 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    margin: 0;
}
.tbl { width: 100%; border-collapse: collapse; }
.tbl th {
    text-align: left;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    color: var(--muted);
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--line);
    font-weight: 500;
}
.tbl td {
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
    font-size: 0.9rem;
}
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: rgba(139, 92, 246, 0.05); }
.tbl strong { font-weight: 600; display: block; }
.tbl-sub { display: block; font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted); }
.cat-chip {
    font-size: 0.72rem;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid var(--line);
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    white-space: nowrap;
}
.mono { font-family: var(--font-mono); font-size: 0.82rem; }
.sort-input {
    width: 58px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    padding: 0.3rem 0.45rem;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}
.row-actions { white-space: nowrap; }
.chip-btn {
    display: inline-block;
    font-size: 0.78rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 0.28rem 0.75rem;
    margin-right: 0.35rem;
    transition: border-color 0.2s, color 0.2s;
}
.chip-btn:hover { border-color: var(--accent); color: var(--accent); }
.chip-btn.danger:hover { border-color: var(--danger); color: var(--danger); }
input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-strong);
}

/* Form */
.edit-form .form-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 1.4rem;
    align-items: start;
}
.form-main, .form-side {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
label { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.85rem; color: var(--muted); font-weight: 600; }
label small { font-weight: 400; color: var(--muted); font-size: 0.75rem; }
input[type="text"], input[type="url"], input[type="number"], input[type="email"], input[type="password"], textarea, select {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    padding: 0.6rem 0.8rem;
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}
textarea { resize: vertical; }
label.check { flex-direction: row; align-items: center; gap: 0.6rem; color: var(--text); }

/* Login */
.login-wrap {
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background:
        radial-gradient(600px circle at 20% 10%, rgba(139, 92, 246, 0.12), transparent 60%),
        radial-gradient(500px circle at 85% 85%, rgba(109, 40, 217, 0.1), transparent 60%),
        var(--bg);
}
.login-card {
    width: min(400px, 100%);
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    background: var(--surface);
    padding: 2.2rem;
}
.login-brand { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1.6rem; font-family: var(--font-display); }
.login-brand svg { width: 28px; height: 28px; color: var(--accent); }
.login-brand em { font-style: normal; color: var(--accent); }
.login-card h1 { font-family: var(--font-display); font-size: 1.4rem; margin: 0 0 1.2rem; }
.login-card .form { display: flex; flex-direction: column; gap: 1rem; }
.login-back { display: inline-block; margin-top: 1.2rem; color: var(--muted); font-size: 0.85rem; }
.login-back:hover { color: var(--accent); }
.error {
    border: 1px solid rgba(248, 113, 113, 0.4);
    background: rgba(248, 113, 113, 0.1);
    color: var(--danger);
    border-radius: 10px;
    padding: 0.6rem 0.9rem;
    font-size: 0.86rem;
}

@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: none; }
    .sb-toggle { display: block; }
    .content { margin-left: 0; padding: 4.5rem 1.2rem 3rem; }
    .edit-form .form-grid { grid-template-columns: 1fr; }
    .kpi-row { grid-template-columns: 1fr; }
    .tbl-wrap, .table-wrap { overflow-x: auto; }
}
