/* ==================================================
   NEXTGSM B2B PORTAL
   KÖZPONTI STÍLUSLAP
   Verzió: 2.0
================================================== */

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

:root {
    --bg-main: #090d13;
    --bg-secondary: #0e141d;
    --bg-panel: #131c28;
    --bg-panel-hover: #192535;
    --bg-input: #0b121c;

    --border: #253449;
    --border-light: #30445d;

    --text-main: #f1f5f9;
    --text-secondary: #a5b4c5;
    --text-muted: #718198;

    --primary: #1687f8;
    --primary-hover: #0873df;
    --primary-soft: rgba(22, 135, 248, 0.12);

    --success: #20c997;
    --success-soft: rgba(32, 201, 151, 0.12);

    --warning: #f0b429;
    --warning-soft: rgba(240, 180, 41, 0.12);

    --danger: #ef5350;
    --danger-soft: rgba(239, 83, 80, 0.12);

    --radius-sm: 7px;
    --radius-md: 12px;
    --radius-lg: 17px;

    --shadow: 0 12px 35px rgba(0, 0, 0, 0.25);

    --transition: 0.2s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--bg-main);
    color: var(--text-main);

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    font-size: 14px;
    line-height: 1.6;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: #58aaff;
}

img {
    max-width: 100%;
}

/* ==================================================
   2. KÖZÖS SEGÉDOSZTÁLYOK
================================================== */

.hidden,
[hidden] {
    display: none !important;
}

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

.text-secondary {
    color: var(--text-secondary);
}

.text-success {
    color: var(--success);
}

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

.text-warning {
    color: var(--warning);
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

/* ==================================================
   3. KÖZPONTI GOMBOK
================================================== */

.btn,
button.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 42px;
    padding: 10px 18px;

    border: 1px solid transparent;
    border-radius: var(--radius-sm);

    font-size: 13px;
    font-weight: 600;

    transition:
        background var(--transition),
        border-color var(--transition),
        transform var(--transition);

    cursor: pointer;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: #ffffff;
}

.btn-secondary {
    background: var(--bg-panel-hover);
    border-color: var(--border);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: #223249;
    border-color: var(--border-light);
}

.btn-success {
    background: var(--success);
    color: #071b15;
}

.btn-success:hover {
    background: #18b889;
}

.btn-danger {
    background: var(--danger);
    color: #ffffff;
}

.btn-danger:hover {
    background: #d94340;
}

.btn-outline {
    background: transparent;
    border-color: var(--border-light);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
}

.btn-block {
    width: 100%;
}

.btn-small {
    min-height: 32px;
    padding: 6px 11px;
    font-size: 12px;
}

/* ==================================================
   4. ŰRLAPOK ÉS BEVITELI MEZŐK
================================================== */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 18px;
}

.form-group label {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    min-height: 43px;

    padding: 10px 13px;

    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);

    color: var(--text-main);
    outline: none;

    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 135, 248, 0.12);
}

select option {
    background: var(--bg-panel);
    color: var(--text-main);
}

input[type="file"] {
    padding: 9px;
}

input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 7px 12px;

    background: var(--bg-panel-hover);
    border: 1px solid var(--border);
    border-radius: 5px;

    color: var(--text-main);
    cursor: pointer;
}

input[type="checkbox"] {
    width: 17px;
    min-height: 17px;
    accent-color: var(--primary);
}

/* ==================================================
   5. KÖZPONTI ÜZENETEK
================================================== */

.portal-message,
.admin-message {
    padding: 13px 16px;
    margin-bottom: 18px;

    border: 1px solid var(--border);
    border-radius: var(--radius-sm);

    background: var(--bg-panel);
    color: var(--text-main);
}

.portal-message.success,
.admin-message.success {
    background: var(--success-soft);
    border-color: rgba(32, 201, 151, 0.35);
    color: var(--success);
}

.portal-message.error,
.admin-message.error {
    background: var(--danger-soft);
    border-color: rgba(239, 83, 80, 0.35);
    color: #ff7773;
}

