/* =========================================================================
   CMS – Téma (Vuexy-stílus): ibolya primer szín, sötét oldalsáv,
   világos tartalom, lekerekített kártyák, pasztell címkék. Reszponzív.
   ========================================================================= */

:root {
    --primary: #4361ee;
    --primary-600: #3a54d6;
    --primary-700: #2f45b8;
    --primary-soft: #e6ebfe;
    --primary-glow: rgba(67, 97, 238, .32);

    --sidebar-bg: #2f3349;
    --sidebar-bg-2: #282c3e;
    --sidebar-text: #b6bee3;
    --sidebar-muted: #7b82a3;

    --body-bg: #f8f7fa;
    --card-bg: #ffffff;
    --heading: #2f2b3d;
    --text: #5d586c;
    --muted: #8b889b;
    --border: #ecebf1;

    --green: #28c76f;   --green-bg: #e4f8ed;
    --orange: #ff9f43;  --orange-bg: #fff1e2;
    --red: #ea5455;     --red-bg: #fce9e9;
    --gray-badge: #6f6b7d; --gray-badge-bg: #eeedf1;

    --radius: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 2px 8px rgba(47, 43, 61, .06);
    --shadow-md: 0 4px 18px rgba(47, 43, 61, .10);
    --shadow-lg: 0 10px 30px rgba(47, 43, 61, .14);
    --sidebar-w: 260px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Public Sans", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    background: var(--body-bg);
    -webkit-font-smoothing: antialiased;
    font-size: 15px;
}

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

/* ---------- Elrendezés ---------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    transition: transform .25s ease;
}

.sidebar__brand {
    padding: 22px 20px;
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: .3px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.sidebar__brand .dot {
    width: 30px; height: 30px; border-radius: 9px;
    background: linear-gradient(135deg, var(--primary), #6f8bf5);
    box-shadow: 0 4px 10px var(--primary-glow);
    flex: 0 0 30px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 800; font-size: .95rem;
}
.sidebar__brand small { display: block; font-size: .7rem; font-weight: 500; color: var(--sidebar-muted); letter-spacing: .02em; }

.sidebar__nav { padding: 10px 14px; flex: 1; overflow-y: auto; }
.sidebar__label {
    font-size: .7rem; text-transform: uppercase; letter-spacing: .12em;
    color: var(--sidebar-muted); padding: 16px 10px 8px;
}
.nav-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; margin-bottom: 4px;
    color: var(--sidebar-text); border-radius: 8px;
    font-size: .93rem; font-weight: 500;
    transition: background .15s ease, color .15s ease;
}
.nav-link svg { width: 20px; height: 20px; flex: 0 0 20px; opacity: .9; }
.nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-link.active {
    background: linear-gradient(72deg, var(--primary), #6f8bf5);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.sidebar__footer {
    padding: 14px; border-top: 1px solid rgba(255, 255, 255, .07);
    font-size: .85rem;
}
.sidebar__user { color: #fff; font-weight: 600; }
.sidebar__email { color: var(--sidebar-muted); font-size: .78rem; word-break: break-all; margin-bottom: 10px; }

/* ---------- Fő tartalom ---------- */
.main {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex; flex-direction: column;
    min-width: 0;
}
.topbar {
    height: 64px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex; align-items: center; gap: 14px;
    padding: 0 22px;
    position: sticky; top: 16px; z-index: 1030;
    margin: 16px 26px 0;
}
.topbar h1 { font-size: 1.1rem; margin: 0; font-weight: 700; color: var(--heading); }
.content { padding: 22px 26px 30px; }

.hamburger {
    display: none; background: none; border: none; cursor: pointer;
    color: var(--heading); padding: 6px;
}
.hamburger svg { width: 26px; height: 26px; }

/* ---------- Kártya / panel ---------- */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: none;
}
.card__head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.card__head h2 { margin: 0; font-size: 1.15rem; color: var(--heading); font-weight: 700; }
.card__body { padding: 22px 24px; }

