/* ============================================================
   Önéletrajzok.eu – Fő stíluslap
   Mobil-first, rendszer fontok, egyszerű design
   ============================================================ */

:root {
    --blue:       #1d4ed8;
    --blue-dark:  #1e3a8a;
    --blue-light: #eff6ff;
    --green:      #16a34a;
    --green-bg:   #f0fdf4;
    --red:        #dc2626;
    --red-bg:     #fef2f2;
    --orange:     #d97706;

    --gray-50:    #f9fafb;
    --gray-100:   #f3f4f6;
    --gray-200:   #e5e7eb;
    --gray-300:   #d1d5db;
    --gray-400:   #9ca3af;
    --gray-500:   #6b7280;
    --gray-700:   #374151;
    --gray-900:   #111827;

    --white:      #ffffff;

    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--gray-900);
    background: var(--gray-50);
    line-height: 1.6;
}

img { max-width: 100%; display: block; }
a   { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   TIPOGRÁFIA
   ============================================================ */

h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.3; font-weight: 700; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }
p  { margin: 0 0 1rem; }

/* ============================================================
   LAYOUT
   ============================================================ */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.container--narrow { max-width: 640px; }
.container--md     { max-width: 860px; }

/* ============================================================
   NAVBAR
   ============================================================ */

.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.navbar__logo {
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--blue);
    letter-spacing: -.3px;
}
.navbar__logo:hover { text-decoration: none; }

.navbar__nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.navbar__link {
    padding: 6px 12px;
    border-radius: var(--radius);
    color: var(--gray-700);
    font-size: .9rem;
    font-weight: 500;
    transition: background .15s;
}
.navbar__link:hover       { background: var(--gray-100); text-decoration: none; }
.navbar__link--active     { color: var(--blue); background: var(--blue-light); }
.navbar__link--btn        { background: var(--blue); color: var(--white); padding: 6px 16px; }
.navbar__link--btn:hover  { background: var(--blue-dark); text-decoration: none; }

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: .9rem;
    font-weight: 600;
    font-family: var(--font);
    border: none;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
    white-space: nowrap;
}

.btn--primary  { background: var(--blue); color: var(--white); }
.btn--primary:hover  { background: var(--blue-dark); text-decoration: none; color: var(--white); }
.btn--secondary { background: var(--white); color: var(--gray-700); border: 1.5px solid var(--gray-300); }
.btn--secondary:hover { background: var(--gray-50); text-decoration: none; border-color: var(--gray-400); }
.btn--danger   { background: var(--red-bg); color: var(--red); border: 1.5px solid #fca5a5; }
.btn--danger:hover   { background: #fee2e2; text-decoration: none; }
.btn--success  { background: var(--green); color: var(--white); }
.btn--success:hover  { background: #15803d; text-decoration: none; color: var(--white); }
.btn--sm { padding: 6px 14px; font-size: .8rem; }
.btn--lg { padding: 14px 28px; font-size: 1rem; }
.btn--full { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

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

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
}

.card__header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card__body    { padding: 24px; }
.card__footer  { padding: 16px 24px; background: var(--gray-50); border-top: 1px solid var(--gray-100); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

/* ============================================================
   FORMOK
   ============================================================ */

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

.label {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}
.label--optional { font-weight: 400; color: var(--gray-400); font-size: .8rem; margin-left: 4px; }

.input,
.select,
.textarea {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-size: 1rem;
    font-family: var(--font);
    color: var(--gray-900);
    background: var(--white);
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    transition: border-color .15s, box-shadow .15s;
    appearance: none;
}

.input:focus,
.select:focus,
.textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .15);
}

.textarea { resize: vertical; min-height: 100px; }
.select   { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%236b7280' d='M6 8L0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

.input--error { border-color: var(--red); }
.input--error:focus { box-shadow: 0 0 0 3px rgba(220, 38, 38, .15); }

.help-text  { font-size: .8rem; color: var(--gray-500); margin-top: 4px; }
.error-text { font-size: .8rem; color: var(--red); margin-top: 4px; }

.checkbox-group { display: flex; align-items: center; gap: 8px; }
.checkbox-group input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--blue); cursor: pointer; }

.radio-group     { display: flex; flex-direction: column; gap: 10px; }
.radio-option    { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border: 1.5px solid var(--gray-200); border-radius: var(--radius); cursor: pointer; transition: border-color .15s; }
.radio-option:hover          { border-color: var(--blue); }
.radio-option input[type="radio"] { margin-top: 2px; accent-color: var(--blue); flex-shrink: 0; }
.radio-option__label { font-weight: 600; font-size: .9rem; }
.radio-option__desc  { font-size: .8rem; color: var(--gray-500); margin-top: 2px; }
.radio-option.selected { border-color: var(--blue); background: var(--blue-light); }

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

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: .9rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
}

