/* =============================================================================
   LXBrain — Tokyo Night Dark + Pastel

   A paletta SZÁNDÉKOSAN bit-azonos a workspace többi appjával, hogy a LoxTop
   felületei egy rendszernek látszódjanak:
     - k8s-chromeservice-dashboard/src/frontend/style.css
     - k8s-web-server/src/frontend/admin.css
     - k8s-mail-watchdog/src/frontend/style.css

   Ha a paletta valaha változik, ott is változzon.
============================================================================= */

:root {
    /* --- Felületek --- */
    --bg-page:       #1a1b26;
    --bg-card:       #24283b;
    --bg-header:     #1f2335;
    --bg-row-alt:    #1f2231;
    --bg-row-hover:  #2a2e44;
    --bg-deep:       #16161e;
    --border:        #414868;
    --border-light:  #2a2e44;

    /* --- Szöveg --- */
    --text:          #c0caf5;
    --text-muted:    #9aa5ce;
    --text-dim:      #6b7394;

    /* --- Pasztell akcentusok --- */
    --pastel-cyan:   #7dcfff;
    --pastel-mint:   #9ece6a;
    --pastel-peach:  #e0af68;
    --pastel-red:    #f7768e;
    --pastel-lilac:  #bb9af7;
    --pastel-blue:   #a9b1d6;

    --shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
    --radius: 8px;
    --radius-sm: 6px;
}

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

html, body { height: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-page);
    color: var(--text);
    font-size: 14px;
    line-height: 1.45;
}

a { color: var(--pastel-cyan); text-decoration: none; }
a:hover { color: var(--pastel-lilac); text-decoration: underline; }

/* =============================================================================
   SCROLLBAR — globális, nem csak a táblákon.
   A hagyományos világos scrollbar egy sötét felületen a leginkább zavaró
   részlet; ezért az EGÉSZ alkalmazásra beállítjuk (ugyanaz a döntés, mint az
   AKCS dashboardon 2026-09-03-án).
============================================================================= */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--border) var(--bg-page);
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: var(--bg-page); border-radius: 4px; }
*::-webkit-scrollbar-thumb {
    background: var(--border);
    border: 2px solid var(--bg-page);
    border-radius: 5px;
    min-height: 24px;
}
*::-webkit-scrollbar-thumb:hover { background: var(--pastel-blue); }
*::-webkit-scrollbar-corner { background: var(--bg-page); }

/* =============================================================================
   ELRENDEZÉS — bal oldali navigáció + tartalom
============================================================================= */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 218px;
    flex: 0 0 218px;
    background: var(--bg-deep);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}
.sidebar-brand {
    padding: 16px 18px 14px;
    border-bottom: 1px solid var(--border-light);
}
.sidebar-brand .logo {
    font-size: 17px; font-weight: 700; letter-spacing: 0.4px;
    color: var(--pastel-cyan);
}
.sidebar-brand .tagline {
    font-size: 11px; color: var(--text-dim); margin-top: 2px;
}

.nav-section { padding: 12px 0 4px; }
.nav-section-title {
    font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.8px;
    color: var(--text-dim); padding: 0 18px 6px;
}
.nav-link {
    display: flex; align-items: center; gap: 9px;
    padding: 7px 18px;
    color: var(--text-muted);
    font-size: 13px;
    border-left: 2px solid transparent;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.nav-link:hover {
    background: var(--bg-row-hover); color: var(--text);
    text-decoration: none;
}
.nav-link.active {
    background: var(--bg-header);
    color: var(--pastel-cyan);
    border-left-color: var(--pastel-cyan);
}
.nav-icon { width: 16px; text-align: center; opacity: 0.85; }

.sidebar-footer {
    margin-top: auto;
    padding: 12px 18px;
    border-top: 1px solid var(--border-light);
    font-size: 11.5px;
    color: var(--text-dim);
}

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

/* =============================================================================
   FEJLÉC
============================================================================= */
.topbar {
    position: sticky; top: 0; z-index: 50;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 11px 20px;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.topbar h1 { font-size: 16px; font-weight: 600; letter-spacing: 0.2px; }
.topbar .subtitle { color: var(--text-muted); font-size: 12px; margin-top: 1px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; font-size: 12.5px; }

.user-chip {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--bg-header); border: 1px solid var(--border);
    border-radius: 999px; padding: 3px 11px 3px 4px;
    font-size: 12.5px;
}
.user-avatar {
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--pastel-lilac); color: var(--bg-page);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
}

