/* =========================================================
   DDMT2 Admin – modern dark UI
   ========================================================= */

/* Alap (sötét) – :root csak ha nincs data-theme; default explicit */
:root {
    --radius: 12px;
    --radius-sm: 8px;
    --sidebar-w: 260px;
    --topbar-h: 64px;
    --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

html:not([data-theme]),
html[data-theme="default"] {
    --bg: #0b0f17;
    --bg-elevated: #111827;
    --bg-card: #151c2c;
    --bg-hover: #1a2336;
    --border: #243047;
    --border-soft: #1c2639;
    --text: #e8edf7;
    --text-muted: #8b97ad;
    --text-dim: #667085;
    --primary: #4f7cff;
    --primary-hover: #3d6aef;
    --primary-soft: rgba(79, 124, 255, 0.15);
    --primary-rgb: 79, 124, 255;
    --accent: #7c5cff;
    --success: #22c55e;
    --success-soft: rgba(34, 197, 94, 0.12);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.12);
    --warning: #f59e0b;
    --warning-soft: rgba(245, 158, 11, 0.12);
    --purple: #a78bfa;
    --cyan: #22d3ee;
    --amber: #fbbf24;
    --green: #34d399;
    --red: #f87171;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    --brand-gradient: linear-gradient(135deg, var(--primary), var(--accent));
    --welcome-gradient: linear-gradient(135deg, rgba(79, 124, 255, 0.14), rgba(167, 139, 250, 0.08));
    --link-hover: #c5d4ff;
    --nav-active-bg: rgba(79, 124, 255, 0.15);
    --nav-active-color: #c5d4ff;
    --chip-badge-bg: rgba(79, 124, 255, 0.15);
    --chip-badge-color: #a8c0ff;
    --topbar-bg: rgba(11, 15, 23, 0.85);
    --table-head-bg: rgba(0, 0, 0, 0.15);
    --modal-backdrop: rgba(5, 8, 14, 0.72);
    --tooltip-bg: #0f1522;
}

/* Rózsaszín téma – élénk pink */
html[data-theme="pink"] {
    --bg: #1c0a15;
    --bg-elevated: #280f1c;
    --bg-card: #321424;
    --bg-hover: #421a30;
    --border: #7a3058;
    --border-soft: #55203c;
    --text: #fff5fa;
    --text-muted: #f0a8cc;
    --text-dim: #d47aa8;
    --primary: #ff5aad;
    --primary-hover: #ff3d9e;
    --primary-soft: rgba(255, 90, 173, 0.28);
    --primary-rgb: 255, 90, 173;
    --accent: #ff7ac2;
    --success: #4ade80;
    --success-soft: rgba(74, 222, 128, 0.14);
    --danger: #ff6b8a;
    --danger-soft: rgba(255, 107, 138, 0.2);
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, 0.14);
    --purple: #ff8ad0;
    --cyan: #ffb8e0;
    --amber: #fcd34d;
    --green: #6ee7b7;
    --red: #ff6b8a;
    --shadow: 0 12px 48px rgba(80, 8, 50, 0.55);
    --brand-gradient: linear-gradient(135deg, #ff8ad0, #ff5aad 42%, #ff2d95);
    --welcome-gradient: linear-gradient(135deg, rgba(255, 90, 173, 0.38), rgba(255, 45, 149, 0.14));
    --link-hover: #ffd6ec;
    --nav-active-bg: rgba(255, 90, 173, 0.32);
    --nav-active-color: #ffd6ec;
    --chip-badge-bg: rgba(255, 90, 173, 0.32);
    --chip-badge-color: #ffb8e0;
    --topbar-bg: rgba(28, 10, 21, 0.88);
    --table-head-bg: rgba(0, 0, 0, 0.2);
    --modal-backdrop: rgba(20, 5, 15, 0.72);
    --tooltip-bg: #1c0a15;
}

html {
    color-scheme: dark;
}

html[data-theme="light"] {
    color-scheme: light;
}

/* Világos / fehér téma */
html[data-theme="light"] {
    --bg: #f4f6fa;
    --bg-elevated: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #eef2f8;
    --border: #d8dee9;
    --border-soft: #e8ecf3;
    --text: #0f172a;
    --text-muted: #5b6b82;
    --text-dim: #8b97ad;
    --primary: #3b6cf5;
    --primary-hover: #2f5be0;
    --primary-soft: rgba(59, 108, 245, 0.12);
    --primary-rgb: 59, 108, 245;
    --accent: #6366f1;
    --success: #16a34a;
    --success-soft: rgba(22, 163, 74, 0.1);
    --danger: #dc2626;
    --danger-soft: rgba(220, 38, 38, 0.1);
    --warning: #d97706;
    --warning-soft: rgba(217, 119, 6, 0.1);
    --purple: #7c3aed;
    --cyan: #0891b2;
    --amber: #d97706;
    --green: #059669;
    --red: #dc2626;
    --shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
    --brand-gradient: linear-gradient(135deg, #3b6cf5, #6366f1);
    --welcome-gradient: linear-gradient(135deg, rgba(59, 108, 245, 0.1), rgba(99, 102, 241, 0.05));
    --link-hover: #1d4ed8;
    --nav-active-bg: rgba(59, 108, 245, 0.1);
    --nav-active-color: #1d4ed8;
    --chip-badge-bg: rgba(59, 108, 245, 0.12);
    --chip-badge-color: #1d4ed8;
    --topbar-bg: rgba(255, 255, 255, 0.9);
    --table-head-bg: rgba(15, 23, 42, 0.04);
    --modal-backdrop: rgba(15, 23, 42, 0.4);
    --tooltip-bg: #ffffff;
}

/* Zöld téma */
html[data-theme="green"] {
    --bg: #0a120e;
    --bg-elevated: #101a14;
    --bg-card: #15241a;
    --bg-hover: #1c3023;
    --border: #2d4a38;
    --border-soft: #213628;
    --text: #ecfdf3;
    --text-muted: #8fb89a;
    --text-dim: #6b9076;
    --primary: #34d399;
    --primary-hover: #10b981;
    --primary-soft: rgba(52, 211, 153, 0.16);
    --primary-rgb: 52, 211, 153;
    --accent: #6ee7b7;
    --success: #4ade80;
    --success-soft: rgba(74, 222, 128, 0.14);
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.14);
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, 0.12);
    --purple: #a7f3d0;
    --cyan: #5eead4;
    --amber: #fcd34d;
    --green: #34d399;
    --red: #f87171;
    --shadow: 0 12px 44px rgba(8, 30, 18, 0.5);
    --brand-gradient: linear-gradient(135deg, #6ee7b7, #34d399 45%, #059669);
    --welcome-gradient: linear-gradient(135deg, rgba(52, 211, 153, 0.18), rgba(5, 150, 105, 0.08));
    --link-hover: #a7f3d0;
    --nav-active-bg: rgba(52, 211, 153, 0.16);
    --nav-active-color: #a7f3d0;
    --chip-badge-bg: rgba(52, 211, 153, 0.18);
    --chip-badge-color: #6ee7b7;
    --topbar-bg: rgba(10, 18, 14, 0.88);
    --table-head-bg: rgba(0, 0, 0, 0.18);
    --modal-backdrop: rgba(5, 14, 10, 0.72);
    --tooltip-bg: #0f1a13;
}