.alert--success { background: var(--green-bg); color: #166534; border: 1px solid #bbf7d0; }
.alert--error   { background: var(--red-bg); color: #991b1b; border: 1px solid #fca5a5; }
.alert--info    { background: var(--blue-light); color: #1e40af; border: 1px solid #bfdbfe; }
.alert--warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

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

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
}

.badge--blue    { background: var(--blue-light); color: var(--blue); }
.badge--green   { background: var(--green-bg); color: var(--green); }
.badge--gray    { background: var(--gray-100); color: var(--gray-500); }
.badge--orange  { background: #fffbeb; color: var(--orange); }

/* ============================================================
   HALADÁSJELZŐ (profil kitöltöttség)
   ============================================================ */

.progress { background: var(--gray-200); border-radius: 999px; height: 8px; overflow: hidden; }
.progress__bar { height: 100%; border-radius: 999px; background: var(--blue); transition: width .4s; }
.progress__bar--green { background: var(--green); }

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

.dash-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 24px 0;
}

@media (min-width: 640px)  { .dash-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .dash-grid { grid-template-columns: repeat(3, 1fr); } }

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    padding: 20px 24px;
    box-shadow: var(--shadow);
}

.stat-card__value { font-size: 2rem; font-weight: 800; color: var(--blue); line-height: 1; }
.stat-card__label { font-size: .85rem; color: var(--gray-500); margin-top: 4px; }

/* ============================================================
   CV KÁRTYA
   ============================================================ */

.cv-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow .2s;
}
.cv-card:hover { box-shadow: var(--shadow-md); }

.cv-card__preview {
    background: var(--gray-100);
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--gray-300);
}

.cv-card__body  { padding: 16px; }
.cv-card__title { font-weight: 700; font-size: .95rem; color: var(--gray-900); }
.cv-card__meta  { font-size: .8rem; color: var(--gray-500); margin-top: 4px; }
.cv-card__actions { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--gray-100); background: var(--gray-50); }

/* ============================================================
   CV BUILDER
   ============================================================ */

.builder {
    display: grid;
    grid-template-columns: 1fr;
    min-height: calc(100vh - 60px);
}

@media (min-width: 900px) {
    .builder { grid-template-columns: 420px 1fr; }
}

.builder__form {
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    overflow-y: auto;
    padding: 0;
}

.builder__preview {
    background: var(--gray-100);
    padding: 24px;
    overflow-y: auto;
    display: none;
}

@media (min-width: 900px) { .builder__preview { display: block; } }

.builder__tabs {
    display: flex;
    border-bottom: 2px solid var(--gray-200);
    padding: 0 16px;
    gap: 0;
    overflow-x: auto;
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 10;
}

.builder__tab {
    padding: 14px 16px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--gray-500);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    cursor: pointer;
    transition: all .15s;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: var(--font);
}

.builder__tab:hover   { color: var(--blue); }
.builder__tab.active  { color: var(--blue); border-bottom-color: var(--blue); }

.builder__section {
    padding: 24px;
    display: none;
}
.builder__section.active { display: block; }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

/* Ismétlődő tételek (tapasztalat, végzettség) */
.repeater-item {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    position: relative;
}

.repeater-item__remove {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    border-radius: 4px;
    line-height: 1;
}
.repeater-item__remove:hover { color: var(--red); background: var(--red-bg); }

/* Szövegsegítség */
.text-assist-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .8rem;
    color: var(--blue);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 0;
    font-family: var(--font);
    margin-top: 6px;
}
.text-assist-btn:hover { text-decoration: underline; }

.suggest-box {
    background: var(--blue-light);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius);
    padding: 12px;
    margin-top: 8px;
    font-size: .875rem;
    display: none;
}
.suggest-box.visible { display: block; }
.suggest-box__actions { display: flex; gap: 8px; margin-top: 10px; }

/* ============================================================
   HŐOLDAL (public landing page)
   ============================================================ */

.hero {
    padding: 64px 0 48px;
    text-align: center;
}