.portal-message.warning,
.admin-message.warning {
    background: var(--warning-soft);
    border-color: rgba(240, 180, 41, 0.35);
    color: var(--warning);
}

/* ==================================================
   6. FEJLÉC
================================================== */

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    min-height: 76px;
    padding: 15px 5%;

    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 43px;
    height: 43px;

    background: linear-gradient(
        135deg,
        #1687f8,
        #0755a5
    );

    border-radius: 11px;

    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
}

.brand-name {
    color: var(--text-main);
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.brand-subtitle {
    color: var(--text-muted);
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ==================================================
   7. OLDAL ELRENDEZÉS
================================================== */

.page-container {
    width: min(1400px, 92%);
    margin: 35px auto;
}

.page-heading {
    margin-bottom: 28px;
}

.page-heading h1 {
    font-size: 27px;
    font-weight: 750;
    letter-spacing: -0.5px;
}

.page-heading p {
    margin-top: 5px;
    color: var(--text-muted);
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    margin-bottom: 18px;
}

.section-heading h2 {
    font-size: 18px;
    font-weight: 700;
}

/* ==================================================
   8. PANELEK
================================================== */

.panel {
    padding: 24px;

    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    box-shadow: var(--shadow);
}

.panel + .panel {
    margin-top: 22px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    margin-bottom: 20px;
    padding-bottom: 15px;

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

.panel-header h2 {
    font-size: 17px;
}

.panel-description {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 4px;
}

/* ==================================================
   9. PARTNERPORTÁL
================================================== */

.partner-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;

    margin-bottom: 28px;
}

.partner-information {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.partner-information strong {
    font-size: 17px;
}

.partner-information span {
    color: var(--text-muted);
    font-size: 12px;
}

.partner-discount {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 9px 14px;

    background: var(--success-soft);
    border: 1px solid rgba(32, 201, 151, 0.25);
    border-radius: var(--radius-sm);

    color: var(--success);
    font-weight: 700;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.portal-panel {
    min-height: 235px;
}

.portal-panel-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 45px;
    height: 45px;

    margin-bottom: 16px;

    background: var(--primary-soft);
    border-radius: 11px;

    color: var(--primary);
    font-size: 20px;
}

.portal-panel h2 {
    margin-bottom: 7px;
    font-size: 18px;
}

.portal-panel p {
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

.file-selection {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.selected-file-name {
    color: var(--text-secondary);
    font-size: 12px;
    overflow-wrap: anywhere;
}

/* ==================================================
   10. RENDELÉSI ELŐNÉZET
================================================== */

#orderPreview {
    margin-top: 25px;
    padding: 22px;

    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
}

.order-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    margin-bottom: 20px;
}

.order-preview-header h3 {
    font-size: 17px;
}

.order-status-badge {
    padding: 5px 10px;

    background: var(--primary-soft);
    border-radius: 20px;

    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
}

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

    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;

    padding: 13px;

    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.summary-item span {
    color: var(--text-muted);
    font-size: 11px;
}

.summary-item strong {
    font-size: 15px;
}

.order-table-wrapper,
.admin-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.order-preview-table,
.admin-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.order-preview-table th,
.order-preview-table td,
.admin-table th,
.admin-table td {
    padding: 12px 13px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.order-preview-table th,
.admin-table th {
    background: var(--bg-secondary);
    color: var(--text-muted);

    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
}

.order-preview-table td,
.admin-table td {
    color: var(--text-secondary);
    font-size: 12px;
}

.order-preview-table tbody tr:hover,
.admin-table tbody tr:hover {
    background: var(--bg-panel-hover);
}

.order-total-box {
    display: flex;
    flex-direction: column;
    gap: 10px;

    margin-top: 20px;
    padding-top: 17px;

    border-top: 1px solid var(--border);
}

.order-total-box > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.order-total-box span {
    color: var(--text-secondary);
}

.order-total-box strong {
    font-size: 15px;
}

.order-total-box .order-final-price {
    color: var(--success);
    font-size: 22px;
}

.order-preview-note {
    margin-top: 14px;
    color: var(--text-muted);
    font-size: 11px;
}

.order-finalize-area {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

/* ==================================================
   11. RENDELÉSI ELŐZMÉNYEK
================================================== */

.history-order {
    margin-bottom: 12px;

    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);

    overflow: hidden;
}

.history-order summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;

    padding: 17px 19px;

    cursor: pointer;
    list-style: none;
}

.history-order summary::-webkit-details-marker {
    display: none;
}

.history-order summary::after {
    content: "+";
    color: var(--primary);
    font-size: 20px;
    font-weight: 700;
}

.history-order[open] summary::after {
    content: "−";
}

.history-order-main,
.history-order-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.history-order-main strong {
    font-size: 13px;
}

.history-order-main span {
    color: var(--text-muted);
    font-size: 11px;
}

.history-order-info {
    align-items: flex-end;
}

.history-status {
    color: var(--warning);
    font-size: 11px;
}

.history-order-info strong {
    font-size: 14px;
}

.history-order-details {
    padding: 18px;
    border-top: 1px solid var(--border);
}

.history-order-total {
    display: flex;
    justify-content: flex-end;
    gap: 12px;

    margin-top: 16px;
    color: var(--text-secondary);
}

.history-order-total strong {
    color: var(--success);
}

/* ==================================================
   12. ADMINISZTRÁCIÓ
================================================== */

.admin-layout {
    width: min(1500px, 94%);
    margin: 30px auto;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;

    margin-bottom: 25px;
}

.admin-topbar h1 {
    font-size: 25px;
}

.admin-topbar p {
    color: var(--text-muted);
    font-size: 12px;
}

.admin-dashboard {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;

    margin-bottom: 28px;
}

.dashboard-card {
    padding: 20px;

    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.dashboard-card span {
    display: block;
    margin-bottom: 7px;

    color: var(--text-muted);
    font-size: 11px;
}

.dashboard-card strong {
    font-size: 26px;
    font-weight: 800;
}

.dashboard-card.primary strong {
    color: var(--primary);
}

.dashboard-card.success strong {
    color: var(--success);
}

.dashboard-card.warning strong {
    color: var(--warning);
}

.admin-section {
    margin-bottom: 24px;
    padding: 23px;

    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.admin-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;

    margin-bottom: 20px;
}

.admin-section-header h2 {
    font-size: 17px;
}

.admin-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.admin-btn {
    padding: 7px 10px;

    background: var(--bg-panel-hover);
    border: 1px solid var(--border);
    border-radius: 5px;

    color: var(--text-main);
    font-size: 11px;
    font-weight: 600;
}

.admin-btn:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.admin-btn.delete {
    color: #ff7773;
}

.admin-btn.activate {
    color: var(--success);
}

.admin-status {
    display: inline-block;
    padding: 4px 8px;

    border-radius: 20px;

    font-size: 10px;
    font-weight: 700;
}

.admin-status.active {
    background: var(--success-soft);
    color: var(--success);
}

.admin-status.inactive {
    background: var(--danger-soft);
    color: var(--danger);
}

.admin-status-select {
    width: auto;
    min-width: 145px;
    min-height: 34px;

    padding: 5px 8px;

    font-size: 11px;
}

/* ==================================================
   13. MODÁLIS ABLAKOK
================================================== */

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;

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

    padding: 20px;

    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(5px);
}

.modal-content {
    width: min(520px, 100%);
    max-height: 90vh;
    overflow-y: auto;

    padding: 25px;

    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);

    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

.modal-content.large {
    width: min(900px, 100%);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    margin-bottom: 22px;
    padding-bottom: 15px;

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

.modal-header h2 {
    font-size: 18px;
}

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    background: var(--bg-panel-hover);
    border: 1px solid var(--border);
    border-radius: 7px;

    color: var(--text-main);
    font-size: 20px;
}

.modal-close:hover {
    background: var(--danger-soft);
    color: var(--danger);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    margin-top: 20px;
}

/* ==================================================
   14. RENDELÉS RÉSZLETEI
================================================== */

.order-details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;

    margin-bottom: 18px;
}

.order-details-header h3 {
    font-size: 17px;
}

.order-details-header span {
    color: var(--text-muted);
    font-size: 11px;
}

.order-details-info {
    margin-bottom: 20px;
    padding: 15px;

    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.order-details-info p {
    margin-bottom: 5px;
    color: var(--text-secondary);
}

.order-details-info strong {
    color: var(--text-main);
}

.order-details-total {
    display: flex;
    justify-content: flex-end;
    gap: 12px;

    margin-top: 20px;
    padding-top: 15px;

    border-top: 1px solid var(--border);
}

.order-details-total strong {
    color: var(--success);
    font-size: 18px;
}

/* ==================================================
   15. ÜRES ÁLLAPOT
================================================== */

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

    color: var(--text-muted);
    text-align: center;

    background: var(--bg-secondary);
    border: 1px dashed var(--border);
    border-radius: var(--radius-md);
}

.empty-state h3 {
    margin-bottom: 7px;
    color: var(--text-main);
    font-size: 16px;
}

.empty-state.error {
    color: var(--danger);
}

/* ==================================================
   16. BEJELENTKEZÉSI ÉS REGISZTRÁCIÓS OLDAL
================================================== */

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 100vh;
    padding: 25px;

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(22, 135, 248, 0.13),
            transparent 45%
        ),
        var(--bg-main);
}

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