/* Arany téma */
html[data-theme="gold"] {
    --bg: #120e08;
    --bg-elevated: #1a140c;
    --bg-card: #211a10;
    --bg-hover: #2c2314;
    --border: #5c4a28;
    --border-soft: #3d3220;
    --text: #fff8e8;
    --text-muted: #d4b878;
    --text-dim: #a89058;
    --primary: #e8b84a;
    --primary-hover: #d4a034;
    --primary-soft: rgba(232, 184, 74, 0.18);
    --primary-rgb: 232, 184, 74;
    --accent: #f5d76e;
    --success: #4ade80;
    --success-soft: rgba(74, 222, 128, 0.14);
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.14);
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, 0.16);
    --purple: #e8c878;
    --cyan: #f0d78c;
    --amber: #fcd34d;
    --green: #86efac;
    --red: #f87171;
    --shadow: 0 12px 44px rgba(40, 28, 8, 0.55);
    --brand-gradient: linear-gradient(135deg, #f5d76e, #e8b84a 45%, #c4922a);
    --welcome-gradient: linear-gradient(135deg, rgba(232, 184, 74, 0.22), rgba(196, 146, 42, 0.1));
    --link-hover: #ffe9a8;
    --nav-active-bg: rgba(232, 184, 74, 0.2);
    --nav-active-color: #ffe9a8;
    --chip-badge-bg: rgba(232, 184, 74, 0.22);
    --chip-badge-color: #f5d76e;
    --topbar-bg: rgba(18, 14, 8, 0.9);
    --table-head-bg: rgba(0, 0, 0, 0.22);
    --modal-backdrop: rgba(12, 9, 4, 0.75);
    --tooltip-bg: #1a140c;
}

/* Gyémánt téma – hideg ezüst / jégkék */
html[data-theme="diamond"] {
    --bg: #0a0e14;
    --bg-elevated: #101820;
    --bg-card: #141c28;
    --bg-hover: #1c2836;
    --border: #3a4a5c;
    --border-soft: #283848;
    --text: #f0f6fc;
    --text-muted: #a8bdd4;
    --text-dim: #7a90a8;
    --primary: #7ec8f0;
    --primary-hover: #5ab4e8;
    --primary-soft: rgba(126, 200, 240, 0.16);
    --primary-rgb: 126, 200, 240;
    --accent: #c8e4f8;
    --success: #4ade80;
    --success-soft: rgba(74, 222, 128, 0.14);
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.14);
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, 0.12);
    --purple: #b8d4f0;
    --cyan: #67e8f9;
    --amber: #fcd34d;
    --green: #6ee7b7;
    --red: #f87171;
    --shadow: 0 12px 44px rgba(8, 16, 28, 0.55);
    --brand-gradient: linear-gradient(135deg, #e8f4fc, #7ec8f0 48%, #4a9fd4);
    --welcome-gradient: linear-gradient(135deg, rgba(126, 200, 240, 0.2), rgba(200, 228, 248, 0.08));
    --link-hover: #d8eefc;
    --nav-active-bg: rgba(126, 200, 240, 0.18);
    --nav-active-color: #d8eefc;
    --chip-badge-bg: rgba(126, 200, 240, 0.2);
    --chip-badge-color: #b8e0f8;
    --topbar-bg: rgba(10, 14, 20, 0.9);
    --table-head-bg: rgba(0, 0, 0, 0.22);
    --modal-backdrop: rgba(6, 10, 16, 0.75);
    --tooltip-bg: #101820;
}

/* Lila téma – erősebb ibolya / neon-amethyst */
html[data-theme="purple"] {
    --bg: #0e0618;
    --bg-elevated: #180a28;
    --bg-card: #1f0f32;
    --bg-hover: #2e1848;
    --border: #6b3f9e;
    --border-soft: #4a2870;
    --text: #faf5ff;
    --text-muted: #d4b8f5;
    --text-dim: #a878e0;
    --primary: #c084fc;
    --primary-hover: #a855f7;
    --primary-soft: rgba(192, 132, 252, 0.28);
    --primary-rgb: 192, 132, 252;
    --accent: #e879f9;
    --success: #4ade80;
    --success-soft: rgba(74, 222, 128, 0.14);
    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.14);
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, 0.12);
    --purple: #e9d5ff;
    --cyan: #d8b4fe;
    --amber: #fcd34d;
    --green: #6ee7b7;
    --red: #f87171;
    --shadow: 0 12px 48px rgba(60, 10, 100, 0.55);
    --brand-gradient: linear-gradient(135deg, #f0abfc, #c084fc 40%, #9333ea 75%, #7e22ce);
    --welcome-gradient: linear-gradient(135deg, rgba(192, 132, 252, 0.38), rgba(147, 51, 234, 0.18));
    --link-hover: #f3e8ff;
    --nav-active-bg: rgba(192, 132, 252, 0.32);
    --nav-active-color: #f3e8ff;
    --chip-badge-bg: rgba(192, 132, 252, 0.32);
    --chip-badge-color: #e9d5ff;
    --topbar-bg: rgba(14, 6, 24, 0.92);
    --table-head-bg: rgba(40, 10, 70, 0.35);
    --modal-backdrop: rgba(12, 4, 24, 0.78);
    --tooltip-bg: #180a28;
}

/* After Dark – 18+ velvet: mély bordó / fekete + meleg arany */
html[data-theme="afterdark"] {
    --bg: #0a0406;
    --bg-elevated: #14080c;
    --bg-card: #1c0c12;
    --bg-hover: #2a121a;
    --border: #6b2a3c;
    --border-soft: #4a1c2a;
    --text: #fff5f7;
    --text-muted: #e8a0b0;
    --text-dim: #c07088;
    --primary: #e11d48;
    --primary-hover: #f43f5e;
    --primary-soft: rgba(225, 29, 72, 0.26);
    --primary-rgb: 225, 29, 72;
    --accent: #f5c26b;
    --success: #4ade80;
    --success-soft: rgba(74, 222, 128, 0.14);
    --danger: #fb7185;
    --danger-soft: rgba(251, 113, 133, 0.2);
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, 0.14);
    --purple: #f0a8bc;
    --cyan: #fcd34d;
    --amber: #f5c26b;
    --green: #6ee7b7;
    --red: #fb7185;
    --shadow: 0 14px 52px rgba(50, 4, 18, 0.65);
    --brand-gradient: linear-gradient(135deg, #f5c26b, #f43f5e 38%, #e11d48 68%, #9f1239);
    --welcome-gradient: linear-gradient(135deg, rgba(225, 29, 72, 0.4), rgba(245, 194, 107, 0.12));
    --link-hover: #fecdd3;
    --nav-active-bg: rgba(225, 29, 72, 0.3);
    --nav-active-color: #fecdd3;
    --chip-badge-bg: rgba(245, 194, 107, 0.18);
    --chip-badge-color: #f5c26b;
    --topbar-bg: rgba(10, 4, 6, 0.92);
    --table-head-bg: rgba(40, 8, 16, 0.4);
    --modal-backdrop: rgba(8, 2, 4, 0.8);
    --tooltip-bg: #14080c;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.9em;
    background: var(--bg-hover);
    padding: 0.1em 0.35em;
    border-radius: 4px;
    color: var(--cyan);
}

/* ---------- Login ---------- */

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px 20px;
    position: relative;
    overflow: hidden;
}

.login-bg {
    position: absolute;
    inset: 0;
    background: var(--bg);
    z-index: 0;
    overflow: hidden;
}

.login-bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.55;
    pointer-events: none;
}

.login-bg-orb-a {
    width: min(520px, 70vw);
    height: min(520px, 70vw);
    top: -12%;
    left: -8%;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.45), transparent 68%);
    animation: login-float-a 14s ease-in-out infinite alternate;
}

