/* ==========================================================================
   2L-WebPanel - Arayüz
   Tasarım dili 2L-AdminMenu ile ortaktır. Tüm vurgu renkleri --acc-* değişkenlerinden
   gelir ve core.js -> Theme.apply(hex) ile config'deki PrimaryColor'a göre üretilir.
   ========================================================================== */

:root {
    --bg-0: #030504;
    --bg-1: #070b09;
    --bg-2: #0b120e;
    --bg-3: #101a14;
    --bg-4: #15231b;

    /* Vurgu (varsayılan 2L yeşili). Theme.apply() bunları yeniden yazar. */
    --acc-rgb: 52, 211, 119;
    --acc-300: #6ee7a0;
    --acc-400: #34d377;
    --acc-500: #1fa855;
    --acc-600: #15803d;
    --acc-700: #11542f;
    --acc-800: #0b3d22;
    --acc-900: #062a17;
    --acc-950: #03140b;

    --line: rgba(var(--acc-rgb), 0.08);
    --line-2: rgba(var(--acc-rgb), 0.16);
    --line-3: rgba(var(--acc-rgb), 0.38);
    --glow: rgba(var(--acc-rgb), 0.22);
    --tint: rgba(var(--acc-rgb), 0.12);
    --tint-2: rgba(var(--acc-rgb), 0.25);

    --text: #e6efe9;
    --text-2: #a3b3aa;
    --muted: #6b7d73;
    --dim: #3f4d45;

    --amber: #f2a93b;
    --amber-soft: rgba(242, 169, 59, 0.12);
    --red: #ef5350;
    --red-soft: rgba(239, 83, 80, 0.12);
    --cyan: #5cc8e6;
    --cyan-soft: rgba(92, 200, 230, 0.12);
    --violet: #a78bfa;
    --blue: #60a5fa;

    --radius-lg: 18px;
    --radius: 12px;
    --radius-sm: 8px;

    --sidebar-w: 256px;

    --font-ui: 'Space Grotesk', system-ui, sans-serif;
    --font-display: 'Oxanium', 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', Consolas, monospace;

    color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
    font-family: var(--font-ui);
    color: var(--text);
    background:
        radial-gradient(1100px 420px at 0% 0%, rgba(var(--acc-rgb), 0.10), transparent 60%),
        radial-gradient(900px 380px at 100% 100%, rgba(var(--acc-rgb), 0.05), transparent 60%),
        linear-gradient(180deg, #070b09, #030504);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    font-size: 13.5px;
}

.hidden { display: none !important; }

svg:not(.leaflet-zoom-animated) {
    width: 18px; height: 18px;
    fill: none; stroke: currentColor;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
    flex-shrink: 0;
}

button, input, select, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--acc-800); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--acc-700); background-clip: padding-box; }
::selection { background: var(--tint-2); }

/* ==========================================================================
   YERLEŞİM
   ========================================================================== */

.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

.sidebar {
    position: sticky; top: 0;
    height: 100vh;
    display: flex; flex-direction: column;
    padding: 20px 14px 14px;
    background: linear-gradient(180deg, rgba(9, 14, 11, 0.96), rgba(4, 6, 5, 0.96));
    border-right: 1px solid var(--line-2);
    overflow: hidden;
}
.sidebar::after {
    content: ''; position: absolute; top: 8%; bottom: 8%; right: -1px; width: 1px;
    background: linear-gradient(180deg, transparent, var(--acc-400), transparent);
    opacity: 0.35;
}

