:root {
    --bg: #0b0d0f;
    --panel: #13171b;
    --panel2: #1b2025;

    --text: #f4f6f7;
    --muted: #858d97;

    --line: #252b31;

    --accent: #b6ff00;

    --danger: #ff5b67;
    --warn: #ffb52e;
    --ok: #3ddc97;
}


/* =========================================================
   ALAP
   ========================================================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;

    background: var(--bg);
    color: var(--text);

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
}

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


/* =========================================================
   TOPBAR
   ========================================================= */

.topbar {
    min-height: 72px;

    background: #101316;

    border-bottom: 1px solid var(--line);

    display: flex;
    align-items: center;

    gap: 25px;

    padding: 12px 4%;

    position: sticky;
    top: 0;

    z-index: 5;
}

.brand {
    font-weight: 900;

    display: flex;
    align-items: center;

    gap: 10px;

    white-space: nowrap;
}

.brand-mark,
.logo-big {
    display: grid;
    place-items: center;

    background: var(--accent);
    color: #0b0d0f;

    font-weight: 1000;
}

.brand-mark {
    width: 38px;
    height: 38px;

    border-radius: 10px;
}

.logo-big {
    width: 72px;
    height: 72px;

    border-radius: 18px;

    font-size: 26px;

    margin: auto auto 16px;
}

.topbar nav {
    display: flex;

    gap: 16px;

    flex: 1;

    flex-wrap: wrap;
}

.topbar nav a {
    color: #c8cdd1;

    font-size: 14px;
}

.topbar nav a:hover,
.link {
    color: var(--accent);
}

.user-menu {
    font-size: 14px;

    display: flex;
    align-items: center;

    gap: 10px;
}


/* =========================================================
   CONTAINER
   ========================================================= */

.container {
    max-width: 1200px;

    margin: 0 auto;

    padding: 30px 22px;
}


/* =========================================================
   ÁLTALÁNOS
   ========================================================= */

.page-head,
.section-head {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 20px;

    margin-bottom: 24px;
}

.page-head h1 {
    margin: 0;

    font-size: 32px;
}

.muted {
    color: var(--muted);
}

.card {
    background: var(--panel);

    border: 1px solid var(--line);

    border-radius: 16px;

    padding: 22px;

    margin-bottom: 20px;

    box-shadow: 0 12px 30px #0003;
}


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

.quick,
.actions {
    display: flex;

    gap: 10px;

    flex-wrap: wrap;
}

.actions.vertical {
    flex-direction: column;
    align-items: stretch;
}

.btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    border: 1px solid var(--line);

    background: var(--panel2);

    color: var(--text);

    padding: 11px 16px;

    border-radius: 10px;

    font-weight: 700;

    cursor: pointer;

    font: inherit;

    transition: .15s ease;
}

.btn:hover {
    filter: brightness(1.15);
}

.btn.primary {
    background: var(--accent);

    border-color: var(--accent);

    color: #0b0d0f;
}

.btn.danger {
    background: #3a171b;

    border-color: #61252b;

    color: #ff9ca4;
}

.btn.small {
    padding: 7px 10px;

    font-size: 13px;
}

.btn.wide {
    width: 100%;
}


/* =========================================================
   INPUT
   ========================================================= */

.input {
    width: 100%;

    background: #0e1114;

    color: var(--text);

    border: 1px solid var(--line);

    border-radius: 10px;

    padding: 12px 13px;

    margin-top: 7px;

    outline: none;
}

.input:focus {
    border-color: var(--accent);
}

label {
    display: block;

    font-weight: 700;

    color: #dfe4e8;
}

.form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;
}

.form-grid .full {
    grid-column: 1 / -1;
}

.form-grid textarea {
    resize: vertical;
}


/* =========================================================
   TABLE
   ========================================================= */

.table-wrap {
    overflow-x: auto;

    padding: 0;
}

.table-wrap table {
    width: 100%;

    border-collapse: collapse;
}

.table-wrap th,
.table-wrap td {
    padding: 15px 16px;

    border-bottom: 1px solid var(--line);

    text-align: left;

    white-space: nowrap;
}

.table-wrap th {
    color: var(--muted);

    font-size: 13px;
}


/* =========================================================
   BADGE
   ========================================================= */

.badge {
    display: inline-flex;

    padding: 6px 9px;

    border-radius: 999px;

    font-size: 12px;

    font-weight: 800;
}