.content { padding: 18px 20px 40px; flex: 1; }

/* =============================================================================
   KÁRTYA
============================================================================= */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 14px;
    box-shadow: var(--shadow);
}
.card > h2 {
    font-size: 15px; font-weight: 600; color: var(--text);
    margin-bottom: 12px; padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
    display: flex; align-items: center; gap: 8px;
}
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 12px;
}

.stat { background: var(--bg-header); border: 1px solid var(--border-light);
        border-radius: var(--radius-sm); padding: 12px 14px; }
.stat-label { font-size: 11.5px; color: var(--text-muted); text-transform: uppercase;
              letter-spacing: 0.5px; }
.stat-value { font-size: 22px; font-weight: 600; margin-top: 3px;
              font-variant-numeric: tabular-nums; }

/* =============================================================================
   GOMBOK
============================================================================= */
.btn {
    background: var(--bg-header); color: var(--text);
    border: 1px solid var(--border);
    padding: 7px 14px; border-radius: var(--radius-sm);
    font-size: 13px; font-family: inherit; line-height: 1.3;
    cursor: pointer; display: inline-block; text-decoration: none;
    transition: all 0.12s;
}
.btn:hover { background: var(--bg-row-hover); border-color: var(--text-dim); text-decoration: none; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; filter: grayscale(0.3); }
.btn-sm { padding: 4px 10px; font-size: 12px; }

.btn-primary {
    background: var(--pastel-cyan); color: var(--bg-page);
    border-color: var(--pastel-cyan); font-weight: 600;
}
.btn-primary:hover:not(:disabled) {
    background: var(--pastel-lilac); border-color: var(--pastel-lilac); color: var(--bg-page);
}
.btn-secondary { background: var(--bg-header); color: var(--text); border-color: var(--border); }
.btn-danger { background: #b04555; color: #fff; border-color: #b04555; font-weight: 600; }
.btn-danger:hover:not(:disabled) { background: #8f3745; border-color: #8f3745; }

/* =============================================================================
   ŰRLAPOK
============================================================================= */
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 13px; }
.form-group label { color: var(--text-muted); font-size: 12.5px; font-weight: 500; }
.form-hint { font-size: 11.5px; color: var(--text-dim); }

input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="search"], select, textarea {
    background: var(--bg-header); color: var(--text);
    border: 1px solid var(--border);
    padding: 8px 11px; border-radius: var(--radius-sm);
    font-family: inherit; font-size: 13.5px;
    outline: none; transition: border-color 0.12s;
    width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--pastel-cyan); }
input::placeholder { color: var(--text-dim); }
input:disabled, select:disabled, textarea:disabled { opacity: 0.55; cursor: not-allowed; }

/* --- Checkbox és radio ---
   Az `accent-color` a legegyszerűbb mód arra, hogy a natív vezérlő a paletta
   szerint színeződjön, és közben megmaradjon minden natív viselkedése
   (billentyűzet, képernyőolvasó, indeterminate állapot). A saját, div-ekből
   épített checkbox ezeket mind eldobná. */
input[type="checkbox"], input[type="radio"] {
    accent-color: var(--pastel-cyan);
    width: 15px; height: 15px;
    cursor: pointer;
    vertical-align: -2px;
}
input[type="checkbox"]:disabled, input[type="radio"]:disabled { cursor: not-allowed; opacity: 0.5; }

.check-row {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 0; font-size: 13px; cursor: pointer; user-select: none;
}
.check-row:hover { color: var(--pastel-cyan); }