.login-bg-orb-b {
    width: min(420px, 60vw);
    height: min(420px, 60vw);
    right: -10%;
    bottom: -8%;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.28), transparent 70%);
    animation: login-float-b 18s ease-in-out infinite alternate;
}

.login-bg-orb-c {
    width: min(280px, 40vw);
    height: min(280px, 40vw);
    top: 42%;
    left: 55%;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.16), transparent 70%);
    animation: login-float-c 12s ease-in-out infinite alternate;
}

.login-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
    opacity: 0.5;
    pointer-events: none;
}

[data-theme="light"] .login-bg-grid {
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
}

@keyframes login-float-a {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(28px, 18px) scale(1.06); }
}

@keyframes login-float-b {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(-22px, -16px) scale(1.08); }
}

@keyframes login-float-c {
    from { transform: translate(0, 0); }
    to { transform: translate(-18px, 22px); }
}

.login-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
}

.login-card {
    position: relative;
    width: 100%;
    background: color-mix(in srgb, var(--bg-card) 92%, transparent);
    border: 1px solid color-mix(in srgb, var(--border) 85%, rgba(var(--primary-rgb), 0.35));
    border-radius: 20px;
    padding: 40px 36px 30px;
    box-shadow:
        var(--shadow),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset,
        0 24px 64px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(var(--primary-rgb), 0.55),
        transparent
    );
    pointer-events: none;
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-brand {
    position: relative;
    display: inline-flex;
    margin-bottom: 4px;
}

.login-brand-glow {
    position: absolute;
    inset: -10px;
    border-radius: 22px;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.45), transparent 70%);
    filter: blur(10px);
    opacity: 0.7;
    z-index: -1;
    pointer-events: none;
}

.login-header h1 {
    margin: 14px 0 6px;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.login-subtitle {
    margin: 0 0 12px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.login-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--chip-badge-color);
    background: var(--chip-badge-bg);
    border: 1px solid rgba(var(--primary-rgb), 0.22);
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--brand-gradient);
    color: #fff;
    display: inline-grid;
    place-items: center;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: -0.03em;
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.35);
}

.brand-mark-lg {
    width: 60px;
    height: 60px;
    font-size: 1.15rem;
    border-radius: 16px;
    box-shadow:
        0 10px 28px rgba(var(--primary-rgb), 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

.login-alert {
    margin-bottom: 16px;
}

.login-form .login-field {
    margin-bottom: 16px;
}

.login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-icon {
    position: absolute;
    left: 12px;
    display: inline-flex;
    color: var(--text-dim);
    pointer-events: none;
    z-index: 1;
}

.login-input {
    padding-left: 42px !important;
    padding-right: 44px !important;
    height: 46px;
    border-radius: 12px !important;
    background: var(--bg-elevated) !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.login-input:focus {
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.18);
}

.login-toggle-pass {
    position: absolute;
    right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    transition: color 0.15s ease, background 0.15s ease;
}

.login-toggle-pass:hover {
    color: var(--text);
    background: rgba(var(--primary-rgb), 0.1);
}

.login-toggle-pass .is-hidden {
    display: none;
}

.login-submit {
    margin-top: 8px;
    height: 48px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.98rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 10px 28px rgba(var(--primary-rgb), 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.login-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(var(--primary-rgb), 0.36);
}

.login-submit:active {
    transform: translateY(0);
}

.login-footer {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border-soft);
}

.login-footer-note {
    margin: 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-dim);
    line-height: 1.45;
}

.login-footer-note code {
    font-size: 0.85em;
}

/* ---------- Forms ---------- */

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font: inherit;
    font-size: 0.95rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control::placeholder {
    color: var(--text-dim);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-block {
    width: 100%;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border);
}

.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-icon span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 1px;
}

/* ---------- Alerts ---------- */

.alert {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 18px;
    border: 1px solid transparent;
}