.badge.large {
    padding: 10px 14px;
}

.badge.ACTIVE {
    background: #123426;

    color: var(--ok);
}

.badge.SOON_EXPIRED {
    background: #3b2e12;

    color: var(--warn);
}

.badge.EXPIRED {
    background: #3b171c;

    color: #ff8e98;
}

.badge.ARCHIVED {
    background: #282d32;

    color: #aeb6bd;
}


/* =========================================================
   ALERT
   ========================================================= */

.empty {
    text-align: center;

    color: var(--muted);

    padding: 35px !important;
}

.alert {
    padding: 13px 16px;

    border-radius: 10px;

    margin-bottom: 18px;

    border: 1px solid;
}

.alert.success {
    background: #123426;

    border-color: #205d43;

    color: #80efbf;
}

.alert.error {
    background: #3b171c;

    border-color: #6b2730;

    color: #ffadb4;
}

.notice {
    background: #182126;

    border: 1px solid var(--line);

    padding: 14px;

    border-radius: 10px;

    color: #c9d1d7;
}


/* =========================================================
   AUTH
   ========================================================= */

.auth-wrap {
    min-height: 75vh;

    display: grid;

    place-items: center;
}

.auth-card {
    width: min(430px, 100%);

    background: var(--panel);

    border: 1px solid var(--line);

    border-radius: 20px;

    padding: 35px;
}

.auth-card h1 {
    text-align: center;

    margin: 0;
}

.auth-card > p {
    text-align: center;

    margin-bottom: 25px;
}

.auth-card form {
    display: grid;

    gap: 16px;
}

footer {
    text-align: center;

    color: #68727a;

    padding: 30px;
}

.check {
    display: flex;

    align-items: center;

    gap: 10px;
}

.check input {
    width: 18px;
    height: 18px;
}


/* =========================================================
   DASHBOARD
   ========================================================= */

.dashboard {
    width: 100%;
}


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

.dashboard-header {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 30px;

    margin-bottom: 28px;
}

.dashboard-kicker {
    color: var(--accent);

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 2px;

    margin-bottom: 8px;
}

.dashboard-header h1 {
    margin: 0 0 7px;

    font-size: 30px;

    font-weight: 800;
}

.dashboard-header p {
    margin: 0;

    color: #7f8792;

    font-size: 14px;
}


/* =========================================================
   STATISZTIKAI KÁRTYÁK
   ========================================================= */

.stats-grid {
    display: grid !important;

    grid-template-columns:
        repeat(4, minmax(0, 1fr)) !important;

    gap: 16px !important;

    margin-bottom: 22px;
}


/*
   MINDEN KÁRTYA UGYANOLYAN
*/

.dashboard-stat {
    background: #13171b;

    border: 1px solid #252b31;

    border-radius: 14px;

    padding: 19px;

    min-height: 92px;

    display: flex;

    align-items: center;

    gap: 15px;

    transition:
        transform .15s ease,
        border-color .15s ease;
}

.dashboard-stat:hover {
    transform: translateY(-2px);

    border-color: #3a424a;
}


/* =========================================================
   STAT IKON
   ========================================================= */

.stat-icon {
    width: 46px;
    height: 46px;

    min-width: 46px;

    border-radius: 12px;

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 20px;
}

.stat-icon.green {
    background: rgba(182, 255, 0, .12);
}

.stat-icon.orange {
    background: rgba(255, 170, 0, .12);
}

.stat-icon.red {
    background: rgba(255, 70, 70, .12);
}

.stat-icon.blue {
    background: rgba(70, 150, 255, .12);
}


/* =========================================================
   STAT TARTALOM
   ========================================================= */

.stat-content {
    display: flex;

    flex-direction: column;

    gap: 5px;

    min-width: 0;
}

.stat-content span {
    color: #858d97;

    font-size: 13px;

    line-height: 1.2;
}

.stat-content strong {
    color: #f1f3f5;

    font-size: 25px;

    line-height: 1;

    font-weight: 800;
}


/*
   HAVI BEVÉTEL KIEMELÉSE
*/

.dashboard-stat.revenue-stat .stat-content strong {
    color: var(--accent);
}


/* =========================================================
   ALSÓ KÉT PANEL
   ========================================================= */

.dashboard-columns {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);

    gap: 20px;

    margin-bottom: 22px;
}