.brand { display: flex; align-items: center; gap: 12px; padding: 0 6px 18px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.brand-mark {
    width: 44px; height: 44px; flex-shrink: 0;
    display: grid; place-items: center;
    border-radius: 13px;
    color: var(--acc-300);
    background: linear-gradient(145deg, var(--acc-800), var(--acc-950));
    border: 1px solid var(--line-3);
    box-shadow: 0 8px 24px rgba(var(--acc-rgb), 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    overflow: hidden;
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.brand-kicker { display: flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 700; letter-spacing: 2.2px; text-transform: uppercase; color: var(--acc-400); }
.brand-kicker .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--dim); }
.brand-name { font-family: var(--font-display); font-size: 19px; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding-right: 2px; margin-right: -4px; }
.nav-group { padding: 14px 10px 6px; font-size: 10px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; color: var(--dim); }
.nav-group:first-child { padding-top: 2px; }
.nav-link {
    position: relative;
    display: flex; align-items: center; gap: 11px;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 13.5px; font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
}
.nav-link svg { width: 17px; height: 17px; }
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.03); }
.nav-link.active {
    color: #fff;
    background: linear-gradient(180deg, var(--acc-700), var(--acc-800));
    box-shadow: 0 4px 14px rgba(var(--acc-rgb), 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.nav-link.active svg { color: var(--acc-300); }
.nav-link .tab-count { margin-left: auto; }
.nav-link.active .tab-count { background: rgba(0, 0, 0, 0.3); color: var(--acc-300); }
.nav-link .nav-lock { margin-left: auto; color: var(--amber); }
.nav-link .nav-lock svg { width: 13px; height: 13px; }

.side-foot { padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.cloud-state { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 10px; background: var(--bg-1); border: 1px solid var(--line); font-size: 11.5px; color: var(--text-2); }
.cloud-state b { color: #fff; font-weight: 600; }
.cloud-state .status-dot { margin-left: auto; }

.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line-2); }
.user-chip .avatar { width: 34px; height: 34px; border-radius: 10px; }
.user-chip .uc-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.user-chip .uc-name { font-weight: 600; font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chip .uc-role { font-size: 10.5px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--amber); }
.user-chip .icon-btn { width: 32px; height: 32px; border-radius: 9px; }
.user-chip .icon-btn svg { width: 15px; height: 15px; }

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

.topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 16px;
    padding: 16px 28px;
    background: rgba(5, 8, 6, 0.82);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.icon-btn.menu-btn { display: none; }
.page-title { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.crumbs { display: flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--acc-400); }
.crumbs .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--dim); }
.crumbs span:last-child { color: var(--text-2); }
.page-title h1 { font-family: var(--font-display); font-size: 24px; font-weight: 800; color: #fff; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.global-search { width: 300px; }

.content { flex: 1; padding: 22px 28px 40px; min-width: 0; animation: fadeIn 0.2s ease; }

.footer { display: flex; justify-content: space-between; gap: 20px; padding: 14px 28px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }

/* ==========================================================================
   TEMEL BİLEŞENLER (AdminMenu ile ortak)
   ========================================================================== */

.sum-chip {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px;
    font-size: 12px; color: var(--muted);
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: 10px;
    white-space: nowrap;
}
.sum-chip strong { font-family: var(--font-display); font-size: 15px; color: #fff; font-variant-numeric: tabular-nums; }
.sum-dot { width: 7px; height: 7px; border-radius: 50%; }
.sum-dot.online { background: var(--acc-400); box-shadow: 0 0 8px var(--acc-400); }

.icon-btn {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    flex-shrink: 0;
    background: var(--bg-2);
    border: 1px solid var(--line-2);
    border-radius: var(--radius);
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.18s ease;
}
.icon-btn:hover { color: #fff; background: var(--bg-3); border-color: var(--line-3); }
.icon-btn.danger:hover { background: var(--red-soft); border-color: rgba(239, 83, 80, 0.45); color: #fff; }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 9px; }
.icon-btn.sm svg { width: 15px; height: 15px; }
.icon-btn.is-loading svg { color: var(--acc-400); animation: spin 0.8s linear infinite; }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .search { flex: 1; min-width: 240px; }
.toolbar .spacer { flex: 1; }

.search { position: relative; display: flex; align-items: center; width: 100%; }
.search svg { position: absolute; left: 13px; color: var(--muted); width: 16px; height: 16px; pointer-events: none; }
.search input {
    width: 100%;
    padding: 11px 14px 11px 38px;
    background: var(--bg-1);
    border: 1px solid var(--line-2);
    border-radius: 11px;
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: all 0.18s ease;
}
.search input::placeholder { color: var(--dim); }
.search input:focus { border-color: var(--acc-500); box-shadow: 0 0 0 3px rgba(var(--acc-rgb), 0.15); }
.search:focus-within svg { color: var(--acc-400); }
.search kbd { position: absolute; right: 10px; }

.tabs {
    display: inline-flex; gap: 4px;
    padding: 4px;
    background: var(--bg-1);
    border: 1px solid var(--line);
    border-radius: 11px;
    flex-shrink: 0;
}
.tab {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 7px 12px;
    background: transparent;
    border: none; border-radius: 8px;
    color: var(--muted);
    font-size: 12px; font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.18s ease;
}
.tab svg { width: 14px; height: 14px; }
.tab:hover { color: var(--text); }
.tab.active {
    color: #fff;
    background: linear-gradient(180deg, var(--acc-700), var(--acc-800));
    box-shadow: 0 4px 14px rgba(var(--acc-rgb), 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.tab-count {
    min-width: 20px; padding: 1px 6px;
    font-size: 10.5px; font-weight: 700; text-align: center;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-2);
    font-variant-numeric: tabular-nums;
}
.tab.active .tab-count { background: rgba(0, 0, 0, 0.3); color: var(--acc-300); }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 13px; font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
    color: var(--text);
}
.btn svg { width: 16px; height: 16px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
    color: #fff;
    background: linear-gradient(180deg, var(--acc-500), var(--acc-600));
    border-color: rgba(var(--acc-rgb), 0.45);
    box-shadow: 0 8px 22px rgba(var(--acc-rgb), 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn-primary:hover:not(:disabled) { background: linear-gradient(180deg, var(--acc-400), var(--acc-500)); }
.btn-primary:active:not(:disabled) { transform: translateY(1px); }
.btn-ghost { color: var(--text-2); background: var(--bg-2); border-color: var(--line-2); }
.btn-ghost:hover { color: #fff; border-color: var(--line-3); background: var(--bg-3); }
.btn-danger {
    color: #fff;
    background: linear-gradient(180deg, #d9423f, #b42318);
    border-color: rgba(239, 83, 80, 0.5);
    box-shadow: 0 8px 22px rgba(180, 35, 24, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.btn-danger:hover { background: linear-gradient(180deg, var(--red), #c62a20); }
.btn-danger-soft { color: var(--red); background: var(--red-soft); border-color: rgba(239, 83, 80, 0.3); }
.btn-danger-soft:hover { color: #fff; background: #b42318; border-color: var(--red); }
.btn-soft { color: var(--acc-300); background: var(--tint); border-color: var(--tint-2); }
.btn-soft:hover { color: #fff; background: rgba(var(--acc-rgb), 0.28); border-color: var(--acc-500); }
.btn-discord { color: #fff; background: linear-gradient(180deg, #6873f5, #4f5bd5); border-color: rgba(129, 140, 248, 0.6); box-shadow: 0 10px 26px rgba(88, 101, 242, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
.btn-discord:hover { background: linear-gradient(180deg, #7a84f7, #5865f2); }
.btn-sm { padding: 7px 10px; font-size: 12px; border-radius: 8px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-icon { padding: 7px; }
.btn-block { width: 100%; }

.input {
    width: 100%; min-width: 0;
    padding: 10px 12px;
    background: var(--bg-1);
    border: 1px solid var(--line-2);
    border-radius: 10px;
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: all 0.18s ease;
}
.input::placeholder { color: var(--dim); }
.input:focus { border-color: var(--acc-500); box-shadow: 0 0 0 3px rgba(var(--acc-rgb), 0.15); }
.input.mono { font-family: var(--font-mono); font-size: 12.5px; }
textarea.input { resize: vertical; min-height: 84px; line-height: 1.45; }
.select {
    appearance: none; -webkit-appearance: none;
    padding-right: 34px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7d73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 11px center; background-size: 15px;
}
.select option { background: var(--bg-2); color: var(--text); }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label { font-size: 11px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-2); }
.field .hint { font-size: 11.5px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }

.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13px; color: var(--text-2); }
.check input { appearance: none; width: 18px; height: 18px; border-radius: 6px; border: 1px solid var(--line-3); background: var(--bg-1); display: grid; place-items: center; cursor: pointer; transition: all 0.15s ease; flex-shrink: 0; }
.check input:checked { background: var(--acc-500); border-color: var(--acc-400); }
.check input:checked::after { content: ''; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.check input:disabled { opacity: 0.5; cursor: not-allowed; }

.switch { position: relative; width: 38px; height: 22px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--bg-4); border: 1px solid var(--line-2); cursor: pointer; transition: 0.2s; }
.switch span::before { content: ''; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; border-radius: 50%; background: var(--muted); transition: 0.2s; }
.switch input:checked + span { background: var(--acc-600); border-color: var(--acc-400); }
.switch input:checked + span::before { transform: translateX(16px); background: #fff; }

kbd {
    display: inline-block; padding: 2px 7px;
    font-family: var(--font-display); font-size: 10px; font-weight: 700;
    color: var(--acc-300);
    background: var(--bg-2);
    border: 1px solid var(--line-2); border-bottom-width: 2px;
    border-radius: 5px;
}

.avatar {
    position: relative;
    width: 36px; height: 36px;
    display: grid; place-items: center;
    flex-shrink: 0;
    border-radius: 10px;
    font-family: var(--font-display);
    font-size: 13px; font-weight: 700;
    color: var(--acc-300);
    background: linear-gradient(145deg, var(--acc-800), var(--acc-950));
    border: 1px solid var(--line-2);
    overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 62px; height: 62px; border-radius: 16px; font-size: 22px; border-color: var(--line-3); box-shadow: 0 8px 24px rgba(var(--acc-rgb), 0.15); }

.status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.status-dot.online { background: var(--acc-400); box-shadow: 0 0 8px var(--acc-400); }
.status-dot.offline { background: var(--dim); }
.status-dot.warn { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.status-dot.bad { background: var(--red); box-shadow: 0 0 8px var(--red); }

.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 9px 3px 8px;
    font-size: 10px; font-weight: 700;
    letter-spacing: 0.8px; text-transform: uppercase;
    border-radius: 999px;
    white-space: nowrap;
    color: var(--text-2); background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.12);
}
.badge.dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.badge.ok     { color: var(--acc-300); background: rgba(var(--acc-rgb), 0.1); border-color: rgba(var(--acc-rgb), 0.35); }
.badge.warn   { color: var(--amber); background: var(--amber-soft); border-color: rgba(242, 169, 59, 0.35); }
.badge.bad    { color: var(--red); background: var(--red-soft); border-color: rgba(239, 83, 80, 0.35); }
.badge.info   { color: var(--cyan); background: var(--cyan-soft); border-color: rgba(92, 200, 230, 0.35); }
.badge.violet { color: var(--violet); background: rgba(167, 139, 250, 0.1); border-color: rgba(167, 139, 250, 0.35); }

.plate {
    display: inline-flex; align-items: center;
    flex-shrink: 0;
    padding: 3px 9px;
    font-family: var(--font-display);
    font-size: 12px; font-weight: 700;
    letter-spacing: 1.6px;
    color: #d9f5e3;
    background: #050806;
    border: 1px solid var(--line-2);
    border-left: 3px solid var(--acc-500);
    border-radius: 5px;
}
.mono { font-family: var(--font-display); letter-spacing: 0.6px; }
.code { font-family: var(--font-mono); font-size: 12px; }
.accent { color: var(--acc-300); }
.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.amber { color: var(--amber); }
.red { color: var(--red); }

/* ==========================================================================
   KARTLAR / BÖLÜMLER
   ========================================================================== */

.section {
    display: flex; flex-direction: column; gap: 14px;
    padding: 16px;
    background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
    border: 1px solid var(--line);
    border-radius: 14px;
    min-width: 0;
}
.section-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.section-icon {
    width: 30px; height: 30px;
    display: grid; place-items: center; flex-shrink: 0;
    border-radius: 9px;
    color: var(--acc-300);
    background: rgba(var(--acc-rgb), 0.12);
    border: 1px solid rgba(var(--acc-rgb), 0.25);
}
.section-icon svg { width: 16px; height: 16px; }
.section-icon.danger { color: var(--red); background: var(--red-soft); border-color: rgba(239, 83, 80, 0.3); }
.section-icon.amber { color: var(--amber); background: var(--amber-soft); border-color: rgba(242, 169, 59, 0.3); }
.section-head h3 { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: #fff; letter-spacing: 0.3px; white-space: nowrap; }
.section-hint { margin-left: auto; font-size: 11px; color: var(--muted); }
.section-head .section-actions { margin-left: auto; display: flex; gap: 6px; }

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* İstatistik kutuları */
.stat {
    position: relative;
    display: flex; flex-direction: column; gap: 10px;
    padding: 16px 16px 14px;
    background:
        radial-gradient(260px 100px at 0% 0%, rgba(var(--acc-rgb), 0.12), transparent 70%),
        linear-gradient(180deg, var(--bg-3), var(--bg-2));
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
}
.stat-top { display: flex; align-items: center; gap: 10px; }
.stat-label { font-size: 10.5px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.stat-top .section-icon { margin-left: auto; width: 28px; height: 28px; }
.stat-value { font-family: var(--font-display); font-size: 30px; font-weight: 800; color: #fff; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 15px; color: var(--muted); font-weight: 600; }
.stat-sub { font-size: 11.5px; color: var(--muted); }
.stat-sub b { color: var(--acc-300); font-weight: 600; }
.stat-bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.05); overflow: hidden; }
.stat-bar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--acc-600), var(--acc-400)); }

.meta-box {
    display: flex; flex-direction: column; gap: 6px;
    padding: 11px 13px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    min-width: 0;
}
.meta-label { font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.meta-val { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.meta-val.mono { font-family: var(--font-display); letter-spacing: 0.8px; color: var(--acc-300); }

.list-empty {
    grid-column: 1 / -1;
    padding: 26px 14px;
    text-align: center;
    font-size: 12.5px;
    color: var(--muted);
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed var(--line-2);
    border-radius: 12px;
}

/* ==========================================================================
   KARAKTERLER
   ========================================================================== */

.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 8px; align-content: start; }
.player-item {
    position: relative;
    display: flex; align-items: center; gap: 11px;
    padding: 10px 12px;
    background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
    border: 1px solid var(--line);
    border-radius: 11px;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease;
    animation: cardIn 0.3s cubic-bezier(.2, .8, .2, 1) both;
}
.player-item:hover { background: var(--bg-4); border-color: var(--line-3); }
.player-item.is-offline .avatar { filter: grayscale(0.8); opacity: 0.6; }
.player-item.is-offline .pi-name { color: var(--text-2); }
.pi-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pi-name { font-size: 13.5px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi-sub { font-family: var(--font-display); font-size: 11px; letter-spacing: 0.4px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pi-sub b { color: var(--acc-400); font-weight: 700; }
.pi-id { font-family: var(--font-display); font-size: 11px; font-weight: 700; color: var(--acc-300); padding: 2px 7px; border-radius: 6px; background: var(--tint); }

/* Profil */
.profile-card {
    position: relative;
    display: flex; flex-direction: column; gap: 16px;
    padding: 18px;
    background:
        radial-gradient(520px 160px at 0% 0%, rgba(var(--acc-rgb), 0.16), transparent 70%),
        linear-gradient(180deg, var(--bg-3), var(--bg-2));
    border: 1px solid var(--line-2);
    border-radius: 14px;
    overflow: hidden;
}
.profile-top { display: flex; align-items: center; gap: 16px; min-width: 0; }
.profile-titles { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.profile-titles h2 { max-width: 100%; font-family: var(--font-display); font-size: 26px; font-weight: 800; line-height: 1.05; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.profile-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.profile-meta { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }

.subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 4px 0 14px; overflow-x: auto; }
.subtab {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px;
    background: none; border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    color: var(--muted);
    font-size: 13px; font-weight: 600;
    cursor: pointer; white-space: nowrap;
    transition: all 0.18s ease;
}
.subtab svg { width: 15px; height: 15px; }
.subtab:hover { color: var(--text); }
.subtab.active { color: #fff; border-bottom-color: var(--acc-400); }
.subtab.active svg { color: var(--acc-300); }

.action-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tile {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    background: var(--bg-1);
    border: 1px solid var(--line-2);
    border-radius: 11px;
    color: var(--text);
    font-size: 13px; font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all 0.18s ease;
}
.tile-icon { width: 30px; height: 30px; display: grid; place-items: center; flex-shrink: 0; border-radius: 8px; color: var(--acc-400); background: rgba(var(--acc-rgb), 0.12); transition: all 0.18s ease; }
.tile-icon svg { width: 16px; height: 16px; }
.tile:hover { border-color: var(--line-3); background: var(--bg-3); color: #fff; }
.tile:hover .tile-icon { background: rgba(var(--acc-rgb), 0.28); color: var(--acc-300); }
.tile:active { transform: translateY(1px); }
.tile:disabled { opacity: 0.4; cursor: not-allowed; }
.tile-danger .tile-icon { color: var(--red); background: var(--red-soft); }
.tile-danger:hover { border-color: rgba(239, 83, 80, 0.45); background: rgba(239, 83, 80, 0.08); }
.tile-danger:hover .tile-icon { color: #fff; background: rgba(239, 83, 80, 0.35); }

.give-card { display: flex; flex-direction: column; gap: 10px; padding: 12px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line); border-radius: var(--radius); }
.give-title { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-2); }
.give-title svg { width: 15px; height: 15px; color: var(--acc-400); }
.give-row { display: flex; gap: 8px; }
.give-row .input { flex: 1; }
.give-row .input-sm { flex: 0 0 30%; }

.money-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.money-box { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); }
.money-box .section-icon { width: 34px; height: 34px; }
.money-box .mb-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.money-box .mb-val { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }

.kv { display: grid; grid-template-columns: 140px 1fr; gap: 9px 14px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { color: var(--text); min-width: 0; overflow-wrap: anywhere; }

.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 90px 1fr 44px; gap: 10px; align-items: center; font-size: 12px; }
.bar-row .bar-label { color: var(--muted); }
.bar-row .bar-val { font-family: var(--font-display); text-align: right; color: var(--text); }
.bar-track { height: 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.bar-track i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--acc-600), var(--acc-400)); }
.bar-track.amber i { background: linear-gradient(90deg, #b9741c, var(--amber)); }
.bar-track.cyan i { background: linear-gradient(90deg, #2b7fa3, var(--cyan)); }
.bar-track.red i { background: linear-gradient(90deg, #a8302c, var(--red)); }

/* Envanter grid'i */
.inv-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; }
.inv-head { display: flex; align-items: center; gap: 12px; }
.inv-weight { flex: 1; display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.inv-weight .bar-track { flex: 1; }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.slot {
    position: relative;
    aspect-ratio: 1 / 1.08;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    padding: 6px;
    background:
        radial-gradient(60% 60% at 50% 85%, rgba(var(--acc-rgb), 0.08), transparent 70%),
        linear-gradient(180deg, #060a08 0%, #0a120d 100%);
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.slot:hover { border-color: var(--line-3); }
.slot.selected { border-color: var(--acc-400); box-shadow: 0 0 0 1px var(--acc-400), 0 0 18px rgba(var(--acc-rgb), 0.25); }
.slot.empty { cursor: default; background: rgba(0, 0, 0, 0.25); border-style: dashed; }
.slot.empty:hover { border-color: var(--line); }
.slot.drag-over { border-color: var(--acc-400); background: var(--tint); }
.slot-no { position: absolute; top: 5px; left: 7px; font-family: var(--font-display); font-size: 10px; color: var(--dim); }
.slot-count { position: absolute; top: 5px; right: 7px; font-family: var(--font-display); font-size: 11px; font-weight: 700; color: var(--acc-300); }
.slot-icon { width: 46%; aspect-ratio: 1; display: grid; place-items: center; color: var(--acc-400); opacity: 0.8; }
.slot-icon svg { width: 100%; height: 100%; stroke-width: 1.4; }
.slot-icon img { width: 100%; height: 100%; object-fit: contain; }
.slot-label { width: 100%; text-align: center; font-size: 10.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-dur { position: absolute; left: 8px; right: 8px; bottom: 5px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.slot-dur i { display: block; height: 100%; background: var(--acc-400); }
.slot.hotbar .slot-no { color: var(--acc-400); font-weight: 700; }

.inspector { position: sticky; top: 90px; align-self: start; }
.inspector .item-head { display: flex; align-items: center; gap: 12px; }
.inspector .item-thumb { width: 56px; height: 56px; }

/* Satır listeleri (araç / depo) */
.data-list { display: flex; flex-direction: column; gap: 6px; }
.data-row {
    display: grid; align-items: center; gap: 14px;
    padding: 8px 12px;
    background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
    border: 1px solid var(--line);
    border-radius: 12px;
    transition: border-color 0.18s ease;
    animation: cardIn 0.3s cubic-bezier(.2, .8, .2, 1) both;
}
.data-row:hover { border-color: var(--line-3); }
.data-row.clickable { cursor: pointer; }
.veh-row { grid-template-columns: 72px minmax(160px, 1.1fr) minmax(170px, 1.2fr) 140px 110px auto; }
.stash-row { grid-template-columns: 34px minmax(180px, 1.3fr) minmax(170px, 1.2fr) 160px auto; }
.dr-thumb {
    width: 72px; height: 40px;
    display: grid; place-items: center;
    border-radius: 8px;
    color: var(--acc-700);
    background: radial-gradient(60% 60% at 50% 85%, var(--glow), transparent 70%), linear-gradient(180deg, #060a08 0%, #0a120d 100%);
    border: 1px solid var(--line);
    overflow: hidden;
}
.dr-thumb svg { width: 30px; height: 30px; stroke-width: 1.3; }
.dr-main { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.dr-title { max-width: 100%; font-family: var(--font-display); font-size: 14px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.veh-row .dr-title { text-transform: uppercase; }
.veh-row .plate { font-size: 11px; padding: 1px 8px; }
.dr-sub { max-width: 100%; display: flex; align-items: center; gap: 8px; min-width: 0; }
.dr-mono { min-width: 0; font-family: var(--font-display); font-size: 11px; letter-spacing: 0.4px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-owner { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dr-owner-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-owner-sub { font-family: var(--font-display); font-size: 11px; letter-spacing: 0.4px; color: var(--acc-400); }
.dr-owner.is-none .dr-owner-name { color: var(--muted); font-style: italic; }
.dr-stats { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.dr-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.stash-icon { width: 34px; height: 34px; display: grid; place-items: center; flex-shrink: 0; border-radius: 9px; color: var(--acc-400); background: rgba(var(--acc-rgb), 0.12); border: 1px solid var(--line-2); }
.stash-icon svg { width: 16px; height: 16px; }
.stash-row.is-empty .stash-icon { color: var(--muted); background: rgba(255, 255, 255, 0.03); }
.mini-bars { display: flex; gap: 6px; align-items: center; }
.mini-bars .bar-track { width: 60px; height: 4px; }

/* Eşyalar */
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; align-content: start; }
.item-card {
    display: flex; align-items: center; gap: 11px;
    padding: 8px 12px 8px 8px;
    background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
    border: 1px solid var(--line);
    border-radius: 11px;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease;
    animation: cardIn 0.3s cubic-bezier(.2, .8, .2, 1) both;
}
.item-card:hover { background: var(--bg-4); border-color: var(--line-3); }
.item-thumb {
    position: relative;
    width: 44px; height: 44px;
    display: grid; place-items: center; flex-shrink: 0;
    border-radius: 9px;
    color: var(--acc-400);
    background: radial-gradient(60% 60% at 50% 85%, var(--glow), transparent 70%), linear-gradient(180deg, #060a08 0%, #0a120d 100%);
    border: 1px solid var(--line);
    overflow: hidden;
}
.item-thumb > svg { width: 18px; height: 18px; opacity: 0.6; }
.item-thumb img { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); object-fit: contain; }
.item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.item-label { font-family: var(--font-display); font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-sub { min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-2); }
.item-tag { flex-shrink: 0; font-size: 10.5px; font-weight: 600; color: var(--amber); }
.item-total { font-family: var(--font-display); font-size: 12px; font-weight: 700; color: var(--acc-300); }

/* ==========================================================================
   TABLO (veritabanı, ban, log)
   ========================================================================== */

.table-wrap { position: relative; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, 0.25); }
table.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table th {
    position: sticky; top: 0; z-index: 1;
    padding: 10px 12px;
    text-align: left;
    font-size: 10.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
    color: var(--text-2);
    background: var(--bg-3);
    border-bottom: 1px solid var(--line-2);
    white-space: nowrap;
}
.table th .col-type { display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0; text-transform: none; color: var(--dim); font-weight: 500; }
.table th .col-key { color: var(--amber); }
.table td { padding: 9px 12px; border-bottom: 1px solid var(--line); color: var(--text); white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.table td.wrap { white-space: normal; }
.table tr:hover td { background: rgba(var(--acc-rgb), 0.04); }
.table tr.selected td { background: rgba(var(--acc-rgb), 0.09); }
.table td.cell-null { color: var(--dim); font-style: italic; }
.table td.cell-json { font-family: var(--font-mono); font-size: 11.5px; color: var(--cyan); }
.table td.cell-num { font-family: var(--font-display); color: var(--acc-300); }
.table td.cell-masked { color: var(--amber); letter-spacing: 2px; }
.table td.cell-actions { width: 1%; text-align: right; }
.table .td-check { width: 1%; }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; opacity: 0.4; transition: opacity 0.15s; }
.table tr:hover .row-actions { opacity: 1; }

.pager { display: flex; align-items: center; gap: 10px; padding-top: 12px; font-size: 12px; color: var(--muted); }
.pager .spacer { flex: 1; }

/* Veritabanı gezgini */
.db-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 14px; align-items: start; }
.db-tables { position: sticky; top: 90px; max-height: calc(100vh - 120px); display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.db-tables .search input { padding-top: 9px; padding-bottom: 9px; }
.db-list { overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin-right: -6px; padding-right: 4px; }
.db-table {
    display: flex; align-items: center; gap: 9px;
    padding: 7px 9px;
    border-radius: 8px;
    color: var(--text-2);
    font-family: var(--font-mono); font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.db-table svg { width: 14px; height: 14px; color: var(--dim); }
.db-table:hover { background: rgba(255, 255, 255, 0.03); color: #fff; }
.db-table.active { background: var(--tint); color: #fff; }
.db-table.active svg { color: var(--acc-400); }
.db-table .db-count { margin-left: auto; font-family: var(--font-display); font-size: 10.5px; color: var(--muted); }
.db-table .lock { color: var(--amber); }

.sql-editor { min-height: 140px; font-family: var(--font-mono); font-size: 13px; line-height: 1.6; color: #d9f5e3; background: #040705; tab-size: 4; }
.callout { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 10px; font-size: 12.5px; line-height: 1.5; color: var(--text-2); background: var(--tint); border: 1px solid var(--tint-2); }
.callout svg { width: 16px; height: 16px; margin-top: 1px; color: var(--acc-300); }
.callout.warn { color: #ffd59a; background: var(--amber-soft); border-color: rgba(242, 169, 59, 0.28); }
.callout.warn svg { color: var(--amber); }
.callout.danger { color: #ffb4b2; background: var(--red-soft); border-color: rgba(239, 83, 80, 0.3); }
.callout.danger svg { color: var(--red); }
.callout b { color: #fff; }

/* ==========================================================================
   CANLI HARİTA
   ========================================================================== */

.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; height: calc(100vh - 150px); min-height: 520px; }
/* Harita dışı alan, harita görselinin açık deniz rengiyle aynı: kenarlar fark edilmez */
.map-box { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: #0fa8d2; }
#live-map { position: absolute; inset: 0; background: #0fa8d2; }
.map-image { image-rendering: auto; }
.map-overlay { position: absolute; z-index: 500; display: flex; gap: 8px; }
.map-overlay.tl { top: 12px; left: 58px; }
.map-overlay.tr { top: 12px; right: 12px; }
.map-overlay.bl { bottom: 12px; left: 12px; }
.map-overlay .tabs, .map-overlay .sum-chip { background: rgba(5, 8, 6, 0.85); backdrop-filter: blur(8px); }
.map-side { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.map-side .section { flex: 1; min-height: 0; }
.map-players { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; margin-right: -8px; padding-right: 6px; }
.map-player { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-1); cursor: pointer; transition: all 0.15s ease; }
.map-player:hover, .map-player.active { border-color: var(--line-3); background: var(--bg-3); }
.map-player .mp-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 8px currentColor; background: currentColor; }
.map-player .mp-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.map-player .mp-name { font-size: 12.5px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-player .mp-sub { font-size: 10.5px; color: var(--muted); }

.leaflet-container { font-family: var(--font-ui) !important; background: #0fa8d2 !important; }
.pm-marker { position: relative; width: 26px; height: 26px; }
.pm-marker .pm-dot { position: absolute; inset: 6px; border-radius: 50%; background: var(--c); border: 2px solid #050806; box-shadow: 0 0 0 2px var(--c), 0 0 14px var(--c); }
.pm-marker .pm-dir { position: absolute; left: 50%; top: -3px; width: 0; height: 0; margin-left: -5px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 8px solid var(--c); transform-origin: 5px 16px; }
.pm-marker.veh .pm-dot { border-radius: 4px; }
.pm-marker.dead .pm-dot { --c: #6b7280; opacity: 0.7; }
.pm-label { display: none; }
.labels-on .pm-label { display: block; }
.pm-label { position: absolute; left: 50%; top: 27px; transform: translateX(-50%); padding: 1px 6px; border-radius: 5px; font-size: 10.5px; font-weight: 600; color: #fff; background: rgba(5, 8, 6, 0.85); border: 1px solid var(--line-2); white-space: nowrap; pointer-events: none; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #0a110d !important; color: var(--text) !important; border: 1px solid var(--line-2); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7) !important; }
.leaflet-popup-content { margin: 14px !important; min-width: 220px; }
.leaflet-control-zoom a { background: var(--bg-2) !important; color: var(--text) !important; border-color: var(--line-2) !important; }
.map-popup h4 { font-family: var(--font-display); font-size: 15px; color: #fff; margin-bottom: 4px; }
.map-popup .mpp-sub { font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.map-popup .mpp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }

/* ==========================================================================
   EKİPLER
   ========================================================================== */

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.team-card {
    position: relative;
    display: flex; flex-direction: column; gap: 14px;
    padding: 16px;
    background: radial-gradient(320px 120px at 0% 0%, color-mix(in srgb, var(--team) 18%, transparent), transparent 70%), linear-gradient(180deg, var(--bg-3), var(--bg-2));
    border: 1px solid var(--line);
    border-radius: 14px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease;
    animation: cardIn 0.3s cubic-bezier(.2, .8, .2, 1) both;
}
.team-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--team); box-shadow: 0 0 14px var(--team); }
.team-card:hover { border-color: var(--line-3); transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5); }
.team-card.suspended { opacity: 0.65; }
.team-card.suspended::before { background: var(--amber); box-shadow: none; }
.tc-head { display: flex; align-items: center; gap: 12px; }
.team-logo { width: 46px; height: 46px; display: grid; place-items: center; flex-shrink: 0; border-radius: 13px; font-size: 20px; font-family: var(--font-display); font-weight: 800; color: #fff; background: linear-gradient(145deg, color-mix(in srgb, var(--team) 55%, #000), color-mix(in srgb, var(--team) 15%, #000)); border: 1px solid color-mix(in srgb, var(--team) 60%, transparent); overflow: hidden; }
.team-logo.lg { width: 64px; height: 64px; border-radius: 17px; font-size: 26px; }
.tc-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tc-name { font-family: var(--font-display); font-size: 17px; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-role { font-size: 11.5px; font-weight: 600; color: var(--team); }
.tc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tc-stats .meta-box { padding: 9px 11px; }
.tc-foot { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.tc-foot .ch { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); color: var(--text-2); }
.tc-foot .ch svg { width: 13px; height: 13px; }
.tc-foot .spacer { flex: 1; }
.member-stack { display: flex; }
.member-stack .avatar { width: 26px; height: 26px; border-radius: 50%; font-size: 10px; margin-left: -7px; border: 2px solid var(--bg-2); }
.member-stack .avatar:first-child { margin-left: 0; }

.type-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; border: 1px solid; }
.type-pill.legal { color: var(--blue); background: rgba(96, 165, 250, 0.1); border-color: rgba(96, 165, 250, 0.35); }
.type-pill.illegal { color: var(--red); background: var(--red-soft); border-color: rgba(239, 83, 80, 0.35); }
.type-pill.social { color: var(--acc-300); background: var(--tint); border-color: var(--tint-2); }

.member-row { grid-template-columns: 36px minmax(160px, 1.2fr) minmax(140px, 1fr) 130px 120px auto; }
.discord-id { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.discord-chan { display: flex; flex-direction: column; gap: 10px; }
.dc-msg { display: flex; gap: 12px; padding: 10px 0; }
.dc-msg + .dc-msg { border-top: 1px solid var(--line); }
.dc-msg .avatar { width: 34px; height: 34px; border-radius: 50%; }
.dc-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.dc-author { font-size: 13px; font-weight: 600; color: #fff; }
.dc-author small { margin-left: 6px; font-size: 10.5px; font-weight: 500; color: var(--muted); }
.dc-author .bot { margin-left: 6px; padding: 1px 5px; border-radius: 4px; font-size: 9.5px; font-weight: 700; color: #fff; background: #5865f2; vertical-align: 1px; }
.dc-text { font-size: 13px; color: var(--text-2); line-height: 1.5; }
.dc-embed { margin-top: 4px; padding: 12px 14px; border-radius: 6px; background: rgba(0, 0, 0, 0.3); border-left: 4px solid var(--team, var(--acc-400)); display: flex; flex-direction: column; gap: 8px; max-width: 460px; }
.dc-embed h5 { font-size: 14px; color: #fff; }
.dc-embed p { font-size: 12.5px; color: var(--text-2); line-height: 1.5; }
.dc-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dc-fields div { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.dc-fields b { color: #fff; font-size: 11.5px; }
.mention { color: #c9cdfb; background: rgba(88, 101, 242, 0.3); border-radius: 3px; padding: 0 3px; }

.color-row { display: flex; gap: 8px; flex-wrap: wrap; }
.color-swatch { width: 30px; height: 30px; border-radius: 9px; border: 2px solid transparent; cursor: pointer; transition: transform 0.15s; }
.color-swatch:hover { transform: scale(1.08); }
.color-swatch.active { border-color: #fff; box-shadow: 0 0 0 2px var(--bg-1), 0 0 12px currentColor; }
.type-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.type-option { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 10px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-1); cursor: pointer; font-weight: 600; color: var(--text-2); transition: all 0.15s; }
.type-option .to-icon { font-size: 22px; }
.type-option small { font-size: 10.5px; color: var(--muted); font-weight: 500; }
.type-option:hover { border-color: var(--line-3); color: #fff; }
.type-option.active { border-color: var(--acc-400); background: var(--tint); color: #fff; box-shadow: 0 0 0 1px var(--acc-400); }

/* ==========================================================================
   YETKİ YÖNETİMİ
   ========================================================================== */

.perm-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 14px; align-items: start; }
.role-list { display: flex; flex-direction: column; gap: 4px; }
.role-item { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; transition: all 0.15s; }
.role-item:hover { background: rgba(255, 255, 255, 0.03); }
.role-item.active { background: var(--bg-1); border-color: var(--line-3); }
.role-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.role-item .ri-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.role-item .ri-name { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role-item .ri-sub { font-size: 10.5px; color: var(--muted); }
.role-item .ri-count { font-family: var(--font-display); font-size: 11px; font-weight: 700; color: var(--acc-300); }
.role-item.unset .ri-count { color: var(--dim); }
.perm-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.perm-group { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 12px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line); }
.perm-group-head { display: flex; align-items: center; gap: 9px; padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.perm-group-head h4 { font-family: var(--font-display); font-size: 14px; color: #fff; }
.perm-group-head .check { margin-left: auto; font-size: 11px; }
.perm-row { display: flex; align-items: center; gap: 10px; padding: 6px 2px; }
.perm-row .pr-text { flex: 1; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.perm-row .pr-label { font-size: 12.5px; color: var(--text); }
.perm-row .pr-key { font-family: var(--font-mono); font-size: 10.5px; color: var(--dim); }
.perm-row.danger .pr-label::after { content: 'KRİTİK'; margin-left: 7px; padding: 0 5px; border-radius: 4px; font-size: 9px; font-weight: 700; color: var(--red); background: var(--red-soft); vertical-align: 1px; }
.save-bar { position: sticky; bottom: 16px; z-index: 5; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 10px 12px; background: rgba(7, 11, 9, 0.92); backdrop-filter: blur(10px); border: 1px solid var(--line-2); border-radius: 13px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6); }
.master-card { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 11px; background: var(--amber-soft); border: 1px solid rgba(242, 169, 59, 0.3); }
.master-card .avatar { border-color: rgba(242, 169, 59, 0.4); color: var(--amber); background: linear-gradient(145deg, #4a3208, #1a1003); }

/* ==========================================================================
   LOG / ZAMAN ÇİZELGESİ
   ========================================================================== */

.timeline { display: flex; flex-direction: column; }
.tl-item { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; padding: 10px 2px; align-items: start; }
.tl-item + .tl-item { border-top: 1px solid var(--line); }
.tl-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: var(--acc-400); background: var(--tint); }
.tl-icon svg { width: 15px; height: 15px; }
.tl-icon.red { color: var(--red); background: var(--red-soft); }
.tl-icon.amber { color: var(--amber); background: var(--amber-soft); }
.tl-icon.cyan { color: var(--cyan); background: var(--cyan-soft); }
.tl-icon.violet { color: var(--violet); background: rgba(167, 139, 250, 0.12); }
.tl-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--text-2); line-height: 1.45; }
.tl-text b { color: #fff; font-weight: 600; }
.tl-text .tl-sub { font-size: 11px; color: var(--muted); }
.tl-time { font-size: 11px; color: var(--muted); white-space: nowrap; }
.diff { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.diff pre { margin: 0; padding: 8px 10px; border-radius: 8px; font-family: var(--font-mono); font-size: 11px; white-space: pre-wrap; word-break: break-all; }
.diff .old { color: #ffb4b2; background: var(--red-soft); border: 1px solid rgba(239, 83, 80, 0.2); }
.diff .new { color: var(--acc-300); background: var(--tint); border: 1px solid var(--tint-2); }

/* ==========================================================================
   MODAL / TOAST
   ========================================================================== */

.modal-overlay {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; justify-content: center; align-items: center;
    padding: 20px;
    background: rgba(1, 3, 2, 0.78);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}
.modal {
    position: relative;
    width: min(520px, 100%);
    max-height: calc(100vh - 40px);
    display: flex; flex-direction: column;
    background: linear-gradient(180deg, #0a110d, #050806);
    border: 1px solid var(--line-2);
    border-radius: var(--radius-lg);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(var(--acc-rgb), 0.06);
    overflow: hidden;
    animation: modalIn 0.3s cubic-bezier(.2, .8, .2, 1);
}
.modal.lg { width: min(760px, 100%); }
.modal.xl { width: min(1000px, 100%); }
.modal::before { content: ''; position: absolute; top: 0; left: 8%; right: 8%; height: 1px; background: linear-gradient(90deg, transparent, var(--acc-400), transparent); opacity: 0.5; }
.modal.danger::before { background: linear-gradient(90deg, transparent, var(--red), transparent); }
.modal-head { display: flex; align-items: center; gap: 14px; padding: 20px 22px 0; }
.modal-head .confirm-icon { width: 46px; height: 46px; border-radius: 14px; }
.modal-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.modal-kicker { font-size: 10.5px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; color: var(--acc-400); }
.modal-titles h3 { font-family: var(--font-display); font-size: 20px; font-weight: 800; color: #fff; }
.modal-body { padding: 18px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 0 22px 20px; }
.modal-foot .btn { min-width: 110px; }
.confirm-icon { display: grid; place-items: center; flex-shrink: 0; color: var(--acc-300); background: linear-gradient(145deg, var(--acc-800), var(--acc-950)); border: 1px solid var(--line-3); }
.confirm-icon svg { width: 22px; height: 22px; }
.modal.danger .confirm-icon { color: #ffb4b2; background: linear-gradient(145deg, #4d1210, #200605); border-color: rgba(239, 83, 80, 0.45); }

.toast-root { position: fixed; top: 22px; left: 50%; z-index: 2000; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; font-size: 13px; font-weight: 600; color: var(--text); background: linear-gradient(180deg, #0f1a14, #070b09); border: 1px solid var(--line-3); border-radius: 11px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7); animation: toastIn 0.3s cubic-bezier(.2, .8, .2, 1); }
.toast svg { width: 16px; height: 16px; color: var(--acc-400); }
.toast.error { border-color: rgba(239, 83, 80, 0.45); }
.toast.error svg { color: var(--red); }
.toast.out { animation: toastOut 0.25s ease forwards; }

/* ==========================================================================
   GİRİŞ EKRANI
   ========================================================================== */

.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card {
    position: relative;
    width: min(440px, 100%);
    display: flex; flex-direction: column; align-items: center; gap: 18px;
    padding: 36px 32px 28px;
    text-align: center;
    background: radial-gradient(500px 200px at 50% 0%, rgba(var(--acc-rgb), 0.14), transparent 70%), linear-gradient(180deg, rgba(9, 14, 11, 0.98), rgba(4, 6, 5, 0.98));
    border: 1px solid var(--line-2);
    border-radius: 22px;
    box-shadow: 0 40px 120px rgba(0, 0, 0, 0.85);
    animation: panelIn 0.4s cubic-bezier(.2, .8, .2, 1);
}
.login-card::before { content: ''; position: absolute; top: 0; left: 10%; right: 10%; height: 1px; background: linear-gradient(90deg, transparent, var(--acc-400), transparent); opacity: 0.6; }
.login-card .brand-mark { width: 68px; height: 68px; border-radius: 20px; }
.login-card .brand-mark svg { width: 32px; height: 32px; }
.login-card h1 { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: #fff; }
.login-card p { font-size: 13px; color: var(--muted); line-height: 1.55; }
.login-card .btn-discord { width: 100%; padding: 13px 18px; font-size: 14.5px; }
.login-card .btn-discord svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.login-divider { width: 100%; display: flex; align-items: center; gap: 12px; font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 1.4px; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.login-foot { display: flex; gap: 14px; font-size: 11px; color: var(--dim); }
.emergency { width: 100%; display: flex; flex-direction: column; gap: 10px; text-align: left; }

/* ==========================================================================
   MENÜ UYARI ROZETİ (bekleyen rapor, IP talebi vb.)
   ========================================================================== */

.nav-link .nav-alert, .nav-link.active .nav-alert { margin-left: auto; color: #fff; background: var(--red); box-shadow: 0 0 10px rgba(239, 83, 80, 0.45); }

/* ==========================================================================
   LOG MERKEZİ (2L script logları — Discord embed görünümü)
   ========================================================================== */

.glog-list { display: flex; flex-direction: column; gap: 6px; }
.glog {
    --gc: var(--acc-400);
    display: flex; flex-direction: column; gap: 6px;
    padding: 9px 12px 10px 14px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--line);
    border-left: 3px solid var(--gc);
    animation: cardIn 0.25s ease both;
}
.glog:hover { border-color: var(--line-2); border-left-color: var(--gc); }
.glog-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.glog-res { flex-shrink: 0; padding: 1px 7px; border-radius: 5px; font-family: var(--font-mono); font-size: 10.5px; color: var(--gc); background: color-mix(in srgb, var(--gc) 12%, transparent); border: 1px solid color-mix(in srgb, var(--gc) 30%, transparent); }
.glog-title { min-width: 0; color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.glog-time { margin-left: auto; flex-shrink: 0; font-size: 11px; color: var(--muted); }
.glog-body { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; color: var(--text-2); }
.glog-player { display: inline-flex; align-items: center; gap: 5px; color: var(--acc-300); font-weight: 600; }
.glog-player:hover { text-decoration: underline; }
.glog-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.glog-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; font-size: 11.5px; font-family: var(--font-mono); color: var(--text-2); background: var(--bg-1); border: 1px solid var(--line-2); cursor: pointer; transition: all 0.15s; }
.glog-chip:hover { color: #fff; border-color: var(--line-3); }
.glog-chip.active { color: #fff; background: var(--tint); border-color: var(--acc-400); }

/* ==========================================================================
   RAPORLAR
   ========================================================================== */

.rp-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 14px; align-items: start; }
.rp-list { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 90px; max-height: calc(100vh - 200px); overflow-y: auto; padding-right: 4px; }
.rp-item { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 11px 13px 11px 16px; border-radius: 12px; background: linear-gradient(180deg, var(--bg-3), var(--bg-2)); border: 1px solid var(--line); cursor: pointer; overflow: hidden; transition: border-color 0.15s; }
.rp-item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--acc-500); }
.rp-item.open::before { background: var(--red); }
.rp-item.claimed::before { background: var(--amber); }
.rp-item:hover { border-color: var(--line-2); }
.rp-item.active { border-color: var(--line-3); background: var(--bg-4); }
.rp-item-top { display: flex; align-items: center; gap: 8px; }
.rp-time { margin-left: auto; font-size: 11px; }
.rp-item-title { font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-item-sub { font-size: 11.5px; color: var(--muted); }
.rp-text { padding: 12px 14px; border-radius: 10px; background: rgba(0, 0, 0, 0.3); border: 1px solid var(--line); font-size: 13px; line-height: 1.6; color: var(--text); white-space: pre-wrap; }
.rp-thread { display: flex; flex-direction: column; gap: 10px; }
.rp-msg { display: flex; gap: 10px; }
.rp-msg-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 9px 12px; border-radius: 10px; background: var(--tint); border: 1px solid var(--tint-2); font-size: 13px; color: var(--text); line-height: 1.5; }
.rp-msg-head { display: flex; align-items: center; gap: 8px; font-size: 11.5px; }
.rp-msg-head b { color: #fff; }

@media (max-width: 1024px) {
    .rp-layout { grid-template-columns: 1fr; }
    .rp-list { position: static; max-height: 320px; }
}

/* ==========================================================================
   ANİMASYONLAR / RESPONSIVE
   ========================================================================== */

@keyframes fadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes panelIn  { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes modalIn  { from { opacity: 0; transform: translateY(10px) scale(0.97); } to { opacity: 1; transform: none; } }
@keyframes cardIn   { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toastIn  { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px); } }
@keyframes spin     { to { transform: rotate(360deg); } }

@media (max-width: 1280px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .profile-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .inv-wrap { grid-template-columns: 1fr; }
    .inspector { position: static; }
    .veh-row { grid-template-columns: 72px minmax(140px, 1fr) minmax(140px, 1fr) 120px auto; }
    .veh-row .dr-stats { display: none; }
    .global-search { width: 220px; }
}
@media (max-width: 1024px) {
    .app { grid-template-columns: 1fr; }
    .sidebar { position: fixed; left: 0; top: 0; z-index: 900; width: var(--sidebar-w); transform: translateX(-100%); transition: transform 0.25s ease; box-shadow: 30px 0 80px rgba(0, 0, 0, 0.7); }
    body.nav-open .sidebar { transform: none; }
    .icon-btn.menu-btn { display: grid; }
    .grid-main, .grid-2, .grid-3, .db-layout, .perm-layout, .map-layout { grid-template-columns: 1fr; }
    .db-tables { position: static; max-height: 300px; }
    .map-layout { height: auto; }
    .map-box { height: 60vh; }
    .global-search, .topbar .sum-chip { display: none; }
}
@media (max-width: 640px) {
    .content { padding: 16px; }
    .topbar { padding: 12px 16px; }
    .grid-4, .money-row, .form-grid, .tc-stats { grid-template-columns: 1fr; }
    .profile-meta { grid-template-columns: 1fr 1fr; }
    .profile-top { flex-wrap: wrap; }
    .veh-row, .stash-row, .member-row { grid-template-columns: 1fr; }
    .dr-thumb { display: none; }
    .kv { grid-template-columns: 1fr; gap: 2px; }
    .kv dd { margin-bottom: 8px; }
    .type-picker { grid-template-columns: 1fr; }
    .footer { flex-direction: column; gap: 6px; }
}