.alert-error,
.alert-danger {
    background: var(--danger-soft);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

.alert-success {
    background: var(--success-soft);
    border-color: rgba(34, 197, 94, 0.3);
    color: #86efac;
}

.alert-warning {
    background: var(--warning-soft);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fcd34d;
}

.alert ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

.mb-0 {
    margin-bottom: 0 !important;
}

/* ---------- App shell ---------- */

.app-body {
    min-height: 100vh;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: var(--bg-elevated);
    border-right: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 40;
    transition: transform 0.2s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 18px;
    border-bottom: 1px solid var(--border-soft);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-text strong {
    font-size: 0.95rem;
}

.brand-text span {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section {
    margin: 0 8px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2px;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--text);
    text-decoration: none;
}

.nav-link.is-active {
    background: var(--nav-active-bg);
    color: var(--nav-active-color);
}

.nav-icon {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background: currentColor;
    opacity: 0.7;
    flex-shrink: 0;
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center;
    -webkit-mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
}

.nav-icon-grid {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Crect x='3' y='3' width='7' height='7'/%3E%3Crect x='14' y='3' width='7' height='7'/%3E%3Crect x='3' y='14' width='7' height='7'/%3E%3Crect x='14' y='14' width='7' height='7'/%3E%3C/svg%3E");
}

.nav-icon-user {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}

.nav-icon-users {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
}

.nav-icon-shield {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E");
}

.nav-icon-clock {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12 6 12 12 16 14'/%3E%3C/svg%3E");
}

.nav-icon-list {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cline x1='8' y1='6' x2='21' y2='6'/%3E%3Cline x1='8' y1='12' x2='21' y2='12'/%3E%3Cline x1='8' y1='18' x2='21' y2='18'/%3E%3Cline x1='3' y1='6' x2='3.01' y2='6'/%3E%3Cline x1='3' y1='12' x2='3.01' y2='12'/%3E%3Cline x1='3' y1='18' x2='3.01' y2='18'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cline x1='8' y1='6' x2='21' y2='6'/%3E%3Cline x1='8' y1='12' x2='21' y2='12'/%3E%3Cline x1='8' y1='18' x2='21' y2='18'/%3E%3Cline x1='3' y1='6' x2='3.01' y2='6'/%3E%3Cline x1='3' y1='12' x2='3.01' y2='12'/%3E%3Cline x1='3' y1='18' x2='3.01' y2='18'/%3E%3C/svg%3E");
}

.nav-icon-box {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/%3E%3Cpolyline points='3.27 6.96 12 12.01 20.73 6.96'/%3E%3Cline x1='12' y1='22.08' x2='12' y2='12'/%3E%3C/svg%3E");
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z'/%3E%3Cpolyline points='3.27 6.96 12 12.01 20.73 6.96'/%3E%3Cline x1='12' y1='22.08' x2='12' y2='12'/%3E%3C/svg%3E");
}

/* Legördülő menü (Logok) */
.nav-group {
    margin-bottom: 2px;
}

.nav-group-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.nav-group-label {
    flex: 1;
}

/* Adminok: fő link + nyíl (lenyíló) */
.nav-group-head {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin-bottom: 2px;
}

.nav-group-main {
    flex: 1;
    min-width: 0;
    margin-bottom: 0 !important;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.nav-group-chevron-btn {
    flex-shrink: 0;
    width: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    border-radius: 0 10px 10px 0;
    opacity: 0.75;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.nav-group-chevron-btn:hover {
    opacity: 1;
    background: var(--bg-hover);
}

.nav-group.has-active .nav-group-chevron-btn,
.nav-group.is-open .nav-group-chevron-btn {
    opacity: 1;
}

.nav-group-chevron-btn .nav-chevron {
    margin-right: 0;
}

.nav-chevron {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(-45deg);
    opacity: 0.55;
    transition: transform 0.15s ease;
    flex-shrink: 0;
    margin-right: 4px;
}

.nav-group.is-open .nav-chevron {
    transform: rotate(45deg);
    margin-top: -2px;
}

.nav-submenu {
    padding: 2px 0 6px 12px;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.nav-submenu[hidden] {
    display: none !important;
}

.nav-sublink {
    padding: 8px 12px 8px 14px;
    font-size: 0.85rem;
    margin-bottom: 0;
}

.nav-subdot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.45;
    flex-shrink: 0;
    margin-left: 6px;
}

.nav-sublink.is-active .nav-subdot {
    opacity: 1;
    background: var(--primary);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.28);
    color: #fecaca;
}

.action-btns {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.row-current {
    background: rgba(79, 124, 255, 0.08);
}

.row-current:hover {
    background: rgba(79, 124, 255, 0.12) !important;
}

#sessionsPanel.is-loading .table-wrap {
    opacity: 0.55;
    pointer-events: none;
}

/* Fiók / részletes nézet */
.link-login {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dotted rgba(232, 237, 247, 0.35);
}

.link-login:hover {
    color: var(--link-hover);
    border-bottom-color: rgba(var(--primary-rgb), 0.55);
    text-decoration: none;
}

.detail-top {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 14px;
}

.detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 20px 22px;
    margin-bottom: 16px;
    background: var(--welcome-gradient);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.detail-header-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.detail-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    background: var(--brand-gradient);
    box-shadow: 0 6px 18px rgba(var(--primary-rgb), 0.3);
    overflow: hidden;
}

.detail-title {
    margin: 0 0 4px;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.detail-sub {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.detail-header-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-dim);
    text-align: right;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(280px, 380px) 1fr;
    gap: 16px;
    align-items: start;
}

/* Karakter oldal: mindkét kártya fix szélesség (nem nyúlik szét) */
.detail-grid-player {
    grid-template-columns: minmax(280px, 380px) minmax(280px, 380px);
    justify-content: start;
}

.detail-grid-player.has-commands {
    grid-template-columns: minmax(280px, 360px) minmax(260px, 340px) minmax(300px, 400px);
    align-items: start; /* Kapcsolatok ne nyúljon szét */
}

/* Alapadatok + Parancsok: a Parancsok magassága JS-sel = Alapadatok */
.detail-grid-player.has-commands > .panel-alapadatok {
    /* referencia panel – természetes magasság */
}

.command-log-panel {
    display: flex;
    flex-direction: column;
    min-height: 0;
    box-sizing: border-box;
}

.command-log-panel .panel-body {
    padding: 0;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.command-log-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 14px 14px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.command-log-panel .empty-state {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.command-log-item {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-soft);
    background: var(--bg);
}

.command-log-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.command-log-time {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.command-log-ip {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.command-log-cmd {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.35;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.detail-col-right {
    display: flex;
    flex-direction: column;
    gap: 16px; /* ugyanakkora köz, mint a detail-grid-nél */
    min-width: 0;
}

@media (max-width: 1200px) {
    .detail-grid-player.has-commands {
        grid-template-columns: minmax(280px, 380px) minmax(280px, 1fr);
    }
}

@media (max-width: 1000px) {
    .detail-grid,
    .detail-grid-player,
    .detail-grid-player.has-commands {
        grid-template-columns: 1fr;
    }

    .detail-header-meta {
        text-align: left;
    }
}

.info-list {
    margin: 0;
    padding: 4px 0;
}

.info-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--border-soft);
    font-size: 0.88rem;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row dt {
    margin: 0;
    color: var(--text-dim);
    font-weight: 500;
}

.info-row dd {
    margin: 0;
    color: var(--text);
    word-break: break-word;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    padding: 16px !important;
}

/* A ban gomb wrapper ne zsugorítsa a cellát – a gomb közvetlen grid-elemként viselkedjen */
#banActionWrap {
    display: contents;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font: inherit;
    text-align: center;
    cursor: not-allowed;
    opacity: 0.55;
    transition: border-color 0.15s, opacity 0.15s;
    width: 100%;
    box-sizing: border-box;
    min-height: 100%;
}

.action-btn:not(:disabled) {
    cursor: pointer;
    opacity: 1;
}

.action-btn:not(:disabled):hover {
    border-color: var(--primary);
    background: var(--bg-hover);
}

.action-btn-icon {
    font-size: 1.2rem;
    line-height: 1;
    margin-bottom: 0;
}

.action-btn-label {
    font-size: 0.88rem;
    font-weight: 600;
    text-align: center;
}

/* Élő (aktív) gyors művelet gomb */
.action-btn-live {
    opacity: 1;
    cursor: pointer;
    border-color: rgba(var(--primary-rgb), 0.45);
    background: rgba(var(--primary-rgb), 0.08);
}

.action-btn-live:hover {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.16);
}

.action-btn-live:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.actions-note {
    padding: 0 16px 14px;
    margin: 0;
}

.detail-actions {
    margin-bottom: 16px;
}

.detail-avatar-char {
    background: linear-gradient(135deg, #34d399, #059669);
    box-shadow: 0 6px 18px rgba(52, 211, 153, 0.28);
}

.detail-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1200px) {
    .detail-grid-3 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 800px) {
    .detail-grid-3 {
        grid-template-columns: 1fr;
    }
}

.stat-bars {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 14px 16px 6px;
}

.stat-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    background: var(--bg);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
}

.stat-bar-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--text-dim);
}

.stat-bar-item strong {
    font-size: 1.15rem;
    font-variant-numeric: tabular-nums;
}

.relation-block {
    border-bottom: 1px solid var(--border-soft);
}

.relation-block:last-child {
    border-bottom: none;
}

.relation-title {
    margin: 0;
    padding: 12px 18px 4px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

.sibling-list {
    list-style: none;
    margin: 0;
    padding: 6px 10px 12px;
}

.sibling-list li {
    margin: 0;
}

.sibling-link {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: inherit;
    text-decoration: none;
}

.sibling-link:hover {
    background: var(--bg-hover);
    text-decoration: none;
    color: inherit;
}

.sibling-link strong {
    color: var(--link-hover);
}

/* ---------- Metin2-style inventory ---------- */

.inventory-panel {
    margin-top: 16px;
}

.action-btn-link {
    text-decoration: none;
    opacity: 1 !important;
    cursor: pointer !important;
    color: inherit;
}

.action-btn-link:hover {
    border-color: var(--primary);
    background: var(--bg-hover);
    text-decoration: none;
    color: inherit;
}

.m2-inventory {
    border-color: #5a4630;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(180, 140, 60, 0.08), transparent 55%),
        var(--bg-card);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 220, 140, 0.06);
}

.m2-inv-header {
    border-bottom-color: rgba(180, 140, 60, 0.25);
    background: linear-gradient(180deg, rgba(90, 70, 40, 0.25), transparent);
}

.m2-inv-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.m2-inv-title-icon {
    font-size: 1.4rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.m2-inv-title h3 {
    margin: 0;
}

.m2-inv-subtitle {
    margin: 2px 0 0;
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: 500;
}

.m2-inv-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.m2-stat-pill {
    font-size: 0.75rem;
    color: #e8d5a3;
    background: rgba(40, 28, 12, 0.55);
    border: 1px solid rgba(180, 140, 60, 0.35);
    padding: 4px 10px;
    border-radius: 999px;
}

.m2-stat-pill strong {
    color: #ffd76a;
    font-weight: 700;
}

/* Tabs – game-like page buttons */
.m2-inv-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 16px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), transparent);
    border-bottom: 1px solid rgba(180, 140, 60, 0.2);
}

