/* ============================================================
   CGM Elemzési Szolgáltatás – Vitality Green Téma
   Meleg, barátságos, egészségtudatos dizájn
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

/* ---- Témaszínek ---- */
:root {
    --primary:        #3A7D5E;
    --primary-light:  #E8F5EF;
    --primary-dark:   #2A5C44;
    --primary-mid:    #5A9E7E;
    --accent:         #F4845F;
    --accent-dark:    #D96640;
    --bg:             #FDFAF7;
    --card:           #FFFFFF;
    --text:           #2C3930;
    --text-muted:     #6B8C7A;
    --border:         #D4E6DC;
    --success:        #48A97F;
    --success-light:  #E6F7F0;
    --error:          #E05C4B;
    --error-light:    #FEF0EE;
    --warning:        #E8973A;
    --warning-light:  #FEF5E7;
    --shadow:         0 4px 24px rgba(58, 125, 94, 0.10);
    --shadow-sm:      0 2px 8px rgba(58, 125, 94, 0.08);
    --radius:         14px;
    --radius-sm:      8px;
    --radius-lg:      20px;
}

/* ---- Alap ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    font-size: 15px;
}

h1, h2, h3, h4 {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    line-height: 1.3;
}

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

/* ============================================================
   LAYOUT – Kétpaneles elrendezés (brand + tartalom)
   ============================================================ */

.page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: linear-gradient(135deg, #EBF5F0 0%, #FDF9F6 60%, #F0EAE3 100%);
}

.auth-card {
    display: flex;
    width: 100%;
    max-width: 920px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(42, 92, 68, 0.15);
    background: var(--card);
}

/* ---- Brand panel (bal oldal) ---- */
.brand-panel {
    width: 38%;
    flex-shrink: 0;
    background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 44px 36px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.brand-panel::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    pointer-events: none;
}

.brand-panel::after {
    content: '';
    position: absolute;
    bottom: -40px; left: -40px;
    width: 160px; height: 160px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    pointer-events: none;
}

.brand-logo {
    width: 64px; height: 64px;
    background: rgba(255,255,255,0.18);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
}

.brand-logo svg { width: 34px; height: 34px; fill: #fff; }

.brand-panel h1 {
    font-family: 'Nunito', sans-serif;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 10px;
    color: #fff;
}

.brand-panel p {
    font-size: 13.5px;
    opacity: 0.82;
    line-height: 1.65;
    margin-bottom: 28px;
}

/* Lépésjelző */
.steps-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.steps-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    opacity: 0.75;
    transition: opacity .2s;
}

.steps-list li.active { opacity: 1; }

.step-dot {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    border: 2px solid rgba(255,255,255,0.35);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
    flex-shrink: 0;
    transition: all .2s;
}

.steps-list li.active .step-dot {
    background: var(--accent);
    border-color: var(--accent);
}

.steps-list li.done .step-dot {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
}

.steps-list li.done .step-dot::after {
    content: '✓';
    font-size: 12px;
}

.brand-footer {
    font-size: 11.5px;
    opacity: 0.55;
    margin-top: 24px;
    position: relative;
    z-index: 1;
}

/* ---- Tartalom panel (jobb oldal) ---- */
.content-panel {
    flex: 1;
    padding: 44px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.content-panel h2 {
    font-size: 22px;
    color: var(--text);
    margin-bottom: 4px;
}

.content-panel .subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 28px;
}

/* ============================================================
   FORM ELEMEK
   ============================================================ */

.form-group { margin-bottom: 18px; }

label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

label .required { color: var(--accent); margin-left: 2px; }

input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--text);
    background: var(--card);
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    appearance: none;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(58,125,94,0.12);
}

input::placeholder { color: #AABFB5; }

textarea { resize: vertical; min-height: 90px; }

.input-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 5px;
}

/* Input pár (két mező egy sorban) */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ---- OTP kód mező ---- */
.otp-input {
    text-align: center;
    font-size: 28px !important;
    font-family: 'Nunito', sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: 10px;
    padding: 14px !important;
    color: var(--primary) !important;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(58,125,94,0.30);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-mid) 0%, var(--primary) 100%);
    box-shadow: 0 6px 16px rgba(58,125,94,0.38);
    transform: translateY(-1px);
    text-decoration: none;
    color: #fff;
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(244,132,95,0.30);
}

.btn-accent:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(244,132,95,0.38);
    text-decoration: none;
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1.5px solid var(--border);
    box-shadow: none;
    margin-top: 10px;
}

