:root {
    --bg: #f4f6fb;
    --sidebar-bg: #1f2937;
    --sidebar-fg: #cbd5e1;
    --sidebar-active: #3b82f6;
    --card-bg: #ffffff;
    --border: #e5e7eb;
    --text: #1f2937;
    --muted: #6b7280;
    --accent: #3b82f6;
}

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

body {
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

.layout { display: flex; min-height: 100vh; }

/* --- Sidebar --- */
.sidebar {
    width: 200px;
    background: var(--sidebar-bg);
    color: var(--sidebar-fg);
    display: flex;
    flex-direction: column;
    padding: 14px 0;
    flex-shrink: 0;
    transition: width 0.18s ease;
}

.brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    padding: 0 14px 16px;
}
.brand-text { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; }

.sidebar-toggle {
    background: rgba(255, 255, 255, 0.06);
    color: var(--sidebar-fg);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    width: 28px; height: 28px;
    flex-shrink: 0;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    display: flex; align-items: center; justify-content: center;
}
.sidebar-toggle:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.brand-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.25);
    flex-shrink: 0;
}

.sidebar nav { display: flex; flex-direction: column; }

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--sidebar-fg);
    text-decoration: none;
    padding: 9px 16px;
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}
.nav-icon { width: 18px; text-align: center; flex-shrink: 0; font-size: 15px; }

.sidebar nav a:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }

.sidebar nav a.active {
    background: rgba(59, 130, 246, 0.15);
    color: #fff;
    border-left-color: var(--sidebar-active);
}

.sidebar-actions { margin-top: auto; padding: 14px 16px 0; }
.sidebar-actions .nav-icon { width: auto; }

/* --- Sidebar restrans (colapsat) --- */
.sidebar-collapsed .sidebar { width: 60px; }
.sidebar-collapsed .brand { justify-content: center; padding: 0 0 16px; }
.sidebar-collapsed .brand-text { display: none; }
.sidebar-collapsed .sidebar nav a { justify-content: center; gap: 0; padding: 11px 0; }
.sidebar-collapsed .nav-label { display: none; }
.sidebar-collapsed .sidebar-actions { padding: 14px 8px 0; }
.sidebar-collapsed .btn-add,
.sidebar-collapsed .btn-refresh-link { justify-content: center; }
.refresh-form { margin-top: 10px; }

