/* ========================================
   Consultanta Eficienta — Platforma Cursuri
   ======================================== */

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

:root {
    --navy:   #1e3a5f;
    --blue:   #2563eb;
    --blue-h: #1d4ed8;
    --green:  #059669;
    --red:    #dc2626;
    --amber:  #d97706;
    --bg:     #f1f5f9;
    --white:  #ffffff;
    --text:   #1e293b;
    --muted:  #64748b;
    --border: #e2e8f0;
    --radius: 10px;
    --shadow: 0 2px 12px rgba(0,0,0,.08);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    font-size: 15px;
}

/* ---- Nav ---- */
.nav {
    background: var(--navy);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.nav-brand {
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-brand span { color: #60a5fa; }
.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    padding: 6px 14px;
    border-radius: 6px;
    transition: background .2s, color .2s;
}
.nav-links a:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-links .btn-nav {
    background: var(--blue);
    color: #fff;
    padding: 7px 18px;
    border-radius: 6px;
    font-weight: 600;
}
.nav-links .btn-nav:hover { background: var(--blue-h); }

/* ---- Layout ---- */
.container { max-width: 900px; margin: 0 auto; padding: 32px 20px; }
.container-wide { max-width: 1100px; margin: 0 auto; padding: 32px 20px; }

/* ---- Cards ---- */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 28px;
    margin-bottom: 20px;
}
.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 16px;
}

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 7px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: opacity .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-h); }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { opacity: .9; }
.btn-outline {
    background: transparent;
    color: var(--blue);
    border: 2px solid var(--blue);
}
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-lg { padding: 13px 30px; font-size: 16px; }
.btn-full { width: 100%; text-align: center; }

/* ---- Forms ---- */
.form-group { margin-bottom: 18px; }
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; color: var(--navy); }
input[type=text], input[type=email], input[type=password], input[type=tel], select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 7px;
    font-size: 14px;
    background: #fff;
    color: var(--text);
    transition: border-color .2s;
    outline: none;
}
input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---- Alerts ---- */
.alert {
    padding: 12px 16px;
    border-radius: 7px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }

/* ---- Progress ---- */
.progress-bar-wrap {
    background: #e2e8f0;
    border-radius: 99px;
    height: 10px;
    overflow: hidden;
}
.progress-bar-fill {
    background: var(--blue);
    height: 100%;
    border-radius: 99px;
    transition: width .4s;
}