.m2-inv-tab {
    appearance: none;
    border: 1px solid #6a5438;
    background: linear-gradient(180deg, #3a2e20, #241a12);
    color: #cbb892;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: inset 0 1px 0 rgba(255, 220, 140, 0.08), 0 2px 4px rgba(0, 0, 0, 0.25);
    transition: border-color 0.15s, color 0.15s, transform 0.1s;
}

.m2-inv-tab:hover {
    color: #ffe9b0;
    border-color: #a08040;
}

.m2-inv-tab.is-active {
    color: #1a1208;
    background: linear-gradient(180deg, #f0d078, #c9a040);
    border-color: #e8c060;
    box-shadow: 0 0 12px rgba(232, 184, 74, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.m2-inv-tab-count {
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0.85;
    background: rgba(0, 0, 0, 0.2);
    padding: 1px 7px;
    border-radius: 999px;
}

.m2-inv-tab.is-active .m2-inv-tab-count {
    background: rgba(0, 0, 0, 0.15);
    color: #3a2a10;
}

.m2-inv-body {
    padding: 18px !important;
    background:
        radial-gradient(circle at 20% 0%, rgba(120, 90, 40, 0.08), transparent 40%),
        var(--bg);
}

.m2-inv-panel[hidden] {
    display: none !important;
}

.m2-board {
    max-width: 520px;
}

.m2-board-frame {
    padding: 10px;
    border-radius: 10px;
    border: 2px solid #6a5438;
    background:
        linear-gradient(145deg, rgba(80, 60, 30, 0.35), rgba(20, 14, 8, 0.65)),
        #1a1410;
    box-shadow:
        inset 0 0 0 1px rgba(255, 210, 120, 0.08),
        inset 0 0 24px rgba(0, 0, 0, 0.45),
        0 8px 24px rgba(0, 0, 0, 0.35);
}

.m2-board-hint {
    margin: 10px 0 0;
    font-size: 0.75rem;
    color: var(--text-dim);
    text-align: center;
}

/* 5×9 inventory grid */
.m2-grid-inv {
    display: grid;
    grid-template-columns: repeat(5, 64px);
    grid-auto-rows: 64px;
    gap: 4px;
    justify-content: center;
}

@media (max-width: 520px) {
    .m2-grid-inv {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        grid-auto-rows: minmax(56px, auto);
    }
}

/* Slot – recessed game cell */
.m2-slot {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 64px;
    border-radius: 4px;
    border: 1px solid #3a3020;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.55)),
        #12100c;
    box-shadow:
        inset 0 2px 4px rgba(0, 0, 0, 0.55),
        inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px;
    overflow: visible;
    z-index: 1;
}

.m2-slot:hover,
.m2-slot:focus-within {
    z-index: 20;
}

.m2-slot-shine {
    pointer-events: none;
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 40%);
}

.m2-slot.is-empty {
    opacity: 0.85;
}

.m2-slot.is-filled {
    border-color: #8a6a30;
    background:
        linear-gradient(180deg, rgba(90, 70, 30, 0.35), rgba(20, 14, 8, 0.8)),
        #1c1610;
    box-shadow:
        inset 0 0 0 1px rgba(255, 210, 100, 0.12),
        inset 0 2px 6px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(0, 0, 0, 0.3);
    cursor: default;
}

.m2-slot.is-filled:hover,
.m2-slot.is-filled:focus {
    border-color: #e0b84a;
    box-shadow:
        inset 0 0 0 1px rgba(255, 220, 120, 0.25),
        0 0 14px rgba(232, 184, 74, 0.35);
}

.m2-slot-icon {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #f0d070;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    line-height: 1;
    margin-bottom: 2px;
}

.m2-slot-name {
    font-size: 0.58rem;
    font-weight: 600;
    color: #e8dcc0;
    line-height: 1.15;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

.m2-slot-count {
    position: absolute;
    right: 3px;
    bottom: 2px;
    font-size: 0.68rem;
    font-weight: 800;
    color: #ffe566;
    text-shadow: 0 0 3px #000, 0 1px 1px #000;
    line-height: 1;
    z-index: 2;
}

/* Tooltip – classic M2 yellow panel */
.m2-tooltip {
    display: none;
    position: absolute;
    left: calc(100% + 8px);
    top: 0;
    min-width: 180px;
    max-width: 260px;
    padding: 10px 12px;
    border-radius: 4px;
    border: 1px solid #c9a040;
    background: linear-gradient(180deg, rgba(40, 32, 18, 0.97), rgba(18, 14, 8, 0.98));
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.4);
    z-index: 50;
    pointer-events: none;
    text-align: left;
}

.m2-slot:hover .m2-tooltip,
.m2-slot:focus .m2-tooltip,
.m2-slot:focus-within .m2-tooltip {
    display: block;
}

/* Ha a jobb szélre lógna – balra nyílik (egyszerű fallback: alul) */
.m2-grid-inv .m2-slot:nth-child(5n) .m2-tooltip,
.m2-pd-col:last-child .m2-tooltip {
    left: auto;
    right: calc(100% + 8px);
}

.m2-tip-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 6px;
}

.m2-tip-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffe9a0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.m2-tip-vnum {
    font-size: 0.7rem;
    color: #9a8a68;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.m2-tip-row {
    font-size: 0.75rem;
    color: #d0c4a8;
    margin-top: 2px;
}

.m2-tip-sep {
    height: 1px;
    margin: 8px 0;
    background: linear-gradient(90deg, transparent, rgba(200, 160, 60, 0.45), transparent);
}

.m2-tip-bonuses {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.m2-tip-bonuses li {
    font-size: 0.78rem;
    font-weight: 600;
    color: #7ec8f0;
    line-height: 1.3;
}

/* Equipment paperdoll */
.m2-board-equip {
    max-width: 640px;
}

.m2-paperdoll {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 12px;
    border-radius: 10px;
    border: 2px solid #6a5438;
    background:
        radial-gradient(ellipse at 50% 40%, rgba(100, 80, 40, 0.2), transparent 60%),
        #14100c;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.5);
}

.m2-pd-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.m2-pd-center {
    padding-top: 0;
}

.m2-equip-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.m2-equip-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #a89870;
}

.m2-slot-equip {
    width: 72px;
    height: 72px;
    min-height: 72px;
}

.m2-extra-equip {
    margin-top: 16px;
}

.m2-extra-title {
    margin: 0 0 10px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #cbb892;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.m2-extra-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.m2-safebox-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(180, 140, 60, 0.35);
    background: linear-gradient(90deg, rgba(60, 45, 20, 0.5), rgba(30, 22, 12, 0.6));
}

.m2-safebox-gold {
    font-size: 0.9rem;
    color: #e8d5a3;
}

.m2-safebox-gold strong {
    color: #ffd76a;
}

.m2-safebox-meta {
    font-size: 0.78rem;
    color: var(--text-dim);
}

.m2-empty {
    margin: 16px 0 0 !important;
    text-align: center;
}

.cell-sub {
    margin-top: 2px;
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: 400;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
}

.auth-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
    white-space: nowrap;
}

.auth-implementor {
    background: rgba(251, 191, 36, 0.14);
    color: #fcd34d;
    border-color: rgba(251, 191, 36, 0.35);
}

.auth-high_wizard {
    background: rgba(167, 139, 250, 0.14);
    color: #c4b5fd;
    border-color: rgba(167, 139, 250, 0.35);
}

.auth-god {
    background: rgba(248, 113, 113, 0.14);
    color: #fca5a5;
    border-color: rgba(248, 113, 113, 0.35);
}

.auth-low_wizard {
    background: rgba(96, 165, 250, 0.14);
    color: #93c5fd;
    border-color: rgba(96, 165, 250, 0.35);
}

.auth-player {
    background: rgba(100, 116, 139, 0.15);
    color: var(--text-dim);
    border-color: var(--border-soft);
}

#adminsPanel.is-loading .table-wrap {
    opacity: 0.55;
    transition: opacity 0.15s;
    pointer-events: none;
}

