/* ========================================
   ALAPBEÁLLÍTÁSOK
======================================== */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f4f7fa;
    color: #163047;
}

a {
    color: #21718c;
}

a:hover {
    color: #173b57;
}

/* ========================================
   FEJLÉC
======================================== */

.topbar {
    min-height: 72px;
    padding: 0 max(24px, calc((100% - 1180px) / 2));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: #ffffff;
    border-bottom: 1px solid #dbe5ed;
}

.brand {
    flex-shrink: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #173b57;
    text-decoration: none;
}

.brand:hover {
    color: #173b57;
}

.topbar nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.topbar nav a:not(.button),
.link-button {
    color: #173b57;
    text-decoration: none;
}

.topbar nav a:not(.button):hover,
.link-button:hover {
    color: #21718c;
}

.topbar nav .button {
    color: #ffffff;
}

.topbar nav .button:hover {
    color: #ffffff;
}

.link-button {
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
}

/* ========================================
   FŐ TARTALOM
======================================== */

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 48px 24px;
}

/* ========================================
   FŐOLDAL
======================================== */

.hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    padding: 64px;
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff, #eaf3f8);
}

.hero h1 {
    max-width: 780px;
    margin: 12px 0 22px;
    font-size: clamp(2.4rem, 5vw, 4.7rem);
    line-height: 1.02;
}

.hero p {
    max-width: 680px;
    margin: 0;
    color: #557085;
    font-size: 1.15rem;
    line-height: 1.65;
}

.eyebrow {
    display: inline-block;
    color: #21718c;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

/* ========================================
   GOMBOK
======================================== */

.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.button {
    display: inline-block;
    padding: 13px 20px;
    border: 0;
    border-radius: 10px;
    background: #173b57;
    color: #ffffff;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.button:hover {
    background: #0f2e47;
    color: #ffffff;
}

.button:active {
    transform: translateY(1px);
}

.button.secondary {
    border: 1px solid #b8cad6;
    background: #ffffff;
    color: #173b57;
}

.button.secondary:hover {
    border-color: #8faabb;
    background: #f4f7fa;
    color: #173b57;
}

.button.small {
    padding: 9px 14px;
}

.button.tiny {
    padding: 9px 12px;
    font-size: 0.88rem;
}

.button.full {
    width: 100%;
    margin-top: 20px;
}

/* ========================================
   BEJELENTKEZÉSI ÉS REGISZTRÁCIÓS KÁRTYA
======================================== */

.auth-card {
    max-width: 520px;
    margin: 0 auto;
    padding: 34px;
    border: 1px solid #dbe5ed;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 14px 42px rgba(25, 62, 88, 0.08);
}

.auth-card.wide {
    max-width: 900px;
}

.auth-card h1 {
    margin-top: 0;
    margin-bottom: 22px;
}

/* ========================================
   ŰRLAPOK
======================================== */

form {
    margin: 0;
}

.grid {
    display: grid;
    gap: 18px;
}

.grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
    display: block;
    margin-bottom: 18px;
    font-weight: 700;
}

input,
select,
textarea {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 12px 13px;
    border: 1px solid #b9cbd8;
    border-radius: 9px;
    background: #ffffff;
    color: #163047;
    font: inherit;
}

input::placeholder,
textarea::placeholder {
    color: #8ba0af;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #2885a0;
    outline: 3px solid rgba(40, 133, 160, 0.16);
}

input[type="radio"],
input[type="checkbox"] {
    width: auto;
}

fieldset {
    margin: 10px 0 24px;
    padding: 0;
    border: 0;
}

legend {
    margin-bottom: 12px;
    font-weight: 800;
}

/* ========================================
   CSOMAGVÁLASZTÁS
======================================== */

