/* ── CV Builder — Stiluri Globale ── */

:root {
    --primary:       #2563eb;
    --primary-dark:  #1d4ed8;
    --primary-light: #eff6ff;
    --success:       #16a34a;
    --warning:       #d97706;
    --danger:        #dc2626;
    --bg:            #f1f5f9;
    --white:         #ffffff;
    --text:          #1e293b;
    --muted:         #64748b;
    --border:        #e2e8f0;
    --radius:        8px;
    --shadow:        0 2px 12px rgba(0,0,0,.07);
    --font:          'Segoe UI', Arial, sans-serif;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
}

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

/* ── Navbar ── */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 56px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.navbar-brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 16px;
}

.navbar-user { color: var(--muted); font-size: .9rem; }

.navbar-link {
    color: var(--text);
    font-size: .9rem;
    font-weight: 500;
}

.navbar-link:hover { color: var(--primary); text-decoration: none; }

.btn-link {
    background: none;
    border: none;
    cursor: pointer;
    font-size: .9rem;
    font-weight: 500;
    color: var(--text);
    padding: 0;
}

.btn-link:hover { color: var(--danger); }

/* ── Butoane ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: background .15s, color .15s, border-color .15s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary  { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; text-decoration: none; }

.btn-outline  { background: var(--white); color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }

.btn-danger   { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #b91c1c; text-decoration: none; }

.btn-danger-outline { background: var(--white); color: var(--danger); border-color: #fecaca; }
.btn-danger-outline:hover { background: #fef2f2; text-decoration: none; }

.btn-sm { padding: 5px 10px; font-size: .82rem; }

/* ── Formulare ── */
.form-group { margin-bottom: 16px; }

label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 5px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="tel"],
input[type="date"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: .92rem;
    font-family: var(--font);
    color: var(--text);
    background: var(--white);
    outline: none;
    transition: border-color .15s;
}

input:focus, textarea:focus, select:focus { border-color: var(--primary); }

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

/* ── Alerte ── */
.alert {
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: .9rem;
    margin-bottom: 16px;
}

.alert-error   { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }
.alert-warning { background: #fffbeb; color: var(--warning); border: 1px solid #fde68a; }

/* ── Modals ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 8px 40px rgba(0,0,0,.15);
    width: 100%;
    max-width: 480px;
    overflow: hidden;
}

.modal-sm { max-width: 360px; }

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

.modal-header h3 { font-size: 1rem; font-weight: 700; }

.modal-close {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--muted);
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
}
.modal-close:hover { background: var(--bg); color: var(--text); }

.modal-body   { padding: 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--bg); }

/* ── Helpers ── */
.text-muted { color: var(--muted); font-size: .88rem; }

/* ── Toast notifications ── */
#toast-container {
    position: fixed;
    bottom: 70px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
    pointer-events: all;
    animation: toast-in .25s ease;
    max-width: 320px;
}

.toast-success { background: #166534; color: #fff; }
.toast-error   { background: #991b1b; color: #fff; }
.toast-warning { background: #92400e; color: #fff; }
.toast-info    { background: #1e40af; color: #fff; }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(12px); }
}

/* ── Loading spinner global ── */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

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

/* ── Badge ── */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: .75rem;
    font-weight: 700;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger  { background: #fee2e2; color: #991b1b; }

/* ── Erori pagini ── */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    padding: 40px;
}
.error-page .error-code { font-size: 5rem; font-weight: 800; color: var(--border); line-height: 1; }
.error-page h2          { font-size: 1.4rem; margin: 12px 0 8px; }
.error-page p           { color: var(--muted); margin-bottom: 24px; }