.hero__title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero__sub {
    font-size: 1.125rem;
    color: var(--gray-500);
    max-width: 480px;
    margin: 0 auto 32px;
    line-height: 1.6;
}

.hero__cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (min-width: 640px) {
    .hero__title { font-size: 3.25rem; }
}

.features {
    padding: 48px 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 640px)  { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features { grid-template-columns: repeat(3, 1fr); } }

.feature-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    padding: 24px;
    box-shadow: var(--shadow);
}

.feature-card__icon { font-size: 2rem; margin-bottom: 12px; }
.feature-card__title { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.feature-card__desc  { font-size: .875rem; color: var(--gray-500); margin: 0; }

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

.auth-page {
    min-height: 100vh;
    background: var(--gray-50);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.auth-box {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    padding: 40px;
    width: 100%;
    max-width: 420px;
}

.auth-box__logo {
    text-align: center;
    margin-bottom: 24px;
}

.auth-box__logo a {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--blue);
}

.auth-box__title {
    font-size: 1.375rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.auth-box__sub {
    text-align: center;
    color: var(--gray-500);
    font-size: .9rem;
    margin-bottom: 28px;
}

.auth-divider {
    text-align: center;
    color: var(--gray-400);
    font-size: .85rem;
    margin: 20px 0;
    position: relative;
}
.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gray-200);
}
.auth-divider span {
    background: var(--white);
    padding: 0 12px;
    position: relative;
}

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

.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: .875rem; }
thead th { text-align: left; padding: 10px 16px; font-weight: 600; color: var(--gray-500); border-bottom: 1px solid var(--gray-200); background: var(--gray-50); white-space: nowrap; }
tbody td { padding: 12px 16px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--gray-50); }

/* ============================================================
   OLDALSÁV ELRENDEZÉS (profil / admin)
   ============================================================ */

.page-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px 0;
}

@media (min-width: 900px) {
    .page-layout { grid-template-columns: 240px 1fr; }
}

.sidebar__nav a {
    display: block;
    padding: 10px 14px;
    border-radius: var(--radius);
    color: var(--gray-700);
    font-size: .9rem;
    font-weight: 500;
    margin-bottom: 2px;
}
.sidebar__nav a:hover { background: var(--gray-100); text-decoration: none; }
.sidebar__nav a.active { background: var(--blue-light); color: var(--blue); font-weight: 600; }

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    padding: 32px 0;
    margin-top: 64px;
    font-size: .85rem;
    color: var(--gray-500);
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer__links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer__links a { color: var(--gray-500); }
.footer__links a:hover { color: var(--gray-900); }

/* ============================================================
   COOKIE BANNER
   ============================================================ */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--gray-900);
    color: var(--white);
    padding: 16px;
    z-index: 1000;
    display: none;
}

.cookie-banner.visible { display: block; }

.cookie-banner__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.cookie-banner__text { font-size: .85rem; flex: 1; }
.cookie-banner__text a { color: #93c5fd; }
.cookie-banner__actions { display: flex; gap: 8px; }

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

.mt-0  { margin-top: 0; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-0  { margin-bottom: 0; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }

.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-sm     { font-size: .875rem; }
.text-xs     { font-size: .75rem; }
.text-muted  { color: var(--gray-500); }
.text-blue   { color: var(--blue); }
.text-red    { color: var(--red); }
.text-green  { color: var(--green); }
.font-bold   { font-weight: 700; }

.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.items-center{ align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8   { gap: 8px; }
.gap-12  { gap: 12px; }
.gap-16  { gap: 16px; }

.hidden { display: none !important; }
.w-full { width: 100%; }

.divider { border: none; border-top: 1px solid var(--gray-200); margin: 24px 0; }

/* Oldal fejléc */
.page-header {
    padding: 24px 0 8px;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.page-header__title { font-size: 1.5rem; font-weight: 800; }
.page-header__sub   { color: var(--gray-500); font-size: .9rem; margin-top: 4px; }

/* Betöltés animáció */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-200);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin .7s linear infinite;
    display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   RESPONSIVE IGAZÍTÁSOK
   ============================================================ */

@media (max-width: 639px) {
    h1 { font-size: 1.625rem; }
    .auth-box { padding: 28px 20px; }
    .card__body { padding: 16px; }
    .card__header { padding: 14px 16px 12px; }
    .navbar__nav .navbar__link--text { display: none; }
}