.toolbar-meta-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.req {
    color: #f87171;
}

.field-hint {
    margin: 6px 0 0;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.change-name-warn-list {
    margin: 8px 0 0;
    padding-left: 1.2em;
    font-size: 0.88rem;
    line-height: 1.45;
}

.change-name-warn-list li + li {
    margin-top: 6px;
}

.bulk-ban-selected-meta {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-elevated);
    border: 1px solid var(--border-soft);
}

.bulk-ban-selected-meta.has-selection {
    color: var(--nav-active-color);
    background: var(--nav-active-bg);
    border-color: rgba(var(--primary-rgb), 0.28);
}


.field-hint + .field-hint {
    margin-top: 2px;
}

.cash-ops {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cash-op {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

.cash-op:has(input:checked) {
    border-color: rgba(var(--primary-rgb), 0.5);
    background: var(--primary-soft);
    color: var(--text);
}

.cash-op input {
    accent-color: var(--primary);
}

.ban-duration-ops {
    margin-top: 4px;
}

.ban-timed-fields {
    margin-top: 4px;
}

/* Kitiltás napló a jobb oszlopban; a köz a .detail-col-right gap-ből jön */

.ban-log-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px 16px;
    /* max. 3 bejegyzés látszik, utána függőleges scrollbar */
    max-height: calc(3 * 6.6rem + 2 * 10px + 28px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.ban-log-list::-webkit-scrollbar {
    width: 8px;
}

.ban-log-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.ban-log-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-dim);
}

.ban-log-item {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-soft);
    background: var(--bg);
}

.ban-log-item.is-ban {
    border-color: rgba(239, 68, 68, 0.35);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), var(--bg));
}

.ban-log-item.is-unban {
    border-color: rgba(34, 197, 94, 0.35);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), var(--bg));
}

.ban-log-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.ban-log-badge {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.ban-log-item.is-ban .ban-log-badge {
    color: #fca5a5;
}

.ban-log-item.is-unban .ban-log-badge {
    color: #86efac;
}

.ban-log-time {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.ban-log-row {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 8px;
    font-size: 0.85rem;
    margin-top: 4px;
}

.ban-log-label {
    color: var(--text-dim);
    font-weight: 500;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 520px) {
    .form-row,
    .form-row-3 {
        grid-template-columns: 1fr;
    }
}

/* Modal */
body.modal-open {
    overflow: hidden;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--modal-backdrop);
    backdrop-filter: blur(4px);
}

.modal-backdrop.is-hidden {
    display: none !important;
}

.modal-card {
    width: 100%;
    max-width: 460px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-soft);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.modal-close {
    min-width: 36px;
    padding-left: 10px;
    padding-right: 10px;
}

.modal-body {
    padding: 18px;
}

.modal-body .form-group {
    margin-bottom: 14px;
}

.modal-important-note {
    margin: 4px 0 14px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(var(--primary-rgb), 0.4);
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--text);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;
}

.modal-important-note strong {
    color: var(--primary);
    font-weight: 700;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
    padding-top: 4px;
}

.text-center {
    text-align: center;
}

/* data-table alapból left – felülírás középre zárt oszlopokhoz */
.data-table th.text-center,
.data-table td.text-center,
.data-table th.col-chars,
.data-table td.col-chars,
.data-table th.col-empire,
.data-table td.col-empire,
.data-table th.col-job,
.data-table td.col-job {
    text-align: center !important;
}

/* Karakterek: cellában CSAK a szám; nevek floating tooltipben hoverre */
.char-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 1.5em;
}

.char-tip-value {
    font-variant-numeric: tabular-nums;
}

.char-tip.has-tip {
    cursor: help;
}

.char-tip.has-tip .char-tip-value {
    border-bottom: 1px dotted rgba(232, 237, 247, 0.4);
    padding-bottom: 1px;
}

.char-floating-tip {
    position: fixed;
    z-index: 10000;
    min-width: 140px;
    max-width: 260px;
    padding: 10px 12px;
    background: var(--tooltip-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow), 0 0 0 1px rgba(var(--primary-rgb), 0.12);
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.12s ease, transform 0.12s ease;
}

.char-floating-tip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.char-floating-tip-title {
    margin-bottom: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.char-floating-tip-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.char-floating-tip-list li {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
    white-space: nowrap;
}

#accountsPanel.is-loading .table-wrap {
    opacity: 0.55;
    transition: opacity 0.15s;
    pointer-events: none;
}

.sidebar-footer {
    padding: 12px 12px 14px;
    border-top: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-soft);
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.12), rgba(var(--primary-rgb), 0.04));
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.sidebar-profile:hover {
    border-color: rgba(var(--primary-rgb), 0.45);
    background: rgba(var(--primary-rgb), 0.16);
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.sidebar-profile.is-active {
    border-color: rgba(var(--primary-rgb), 0.5);
    background: var(--nav-active-bg);
    color: var(--nav-active-color);
}

.sidebar-profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    background: var(--brand-gradient);
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.35);
    flex-shrink: 0;
    overflow: hidden;
    padding: 0;
}

.sidebar-profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Profilkép a karakter oldalon */
.profile-avatar-wrap {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    overflow: visible;
}

.profile-avatar-wrap .detail-avatar {
    width: 64px;
    height: 64px;
    margin: 0;
}

.detail-avatar-img {
    object-fit: cover;
    display: block;
    padding: 0;
    font-size: 0;
}

.profile-avatar-wrap.is-editable {
    cursor: pointer;
}

.profile-avatar-edit {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
    background: var(--primary);
    color: #fff;
    font-size: 0.85rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    padding: 0;
}

.profile-avatar-edit:hover {
    filter: brightness(1.08);
}

.profile-avatar-edit:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* Profilkép crop modal */
.avatar-crop-modal {
    max-width: 440px;
    width: calc(100% - 32px);
}

.avatar-crop-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.avatar-crop-hint {
    margin: 0;
}

.avatar-crop-stage {
    display: flex;
    justify-content: center;
    padding: 12px;
    border-radius: var(--radius);
    background:
        radial-gradient(circle at 50% 40%, rgba(var(--primary-rgb), 0.12), transparent 60%),
        var(--bg);
    border: 1px solid var(--border-soft);
}

.avatar-crop-canvas {
    width: 280px;
    height: 280px;
    max-width: 100%;
    border-radius: 8px;
    cursor: grab;
    touch-action: none;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4);
    background: #0b0f17;
}

.avatar-crop-canvas.is-dragging {
    cursor: grabbing;
}

.avatar-crop-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.avatar-crop-control label,
.avatar-crop-shape-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.avatar-crop-control input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
}