.plans {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.plan {
    position: relative;
    margin: 0;
    padding: 14px;
    border: 1px solid #cbd9e2;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.plan:hover {
    border-color: #7da6b8;
    box-shadow: 0 8px 24px rgba(25, 62, 88, 0.08);
    transform: translateY(-1px);
}

.plan input {
    width: auto;
    margin: 0 0 10px;
}

.plan strong {
    display: block;
    color: #173b57;
    font-size: 1.05rem;
}

.plan span,
.plan small {
    display: block;
    margin-top: 6px;
    color: #60798c;
    line-height: 1.4;
}

.plan .plan-limit {
    color: #173b57;
    font-weight: 800;
}

/* ========================================
   ÜZENETEK
======================================== */

.alert {
    max-width: 900px;
    margin: 0 auto 20px;
    padding: 14px 18px;
    border-radius: 10px;
}

.alert.success {
    background: #e8f7ef;
    color: #17623d;
}

.alert.error {
    background: #fff0f0;
    color: #8d2424;
}

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

/* ========================================
   VEZÉRLŐPULT
======================================== */

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

.stat {
    padding: 20px;
    border: 1px solid #dbe5ed;
    border-radius: 14px;
    background: #ffffff;
}

.stat span {
    display: block;
    margin-bottom: 8px;
    color: #60798c;
}

.stat strong {
    display: block;
    color: #173b57;
    font-size: 1.5rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 28px;
}

.panel {
    padding: 24px;
    border: 1px solid #dbe5ed;
    border-radius: 16px;
    background: #ffffff;
}

.panel h2 {
    margin-top: 0;
    margin-bottom: 18px;
}

.panel p {
    color: #557085;
    line-height: 1.6;
}

dl {
    margin: 0;
}

dt {
    margin-top: 12px;
    font-weight: 800;
}

dt:first-child {
    margin-top: 0;
}

dd {
    margin: 4px 0 0;
    color: #557085;
}

/* ========================================
   OLDALFEJLÉC
======================================== */

.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.page-heading h1 {
    margin: 8px 0;
}

/* ========================================
   TÁBLÁZAT
======================================== */

.table-wrap {
    overflow-x: auto;
    border: 1px solid #dbe5ed;
    border-radius: 16px;
    background: #ffffff;
}

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

th,
td {
    padding: 15px 16px;
    border-bottom: 1px solid #e4ebf0;
    text-align: left;
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: 0;
}

th {
    background: #f9fbfc;
    color: #60798c;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

tbody tr:hover {
    background: #fbfdfe;
}

td strong {
    color: #173b57;
}

td small {
    display: block;
    margin-top: 4px;
    color: #60798c;
}

/* ========================================
   ÁLLAPOTJELZŐK
======================================== */

.badge {
    display: inline-block;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}

.status-active {
    background: #e8f7ef;
    color: #17623d;
}

.status-inactive {
    background: #fff6dd;
    color: #805c00;
}

.status-archived {
    background: #edf1f4;
    color: #4d6475;
}

.status-terminated {
    background: #fff0f0;
    color: #8d2424;
}

/* ========================================
   ÜGYFÉLÁLLAPOT ŰRLAP
======================================== */

.status-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-form select {
    min-width: 120px;
    margin: 0;
    padding: 8px 10px;
}

/* ========================================
   ÜRES ÁLLAPOT
======================================== */

.empty-state {
    padding: 48px;
    border: 1px solid #dbe5ed;
    border-radius: 16px;
    background: #ffffff;
    text-align: center;
}

.empty-state h2 {
    margin-top: 0;
}

.empty-state p {
    color: #60798c;
}

/* ========================================
   CAPTCHA
======================================== */

.sl-captcha {
    margin: 18px 0;
}

/* ========================================
   SEGÉDOSZTÁLYOK
======================================== */

.inline {
    display: inline;
}

.center {
    text-align: center;
}

.muted,
.hint {
    color: #60798c;
}

.hint {
    font-size: 0.92rem;
}

/* ========================================
   MOBILNÉZET
======================================== */

@media (max-width: 760px) {
    .topbar {
        min-height: auto;
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar nav {
        width: 100%;
        gap: 10px;
    }

    .container {
        padding: 28px 16px;
    }

    .hero {
        min-height: auto;
        padding: 34px;
    }

    .hero h1 {
        font-size: 2.4rem;
    }

    .grid.two,
    .plans,
    .dashboard-grid,
    .stats {
        grid-template-columns: 1fr;
    }

    .auth-card {
        padding: 24px;
    }

    .page-heading {
        display: block;
    }

    .page-heading .button {
        margin-top: 12px;
    }

    .actions {
        flex-direction: column;
    }

    .actions .button {
        width: 100%;
    }

    .status-form {
        display: block;
        min-width: 150px;
    }

    .status-form select {
        width: 100%;
    }

    .status-form .button {
        width: 100%;
        margin-top: 8px;
    }

    .empty-state {
        padding: 30px 20px;
    }
}