:root {
    --bg: #071224;
    --bg2: #0b1730;
    --panel: #162447;
    --panel2: #1d2c56;
    --line: rgba(255,255,255,0.08);
    --text: #eef4ff;
    --muted: #b6c4e3;
    --accent: #6c8cff;
    --accent2: #8b5cf6;
    --danger: #ff9b9b;
    --success: #bbf7d0;
    --input-bg: rgba(255,255,255,0.06);
    --input-bg-focus: rgba(255,255,255,0.09);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: radial-gradient(circle at top left, rgba(108,140,255,0.10), transparent 28%), radial-gradient(circle at top right, rgba(139,92,246,0.10), transparent 22%), linear-gradient(180deg, #06101f 0%, #081326 100%);
    color: var(--text);
    font-family: "Segoe UI", Arial, sans-serif;
}

body {
    min-height: 100vh;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar {
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(6, 11, 24, 0.90);
}

.topbar-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    font-size: 1.05rem;
    font-weight: 800;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

    .nav a {
        color: var(--muted);
        font-size: 0.95rem;
    }

        .nav a:hover {
            color: white;
        }

.main-content {
    padding: 28px 0 40px;
}

/* COMMON */
.page-header {
    margin-bottom: 22px;
}

    .page-header h1 {
        margin: 0 0 8px 0;
        font-size: 2.1rem;
        font-weight: 800;
    }

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

.panel,
.form-card,
.page-card,
.entry-shell {
    background: linear-gradient(180deg, rgba(22,36,71,0.96), rgba(24,39,74,0.96));
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 18px 48px rgba(0,0,0,0.30);
}

.panel-header {
    margin-bottom: 18px;
}

    .panel-header h2 {
        margin: 0 0 8px 0;
        font-size: 1.7rem;
    }

.panel-subtitle {
    color: var(--muted);
    font-size: 0.95rem;
}

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

.form-field,
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

    .form-field.full-width,
    .form-group.full-width {
        grid-column: 1 / -1;
    }

    .form-field label,
    .form-group label {
        font-size: 0.95rem;
        font-weight: 700;
        color: #f4f8ff;
    }

/* INPUTS + SELECTS */
.input-modern,
.result-output,
textarea,
select,
input[type="text"],
input[type="number"],
input[type="date"] {
    width: 100%;
    min-height: 50px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.10);
    background: var(--input-bg);
    color: white;
    padding: 0 14px;
    outline: none;
    font-size: 0.98rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

    /* NATÍV LENYÍLÓK SZÉPÍTÉSE */
    select,
    select.input-modern {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-color: rgba(255,255,255,0.06);
        background-image: linear-gradient(45deg, transparent 50%, #dbe7ff 50%), linear-gradient(135deg, #dbe7ff 50%, transparent 50%);
        background-position: calc(100% - 18px) calc(50% - 3px), calc(100% - 12px) calc(50% - 3px);
        background-size: 6px 6px, 6px 6px;
        background-repeat: no-repeat;
        padding-right: 42px;
        cursor: pointer;
    }

        select::-ms-expand {
            display: none;
        }

        select:hover,
        select.input-modern:hover {
            border-color: rgba(108,140,255,0.55);
            background-color: rgba(255,255,255,0.08);
        }

        select:focus,
        select.input-modern:focus {
            border-color: rgba(108,140,255,0.80);
            box-shadow: 0 0 0 4px rgba(108,140,255,0.14);
            background-color: rgba(255,255,255,0.10);
        }

/* OPTIONÖK */
option {
    background: #162447;
    color: #eef4ff;
}

textarea {
    min-height: 120px;
    padding-top: 12px;
    resize: vertical;
}

    .input-modern:focus,
    textarea:focus,
    input[type="text"]:focus,
    input[type="number"]:focus,
    input[type="date"]:focus {
        border-color: rgba(108,140,255,0.80);
        box-shadow: 0 0 0 4px rgba(108,140,255,0.14);
        background: var(--input-bg-focus);
    }

.readonly-modern,
.result-output {
    background: rgba(255,255,255,0.05);
    color: #eef4ff;
}

.validation-summary,
.validation-text,
.text-danger {
    color: var(--danger);
}

.validation-summary {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(127, 29, 29, 0.18);
    border: 1px solid rgba(255, 120, 120, 0.20);
}

.alert-success {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(34,197,94,0.12);
    border: 1px solid rgba(34,197,94,0.28);
    color: var(--success);
}

.form-actions,
.hero-actions,
.action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary,
.btn-edit-sm,
.btn-danger-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border: none;
    border-radius: 14px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: transform .18s ease, opacity .18s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    box-shadow: 0 12px 28px rgba(108,140,255,0.22);
}

.btn-secondary {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
}

.btn-edit-sm {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    background: rgba(245,158,11,0.16);
    color: #fde68a;
    border: 1px solid rgba(245,158,11,0.35);
}

.btn-danger-sm {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 0.9rem;
    background: rgba(239,68,68,0.15);
    color: #fecaca;
    border: 1px solid rgba(239,68,68,0.35);
}

    .btn-primary:hover,
    .btn-secondary:hover,
    .btn-edit-sm:hover,
    .btn-danger-sm:hover {
        opacity: 0.96;
        transform: translateY(-1px);
    }

/* HERO */
.hero {
    margin-bottom: 24px;
}

.hero-content {
    padding: 4px 0 8px 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(108,140,255,0.16);
    border: 1px solid rgba(108,140,255,0.24);
    color: #dbe7ff;
    font-size: 0.84rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.hero h1 {
    margin: 0 0 10px 0;
    font-size: 2.4rem;
    font-weight: 800;
}

.lead {
    margin: 0 0 16px 0;
    color: var(--muted);
    max-width: 760px;
}

/* DASHBOARD */
.dashboard-filter-panel {
    margin-bottom: 24px;
}

.dashboard-filter-form {
    margin-top: 8px;
}

.dashboard-filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 16px;
    align-items: end;
}

.dashboard-filter-button-wrap {
    min-width: 180px;
}

.dashboard-filter-button {
    width: 100%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    padding: 18px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.24);
}

.stat-label {
    color: var(--muted);
    font-size: 0.92rem;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 1.45rem;
    font-weight: 800;
    color: white;
}

.dashboard-advisors-panel {
    margin-bottom: 24px;
}

.advisor-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.advisor-dashboard-card {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    padding: 20px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.24);
}