.avatar-crop-shapes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.avatar-crop-shapes .cash-op {
    flex: 1;
    min-width: 100px;
    justify-content: center;
}

.avatar-crop-actions {
    margin-top: 4px;
    flex-wrap: wrap;
}

#avatarZoomLabel {
    color: var(--primary);
    font-weight: 700;
}

.sidebar-profile-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 1px;
}

.sidebar-profile-title {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-dim);
}

.sidebar-profile-name {
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-profile.is-active .sidebar-profile-title {
    color: var(--nav-active-color);
    opacity: 0.8;
}

.sidebar-hint {
    font-size: 0.75rem;
    color: var(--text-dim);
    padding: 0 4px;
}

/* Logok · Eszközök */
.tools-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    align-items: center;
}

.tools-tab {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-muted);
    background: var(--bg-elevated);
    border: 1px solid var(--border-soft);
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.tools-tab:hover {
    color: var(--text);
    border-color: var(--border);
    background: var(--bg-hover);
}

.tools-tab.is-active {
    color: var(--nav-active-color);
    background: var(--nav-active-bg);
    border-color: rgba(var(--primary-rgb), 0.35);
}

.tools-tab-soon {
    opacity: 0.45;
    cursor: default;
    font-weight: 500;
    border-style: dashed;
}

.tools-tab-soon:hover {
    color: var(--text-muted);
    background: var(--bg-elevated);
    border-color: var(--border-soft);
}

.ip-chars-cell {
    max-width: 320px;
    line-height: 1.55;
}

.ip-char-link {
    margin-right: 8px;
    white-space: nowrap;
}

/* Kereskedés – Adta / Kapta badge */
.trade-how-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.2;
    border: 1px solid transparent;
    white-space: nowrap;
}

.trade-how-badge.is-give {
    color: #6ee7b7;
    background: rgba(52, 211, 153, 0.14);
    border-color: rgba(52, 211, 153, 0.28);
}

.trade-how-badge.is-take {
    color: #93c5fd;
    background: rgba(59, 130, 246, 0.14);
    border-color: rgba(59, 130, 246, 0.28);
}

[data-theme="light"] .trade-how-badge.is-give {
    color: #047857;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.28);
}

[data-theme="light"] .trade-how-badge.is-take {
    color: #1d4ed8;
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.28);
}

/* Tárgy adás – ikon + név */
.item-cell {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    vertical-align: middle;
    cursor: default;
}

.item-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    flex-shrink: 0;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.item-icon.is-missing,
.item-icon-empty {
    display: inline-block;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px dashed rgba(255, 255, 255, 0.12);
}

.item-icon.is-missing {
    visibility: hidden;
    position: relative;
}

.item-icon.is-missing::after {
    content: '';
    visibility: visible;
    position: absolute;
    inset: 0;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px dashed rgba(255, 255, 255, 0.12);
}

.item-name {
    min-width: 0;
    word-break: break-word;
}

/* Parancs napló – hosszú command sor */
.cmd-log-command {
    max-width: 420px;
}

.cmd-log-command code {
    display: inline-block;
    max-width: 100%;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.82rem;
    color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(var(--primary-rgb), 0.18);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* Munkamenetek profilkép */
.col-session-avatar {
    width: 48px;
    padding-right: 4px !important;
}

.session-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--brand-gradient);
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.28);
    vertical-align: middle;
}

.session-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.session-avatar-fallback {
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 30;
}

.app-main {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-soft);
    background: var(--topbar-bg);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
}

.user-chip-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.user-chip-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--chip-badge-bg);
    color: var(--chip-badge-color);
}

.content {
    flex: 1;
    padding: 24px;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid var(--border-soft);
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* ---------- Dashboard ---------- */

.welcome-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 22px 24px;
    margin-bottom: 22px;
    background: var(--welcome-gradient);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.welcome-main {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.welcome-avatar {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--brand-gradient);
    box-shadow: 0 6px 18px rgba(var(--primary-rgb), 0.35);
    border: 2px solid rgba(255, 255, 255, 0.12);
}

.welcome-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.welcome-avatar-fallback {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
}

.welcome-banner h2 {
    margin: 0 0 4px;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.welcome-banner p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.welcome-meta {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* Téma legördülő – header */
.theme-select-wrap {
    display: flex;
    align-items: center;
}

.theme-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--bg-card)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b97ad' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E")
        no-repeat right 10px center;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--text-muted);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 6px 30px 6px 12px;
    min-width: 140px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background-color 0.15s;
}

.theme-select:hover {
    border-color: rgba(var(--primary-rgb), 0.45);
    color: var(--text);
}

.theme-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
    color: var(--text);
}