.mode-select {
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}
.mode-select option { color: #1f2937; }  /* lista deschisa: text inchis pe alb */

/* --- Panou „Extrage de pe site" (pagina Statistici) --- */
.scrape-panel .panel-meta { margin-bottom: 16px; }
.btn-refresh-link { display: flex; align-items: center; justify-content: center; gap: 8px; text-align: center; text-decoration: none; margin-top: 10px; }

.scrape-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 18px;
}
.field { display: flex; flex-direction: column; gap: 5px; }
.field-label { font-size: 12px; color: var(--muted, #64748b); font-weight: 600; }
.field-input {
    padding: 8px 10px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 6px;
    background: #fff;
    color: #1f2937;
    font-size: 14px;
    min-width: 150px;
}

.cat-picker { margin-bottom: 18px; }
.cat-picker-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-weight: 700;
    margin-bottom: 10px;
}
.cat-badge { font-weight: 600; color: var(--accent); font-size: 13px; }
.cat-hint { font-weight: 400; font-size: 12px; color: var(--muted, #64748b); }
.cat-tools { margin-left: auto; display: flex; gap: 6px; }
.cat-tool {
    padding: 4px 10px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 6px;
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    cursor: pointer;
}
.cat-tool:hover { background: #eef2f7; }

.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 6px 14px;
}
.cat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}
.cat-item:hover { background: #f1f5f9; }
.cat-item input { width: 16px; height: 16px; flex-shrink: 0; cursor: pointer; }
.cat-name { flex: 1; color: #1f2937; }
.cat-count { color: var(--muted, #94a3b8); font-size: 12px; font-variant-numeric: tabular-nums; }

.scrape-actions { display: flex; gap: 10px; }
.scrape-panel .btn-refresh { width: auto; padding: 10px 22px; }
.scrape-panel .rescore-form { margin-top: 14px; }
.scrape-panel .btn-rescore {
    width: auto;
    background: #f8fafc;
    color: #334155;
    border: 1px solid var(--border, #e2e8f0);
    padding: 9px 18px;
}
.scrape-panel .btn-rescore:hover { background: #eef2f7; }

.limit-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: var(--sidebar-fg);
    margin-bottom: 8px;
}
.limit-input {
    width: 84px;
    padding: 6px 8px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 13px;
    text-align: right;
}
.limit-input:focus { outline: none; border-color: var(--accent); }

.btn-add {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 9px;
    font-size: 14px;
    transition: background 0.15s;
}
.btn-add:hover { background: rgba(255, 255, 255, 0.16); }

.btn-refresh {
    width: 100%;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-refresh:hover { background: #2563eb; }

.rescore-form { margin-top: 10px; }
.btn-rescore {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-rescore:hover { background: rgba(255, 255, 255, 0.16); }

/* --- Content --- */
.content { flex: 1; display: flex; flex-direction: column; }

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 32px;
    background: #fff;
    border-bottom: 1px solid var(--border);
}
.topbar h1 { font-size: 22px; }

.source-badge {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}
.source-live  { background: #dcfce7; color: #166534; }
.source-cache { background: #dbeafe; color: #1e40af; }
.source-demo  { background: #fef9c3; color: #854d0e; }

.page { padding: 28px 32px; }

/* --- Cards --- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 26px;
}
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}
.card-label { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.card-value { font-size: 30px; font-weight: 700; }
.card-value .muted { font-size: 16px; color: var(--muted); font-weight: 400; }

/* --- Panels & tables --- */
.panel {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 22px;
}
.panel h2 { font-size: 17px; margin-bottom: 16px; }
.panel-meta { color: var(--muted); font-size: 13px; margin-bottom: 12px; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td {
    text-align: left;
    padding: 9px 10px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    vertical-align: top;
}
.data-table th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; white-space: nowrap; }
.data-table tbody tr:hover { background: #f9fafb; }
.data-table .empty { text-align: center; color: var(--muted); padding: 24px; }

/* coloane cu text lung: se scurteaza cu „…"; textul complet apare la hover (title) */
.data-table .col-clip {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.data-table .col-cat { max-width: 130px; }
.data-table .col-date, .data-table .col-score { white-space: nowrap; }

/* prima coloana (Denumire) ramane fixa la scroll lateral, ca sa stii mereu ce proiect e */
.data-table .col-name {
    position: sticky;
    left: 0;
    background: #fff;
    max-width: 240px;
    z-index: 1;
}
.data-table tbody tr:hover .col-name { background: #f9fafb; }
.data-table thead th:first-child {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 2;
}

/* --- Filter bar --- */
.filter-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.filter-bar input[type="text"] {
    flex: 1;
    min-width: 240px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
}
.filter-bar select {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    color: var(--text);
}
.filter-bar button {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    cursor: pointer;
}
.btn-export {
    margin-left: auto;
    background: #16a34a;
    color: #fff;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
}
.btn-export:hover { background: #15803d; }

/* varianta secundara: export cu textul integral (mai lent) — buton discret, cu contur */
.btn-export-full {
    margin-left: 8px;
    background: transparent;
    color: #16a34a;
    border: 1px solid #16a34a;
    padding: 9px 15px;
}
.btn-export-full:hover { background: rgba(22, 163, 74, 0.08); }

/* --- Sortable headers --- */
.sort-link { color: var(--muted); text-decoration: none; }
.sort-link:hover { color: var(--text); }
.sort-link.active { color: var(--accent); }

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

/* --- Article text box --- */
.content-box {
    margin-top: 22px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}
.content-box summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: var(--accent);
}
.content-text {
    margin-top: 12px;
    white-space: pre-wrap;
    line-height: 1.6;
    font-size: 14px;
    color: var(--text);
    max-height: 360px;
    overflow-y: auto;
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
}

/* --- Search bar --- */
.search-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 20px; }
.search-bar input {
    flex: 1;
    max-width: 360px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
}
.search-bar button {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    cursor: pointer;
}
.clear-link { color: var(--muted); font-size: 13px; text-decoration: none; }
.clear-link:hover { text-decoration: underline; }

/* --- Bar chart --- */
.bar-chart { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 40px; align-items: center; gap: 12px; }
.bar-label { font-size: 14px; }
.bar-track { background: #eef2f7; border-radius: 6px; height: 22px; overflow: hidden; }
.bar-fill { background: var(--accent); height: 100%; border-radius: 6px; transition: width 0.3s; }
.bar-value { text-align: right; font-size: 14px; font-weight: 600; }

/* --- Progress bar --- */
.progress-status { font-size: 18px; font-weight: 600; margin-bottom: 14px; }
.progress-track {
    background: #eef2f7;
    border-radius: 999px;
    height: 26px;
    overflow: hidden;
}
.progress-fill {
    background: var(--accent);
    height: 100%;
    border-radius: 999px;
    width: 0;
    transition: width 0.4s ease;
    background-image: linear-gradient(90deg, #3b82f6, #60a5fa);
}
#progress-done .btn-primary, #progress-error .btn-cancel { margin-top: 6px; display: inline-block; }

/* bara nedeterminata (modul „doar noi", cand nu stim totalul) */
.progress-track.indeterminate { position: relative; overflow: hidden; }
.progress-track.indeterminate .progress-fill {
    width: 40% !important;
    position: absolute;
    animation: indet 1.2s ease-in-out infinite;
}
@keyframes indet {
    0%   { left: -40%; }
    100% { left: 100%; }
}

/* --- Flash messages --- */
.flash {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 14px;
    border: 1px solid transparent;
}
.flash-success { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.flash-error   { background: #fee2e2; color: #991b1b; border-color: #fecaca; }

/* --- Table actions / tags --- */
.row-actions { text-align: right; white-space: nowrap; }
.link-edit { color: var(--accent); text-decoration: none; font-size: 13px; }
.link-edit:hover { text-decoration: underline; }
.tag-manual {
    display: inline-block;
    font-size: 11px;
    background: #ede9fe;
    color: #6d28d9;
    padding: 1px 7px;
    border-radius: 999px;
    margin-left: 6px;
    vertical-align: middle;
}
.btn-inline {
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
}
.btn-inline:hover { background: #2563eb; }

/* --- Pagination --- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 20px;
}
.pagination a {
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.pagination a:hover { background: #f1f5f9; }
.page-info { color: var(--muted); font-size: 14px; }

/* --- Project form --- */
.project-form { display: flex; flex-direction: column; gap: 16px; max-width: 640px; }
.project-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.project-form input, .project-form textarea {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text);
    font-weight: 400;
    font-family: inherit;
}
.project-form input:focus, .project-form textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* --- Grila site vs manual (ecranul de editare) --- */
.field-grid {
    display: grid;
    grid-template-columns: 150px 1fr 1fr;
    gap: 10px 16px;
    align-items: center;
    margin-bottom: 8px;
}
.fg-head {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    font-weight: 700;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border);
}
.fg-label { font-size: 14px; font-weight: 600; color: var(--text); }
.fg-site {
    font-size: 13px;
    color: var(--muted);
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 8px 10px;
    word-break: break-word;
    max-height: 90px;
    overflow-y: auto;
}
.fg-manual input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}
.fg-manual input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }

.manual-only {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.manual-only-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 12px;
}

@media (max-width: 720px) {
    .field-grid { grid-template-columns: 1fr; gap: 4px; }
    .fg-head:nth-child(2), .fg-head:nth-child(3) { display: none; }
    .fg-label { margin-top: 12px; }
    .fg-site::before { content: "De pe site: "; font-weight: 600; }
}
.form-actions { display: flex; align-items: center; gap: 14px; margin-top: 4px; }

.btn-primary {
    background: var(--accent); color: #fff; border: none;
    border-radius: 8px; padding: 11px 22px; font-size: 14px; cursor: pointer;
}
.btn-primary:hover { background: #2563eb; }
.btn-cancel { color: var(--muted); text-decoration: none; font-size: 14px; }
.btn-cancel:hover { text-decoration: underline; }

.site-hint {
    font-size: 12px;
    color: var(--muted);
    font-weight: 400;
    margin-top: 2px;
}
.info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a8a;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 20px;
}
.dot-ovr { color: #7c3aed; font-size: 10px; vertical-align: middle; }

.edit-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    flex-wrap: wrap;
}
.sync-form { display: flex; align-items: center; gap: 12px; }
.btn-secondary {
    background: #fff; color: var(--accent); border: 1px solid var(--accent);
    border-radius: 8px; padding: 9px 16px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.btn-secondary:hover { background: #eff6ff; }

.delete-form { margin-top: 0; }
.btn-danger {
    background: #fff; color: #b91c1c; border: 1px solid #fecaca;
    border-radius: 8px; padding: 9px 16px; font-size: 13px; cursor: pointer;
}
.btn-danger:hover { background: #fef2f2; }

@media (max-width: 640px) {
    .form-row { grid-template-columns: 1fr; }
}

/* select-uri in formular (categorii, status, distinctie) */
.project-form select, .fg-manual select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text);
    font-weight: 400;
    font-family: inherit;
    background: #fff;
}
.project-form select:focus, .fg-manual select:focus { outline: 2px solid var(--accent); border-color: var(--accent); }

/* filtru pe interval de date (bara de filtrare) */
.date-filter {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--muted);
}
.date-filter input[type="date"] {
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text);
}

.score-filter {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--muted);
}
.score-filter input[type="number"] {
    width: 62px;
    padding: 8px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text);
}

/* --- Multi-select (buton + popover cu bife) --- */
.ms { position: relative; }
.ms-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
}
.ms-btn:hover { border-color: #cbd5e1; }
.ms-count {
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.ms-caret { color: var(--muted); font-size: 11px; }
.ms-pop {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 30;
    width: 260px;
    max-width: 80vw;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14);
    padding: 8px;
}
.ms-search {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    margin-bottom: 6px;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 13px;
    font-family: inherit;
}
.ms-list { max-height: 260px; overflow-y: auto; }
.ms-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 8px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text);
    cursor: pointer;
}
.ms-item:hover { background: #f1f5f9; }
.ms-item input { width: 15px; height: 15px; flex-shrink: 0; }
.ms-item-none {
    color: var(--muted);
    font-style: italic;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
    padding-bottom: 8px;
}
.ms-empty { padding: 10px 8px; color: var(--muted); font-size: 13px; }

/* badge-uri status / distinctie in tabel */
.badge-status, .badge-dist {
    display: inline-block;
    font-size: 12px;
    padding: 2px 9px;
    border-radius: 999px;
    font-weight: 600;
    white-space: nowrap;
    background: #eef2f7;
    color: #374151;
}
.badge-in       { background: #dcfce7; color: #166534; }
.badge-out      { background: #fee2e2; color: #991b1b; }
.badge-maybe    { background: #fef9c3; color: #854d0e; }
.badge-double   { background: #dbeafe; color: #1e40af; }
.badge-inactiv  { background: #e5e7eb; color: #4b5563; }
.badge-gold     { background: #fef3c7; color: #92400e; }
.badge-silver   { background: #e5e7eb; color: #374151; }
.badge-bronze   { background: #fde4d0; color: #9a3412; }
.badge-the-one  { background: #ede9fe; color: #6d28d9; }

/* --- Configurari (nomenclatoare) --- */
.nom-panel h2 { margin-bottom: 6px; }
.nom-add { display: flex; gap: 10px; margin: 14px 0 18px; }
.nom-add input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}
.nom-add input:focus { outline: 2px solid var(--accent); border-color: var(--accent); }

.nom-list { display: flex; flex-direction: column; gap: 8px; }
.nom-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}
.nom-row:last-child { border-bottom: none; }
.nom-edit { display: flex; align-items: center; gap: 10px; flex: 1; flex-wrap: wrap; }
.nom-edit input[type="text"] {
    flex: 1;
    min-width: 180px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}
.nom-edit input[type="text"]:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.nom-active {
    display: flex; align-items: center; gap: 5px;
    font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap;
}
.nom-row-actions, .nom-delete { display: flex; align-items: center; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.nom-inactive input[type="text"] { color: var(--muted); background: #f9fafb; text-decoration: line-through; }
.nom-inactive .nom-active { color: #b91c1c; }

/* --- Prose (about) --- */
.prose p { margin-bottom: 14px; line-height: 1.6; }
.prose h3 { margin: 18px 0 10px; font-size: 15px; }
.prose ul { margin: 0 0 14px 20px; line-height: 1.7; }
.prose code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

/* =========================================================================
   Autentificare, cont si administrare utilizatori
   ========================================================================= */

/* --- Pagina de login (fara bara laterala) --- */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 20px;
}
.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    padding: 30px 30px 34px;
    width: 100%;
    max-width: 380px;
}
.auth-card h1 { font-size: 20px; margin: 6px 0 18px; color: var(--text); }
.auth-brand {
    display: inline-flex; align-items: center; gap: 8px;
    font-weight: 700; color: var(--text); font-size: 16px;
}
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form .field { display: flex; flex-direction: column; gap: 5px; }
.auth-form .field-input { min-width: 0; width: 100%; box-sizing: border-box; }
.auth-submit { width: 100%; text-align: center; padding: 10px; }

/* --- Caseta utilizatorului din bara laterala --- */
.sidebar-user {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
}
.sidebar-user .user-info {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 16px; font-size: 13px; color: var(--muted);
    white-space: nowrap; overflow: hidden;
}
.sidebar-user a {
    display: flex; align-items: center; gap: 11px;
    color: var(--sidebar-fg); text-decoration: none;
    padding: 9px 16px; font-size: 14px;
    border-left: 3px solid transparent;
    transition: background 0.15s, color 0.15s; white-space: nowrap;
}
.sidebar-user a:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
.sidebar-user a.active {
    background: rgba(59, 130, 246, 0.15);
    color: #fff; border-left-color: var(--sidebar-active);
}

/* --- Formulare inline din pagina de administrare --- */
.check-inline {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 14px; color: var(--text); margin: 4px 12px 4px 0;
}
.inline-form { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.field-inline { min-width: 0; width: auto; padding: 6px 8px; font-size: 13px; }
.link-delete {
    background: none; border: none; cursor: pointer;
    color: #dc2626; font-size: 14px; padding: 0; text-decoration: underline;
}
.link-delete:hover { color: #b91c1c; }
.link-plain {
    background: none; border: none; cursor: pointer; padding: 0;
    color: var(--accent); font-size: 14px; text-decoration: underline;
}
.link-plain:hover { color: #2563eb; }
td .muted, span.muted { color: var(--muted); }