.dashboard-panel {
    background: #13171b;

    border: 1px solid #252b31;

    border-radius: 16px;

    overflow: hidden;
}


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

.panel-header {
    padding: 21px 22px;

    border-bottom: 1px solid #252b31;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;
}

.panel-header h2 {
    margin: 0 0 5px;

    font-size: 17px;
}

.panel-header p {
    margin: 0;

    color: #747d87;

    font-size: 12px;
}

.panel-link {
    color: var(--accent);

    text-decoration: none;

    font-size: 12px;

    font-weight: 700;

    white-space: nowrap;
}

.panel-link:hover {
    text-decoration: underline;
}


/* =========================================================
   TAG LISTA
   ========================================================= */

.member-list,
.payment-list {
    padding: 5px 0;
}

.member-row,
.payment-row {
    display: flex;

    align-items: center;

    gap: 12px;

    padding: 13px 20px;

    border-bottom: 1px solid #20252a;
}

.member-row:last-child,
.payment-row:last-child {
    border-bottom: none;
}


/* =========================================================
   AVATAR
   ========================================================= */

.member-avatar,
.payment-avatar {
    width: 38px;
    height: 38px;

    min-width: 38px;

    border-radius: 10px;

    background: #20262c;

    color: var(--accent);

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 13px;

    font-weight: 800;
}


/* =========================================================
   TAG ADATOK
   ========================================================= */

.member-info,
.payment-info {
    min-width: 0;

    flex: 1;

    display: flex;

    flex-direction: column;

    gap: 3px;
}