/* Téma átmenet (finom) */
body.app-body,
.app-shell,
.sidebar,
.app-main,
.topbar,
.content,
.panel,
.stat-card,
.toolbar,
.login-card {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.theme-select option {
    background: var(--bg-elevated);
    color: var(--text);
}

/* Világos téma – badge / offline finomítások */
[data-theme="light"] .badge-offline {
    background: rgba(100, 116, 139, 0.12);
    color: #64748b;
}

[data-theme="light"] .badge-ok {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}

[data-theme="light"] .badge-warn {
    background: rgba(217, 119, 6, 0.12);
    color: #b45309;
}

[data-theme="light"] .badge-online {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}

[data-theme="light"] .action-btn {
    opacity: 0.7;
}

[data-theme="light"] .btn-icon span {
    background: var(--text);
}

[data-theme="light"] .row-current {
    background: rgba(59, 108, 245, 0.06);
}

[data-theme="light"] .row-current:hover {
    background: rgba(59, 108, 245, 0.1) !important;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.stat-icon {
    display: block;
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    border-radius: 10px;
    flex-shrink: 0;
    opacity: 0.95;
    background: #334155; /* fallback, ha a színosztály nem töltődik */
}

.stat-icon-blue   { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.stat-icon-green  { background: linear-gradient(135deg, #34d399, #059669); }
.stat-icon-amber  { background: linear-gradient(135deg, #fbbf24, #d97706); }
.stat-icon-purple { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.stat-icon-red    { background: linear-gradient(135deg, #f87171, #dc2626); }
.stat-icon-cyan   { background: linear-gradient(135deg, #22d3ee, #0891b2); }
.stat-icon-rose,
.stat-icon-banned {
    background: linear-gradient(135deg, #fb7185, #9f1239) !important;
}

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

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.panels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 16px;
}

.panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

/* Egymás alatti panelek közti térköz (listák, eszközök, stb.) */
.content > .panel + .panel {
    margin-top: 16px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-soft);
}

.panel-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.panel-count {
    font-weight: 500;
    color: var(--text-muted);
    font-size: 0.9em;
}

.panel-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.action-btn.is-active-action {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.18);
    box-shadow: 0 0 0 1px rgba(var(--primary-rgb), 0.25);
}

.panel-body {
    padding: 0;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.data-table th,
.data-table td {
    padding: 11px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-soft);
    white-space: nowrap;
}

.data-table th {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-dim);
    background: var(--table-head-bg);
}

.data-table tbody tr:hover {
    background: var(--bg-hover);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
}

.badge-ok {
    background: var(--success-soft);
    color: #86efac;
}

.badge-warn {
    background: var(--warning-soft);
    color: #fcd34d;
}

.empty-state {
    margin: 0;
    padding: 28px 18px;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* ---------- Toolbar / list pages ---------- */

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.toolbar-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}

.form-group-inline {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.form-control-search {
    min-width: 220px;
    width: min(320px, 100%);
}

.search-wrap {
    position: relative;
}

.search-wrap .form-control-search {
    padding-right: 36px;
}

.search-spinner {
    position: absolute;
    right: 12px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    pointer-events: none;
}

.search-spinner.is-hidden,
.is-hidden {
    display: none !important;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#playersPanel.is-loading .table-wrap {
    opacity: 0.55;
    transition: opacity 0.15s;
    pointer-events: none;
}

.sort-btn {
    appearance: none;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.sort-btn:hover {
    color: var(--text);
}

.sort-btn.is-sorted {
    color: var(--link-hover);
}

button.page-num {
    appearance: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}

.form-control-sm {
    padding: 7px 10px;
    font-size: 0.85rem;
    width: auto;
    min-width: 72px;
}

.toolbar-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.text-muted {
    color: var(--text-muted);
}

.char-name {
    letter-spacing: -0.01em;
}

.playtime-cell {
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.sort-link {
    color: inherit;
    text-decoration: none;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

.sort-link:hover {
    color: var(--text);
    text-decoration: none;
}

.sort-link.is-sorted {
    color: var(--link-hover);
}

.job-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--bg-hover);
    color: var(--text-muted);
    border: 1px solid var(--border-soft);
}

.job-0, .job-4 { color: #fca5a5; border-color: rgba(248, 113, 113, 0.25); background: rgba(248, 113, 113, 0.08); }
.job-1, .job-5 { color: #86efac; border-color: rgba(52, 211, 153, 0.25); background: rgba(52, 211, 153, 0.08); }
.job-2, .job-6 { color: #c4b5fd; border-color: rgba(167, 139, 250, 0.25); background: rgba(167, 139, 250, 0.08); }
.job-3, .job-7 { color: #7dd3fc; border-color: rgba(56, 189, 248, 0.25); background: rgba(56, 189, 248, 0.08); }
.job-8 { color: #fcd34d; border-color: rgba(251, 191, 36, 0.25); background: rgba(251, 191, 36, 0.08); }

/* Kaszt face ikonok (assets/images/face/) */
.job-face {
    display: inline-block;
    width: 36px;
    height: 36px;
    object-fit: contain;
    vertical-align: middle;
    border-radius: 6px;
    background: var(--bg);
    border: 1px solid var(--border-soft);
    image-rendering: auto;
}

.col-job {
    text-align: center;
    width: 56px;
}

.job-face-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.job-face-label {
    font-size: 0.88rem;
}

.sibling-job-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sibling-job-meta .job-face {
    width: 28px;
    height: 28px;
}

.detail-sub .job-face {
    width: 28px;
    height: 28px;
    vertical-align: -6px;
}

/* Főoldal aktív karakterek – tartalomhoz igazodó szélesség, nincs üres hézag */
.data-table-compact {
    width: auto;
    max-width: 100%;
    table-layout: auto;
}

.data-table-compact th,
.data-table-compact td {
    width: 1%;
    white-space: nowrap;
    padding-left: 12px;
    padding-right: 12px;
}

.data-table-compact .col-job .job-face {
    width: 22px;
    height: 22px;
}

/* Birodalom: rövid fejléc (BIROD.), keskeny oszlop */
.data-table-compact th.col-empire,
.data-table-compact td.col-empire {
    width: 1% !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    text-align: center !important;
    white-space: nowrap !important;
}

.data-table-compact th.col-empire {
    letter-spacing: 0.04em;
}

.data-table-compact .empire-flag {
    width: 28px;
    height: 20px;
    margin: 0 auto;
}

.data-table-compact .empire-flag-img {
    width: 28px;
    height: 20px;
}

.data-table-compact td.col-name .link-login,
.data-table-compact td.col-name strong {
    display: inline-block;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}

/* Birodalmi zászlók (assets/images/birodalmi_zaszlok/) – _ = hover */
.data-table th.col-empire,
.data-table td.col-empire {
    width: 88px;
    vertical-align: middle;
}

.data-table td.col-empire {
    line-height: 0;
}

.empire-flag {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 28px;
    vertical-align: middle;
    line-height: 0;
}

.empire-flag-img {
    display: block;
    width: 40px;
    height: 28px;
    object-fit: contain;
    border-radius: 3px;
}

.empire-flag-hover {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}

.empire-flag:hover .empire-flag-hover {
    opacity: 1;
}

.empire-flag:hover .empire-flag-normal {
    opacity: 0;
}

.badge-online {
    background: var(--success-soft);
    color: #86efac;
}

.badge-offline {
    background: rgba(100, 116, 139, 0.15);
    color: var(--text-dim);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px;
    border-top: 1px solid var(--border-soft);
}

.pagination-info {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.pagination-links {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    border: 1px solid transparent;
    text-decoration: none;
}

.page-num:hover {
    background: var(--bg-hover);
    color: var(--text);
    text-decoration: none;
}

.page-num.is-active {
    background: var(--primary-soft);
    color: var(--link-hover);
    border-color: rgba(var(--primary-rgb), 0.35);
}

.page-ellipsis {
    color: var(--text-dim);
    padding: 0 2px;
}

.btn.is-disabled,
.btn.is-disabled:hover {
    opacity: 0.4;
    pointer-events: none;
    cursor: default;
}

.list-hint {
    margin: 12px 0 0;
    font-size: 0.78rem;
    color: var(--text-dim);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar-backdrop.is-visible {
        display: block;
    }

    .app-main {
        margin-left: 0;
    }

    .btn-icon {
        display: flex;
    }

    .content {
        padding: 16px;
    }

    .panels-grid {
        grid-template-columns: 1fr;
    }

    .form-control-search {
        min-width: 0;
        width: 100%;
    }

    .toolbar-form {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px 22px;
        border-radius: 16px;
    }

    .login-header h1 {
        font-size: 1.3rem;
    }

    .brand-mark-lg {
        width: 52px;
        height: 52px;
    }

    .user-chip-name {
        display: none;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .pagination-links {
        justify-content: center;
    }
}

/* Panel moduljogok */
.panel-access-form {
    margin: 16px 0 0;
}

.panel-access-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
}

.perm-box {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
}

.perm-box-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.perm-box-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.perm-box-actions {
    display: flex;
    gap: 6px;
}

.perm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px 12px;
}

.perm-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-soft);
    background: var(--bg-card);
    cursor: pointer;
    font-size: 0.875rem;
    user-select: none;
}

.perm-check:hover {
    border-color: var(--border);
    background: var(--bg-hover);
}

.perm-check input {
    accent-color: var(--primary);
    width: 15px;
    height: 15px;
}

.perm-cell {
    min-width: 180px;
    max-width: 340px;
    vertical-align: middle;
}

.perm-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    align-content: flex-start;
}

.perm-chip {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 500;
    line-height: 1.35;
    background: var(--primary-soft);
    color: var(--nav-active-color, var(--primary));
    white-space: nowrap;
}

.perm-chip-all {
    background: var(--success-soft, rgba(34, 197, 94, 0.12));
    color: var(--success, #22c55e);
    font-weight: 600;
}

.table-actions {
    white-space: nowrap;
}

.table-actions .btn + .btn {
    margin-left: 4px;
}

/* Munkamenetek – panel jog oszlop */
.session-panel-perm {
    white-space: nowrap;
    vertical-align: middle;
}

.panel-role-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
}

.panel-role-owner {
    color: var(--success, #22c55e);
}

.panel-role-member {
    color: var(--nav-active-color, var(--primary));
}

.panel-role-gmlist {
    color: var(--warning, #f59e0b);
}

