* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: #0d1224;
    color: #e5e7eb;
    min-height: 100vh;
}

/* ---------- LOGIN / REGISTER ---------- */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.auth-box {
    background: #131a30;
    border-radius: 12px;
    padding: 40px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.auth-box .brand {
    text-align: center;
    margin-bottom: 30px;
}
.auth-box .brand .name {
    font-size: 1.5rem;
    font-weight: 700;
    font-style: italic;
    color: #fff;
}
.auth-box .brand .name span { color: #6366f1; }
.auth-box .brand .sub {
    font-size: 0.75rem;
    color: #8b93ab;
    display: block;
    margin-top: 2px;
    font-style: normal;
}
.auth-box h2 {
    font-size: 1.15rem;
    color: #fff;
    margin-bottom: 20px;
    text-align: center;
}
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 0.82rem;
    color: #a3aac4;
    margin-bottom: 6px;
}
.form-group input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #2a3358;
    background: #0d1224;
    color: #e5e7eb;
    font-size: 0.9rem;
    outline: none;
}
.form-group input:focus { border-color: #6366f1; }
.btn {
    width: 100%;
    padding: 11px;
    border-radius: 8px;
    border: none;
    background: #6366f1;
    color: #fff;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 6px;
}
.btn:hover { background: #4f52d6; }
.btn-secondary { background: #232b4d; }
.btn-secondary:hover { background: #2a3358; }
.btn-danger { background: #ef4444; }
.btn-danger:hover { background: #dc2626; }
.auth-footer {
    text-align: center;
    margin-top: 18px;
    font-size: 0.85rem;
    color: #8b93ab;
}
.auth-footer a { color: #818cf8; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }
.alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 16px;
}
.alert-error { background: #3f1d24; color: #fca5a5; border: 1px solid #7f1d1d; }
.alert-success { background: #14301f; color: #86efac; border: 1px solid #166534; }
.hint {
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
    margin-top: 14px;
}

/* ---------- APP LAYOUT ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
    width: 240px;
    background: #131a30;
    min-height: 100vh;
    padding: 20px 0;
    flex-shrink: 0;
}
.brand-side {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 0 24px 24px 24px;
    border-bottom: 1px solid #1f2740;
    margin-bottom: 16px;
}
.brand-side .name {
    font-size: 1.3rem;
    font-weight: 700;
    font-style: italic;
    color: #fff;
}
.brand-side .name span { color: #6366f1; }
.brand-side .sub {
    font-size: 0.65rem;
    color: #8b93ab;
    display: block;
    font-style: normal;
    margin-top: -2px;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: #a3aac4;
    font-size: 0.92rem;
    text-decoration: none;
    border-left: 3px solid transparent;
}
.nav-item:hover { background: #171f3a; color: #fff; }
.nav-item .ic { width: 18px; text-align: center; opacity: 0.8; }
.nav-item.active {
    background: #1c2544;
    color: #fff;
    border-left: 3px solid #6366f1;
}
.nav-divider {
    margin: 12px 24px;
    border-top: 1px solid #1f2740;
}
.nav-badge {
    margin-left: auto;
    background: #6366f1;
    color: #fff;
    font-size: 0.62rem;
    padding: 2px 6px;
    border-radius: 10px;
}

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
    padding: 16px 32px;
    border-bottom: 1px solid #1f2740;
    color: #a3aac4;
    font-size: 0.9rem;
}
.topbar .user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #131a30;
    padding: 6px 14px 6px 6px;
    border-radius: 20px;
}
.topbar .user-chip .avatar {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: #6366f1;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}
.topbar .role-tag {
    font-size: 0.65rem;
    background: #232b4d;
    color: #a3aac4;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
}
.role-tag.admin { background: #3730a3; color: #c7d2fe; }
.topbar a.logout { color: #fca5a5; text-decoration: none; font-size: 0.85rem; }
.topbar a.logout:hover { text-decoration: underline; }

.content { padding: 32px; }
h1.title { font-size: 1.7rem; color: #fff; margin-bottom: 24px; }
h2.section-title {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.help-dot {
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #2a3358;
    color: #8b93ab;
    font-size: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.panel {
    background: #131a30;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 24px;
}
.panel-title {
    padding: 16px 20px;
    font-size: 1rem;
    color: #fff;
    border-bottom: 1px solid #1f2740;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.kv-row {
    display: flex;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #1c2440;
    font-size: 0.88rem;
}
.kv-row:last-child { border-bottom: none; }
.kv-row .k { color: #8b93ab; }
.kv-row .v { color: #e5e7eb; font-weight: 500; }

/* ---------- RESOURCE / DONUT ---------- */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}
.resource-card {
    background: #131a30;
    border-radius: 10px;
    padding: 24px;
}
.resource-card .rc-title { font-size: 0.95rem; color: #cbd1e3; text-align: center; margin-bottom: 18px; }
.donut-wrap { display: flex; align-items: center; gap: 20px; }
.donut-center-text { text-anchor: middle; fill: #fff; }
.donut-pct { font-size: 22px; font-weight: 700; }
.donut-label { font-size: 11px; fill: #8b93ab; }
.legend { flex: 1; font-size: 0.82rem; }
.legend-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #1c2440;
    color: #a3aac4;
}
.legend-row:last-child { border-bottom: none; }
.legend-row .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.legend-row .val { color: #e5e7eb; font-weight: 500; }
.dot-used { background: #6366f1; }
.dot-free { background: #3a4266; }

/* ---------- TABLES ---------- */
table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
table.data-table th {
    text-align: left;
    color: #8b93ab;
    font-weight: 500;
    padding: 12px 20px;
    border-bottom: 1px solid #1f2740;
    font-size: 0.78rem;
    text-transform: uppercase;
}
table.data-table td {
    padding: 12px 20px;
    border-bottom: 1px solid #1c2440;
    color: #e5e7eb;
}
table.data-table tr:last-child td { border-bottom: none; }
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 600;
}
.badge-admin { background: #3730a3; color: #c7d2fe; }
.badge-user { background: #232b4d; color: #a3aac4; }
.badge-pending { background: #422006; color: #fbbf24; }
.badge-done { background: #14301f; color: #86efac; }
.badge-up { background: #14301f; color: #86efac; }
.badge-down { background: #3f1d24; color: #fca5a5; }

.inline-form { display: inline; }
.link-btn {
    background: none;
    border: none;
    color: #818cf8;
    cursor: pointer;
    font-size: 0.82rem;
    padding: 0;
}
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: #fca5a5; }

.footer-note {
    text-align: center;
    color: #545c78;
    font-size: 0.78rem;
    margin-top: 8px;
}

.access-denied {
    background: #131a30;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    color: #fca5a5;
}

/* ---------- MOBIL / TABLET ---------- */
.menu-btn {
    display: none;
    background: #131a30;
    border: 1px solid #2a3358;
    color: #e5e7eb;
    width: 40px; height: 40px;
    border-radius: 8px;
    font-size: 1.25rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.top-brand { display: none; font-weight: 700; font-style: italic; color: #fff; white-space: nowrap; }
.top-brand span { color: #6366f1; }
.nav-overlay { display: none; }

@media (max-width: 900px) {
    /* oldalsáv: kihúzható menü */
    .sidebar {
        position: fixed; top: 0; left: -280px; bottom: 0;
        width: 260px; min-height: 0;
        z-index: 200;
        overflow-y: auto;
        transition: left 0.25s ease;
    }
    .app.nav-open .sidebar { left: 0; box-shadow: 0 0 40px rgba(0,0,0,0.6); }
    .nav-overlay {
        display: block;
        position: fixed; inset: 0;
        background: rgba(0,0,0,0.55);
        z-index: 150;
        opacity: 0; pointer-events: none;
        transition: opacity 0.25s ease;
    }
    .app.nav-open .nav-overlay { opacity: 1; pointer-events: auto; }
    .nav-item { padding: 14px 24px; }

    /* felső sáv */
    .menu-btn { display: inline-flex; }
    .top-brand { display: block; margin-right: auto; }
    .topbar {
        padding: 10px 14px; gap: 10px;
        position: sticky; top: 0; z-index: 100;
        background: #0d1224;
    }

    /* tartalom */
    .content { padding: 16px 14px; }
    h1.title { font-size: 1.35rem; margin-bottom: 16px; }
    h2.section-title { font-size: 1rem; }
    .panel { margin-bottom: 16px; }
    .panel-title { padding: 14px 16px; flex-wrap: wrap; gap: 8px; }
    .kv-row { flex-direction: column; gap: 4px; padding: 12px 16px; word-break: break-word; }
    .kv-row .v { text-align: left; }

    /* kártyák */
    .resource-grid { grid-template-columns: 1fr !important; gap: 14px; }
    .resource-card { padding: 18px; }
    .donut-wrap { flex-wrap: wrap; justify-content: center; }
    .legend { min-width: 200px; }

    /* űrlapok: egymás alá, teljes szélességben */
    .panel form { min-width: 0; }
    .panel form[style*="display:flex"] { flex-direction: column !important; align-items: stretch !important; }
    .form-group { min-width: 0 !important; flex: 1 1 auto !important; width: 100%; }
    .panel form .btn, .panel form .btn-secondary { width: 100% !important; text-align: center; display: block; }
    .form-group input, .form-group select { font-size: 16px; } /* iOS ne nagyítson rá */

    /* táblázatok: vízszintesen görgethetők */
    .panel table.data-table:not(.sites-table) {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    table.data-table th { white-space: nowrap; padding: 10px 14px; }
    table.data-table td { padding: 10px 14px; }

    pre { max-width: 100%; }
    .access-denied { padding: 24px; }
}

@media (max-width: 480px) {
    .topbar .role-tag { display: none; }
    .topbar .user-chip { padding: 4px 12px 4px 4px; }
    .topbar a.logout { font-size: 0.8rem; }
    .auth-box { padding: 28px 22px; }
}

/* ---------- Űrlap kiegészítések: select / textarea, tárhely sáv ---------- */
.form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #2a3358;
    background: #0d1224;
    color: #e5e7eb;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
}
.form-group select:focus, .form-group textarea:focus { border-color: #6366f1; }
.form-group textarea { resize: vertical; }
.acc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 14px; }
.bar { background: #232b4d; border-radius: 6px; height: 10px; overflow: hidden; }
.bar > span { display: block; height: 10px; background: #6366f1; border-radius: 6px; }
.bar.warn > span { background: #f59e0b; }
.bar.crit > span { background: #ef4444; }
.muted { color: #8b93ab; font-size: 0.78rem; }
@media (max-width: 700px) { .acc-grid { grid-template-columns: 1fr; } }

/* ---------- Frissítés állapot ---------- */
.badge-update { background: #1e2a5a; color: #93c5fd; }
.alert-info { background: #14213f; color: #93c5fd; border: 1px solid #1e3a8a; }

/* ---- Captcha ("Nem vagyok robot") ---- */
.captcha-box { background: #0d1224; border: 1px solid #2a3358; border-radius: 10px; padding: 12px 14px; }
.captcha-box .captcha-check { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; margin-bottom: 10px; }
.captcha-box .captcha-check input { width: 20px; height: 20px; padding: 0; margin: 0; accent-color: #4f7cff; }
.captcha-box .captcha-q { display: block; font-size: 0.85rem; color: #a3aac4; margin-bottom: 6px; }
.captcha-box .g-recaptcha { transform-origin: 0 0; }
@media (max-width: 380px) { .captcha-box .g-recaptcha { transform: scale(0.88); } }

/* ---- Barátok ---- */
.friend-add { display: flex; gap: 10px; flex-wrap: wrap; padding: 16px 20px; border-top: 1px solid #1c2440; }
.friend-add input[type=text] { flex: 1 1 200px; }
.friend-list { list-style: none; margin: 0; padding: 0; }
.friend-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 20px; border-top: 1px solid #1c2440; }
.friend-list .who { display: flex; align-items: center; gap: 8px; }

/* ---- Élő chat ---- */
.chat-wrap { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.chat-wrap.chat-admin { grid-template-columns: 300px 1fr; }
.chat-wrap .panel { margin-bottom: 0; }
.chat-log { height: 52vh; min-height: 280px; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; background: #0d1224; }
.chat-empty { color: #a3aac4; font-size: 0.88rem; padding: 14px 18px; }
.chat-msg { display: flex; flex-direction: column; max-width: 78%; }
.chat-msg.mine { align-self: flex-end; align-items: flex-end; }
.chat-msg.theirs { align-self: flex-start; align-items: flex-start; }
.chat-bubble { padding: 9px 13px; border-radius: 12px; font-size: 0.9rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.chat-msg.mine .chat-bubble { background: #4f46e5; color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.theirs .chat-bubble { background: #1c2440; color: #e5e7eb; border-bottom-left-radius: 4px; }
.chat-meta { font-size: 0.72rem; color: #7d86a6; margin-top: 3px; }
.chat-form { display: flex; gap: 10px; padding: 12px 14px; border-top: 1px solid #1c2440; align-items: flex-end; }
.chat-form textarea { flex: 1; resize: none; padding: 10px 12px; border-radius: 8px; border: 1px solid #2a3358; background: #0d1224; color: #e5e7eb; font: inherit; font-size: 0.9rem; outline: none; }
.chat-form textarea:focus { border-color: #6366f1; }
.chat-error { padding: 8px 18px; background: #3f1d24; color: #fca5a5; font-size: 0.82rem; }
.chat-threads #threadList { max-height: 60vh; overflow-y: auto; }
.chat-thread { display: block; padding: 11px 16px; border-top: 1px solid #1c2440; color: #e5e7eb; text-decoration: none; }
.chat-thread:hover, .chat-thread.active { background: #171f3a; }
.chat-thread .ct-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.chat-thread .ct-last { font-size: 0.82rem; color: #a3aac4; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-thread .ct-at { font-size: 0.72rem; color: #7d86a6; margin-top: 2px; }
.chat-badge, .ct-unread { background: #ef4444 !important; color: #fff !important; }
@media (max-width: 900px) {
    .chat-wrap.chat-admin { grid-template-columns: 1fr; }
    .chat-log { height: 46vh; }
    .chat-msg { max-width: 90%; }
}

/* ---- Chat: lezárás ---- */
.chat-msg.system { align-self: center; align-items: center; max-width: 90%; }
.chat-msg.system .chat-bubble { background: transparent; border: 1px dashed #2a3358; color: #a3aac4; font-size: 0.8rem; text-align: center; padding: 6px 12px; }
.chat-closed-note { padding: 9px 18px; background: #1a2140; color: #a3aac4; font-size: 0.82rem; border-bottom: 1px solid #1c2440; }
.chat-group { padding: 8px 16px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: .06em; color: #7d86a6; border-top: 1px solid #1c2440; background: #0d1224; }
.chat-thread.closed { opacity: 0.65; }

/* ---- Server dashboard ---- */
.app { background: #090b0f; }
.sidebar {
    width: 224px;
    background: #0c0e13;
    border-right: 1px solid #1c2028;
    padding: 18px 12px 20px;
}
.brand-side {
    align-items: center;
    gap: 9px;
    padding: 0 11px 20px;
    margin-bottom: 12px;
    border-bottom: 0;
}
.brand-mark {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #7279ff;
    color: #fff;
    font-size: 16px;
    box-shadow: 0 3px 14px rgba(100, 110, 255, .3);
}
.brand-side .name {
    font-size: 14px;
    font-style: normal;
    letter-spacing: -.02em;
}
.brand-favorite { margin-left: auto; color: #687080; font-size: 15px; }
.nav-section {
    padding: 15px 11px 7px;
    color: #646d7e;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
}
.nav-item {
    min-height: 34px;
    padding: 8px 10px;
    gap: 10px;
    margin: 1px 0;
    border: 0;
    border-radius: 6px;
    color: #929aaa;
    font-size: 11px;
}
.nav-item .ic { width: 16px; font-size: 13px; color: #8791a3; }
.nav-item:hover { background: #151820; color: #eef0f7; }
.nav-item.active {
    background: #191c26;
    color: #f1f2f7;
    box-shadow: inset 2px 0 #7b82ff;
}
.nav-item.active .ic { color: #aeb4ff; }
.main { background: #090b0f; }
.topbar {
    min-height: 54px;
    padding: 8px 28px;
    border-bottom-color: #1b1e25;
    background: #090b0f;
    color: #9aa2b2;
    font-size: 12px;
}
.topbar .user-chip { background: #12151b; }
.topbar .user-chip .avatar { background: #424a70; }
.topbar .role-tag { background: #20232c; }
.role-tag.admin { background: #292b58; color: #c7c9ff; }
.topbar a.logout { color: #b7bdc9; }
.dashboard-content { padding: 0; }
.dashboard-page {
    min-height: calc(100vh - 54px);
    padding: 0 28px 20px;
    color: #e6e8ee;
    background-color: #090b0f;
    background-image:
        linear-gradient(rgba(40, 45, 54, .17) 1px, transparent 1px),
        linear-gradient(90deg, rgba(40, 45, 54, .17) 1px, transparent 1px);
    background-size: 48px 48px;
}
.dashboard-tabs {
    min-height: 56px;
    display: flex;
    align-items: center;
    gap: 7px;
    border-bottom: 1px solid #1b1e25;
}
.dashboard-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #858d9d;
    font-size: 11px;
    text-decoration: none;
}
.dashboard-tab > span { color: #8c95a6; }
.dashboard-tab small {
    display: inline-flex;
    min-width: 17px;
    height: 17px;
    justify-content: center;
    align-items: center;
    border-radius: 9px;
    background: #20232c;
    color: #aab0bd;
    font-size: 9px;
}
.dashboard-tab.active {
    border-color: #292d38;
    background: #171a21;
    color: #edf0f7;
}
.dashboard-toolbar {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8991a0;
    font-size: 10px;
}
.server-select, .range-select {
    min-height: 29px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 9px;
    border: 1px solid #242832;
    border-radius: 6px;
    background: #13161d;
    white-space: nowrap;
}
.server-select strong { color: #d7dbe4; font-weight: 500; }
.server-select > span:last-child { color: #7b8392; }
.status-dot, .activity-dot {
    width: 6px;
    height: 6px;
    display: inline-block;
    border-radius: 50%;
    background: #35d69c;
    box-shadow: 0 0 8px rgba(53, 214, 156, .35);
}
.range-select { word-spacing: 4px; color: #b7bdc9; }
.updated-label { padding-left: 5px; white-space: nowrap; }
.dashboard-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0 18px;
}
.dashboard-heading .eyebrow {
    margin-bottom: 6px;
    color: #788192;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .14em;
}
.dashboard-heading h1.title {
    margin: 0;
    color: #f0f1f5;
    font-size: 21px;
    letter-spacing: -.03em;
}
.dashboard-refresh {
    width: 32px;
    height: 32px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #282c36;
    border-radius: 6px;
    color: #adb4c1;
    font-size: 18px;
    text-decoration: none;
}
.dashboard-refresh:hover { background: #171a21; color: #fff; }
.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    margin-bottom: 10px;
}
.metric-card, .dash-panel {
    min-width: 0;
    border: 1px solid #252932;
    border-radius: 8px;
    background: rgba(16, 19, 25, .97);
}
.metric-card { min-height: 128px; padding: 12px 14px 13px; }
.metric-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #c8cdd7;
    font-size: 11px;
    font-weight: 600;
}
.metric-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    font-size: 12px;
    background: #1c2226;
}
.metric-icon.green, .green-text { color: #35d69c; }
.metric-icon.blue, .blue-text { color: #8b9cff; }
.metric-icon.purple, .purple-text { color: #bd91ff; }
.metric-icon.red, .red-text { color: #ff7779; }
.metric-icon.blue { background: #1e2232; }
.metric-icon.purple { background: #241e31; }
.metric-icon.red { background: #2a1d22; }
.metric-menu { margin-left: auto; color: #687181; letter-spacing: 2px; }
.metric-value {
    margin-top: 10px;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.03em;
}
.metric-caption {
    margin-top: 5px;
    color: #bbc1cd;
    font-size: 9px;
}
.metric-caption span { color: #697283; }
.metric-track, .utilization-track {
    height: 4px;
    overflow: hidden;
    border-radius: 5px;
    background: #242831;
}
.metric-track { margin-top: 12px; }
.metric-track span, .utilization-track span { display: block; height: 100%; border-radius: inherit; }
.green-fill { background-color: #35d69c; }
.blue-fill { background-color: #8b9cff; }
.purple-fill { background-color: #bd91ff; }
.red-fill { background-color: #ff7779; }
.dashboard-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(260px, .92fr);
    gap: 9px;
    align-items: start;
}
.dashboard-main-column, .dashboard-side-column { display: grid; gap: 9px; min-width: 0; }
.dash-panel { overflow: hidden; }
.dash-panel-title {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 13px;
    border-bottom: 1px solid #242831;
    color: #d7dbe4;
    font-size: 10px;
    font-weight: 600;
}
.dash-panel-title a {
    color: #959eae;
    font-size: 9px;
    font-weight: 500;
    text-decoration: none;
}
.dash-panel-title a:hover { color: #dce0e8; }
.dash-panel-title a span { padding-left: 3px; }
.panel-subtitle { color: #798293; font-size: 9px; font-weight: 400; }
.performance-panel { min-height: 205px; }
.utilization-chart {
    position: relative;
    display: grid;
    gap: 22px;
    padding: 24px 16px 21px;
}
.chart-grid-lines {
    position: absolute;
    inset: 14px 100px 14px 100px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}
.chart-grid-lines i { width: 1px; background: #20242c; }
.utilization-row {
    position: relative;
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 10px;
}
.utilization-name, .chart-footer {
    color: #98a0af;
    font-size: 9px;
}
.utilization-name { display: flex; align-items: center; gap: 7px; }
.legend-square { width: 6px; height: 6px; display: inline-block; border-radius: 2px; flex: 0 0 auto; }
.utilization-track { height: 7px; background: #20242c; }
.utilization-row strong {
    color: #d9dde5;
    font-size: 10px;
    font-weight: 600;
    text-align: right;
}
.chart-footer {
    display: flex;
    gap: 16px;
    padding: 9px 14px;
    border-top: 1px solid #20242c;
}
.chart-footer span { display: inline-flex; align-items: center; gap: 6px; }
.applications-panel { min-height: 242px; }
.table-scroll { overflow-x: auto; }
.dashboard-table { width: 100%; border-collapse: collapse; font-size: 9px; }
.dashboard-table th {
    padding: 9px 12px;
    background: #14171e;
    color: #70798a;
    font-size: 8px;
    font-weight: 600;
    letter-spacing: .08em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}
.dashboard-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #20242c;
    color: #9ba3b2;
    white-space: nowrap;
}
.dashboard-table tr:last-child td { border-bottom: 0; }
.dashboard-table td:first-child { color: #e1e4eb; font-weight: 600; }
.site-symbol { margin-right: 8px; color: #8b9cff; }
.state-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 7px;
    border-radius: 5px;
    font-size: 8px;
}
.state-active { background: #153329; color: #56dda9; }
.state-active i { width: 5px; height: 5px; border-radius: 50%; background: #35d69c; }
.empty-row { text-align: center; padding: 24px !important; color: #7c8493 !important; font-weight: 400 !important; }
.quick-panel { padding-bottom: 8px; }
.quick-action {
    display: flex;
    min-height: 35px;
    align-items: center;
    justify-content: space-between;
    margin: 8px 9px 0;
    padding: 0 10px;
    border: 1px solid #272b35;
    border-radius: 6px;
    background: #171a21;
    color: #b9bfca;
    font-size: 9px;
    text-decoration: none;
}
.quick-action:hover { border-color: #414657; color: #fff; }
.quick-action b { color: #848d9d; font-size: 12px; font-weight: 400; }
.hardware-panel { padding-bottom: 3px; }
.spec-row {
    min-height: 29px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border-bottom: 1px solid #20242c;
    font-size: 9px;
}
.spec-row:last-child { border-bottom: 0; }
.spec-row span { color: #788191; }
.spec-row strong {
    overflow: hidden;
    color: #d0d4dd;
    font-size: 9px;
    font-weight: 500;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.activity-item {
    display: flex;
    gap: 9px;
    padding: 10px 12px;
    border-bottom: 1px solid #20242c;
}
.activity-dot { width: 5px; height: 5px; margin-top: 4px; flex: 0 0 auto; background: #8b9cff; box-shadow: none; }
.activity-dot.done { background: #35d69c; }
.activity-item div { min-width: 0; display: grid; gap: 4px; }
.activity-item strong {
    overflow: hidden;
    color: #c6cbd5;
    font-size: 9px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.activity-item div span { color: #747d8d; font-size: 8px; }
.activity-empty { padding: 15px 12px; color: #818a9a; font-size: 9px; }
.activity-summary {
    padding: 9px 12px;
    color: #858e9e;
    font-size: 9px;
}
.dashboard-footer {
    display: flex;
    align-items: center;
    gap: 7px;
    padding-top: 13px;
    color: #798293;
    font-size: 9px;
}
.dashboard-footer > span { display: inline-flex; align-items: center; gap: 5px; color: #9ba3b2; }
.dashboard-footer .footer-updated { margin-left: auto; color: #717a8a; }

@media (max-width: 1100px) {
    .dashboard-toolbar { gap: 5px; }
    .updated-label { display: none; }
    .dashboard-columns { grid-template-columns: minmax(0, 1.5fr) minmax(240px, .9fr); }
}
@media (max-width: 900px) {
    .sidebar { width: 260px; }
    .dashboard-page { padding: 0 16px 18px; }
    .topbar { background: #090b0f; }
    .dashboard-columns { grid-template-columns: 1fr; }
    .dashboard-side-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .activity-panel { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .dashboard-page { padding: 0 12px 16px; }
    .dashboard-tabs { min-height: 49px; gap: 2px; }
    .dashboard-tab { gap: 5px; padding: 0 7px; font-size: 9px; }
    .dashboard-toolbar { display: none; }
    .dashboard-heading { padding: 19px 0 14px; }
    .dashboard-heading h1.title { font-size: 19px; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
    .metric-card { min-height: 120px; padding: 10px; }
    .metric-value { font-size: 21px; }
    .dashboard-side-column { grid-template-columns: 1fr; }
    .activity-panel { grid-column: auto; }
    .chart-grid-lines { inset-inline: 90px; }
    .utilization-row { grid-template-columns: 58px minmax(0, 1fr) 34px; gap: 7px; }
    .dashboard-footer { flex-wrap: wrap; }
    .dashboard-footer .footer-updated { width: 100%; margin-left: 0; }
}
@media (max-width: 380px) {
    .dashboard-tab { padding: 0 5px; }
    .dashboard-tab small { display: none; }
    .metric-heading { font-size: 10px; }
    .chart-footer { gap: 9px; }
}

/* ---- Shared dark theme for every admin page ---- */
.app {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}
.main, .content {
    width: 100%;
    min-width: 0;
}
.panel, .resource-card, .access-denied {
    max-width: 100%;
    border: 1px solid #252932;
    border-radius: 8px;
    background: #101318;
}
.panel { margin-bottom: 14px; }
.panel-title {
    padding: 12px 14px;
    border-bottom-color: #242831;
    color: #e0e3e9;
    font-size: .9rem;
}
.kv-row {
    padding: 12px 14px;
    border-bottom-color: #20242c;
}
.kv-row .k { color: #8992a1; }
.kv-row .v { color: #d7dbe3; }
table.data-table {
    width: 100%;
    max-width: 100%;
    font-size: .82rem;
}
table.data-table th {
    padding: 11px 14px;
    border-bottom-color: #242831;
    background: #14171e;
    color: #8c95a4;
}
table.data-table td {
    padding: 11px 14px;
    border-bottom-color: #20242c;
    color: #d0d4dd;
}
.form-group input, .form-group select, .form-group textarea, .chat-form textarea {
    border-color: #2a2e38;
    background: #0c0f14;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus,
.chat-form textarea:focus { border-color: #7279ff; }
.btn { background: #7279ff; }
.btn:hover { background: #6269ed; }
.btn-secondary { background: #20242c; }
.btn-secondary:hover { background: #292e38; }
.bar { background: #242831; }
.bar > span { background: #7279ff; }
.chat-log { background: #0c0f14; }
.chat-msg.mine .chat-bubble { background: #555ce0; }
.chat-msg.theirs .chat-bubble { background: #20242c; }
.chat-thread:hover, .chat-thread.active { background: #171a21; }
.chat-thread, .chat-group { border-color: #242831; }
.chat-group { background: #0c0f14; }
.nav-item.active { box-shadow: inset 2px 0 #7b82ff; }

@media (max-width: 900px) {
    .content { width: 100%; }
    .panel table.data-table:not(.sites-table) {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
    }
}

/* ---- My hosting page ---- */
.my-page { max-width: 1480px; margin: 0 auto; }
.my-page-heading, .shared-sites-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.my-page-heading { padding: 23px 0 19px; }
.my-eyebrow {
    color: #788293;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .14em;
}
.my-page-heading h1.title {
    margin: 5px 0 5px;
    font-size: 22px;
    letter-spacing: -.025em;
}
.my-page-heading p {
    color: #8992a1;
    font-size: 11px;
}
.my-account-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 11px;
    border: 1px solid #252932;
    border-radius: 20px;
    background: #11151a;
    color: #aeb5c1;
    font-size: 10px;
    white-space: nowrap;
}
.my-sites { display: grid; gap: 12px; }
.my-site-group {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, .9fr);
    gap: 12px;
    min-width: 0;
    scroll-margin-top: 70px;
}
.my-site-group > .panel, .my-shared-site, .my-empty-state { margin: 0; }
.site-overview-panel { grid-column: 1 / -1; }
.my-page .panel-title {
    min-height: 43px;
    gap: 12px;
}
.my-page .panel-title > span:first-child { display: inline-flex; align-items: center; gap: 7px; }
.my-site-icon {
    width: 23px;
    height: 23px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #1a2028;
    color: #8b9cff;
    font-size: 14px;
}
.my-page .site-overview-panel .kv-row,
.my-page .access-panel .kv-row {
    min-width: 0;
    gap: 16px;
}
.my-page .site-overview-panel .kv-row .v,
.my-page .access-panel .kv-row .v { min-width: 0; }
.my-page .quota-line {
    align-items: center;
    gap: 12px;
    color: #d7dbe3;
    font-size: 11px;
}
.my-page .quota-line .k { color: #8992a1; }
.my-page .bar {
    height: 7px;
    border-radius: 8px;
    background: #242831;
}
.my-page .bar > span { height: 100%; border-radius: inherit; }
.my-page .bar.warn > span { background: #f0ad55; }
.my-page .bar.crit > span { background: #fb6d72; }
.my-page .upd-row {
    padding: 13px 15px;
    border-top-color: #242831;
    background: #14171e;
}
.my-page .upd-row .txt { color: #929baa; font-size: 11px; }
.my-page .upd-row .txt strong { color: #e4e7ed; }
.my-page .upd-row form { flex: 0 1 auto; }
.my-page .upd-row .btn { font-size: 11px; }
.my-page .access-panel .kv-row { padding-top: 10px; padding-bottom: 10px; }
.my-page .pw {
    background: #0c0f14;
    border-color: #2a2e38;
    color: #dce1ea;
    font-size: 10px;
}
.my-page .acc-val { gap: 7px; }
.my-page .acc-val a { overflow-wrap: anywhere; text-align: right; }
.my-page .note-box { color: #aab2c0; font-size: 11px; }
.my-page .friends-intro {
    padding: 11px 14px 5px;
    color: #8992a1;
    font-size: 10px;
}
.my-page .friend-list li {
    padding: 10px 14px;
    border-top-color: #242831;
}
.my-page .friend-list .avatar {
    width: 25px;
    height: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #252a38;
    color: #c5caff;
    font-size: 10px;
    font-weight: 700;
}
.my-page .friend-add {
    gap: 8px;
    padding: 13px 14px;
    border-top-color: #242831;
}
.my-page .friend-add input[type=text] { min-width: 0; }
.my-page .friend-add .btn { font-size: 11px; }
.my-page .friends-note {
    padding: 0 14px 14px;
    color: #7f8999;
    font-size: 10px;
    line-height: 1.6;
}
.my-page .my-empty-state > div:last-child {
    padding: 18px !important;
    color: #9ba4b3 !important;
}
.my-page .panel:target .panel-title {
    background: #171b23;
    box-shadow: inset 2px 0 #7b82ff;
}
.shared-sites { margin-top: 26px; }
.shared-sites-heading { margin-bottom: 12px; }
.shared-sites-heading h2 {
    margin-top: 5px;
    color: #e6e8ee;
    font-size: 17px;
}
.shared-sites-heading > span {
    padding: 5px 9px;
    border: 1px solid #252932;
    border-radius: 16px;
    color: #9ba4b3;
    font-size: 10px;
}
.my-shared-site { margin-bottom: 12px; }

@media (max-width: 1000px) {
    .my-site-group { grid-template-columns: minmax(0, 1fr); }
    .site-overview-panel { grid-column: auto; }
}
@media (max-width: 640px) {
    .my-page-heading { align-items: flex-start; padding: 17px 0 14px; }
    .my-page-heading h1.title { font-size: 19px; }
    .my-page-heading p { max-width: 260px; line-height: 1.5; }
    .my-account-chip { padding: 7px 8px; font-size: 9px; }
    .my-page .site-overview-panel .kv-row,
    .my-page .access-panel .kv-row { gap: 4px; }
    .my-page .acc-val { justify-content: flex-start; }
    .my-page .acc-val a { text-align: left; }
    .my-page .upd-row { align-items: stretch; }
    .my-page .upd-row .btn { width: 100% !important; }
    .my-page .friend-add { align-items: stretch; }
    .my-page .friend-add .btn { width: 100% !important; }
    .shared-sites-heading h2 { font-size: 15px; }
}
.my-overview { margin-bottom: 20px; }
.my-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 10px;
}
.my-section-heading h2 {
    margin-top: 4px;
    color: #e3e6ed;
    font-size: 15px;
}
.my-section-heading > span {
    color: #929baa;
    font-size: 9px;
    white-space: nowrap;
}
.my-section-heading .my-snapshot-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border: 1px solid #252932;
    border-radius: 14px;
    background: #11151a;
}
.my-metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-bottom: 10px; }
.my-metric-grid .metric-card { min-height: 124px; }
.my-metric-grid .metric-value { overflow: hidden; font-size: 22px; text-overflow: ellipsis; white-space: nowrap; }
.my-metric-grid .metric-caption { line-height: 1.5; }
.my-usage-panel { margin-bottom: 0; }
.my-usage-list { display: grid; gap: 2px; padding: 8px 14px; }
.my-usage-row { min-width: 0; padding: 8px 0; }
.my-usage-row + .my-usage-row { border-top: 1px solid #20242c; }
.my-usage-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.my-usage-site {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    overflow: hidden;
    color: #d7dbe3;
    font-size: 10px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.my-usage-value { color: #929baa; font-size: 9px; text-align: right; }
.my-usage-track {
    height: 7px;
    overflow: hidden;
    border-radius: 8px;
    background: #242831;
}
.my-usage-track > span { display: block; height: 100%; border-radius: inherit; transition: width .25s ease; }
.my-chart-note {
    padding: 9px 14px;
    border-top: 1px solid #20242c;
    color: #798293;
    font-size: 9px;
    line-height: 1.5;
}
.my-chart-empty { padding: 20px 14px; color: #8992a1; font-size: 10px; }
.my-sites-heading { margin-top: 22px; }

@media (max-width: 1100px) {
    .my-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .my-metric-grid { gap: 7px; }
    .my-metric-grid .metric-card { min-height: 116px; padding: 10px; }
    .my-metric-grid .metric-value { font-size: 20px; }
    .my-usage-label { align-items: flex-start; flex-direction: column; gap: 5px; }
    .my-usage-value { text-align: left; }
    .my-section-heading h2 { font-size: 14px; }
}

/* ---- Email kód megerősítés (verify.php) ---- */
.code-input { text-align: center; font-size: 1.6rem !important; letter-spacing: 0.5em; font-weight: 700; font-family: Consolas, Menlo, monospace; padding-left: 0.5em !important; }
.btn-link-like { background: transparent !important; border: 1px solid #2a3358 !important; color: #a3aac4 !important; font-size: 0.85rem; }
.btn-link-like:hover { color: #fff !important; border-color: #6366f1 !important; }