.advisor-dashboard-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.advisor-name {
    font-size: 1.08rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.35;
}

.advisor-status {
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.92rem;
}

.su-gauge-wrap {
    flex-shrink: 0;
}

.su-gauge {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    position: relative;
}

.su-gauge-inner {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: #11192f;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.28);
}

.su-gauge-value {
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
}

.su-gauge-label {
    margin-top: 4px;
    font-size: 0.78rem;
    color: var(--muted);
}

.advisor-metrics {
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
}

.advisor-metric {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
}

.advisor-metric-label {
    color: var(--muted);
    font-size: 0.92rem;
}

.advisor-metric-value {
    font-weight: 700;
    color: #ffffff;
    text-align: right;
}

.advisor-bonus-percent {
    color: #fde68a;
    font-size: 0.9rem;
    margin-left: 6px;
}

.advisor-metric-final {
    border: 1px solid rgba(94,162,255,0.18);
    background: rgba(94,162,255,0.08);
}

.su-scale-bar {
    display: grid;
    grid-template-columns: 4.5fr 4.5fr 11fr;
    gap: 6px;
    margin-top: 10px;
}

.su-scale-segment {
    height: 8px;
    border-radius: 999px;
}

.su-scale-gray {
    background: #6b7280;
}

.su-scale-yellow {
    background: #f59e0b;
}

.su-scale-green {
    background: #22c55e;
}

.su-scale-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.82rem;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
}

    .modern-table th,
    .modern-table td {
        padding: 12px 10px;
        border-bottom: 1px solid var(--line);
        text-align: left;
        vertical-align: middle;
    }

    .modern-table th {
        color: #dfe8ff;
        font-size: 0.95rem;
    }

.empty-state {
    padding: 18px;
    border-radius: 16px;
    background: rgba(255,255,255,0.03);
    color: var(--muted);
}

/* DATA ENTRY */
.entry-header {
    margin-bottom: 24px;
}

    .entry-header h2 {
        margin: 0 0 8px 0;
        font-size: 1.9rem;
    }

    .entry-header p {
        margin: 0;
        color: var(--muted);
    }

.entry-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.8fr);
    gap: 28px;
    align-items: start;
}

.entry-main,
.entry-side {
    min-width: 0;
}

.yes-panel {
    margin-top: 22px;
    padding: 20px;
    border-radius: 18px;
    border: 1px solid rgba(139,92,246,0.20);
    background: rgba(139,92,246,0.08);
}

    .yes-panel h3 {
        margin: 0 0 18px 0;
        font-size: 1.15rem;
    }

.result-panel {
    background: rgba(11, 21, 42, 0.62);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 18px;
    padding: 20px;
    position: sticky;
    top: 18px;
}

.result-panel-title {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 14px;
}

.result-card {
    margin-bottom: 14px;
}

.result-label {
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 6px;
}

.help-box {
    margin-top: 16px;
    padding: 16px;
    border-radius: 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
}

.help-box-title {
    font-weight: 800;
    margin-bottom: 8px;
}

.help-box ul {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .advisor-dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 980px) {
    .entry-grid {
        grid-template-columns: 1fr;
    }

    .result-panel {
        position: static;
    }
}

@media (max-width: 800px) {
    .form-grid,
    .dashboard-filter-grid,
    .stats-grid,
    .advisor-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-filter-button-wrap {
        min-width: auto;
    }

    .topbar-inner {
        flex-direction: column;
        justify-content: center;
        padding: 14px 0;
    }

    .advisor-dashboard-top {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 720px) {
    .container {
        width: min(100%, calc(100% - 20px));
    }

    .entry-shell,
    .panel,
    .page-card,
    .form-card {
        padding: 18px;
        border-radius: 18px;
    }

    .page-header h1,
    .hero h1 {
        font-size: 1.8rem;
    }

    .nav {
        gap: 12px;
    }
}
.actions-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 170px;
}

    .actions-cell .btn-edit-sm,
    .actions-cell .btn-danger-sm {
        min-width: 92px;
        text-align: center;
        text-decoration: none;
    }