.btn-ghost:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    text-decoration: none;
    transform: none;
}

.btn svg { width: 18px; height: 18px; }

/* ============================================================
   ÉRTESÍTÉSEK (alert)
   ============================================================ */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }

.alert-error   { background: var(--error-light);   color: var(--error);   border-left: 3px solid var(--error); }
.alert-success { background: var(--success-light); color: var(--success); border-left: 3px solid var(--success); }
.alert-warning { background: var(--warning-light); color: var(--warning); border-left: 3px solid var(--warning); }
.alert-info    { background: var(--primary-light); color: var(--primary); border-left: 3px solid var(--primary); }

/* ============================================================
   HALADÁSJELZŐ (progress bar)
   ============================================================ */

.progress-bar {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 30px;
}

.progress-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 14px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--border);
    z-index: 0;
}

.progress-step.done:not(:last-child)::after,
.progress-step.active:not(:last-child)::after {
    background: var(--primary);
}

.progress-num {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
    position: relative; z-index: 1;
    transition: all .3s;
    font-family: 'Nunito', sans-serif;
}

.progress-step.active .progress-num {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(58,125,94,0.18);
}

.progress-step.done .progress-num {
    background: var(--primary);
    color: #fff;
}

.progress-label {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 5px;
    font-weight: 600;
    text-align: center;
}

.progress-step.active .progress-label { color: var(--primary); }

/* ============================================================
   ADMIN FELÜLET
   ============================================================ */

.admin-wrapper {
    min-height: 100vh;
    background: var(--bg);
}

.admin-topbar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-topbar .logo-area {
    display: flex; align-items: center; gap: 10px;
}

.admin-topbar .logo-area span {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 16px;
    color: var(--primary);
}

.admin-topbar .badge {
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    font-family: 'Nunito', sans-serif;
}

.admin-topbar nav a {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 24px;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: all .2s;
}

.admin-topbar nav a:hover,
.admin-topbar nav a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    text-decoration: none;
}

.admin-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px;
}

.admin-content h1 {
    font-size: 24px;
    margin-bottom: 4px;
}

.admin-content .page-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 28px;
}

/* Táblázat */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.data-table th {
    background: var(--primary-light);
    color: var(--primary-dark);
    font-family: 'Nunito', sans-serif;
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 12px 16px;
    text-align: left;
}

.data-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    vertical-align: middle;
}

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

.data-table tr:hover td { background: #F6FBF8; }

/* Badge-ek */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Nunito', sans-serif;
}

.badge-pending  { background: var(--warning-light); color: var(--warning); }
.badge-done     { background: var(--success-light); color: var(--success); }

/* Kártya */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
}

.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 16px;
    color: var(--text);
}

.card-body { padding: 24px; }

/* Stats sor */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    background: var(--primary-light);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg { width: 22px; height: 22px; fill: var(--primary); }

.stat-num {
    font-family: 'Nunito', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.stat-label {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* File upload terület */
.file-drop {
    border: 2px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    background: var(--bg);
}

.file-drop:hover, .file-drop.drag-over {
    border-color: var(--primary);
    background: var(--primary-light);
}

.file-drop svg { width: 36px; height: 36px; fill: var(--primary); opacity: .6; margin-bottom: 10px; }

.file-drop p { font-size: 14px; color: var(--text-muted); }

.file-drop strong { color: var(--primary); }

input[type="file"] { display: none; }

/* Profil adatok megjelenítése */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 24px;
}

.profile-item label {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 2px;
}

.profile-item .value {
    font-size: 15px;
    color: var(--text);
    font-weight: 600;
}

/* Linx csatlakozás gomb */
.linx-connect {
    background: linear-gradient(135deg, #1a6fb5 0%, #0d4e8a 100%);
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(26,111,181,0.28);
}

.linx-connect:hover {
    box-shadow: 0 6px 18px rgba(26,111,181,0.36);
    transform: translateY(-1px);
    text-decoration: none;
    color: #fff !important;
}

/* Divider */
.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

/* Help link */
.help-text {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 16px;
}

/* Success állapot */
.success-icon {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: var(--success-light);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
}

.success-icon svg { width: 36px; height: 36px; fill: var(--success); }

/* ============================================================
   RESZPONZÍV
   ============================================================ */

@media (max-width: 700px) {
    .auth-card { flex-direction: column; }

    .brand-panel {
        width: 100%;
        padding: 28px 24px;
    }

    .steps-list { display: none; }

    .content-panel { padding: 28px 24px; }

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

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

    .admin-content { padding: 20px 16px; }

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