.member-info a,
.payment-info a {
    color: #e9ecef;

    text-decoration: none;

    font-weight: 700;

    font-size: 13px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

.member-info a:hover,
.payment-info a:hover {
    color: var(--accent);
}

.member-info span,
.payment-info span {
    color: #737c86;

    font-size: 11px;
}


/* =========================================================
   LEJÁRAT
   ========================================================= */

.member-expiry {
    display: flex;

    flex-direction: column;

    align-items: flex-end;

    gap: 2px;

    margin-right: 8px;
}

.member-expiry span {
    font-size: 9px;

    font-weight: 800;

    text-transform: uppercase;
}

.member-expiry span.soon {
    color: var(--warn);
}

.member-expiry span.expired {
    color: #ff5b5b;
}

.member-expiry strong {
    font-size: 12px;

    color: #cbd0d5;
}


/* =========================================================
   MEGÚJÍTÁS
   ========================================================= */

.renew-btn {
    background: #20262c;

    border: 1px solid #30373e;

    color: var(--accent);

    text-decoration: none;

    padding: 7px 10px;

    border-radius: 7px;

    font-size: 10px;

    font-weight: 800;

    white-space: nowrap;

    transition: .15s ease;
}

.renew-btn:hover {
    background: var(--accent);

    color: #0b0d0f;
}


/* =========================================================
   FIZETÉS ÖSSZEG
   ========================================================= */

.payment-amount {
    color: var(--accent);

    font-size: 12px;

    white-space: nowrap;
}


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

.empty-state {
    padding: 45px 20px;

    text-align: center;

    color: #737c86;
}

.empty-state > div {
    font-size: 28px;

    color: var(--accent);

    margin-bottom: 10px;
}

.empty-state p {
    margin: 0;

    font-size: 13px;
}


/* =========================================================
   GYORS MŰVELETEK ELREJTÉSE
   ========================================================= */

.quick-actions {
    display: none !important;
}


/* =========================================================
   FIZETÉSEK OLDAL
   ========================================================= */

.payments-page {
    width: 100%;
}

.payments-page-head {
    margin-bottom: 28px;
}

.payments-kicker {
    color: var(--accent);

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 2px;

    margin-bottom: 8px;
}

.payments-page-head h1 {
    margin: 0 0 7px;

    font-size: 32px;

    font-weight: 800;
}

.payments-panel {
    background: #13171b;

    border: 1px solid #252b31;

    border-radius: 16px;

    overflow: hidden;
}

.payments-panel-header {
    display: flex;

    justify-content: space-between;
    align-items: center;

    padding: 21px 23px;

    border-bottom: 1px solid #252b31;
}

.payments-panel-header h2 {
    margin: 0 0 5px;

    font-size: 18px;
}

.payments-panel-header p {
    margin: 0;

    color: #747d87;

    font-size: 12px;
}

.payments-table-wrap {
    width: 100%;

    overflow-x: auto;
}

.payments-table {
    width: 100%;

    border-collapse: collapse;
}

.payments-table th {
    padding: 13px 20px;

    background: #101418;

    border-bottom: 1px solid #252b31;

    color: #747d87;

    font-size: 10px;

    font-weight: 800;

    letter-spacing: .7px;

    text-transform: uppercase;

    text-align: left;

    white-space: nowrap;
}

.payments-table td {
    padding: 14px 20px;

    border-bottom: 1px solid #20252a;

    color: #dfe3e6;

    font-size: 13px;

    white-space: nowrap;
}

.payments-table tbody tr {
    transition: background .15s ease;
}

.payments-table tbody tr:hover {
    background: #171c20;
}

.payments-table tbody tr:last-child td {
    border-bottom: none;
}

.payment-date {
    color: #aeb6bd;

    font-size: 12px;
}

.payment-member {
    display: inline-flex;

    align-items: center;

    gap: 10px;

    font-weight: 700;

    color: #e8ebed;
}

.payment-member:hover {
    color: var(--accent);
}

.payment-member-avatar {
    width: 34px;
    height: 34px;

    min-width: 34px;

    border-radius: 9px;

    background: #20262c;

    color: var(--accent);

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 11px;

    font-weight: 800;
}

.payment-card-number {
    color: #7d8790;

    font-size: 12px;
}

.payment-membership {
    display: inline-flex;

    padding: 6px 9px;

    background: #20262c;

    border: 1px solid #30373e;

    border-radius: 7px;

    color: #c7cdd2;

    font-size: 11px;

    font-weight: 700;
}

.payment-total {
    color: var(--accent);

    font-size: 13px;

    font-weight: 800;
}


/* =========================================================
   FIZETÉSI MÓD
   ========================================================= */

.payment-method-badge {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    min-width: 108px;

    padding: 7px 10px;

    background: #20262c;

    border: 1px solid #30373e;

    border-radius: 8px;

    color: #cbd1d6;

    font-size: 11px;

    font-weight: 700;

    line-height: 1;

    transition: .15s ease;
}

.payment-method-badge:hover {
    border-color: #414951;

    background: #252b31;
}

.payment-method-dot {
    width: 7px;
    height: 7px;

    min-width: 7px;

    border-radius: 50%;
}

.payment-method-badge.cash .payment-method-dot {
    background: var(--accent);
}

.payment-method-badge.card .payment-method-dot {
    background: #5ca9ff;
}

.payment-method-badge.transfer .payment-method-dot {
    background: #b66cff;
}


/* =========================================================
   ÜRES FIZETÉSEK
   ========================================================= */

.payments-empty {
    padding: 65px 20px !important;

    text-align: center !important;

    color: #707983 !important;
}

.payments-empty-icon {
    width: 48px;
    height: 48px;

    margin: 0 auto 13px;

    border-radius: 12px;

    background: rgba(182,255,0,.1);

    color: var(--accent);

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 22px;
}

.payments-empty strong {
    display: block;

    color: #dfe3e6;

    font-size: 14px;

    margin-bottom: 5px;
}

.payments-empty span {
    display: block;

    color: #707983;

    font-size: 11px;
}


/* =========================================================
   MOBIL
   ========================================================= */

@media (max-width: 1100px) {

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

    .dashboard-columns {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 850px) {

    .topbar {
        align-items: flex-start;

        flex-wrap: wrap;
    }

    .topbar nav {
        order: 3;

        width: 100%;

        overflow: auto;
    }

    .user-menu {
        margin-left: auto;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .page-head {
        align-items: flex-start;

        flex-direction: column;
    }
}


@media (max-width: 650px) {

    .dashboard-header {
        align-items: flex-start;

        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .member-row,
    .payment-row {
        padding: 12px;
    }

    .member-expiry {
        display: none;
    }

    .dashboard-stat {
        min-height: 88px;
    }

    .stat-content strong {
        font-size: 23px;
    }
}


@media (max-width: 500px) {

    .container {
        padding: 22px 15px;
    }

    .dashboard-header h1 {
        font-size: 26px;
    }

    .dashboard-stat {
        padding: 16px;
    }

    .stat-icon {
        width: 42px;
        height: 42px;

        min-width: 42px;

        font-size: 18px;
    }

    .stat-content span {
        font-size: 12px;
    }

    .stat-content strong {
        font-size: 21px;
    }
}