.auth-brand {
    margin-bottom: 28px;
    text-align: center;
}

.auth-brand .brand {
    justify-content: center;
}

.auth-brand p {
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 12px;
}

.auth-panel {
    padding: 30px;

    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    box-shadow: var(--shadow);
}

.auth-panel h1 {
    margin-bottom: 7px;
    font-size: 23px;
}

.auth-panel > p {
    margin-bottom: 25px;
    color: var(--text-muted);
    font-size: 12px;
}

.auth-footer {
    margin-top: 22px;
    color: var(--text-muted);
    text-align: center;
    font-size: 12px;
}

/* ==================================================
   17. LÁBLÉC
================================================== */

.app-footer {
    padding: 25px 15px;
    margin-top: 45px;

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

    color: var(--text-muted);
    text-align: center;
    font-size: 11px;
}

/* ==================================================
   18. MOBILNÉZET
================================================== */

@media (max-width: 900px) {

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

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

    .page-container {
        width: 94%;
    }

}

@media (max-width: 600px) {

    body {
        font-size: 13px;
    }

    .app-header {
        padding: 12px 4%;
    }

    .brand-name {
        font-size: 16px;
    }

    .brand-logo {
        width: 37px;
        height: 37px;
    }

    .page-container,
    .admin-layout {
        width: 94%;
        margin: 22px auto;
    }

    .page-heading h1 {
        font-size: 22px;
    }

    .panel,
    .admin-section {
        padding: 17px;
    }

    .admin-dashboard {
        gap: 10px;
    }

    .dashboard-card {
        padding: 14px;
    }

    .dashboard-card strong {
        font-size: 21px;
    }

    .order-summary-grid {
        grid-template-columns: 1fr;
    }

    .order-preview-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .partner-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .header-actions {
        gap: 7px;
    }

    .btn {
        padding: 9px 12px;
        font-size: 12px;
    }

    .history-order summary {
        align-items: flex-start;
    }

    .history-order-info {
        align-items: flex-start;
    }

    .modal {
        padding: 10px;
    }

    .modal-content {
        padding: 18px;
    }

    .auth-panel {
        padding: 23px;
    }

    .admin-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

}

/* ==================================================
   19. GÖRGETÉS
================================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: #30445d;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #45617f;
}

/* ==================================================
   20. FINOM ANIMÁCIÓ
================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(7px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.panel,
.admin-section,
.dashboard-card {
    animation: fadeIn 0.3s ease;
}