/* ── LexaLive Panel — koyu modern tema ─────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #0b0f1a;
    --bg2: #111827;
    --card: #151d2e;
    --border: #232f47;
    --text: #e5e9f2;
    --muted: #8b96ac;
    --accent: #6366f1;
    --accent2: #8b5cf6;
    --ok: #10b981;
    --warn: #f59e0b;
    --err: #f43f5e;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* ── Giriş / kurulum ekranı ── */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(700px 400px at 20% 10%, rgba(99, 102, 241, .18), transparent),
        radial-gradient(700px 400px at 80% 90%, rgba(139, 92, 246, .14), transparent),
        var(--bg);
}
.auth-card {
    width: 100%;
    max-width: 400px;
    margin: 24px 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 36px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
}
.auth-card h1 { font-size: 22px; margin-bottom: 4px; }
.auth-card.wide { max-width: 560px; }
.wizard-section { margin-bottom: 18px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.wizard-section h3 { font-size: 15px; margin-bottom: 2px; }
.brand { text-align: center; margin-bottom: 22px; }
.brand-logo {
    width: 52px; height: 52px; margin: 0 auto 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 900; color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    border-radius: 14px;
}

label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; }
input, select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    outline: none;
}
input:focus, select:focus { border-color: var(--accent); }
button, .btn {
    display: inline-block;
    margin-top: 16px;
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}
button:hover, .btn:hover { filter: brightness(1.12); }
.auth-card form > button[type=submit] { width: 100%; }

.alert { padding: 11px 14px; border-radius: 10px; font-size: 13px; margin: 12px 0; }
.alert.ok   { background: rgba(16, 185, 129, .12); color: #34d399; border: 1px solid rgba(16, 185, 129, .3); }
.alert.err  { background: rgba(244, 63, 94, .12);  color: #fb7185; border: 1px solid rgba(244, 63, 94, .3); }
.alert.warn { background: rgba(245, 158, 11, .12); color: #fbbf24; border: 1px solid rgba(245, 158, 11, .3); }
code { font-family: ui-monospace, Consolas, monospace; font-size: .92em; background: rgba(255,255,255,.06); padding: 1px 6px; border-radius: 4px; }
.muted { color: var(--muted); font-size: 13px; }
.mono { font-family: Consolas, monospace; font-size: 12.5px; }

/* ── Panel iskeleti ── */
.shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 230px;
    background: var(--bg2);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 18px 12px;
    position: sticky; top: 0; height: 100vh;
}
.side-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; padding: 6px 8px 20px; }
.side-brand .brand-logo { width: 34px; height: 34px; font-size: 16px; margin: 0; border-radius: 9px; }
.sidebar nav { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.sidebar nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    color: var(--muted);
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
}
.sidebar nav a:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
.sidebar nav a.active { background: linear-gradient(135deg, rgba(99,102,241,.25), rgba(139,92,246,.18)); color: #fff; }
.side-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 8px 0; border-top: 1px solid var(--border); }
.side-foot .logout { color: var(--err); font-size: 13px; text-decoration: none; }

.content { flex: 1; padding: 28px 32px; max-width: none; min-width: 0; }
.page-title { font-size: 22px; margin-bottom: 20px; }

/* ── Kartlar / istatistikler ── */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
}
.card h3 { font-size: 15px; margin-bottom: 14px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    display: flex; flex-direction: column; gap: 4px;
}
.stat .num { font-size: 26px; font-weight: 800; }
.stat .num.ok { color: var(--ok); }
.stat .num.warn { color: var(--warn); }
.stat .num.err { color: var(--err); }
.stat .lbl { font-size: 12px; color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 980px) { .two-col { grid-template-columns: 1fr; } .content { padding: 18px; } }

/* ── Tablolar ── */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(0,0,0,.15);
}
.table-wrap table { min-width: 720px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, .04); vertical-align: middle; }
tr:hover td { background: rgba(255, 255, 255, .02); }
.row-off td { opacity: .5; }
td.col-actions { width: 1%; white-space: nowrap; }
td.col-id { width: 56px; color: var(--muted); }
td.col-user { min-width: 120px; }
.user-cell { display: flex; flex-direction: column; gap: 2px; }
.user-cell .name { font-size: 12px; color: var(--muted); }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.badge.ok   { background: rgba(16, 185, 129, .15); color: #34d399; }
.badge.warn { background: rgba(245, 158, 11, .15); color: #fbbf24; }
.badge.err  { background: rgba(244, 63, 94, .15);  color: #fb7185; }
.badge.mute { background: rgba(255,255,255,.06); color: var(--muted); font-weight: 600; }

/* ── Butonlar ── */
.btn.small { padding: 5px 10px; font-size: 12px; margin-top: 0; width: auto; }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.btn.ghost:hover { color: var(--text); border-color: var(--accent); }
.btn.good { background: linear-gradient(135deg, #059669, #10b981); }
.btn.warn { background: linear-gradient(135deg, #d97706, #f59e0b); }
.btn.danger { background: linear-gradient(135deg, #e11d48, #f43f5e); }
.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.actions form { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
.actions button { margin-top: 0; width: auto; flex: 0 0 auto; }
.inline { display: inline; }
.inline button { margin-top: 0; }

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}
.toolbar .search-field { flex: 1 1 220px; min-width: 180px; }
.toolbar .search-field input { width: 100%; }
.toolbar .btn, .toolbar button { margin-top: 0; width: auto; flex: 0 0 auto; }
.toolbar .count { margin-left: auto; }

/* ── Formlar ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-row { display: grid; grid-template-columns: 2fr 1fr auto; gap: 14px; align-items: end; }
.form-row .align-end button { margin-top: 0; }
@media (max-width: 780px) { .form-grid, .form-row { grid-template-columns: 1fr; } }
.searchbar { display: flex; gap: 10px; }
.searchbar input { flex: 1; }
.searchbar button { margin-top: 0; width: auto; }

.expiry-form input[type=date] { width: auto; padding: 5px 8px; font-size: 12px; }
.copyable { cursor: pointer; }
.copyable.copied { color: var(--ok); }
.pager { margin-top: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