/* ---------- Gombok ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 7px;
    border: 1px solid transparent; border-radius: 8px;
    padding: 10px 18px; font-size: .9rem; font-weight: 600;
    cursor: pointer; transition: all .15s ease; line-height: 1;
    text-decoration: none;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 3px 10px var(--primary-glow); }
.btn-primary:hover { background: var(--primary-600); color: #fff; box-shadow: 0 5px 14px var(--primary-glow); }
.btn-light { background: var(--gray-badge-bg); color: var(--text); }
.btn-light:hover { background: #e4e2ea; }
.btn-danger { background: var(--red); color: #fff; box-shadow: 0 3px 10px rgba(234, 84, 85, .3); }
.btn-danger:hover { background: #d94446; color: #fff; }
.btn-sm { padding: 7px 12px; font-size: .82rem; }

/* ---------- Táblázat ---------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td {
    padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
table.data thead th {
    background: #fbfbfc; color: var(--muted);
    font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em;
    cursor: pointer; user-select: none; white-space: nowrap;
}
table.data thead th.sortable::after { content: " ⇅"; color: #c9c7d2; font-size: .8em; }
table.data thead th.sort-asc::after { content: " ↑"; color: var(--primary); }
table.data thead th.sort-desc::after { content: " ↓"; color: var(--primary); }
table.data tbody tr:hover { background: #faf9fc; }
table.data .actions { display: flex; gap: 8px; justify-content: flex-end; }
.text-right { text-align: right; }
.text-muted { color: var(--muted); }
code { background: var(--primary-soft); color: var(--primary-700); padding: 2px 7px; border-radius: 5px; font-size: .85em; }

/* ---------- Badge / kapcsoló ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 11px; border-radius: 6px; font-size: .76rem; font-weight: 600;
    text-transform: capitalize;
}
.badge-on { background: var(--green-bg); color: var(--green); }
.badge-off { background: var(--red-bg); color: var(--red); }

.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer; inset: 0;
    background: #d5d3dd; transition: .2s; border-radius: 999px;
}
.slider::before {
    content: ""; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px;
    background: #fff; transition: .2s; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + .slider { background: var(--primary); box-shadow: 0 2px 8px var(--primary-glow); }
.switch input:checked + .slider::before { transform: translateX(20px); }

/* ---------- Űrlap ---------- */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 7px; color: var(--heading); font-size: .88rem; }
.form-group .hint { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.form-control {
    width: 100%; padding: 11px 14px; font-size: .95rem;
    border: 1px solid #dcdae3; border-radius: 8px; background: #fff;
    transition: border-color .15s, box-shadow .15s; color: var(--heading);
}
.form-control::placeholder { color: #b6b3c2; }
.form-control:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}
.form-check { display: flex; align-items: center; gap: 10px; }
.invalid { color: var(--red); font-size: .82rem; margin-top: 6px; }
.form-control.is-invalid { border-color: var(--red); }
.form-actions { display: flex; gap: 10px; margin-top: 8px; }

/* ---------- Flash üzenetek ---------- */
.alert {
    padding: 13px 16px; border-radius: 8px; margin-bottom: 18px; font-size: .9rem;
    border: none;
}
.alert-success { background: var(--green-bg); color: var(--green); }
.alert-error { background: var(--red-bg); color: var(--red); }

/* ---------- Modal (törlés jóváhagyás) ---------- */
.modal-backdrop {
    position: fixed; inset: 0; background: rgba(47, 43, 61, .5);
    display: none; align-items: center; justify-content: center; z-index: 1060; padding: 16px;
    backdrop-filter: blur(2px);
    /* Bootstrap .modal-backdrop felülírása */
    width: auto; height: auto; opacity: 1;
}
.modal-backdrop.open { display: flex; }
.modal {
    /* Bootstrap .modal (position:fixed; display:none; 100%) felülírása */
    position: relative; display: block; height: auto; inset: auto; margin: auto; z-index: 1;
    background: #fff; border-radius: var(--radius-lg); max-width: 420px; width: 100%;
    box-shadow: var(--shadow-lg); overflow: hidden;
}
.modal__body { padding: 26px; }
.modal__body h3 { margin: 0 0 8px; color: var(--heading); }
.modal__body p { margin: 0; color: var(--muted); }
.modal__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 26px; background: #faf9fc; }

/* ---------- Login (osztott képernyő) ---------- */
.login-split { display: flex; min-height: 100vh; }
.login-visual {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #3b5bdb 0%, #4c6ef5 55%, #74a0f9 100%);
    display: flex; align-items: center; justify-content: center;
}
.login-visual .visual-inner { position: relative; z-index: 2; text-align: center; color: #fff; padding: 48px; max-width: 520px; }
.login-visual h2 { font-size: 1.9rem; font-weight: 800; margin: 28px 0 10px; }
.login-visual p { font-size: 1.02rem; opacity: .9; line-height: 1.6; margin: 0; }
.login-visual svg.illus { width: 100%; max-width: 420px; height: auto; filter: drop-shadow(0 20px 40px rgba(0,0,0,.2)); }
.login-visual .blob { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .18; background: #fff; }
.login-visual .blob.b1 { width: 320px; height: 320px; top: -80px; right: -60px; }
.login-visual .blob.b2 { width: 220px; height: 220px; bottom: -60px; left: -40px; opacity: .12; }

.login-form-side {
    width: 480px; max-width: 100%;
    display: flex; align-items: center; justify-content: center;
    padding: 40px; background: #fff;
}
.login-box { width: 100%; max-width: 360px; }
.login-box .brand {
    display: flex; align-items: center; gap: 10px; margin-bottom: 34px; font-weight: 800; font-size: 1.35rem; color: var(--heading);
}
.login-box .brand .dot {
    width: 34px; height: 34px; border-radius: 9px;
    background: linear-gradient(135deg, var(--primary), #6f8bf5);
    box-shadow: 0 4px 10px var(--primary-glow);
}
.login-box h1 { font-size: 1.4rem; color: var(--heading); margin: 0 0 6px; font-weight: 700; }
.login-box .sub { color: var(--muted); margin: 0 0 26px; font-size: .95rem; }

.empty { text-align: center; padding: 44px 20px; color: var(--muted); }

/* ---------- Reszponzív ---------- */
.overlay { display: none; position: fixed; inset: 0; background: rgba(47, 43, 61, .4); z-index: 1035; }
.overlay.open { display: block; }

@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; }
    .topbar { margin: 14px 16px 0; }
    .content { padding: 18px 16px 26px; }
    .hamburger { display: inline-flex; }
}
@media (max-width: 900px) {
    .login-visual { display: none; }
    .login-form-side { flex: 1; width: auto; }
}