/* ---- Module grid ---- */
.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 20px;
}
.module-card {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-decoration: none;
    color: var(--text);
    transition: border-color .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.module-card:hover { border-color: var(--blue); box-shadow: 0 4px 20px rgba(37,99,235,.12); }
.module-card.locked { opacity: .55; cursor: not-allowed; pointer-events: none; }
.module-card.done { border-color: var(--green); }

.module-num {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--muted);
}
.module-title { font-weight: 700; font-size: 15px; color: var(--navy); }
.module-desc { font-size: 13px; color: var(--muted); }
.module-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--muted);
}
.badge {
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
}
.badge-done { background: #dcfce7; color: #166534; }
.badge-locked { background: #f1f5f9; color: var(--muted); }
.badge-open { background: #dbeafe; color: #1e40af; }

/* ---- Module content ---- */
.modul-content h2 { font-size: 22px; color: var(--navy); margin: 0 0 16px; }
.modul-content h3 { font-size: 16px; color: var(--navy); margin: 24px 0 10px; }
.modul-content p { margin-bottom: 12px; color: #374151; }
.modul-content ul { padding-left: 20px; margin-bottom: 12px; }
.modul-content li { margin-bottom: 6px; color: #374151; }
.modul-content strong { color: var(--navy); }
.nota-important {
    background: #eff6ff;
    border-left: 4px solid var(--blue);
    padding: 14px 16px;
    border-radius: 0 8px 8px 0;
    margin-top: 24px;
    font-size: 14px;
    color: #1e40af;
}

/* ---- Quiz ---- */
.quiz-question {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 16px;
}
.quiz-question h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 14px;
}
.answer-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 7px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.answer-option:hover { border-color: var(--blue); background: #f0f7ff; }
.answer-option input[type=radio] { margin-top: 2px; accent-color: var(--blue); flex-shrink: 0; }
.answer-option label { cursor: pointer; font-size: 14px; color: var(--text); }

/* Quiz result states */
.answer-option.correct { border-color: var(--green); background: #f0fdf4; }
.answer-option.wrong   { border-color: var(--red);   background: #fff1f2; }

/* ---- Score display ---- */
.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin: 0 auto 20px;
}
.score-pass  { background: #dcfce7; color: #166534; border: 4px solid #22c55e; }
.score-fail  { background: #fee2e2; color: #991b1b; border: 4px solid #ef4444; }
.score-num   { font-size: 32px; line-height: 1; }
.score-label { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }

/* ---- Dashboard stats ---- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}
.stat-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}
.stat-num  { font-size: 32px; font-weight: 800; color: var(--navy); }
.stat-lbl  { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---- Landing page ---- */
.hero {
    background: linear-gradient(135deg, var(--navy) 0%, #2d5986 100%);
    color: #fff;
    padding: 72px 24px;
    text-align: center;
}
.hero h1 { font-size: clamp(26px, 4vw, 42px); font-weight: 800; margin-bottom: 16px; }
.hero p  { font-size: 17px; color: #bfdbfe; max-width: 620px; margin: 0 auto 28px; }
.hero-tags { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }
.hero-tag {
    background: rgba(255,255,255,.1);
    color: #e2e8f0;
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 13px;
    border: 1px solid rgba(255,255,255,.2);
}

.landing-section { padding: 52px 24px; }
.landing-section h2 { font-size: 26px; font-weight: 800; color: var(--navy); margin-bottom: 20px; text-align: center; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 16px; max-width: 900px; margin: 0 auto; }
.feature-box {
    background: var(--white);
    border-radius: var(--radius);
    padding: 22px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.feature-icon { font-size: 28px; margin-bottom: 10px; }
.feature-box h3 { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.feature-box p  { font-size: 13px; color: var(--muted); }

.curriculum-list { max-width: 700px; margin: 0 auto; }
.curriculum-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
}
.curriculum-num {
    width: 32px; height: 32px;
    background: var(--navy);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
    flex-shrink: 0;
}
.curriculum-info { flex: 1; }
.curriculum-title { font-weight: 600; font-size: 14px; }
.curriculum-desc  { font-size: 12px; color: var(--muted); }
.curriculum-time  { font-size: 12px; color: var(--muted); white-space: nowrap; }

.cta-section {
    background: var(--navy);
    color: #fff;
    padding: 52px 24px;
    text-align: center;
}
.cta-section h2 { font-size: 26px; font-weight: 800; margin-bottom: 12px; }
.cta-section p  { color: #bfdbfe; margin-bottom: 24px; font-size: 16px; }

/* ---- Certificate ---- */
@media screen {
    .cert-page {
        background: #e5e7eb;
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 32px;
    }
}
.cert-wrap {
    background: #fff;
    width: 800px;
    padding: 60px;
    border: 8px solid var(--navy);
    outline: 3px solid #60a5fa;
    outline-offset: 8px;
    font-family: Georgia, serif;
    position: relative;
}
.cert-header { text-align: center; border-bottom: 2px solid #e2e8f0; padding-bottom: 20px; margin-bottom: 32px; }
.cert-brand { font-size: 13px; color: var(--muted); letter-spacing: 2px; text-transform: uppercase; font-family: sans-serif; }
.cert-logo  { font-size: 26px; font-weight: 800; color: var(--navy); font-family: sans-serif; margin: 6px 0; }
.cert-title { font-size: 11px; color: var(--blue); letter-spacing: 3px; text-transform: uppercase; font-family: sans-serif; }
.cert-main  { text-align: center; }
.cert-presents { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.cert-name  { font-size: 38px; color: var(--navy); margin-bottom: 8px; font-style: italic; }
.cert-sub   { font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.cert-sub strong { color: var(--text); }
.cert-course-label { font-size: 13px; color: var(--muted); margin: 24px 0 8px; font-family: sans-serif; text-transform: uppercase; letter-spacing: 1px; }
.cert-course { font-size: 22px; color: var(--navy); font-weight: bold; }
.cert-details {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    font-family: sans-serif;
    font-size: 13px;
    color: var(--muted);
}
.cert-sig { text-align: center; }
.cert-sig-line { width: 160px; border-top: 1.5px solid #94a3b8; margin: 0 auto 6px; }
.cert-sig strong { color: var(--navy); display: block; font-size: 14px; }
.cert-code { text-align: center; background: #f8fafc; padding: 6px 14px; border-radius: 6px; font-size: 12px; }
.cert-code strong { color: var(--navy); display: block; }
.cert-footer { text-align: center; margin-top: 24px; font-family: sans-serif; font-size: 11px; color: #94a3b8; }

/* ---- Admin table ---- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 10px 12px; background: var(--navy); color: #fff; font-weight: 600; }
td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
tr:hover td { background: #f8fafc; }
.pill { padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; }
.pill-green { background: #dcfce7; color: #166534; }
.pill-gray  { background: #f1f5f9; color: var(--muted); }
.pill-blue  { background: #dbeafe; color: #1e40af; }

/* ---- Auth pages ---- */
.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy) 0%, #2d5986 100%);
    padding: 24px;
}
.auth-box {
    background: #fff;
    border-radius: 14px;
    padding: 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.auth-logo  { text-align: center; margin-bottom: 28px; }
.auth-logo h1 { font-size: 22px; font-weight: 800; color: var(--navy); }
.auth-logo p  { font-size: 13px; color: var(--muted); margin-top: 4px; }
.auth-footer  { text-align: center; margin-top: 18px; font-size: 13px; color: var(--muted); }
.auth-footer a { color: var(--blue); text-decoration: none; font-weight: 600; }

/* ---- Divider ---- */
.divider { height: 1px; background: var(--border); margin: 24px 0; }

/* ---- Print certificate ---- */
@media print {
    @page { margin: 12mm; }
    html, body { height: auto; }
    body, .cert-page {
        background: #fff !important;
        display: block !important;
        padding: 0 !important;
        min-height: 0 !important;
    }
    .no-print { display: none !important; }
    .cert-wrap {
        width: 100% !important;
        max-width: 680px;
        margin: 0 auto;
        border: 8px solid #1e3a5f !important;
        outline: none !important;
        box-shadow: none !important;
        page-break-inside: avoid;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .cert-name { font-size: 32px !important; }
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }
    .cert-wrap { padding: 30px 20px; width: 100%; }
    .cert-name { font-size: 26px; }
}