/* =============================================================================
   TÁBLÁZAT
============================================================================= */
.table-scroll { overflow-x: auto; border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
    background: var(--bg-header); color: var(--text-muted);
    text-align: left; font-weight: 600; font-size: 11.5px;
    text-transform: uppercase; letter-spacing: 0.4px;
    padding: 8px 11px; border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 2;
}
tbody td { padding: 8px 11px; border-bottom: 1px solid var(--border-light); }
tbody tr:nth-child(even) { background: var(--bg-row-alt); }
tbody tr:hover { background: var(--bg-row-hover); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* =============================================================================
   ÁLLAPOT-JELZŐK
============================================================================= */
.badge {
    display: inline-block; padding: 2px 8px; border-radius: 999px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.3px;
    border: 1px solid transparent;
}
.badge-approved { background: rgba(158, 206, 106, 0.15); color: var(--pastel-mint);  border-color: rgba(158, 206, 106, 0.35); }
.badge-draft    { background: rgba(169, 177, 214, 0.13); color: var(--pastel-blue);  border-color: rgba(169, 177, 214, 0.30); }
.badge-review   { background: rgba(224, 175, 104, 0.15); color: var(--pastel-peach); border-color: rgba(224, 175, 104, 0.35); }
.badge-rejected { background: rgba(247, 118, 142, 0.15); color: var(--pastel-red);   border-color: rgba(247, 118, 142, 0.35); }
.badge-archived { background: rgba(107, 115, 148, 0.15); color: var(--text-dim);     border-color: rgba(107, 115, 148, 0.35); }

.muted { color: var(--text-muted); }
.dim   { color: var(--text-dim); }
.accent-cyan  { color: var(--pastel-cyan); }
.accent-mint  { color: var(--pastel-mint); }
.accent-peach { color: var(--pastel-peach); }
.accent-red   { color: var(--pastel-red); }
.accent-lilac { color: var(--pastel-lilac); }

/* =============================================================================
   ÜZENETEK
============================================================================= */
.alert {
    border-radius: var(--radius-sm); padding: 10px 13px;
    font-size: 13px; margin-bottom: 13px;
    border: 1px solid transparent;
}
.alert-error   { background: rgba(247, 118, 142, 0.12); color: var(--pastel-red);   border-color: rgba(247, 118, 142, 0.35); }
.alert-success { background: rgba(158, 206, 106, 0.12); color: var(--pastel-mint);  border-color: rgba(158, 206, 106, 0.35); }
.alert-warning { background: rgba(224, 175, 104, 0.12); color: var(--pastel-peach); border-color: rgba(224, 175, 104, 0.35); }
.alert-info    { background: rgba(125, 207, 255, 0.10); color: var(--pastel-cyan);  border-color: rgba(125, 207, 255, 0.30); }

/* =============================================================================
   BEJELENTKEZÉS
============================================================================= */
.login-page {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    /* Finom, kétpontos sugárzás — ugyanaz a mélység, mint a kártya-árnyékon. */
    background:
        radial-gradient(1000px 500px at 18% -10%, rgba(125, 207, 255, 0.07), transparent 60%),
        radial-gradient(800px 420px at 88% 110%, rgba(187, 154, 247, 0.07), transparent 60%),
        var(--bg-page);
}
.login-card {
    width: 100%; max-width: 380px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 28px 26px 24px;
    box-shadow: var(--shadow);
}
.login-brand { text-align: center; margin-bottom: 22px; }
.login-brand .logo {
    font-size: 26px; font-weight: 700; letter-spacing: 0.6px;
    color: var(--pastel-cyan);
}
.login-brand .tagline { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }
.login-card .btn-primary { width: 100%; padding: 9px; font-size: 14px; margin-top: 4px; }
.login-footer {
    margin-top: 18px; padding-top: 14px;
    border-top: 1px solid var(--border-light);
    text-align: center; font-size: 11.5px; color: var(--text-dim);
}

/* =============================================================================
   RESPONSIVE
============================================================================= */
@media (max-width: 860px) {
    .app-shell { flex-direction: column; }
    .sidebar {
        width: 100%; flex: none; height: auto; position: static;
        border-right: none; border-bottom: 1px solid var(--border-light);
    }
    .nav-section { display: flex; flex-wrap: wrap; padding: 6px; }
    .nav-section-title { display: none; }
    .nav-link { border-left: none; border-bottom: 2px solid transparent; padding: 7px 12px; }
    .nav-link.active { border-left: none; border-bottom-color: var(--pastel-cyan); }
    .sidebar-footer { display: none; }
    .content { padding: 14px 12px 30px; }
}
