/* ============================================================================
 * Asistent Personal (AP) — app.css
 * (ap.edimed.ro, /public_html/css/app.css)
 *
 * Stiluri globale pentru toate paginile AP.
 * Încărcat automat de /php/partials/head.php.
 *
 * Convenții:
 *   - Variabile CSS la :root (--accent, --bg, --border, --muted, --error)
 *   - Clase: .card, .btn, .form-group, .topbar, .badge, .container
 *   - Mobile-first (responsive, max-width 480px implicit)
 * ========================================================================== */

:root {
    --accent: #1976d2;
    --accent-hover: #1565c0;
    --bg: #f5f7fa;
    --border: #e0e0e0;
    --muted: #666;
    --error: #c62828;
    --success: #1b5e20;
    --warning: #7a5900;
    --text: #222;
    --radius: 6px;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
}

/* ====================== Container & Layout ====================== */

.container {
    width: 80%;
    margin: 0 auto;
    padding: 16px;
    box-sizing: border-box;
}

.container--narrow { max-width: 480px; margin: 40px auto; }

/* ====================== Container 80% (wrapper comun pt topbar, nav, etc.) ====================== */

.container-80 {
    width: 80%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* ====================== Topbar (pentru pagini autentificate) ====================== */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 10px 16px;
    margin: 0 auto 16px;
    font-size: 14px;
    width: 80%;
}

.topbar h1 { margin: 0; font-size: 18px; }

.topbar__right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar__email {
    color: var(--muted);
    font-size: 13px;
}

.topbar__link {
    color: var(--accent);
    text-decoration: none;
    font-size: 13px;
}

.topbar__link:hover { text-decoration: underline; }

.topbar__lang {
    display: inline-flex;
    align-items: center;
}

/* .topbar__inner scos — .topbar e direct 80% width, fără wrapper interior */

/* ====================== Card ====================== */

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin: 0 0 16px;
    box-shadow: var(--shadow);
}

.card--centered {
    max-width: 400px;
    margin: 0 auto;
    padding: 32px;
}

.card h1 { margin: 0 0 4px; font-size: 22px; color: var(--text); }
.card h2 { margin-top: 0; }
.card h3 { margin: 0 0 12px; font-size: 15px; }

/* ====================== Subtitle / Helper text ====================== */

.subtitle {
    color: var(--muted);
    margin: 0 0 24px;
    font-size: 13px;
}

.footer-note {
    margin-top: 24px;
    font-size: 11px;
    color: var(--muted);
    text-align: center;
}

/* ====================== Forms ====================== */

.form-group { margin: 0 0 14px; }

.form-group label {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

/* ====================== Form Actions (checkbox + button pe aceeași linie) ====================== */

.form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 18px;
    flex-wrap: wrap;  /* pe ecrane mici, button-ul coboară sub checkbox */
}

.form-actions .checkbox-label {
    margin: 0;  /* suprascrie .form-group label care are margin-bottom */
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--muted);
    user-select: none;
}

.form-actions .checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.form-actions .btn {
    flex: 0 0 auto;
}
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.12);
}

.form-help {
    font-size: 11px;
    color: var(--muted);
    margin: 4px 0 0;
}

/* ====================== Buttons ====================== */

.btn {
    display: inline-block;
    padding: 10px 16px;
    background: var(--accent);
    color: #fff;
    border: 0;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn--block { display: block; width: 100%; }

.btn--secondary {
    background: #fff;
    color: var(--accent);
    border: 1px solid var(--accent);
}
.btn--secondary:hover { background: rgba(25, 118, 210, 0.06); }

.btn--danger { background: var(--error); }
.btn--danger:hover { background: #b71c1c; }

/* ====================== Alerts (HTML version, fallback) ====================== */

.alert {
    border-radius: var(--radius);
    padding: 10px 12px;
    margin: 0 0 16px;
    font-size: 13px;
    border: 1px solid;
}

.alert--error { background: #ffebee; color: var(--error); border-color: #ef9a9a; }
.alert--success { background: #d4edda; color: var(--success); border-color: #a5d6a7; }
.alert--warning { background: #fff3cd; color: var(--warning); border-color: #ffe082; }
.alert--info { background: #e3f2fd; color: #0d47a1; border-color: #90caf9; }

/* Compat cu nume vechi (folosite înainte de refactor) */
.error {
    background: #ffebee;
    color: var(--error);
    border: 1px solid #ef9a9a;
    border-radius: var(--radius);
    padding: 10px 12px;
    margin: 0 0 16px;
    font-size: 13px;
}

/* ====================== Tools dashboard ====================== */

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.tool-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 16px 18px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    transition: box-shadow 0.15s, transform 0.15s;
}

.tool-card:hover:not(.tool-card--locked) {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.tool-card--locked {
    opacity: 0.5;
    background: #fafafa;
}

.tool-card__icon {
    font-size: 24px;
    line-height: 1;
    flex: 0 0 auto;
}

.tool-card__body {
    flex: 1 1 auto;
    min-width: 0;
}

.tool-card__title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
}

.tool-card__desc {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.45;
}

.tool-card__meta {
    margin: 0 0 10px;
}

.tool-card__locked-msg {
    font-size: 12px;
    color: var(--muted);
    font-style: italic;
}

/* ====================== DB-driven Menu (text only, voicevet style) ====================== */

.db-menu {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0;
}

.db-menu-list {
    list-style: none;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    align-items: stretch;
    width: 80%;
}

.db-menu-item {
    position: relative;
}

/* <details> = container pt submeniu. Functioneaza nativ pe toate browserele. */
.db-menu-details {
    position: static;
    display: block;
}

.db-menu-details > summary {
    list-style: none;
    cursor: pointer;
    padding: 12px 16px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 2px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}

.db-menu-details > summary:hover {
    background: rgba(25, 118, 210, 0.06);
    border-bottom-color: var(--accent);
}

.db-menu-details > summary::-webkit-details-marker { display: none; }
.db-menu-details > summary::marker             { content: ''; }

/* Sageata toggle (litera v rotita cand deschis) */
.db-menu-details > summary::after {
    content: '\25BE';  /* sageata jos */
    font-size: 11px;
    color: var(--muted);
    margin-left: auto;
    transition: transform 0.15s;
    display: inline-block;
}

.db-menu-details[open] > summary::after {
    transform: rotate(-180deg);
}

/* Activ: border accent la baza */
.db-menu-item.active > .db-menu-details > summary {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Submeniul apare cand details e deschis */
.db-menu-details[open] > .db-menu-children {
    display: block;
}

.db-menu-children {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    z-index: 100;
}

.db-menu-children .db-menu-item {
    width: 100%;
}

.db-menu-children .db-menu-item > a {
    padding: 10px 16px;
    border-bottom: none;
    font-weight: 400;
    font-size: 13px;
    color: var(--text);
    text-decoration: none;
    display: block;
}

.db-menu-children .db-menu-item > a:hover {
    background: rgba(25, 118, 210, 0.06);
}

/* Items non-parent (link simplu) */
.db-menu-item > a {
    display: block;
    padding: 12px 16px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}

.db-menu-item > a:hover {
    background: rgba(25, 118, 210, 0.06);
    border-bottom-color: var(--accent);
}

.db-menu-item.active > a {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.db-menu-item-placeholder {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ====================== Badges ====================== */

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.badge--admin { background: #d4edda; color: var(--success); }
.badge--editor { background: #cce5ff; color: #004085; }
.badge--author { background: #fff3cd; color: var(--warning); }
.badge--reviewer { background: #e2d5e8; color: #5b2a72; }
.badge--readonly { background: #e0e0e0; color: var(--muted); }

/* ====================== Tables ====================== */

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table th,
.table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.table th {
    background: var(--bg);
    font-weight: 600;
    position: sticky;
    top: 0;
}

.table tr:hover td { background: #fafbfc; }

/* Tabel responsive: pe mobil, fiecare rand devine un card */
@media (max-width: 768px) {
    .table.responsive-cards,
    .table.responsive-cards thead,
    .table.responsive-cards tbody,
    .table.responsive-cards tr,
    .table.responsive-cards td {
        display: block;
    }

    .table.responsive-cards thead {
        position: absolute;
        left: -9999px;
        top: -9999px;
    }

    .table.responsive-cards tr {
        background: #fff;
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 14px 16px;
        margin-bottom: 12px;
        box-shadow: var(--shadow);
    }

    .table.responsive-cards td {
        padding: 6px 0;
        border: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }

    .table.responsive-cards td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--muted);
        font-size: 12px;
        text-transform: uppercase;
        flex: 0 0 auto;
        min-width: 80px;
    }

    .table.responsive-cards td:last-child {
        justify-content: flex-end;
    }

    .table.responsive-cards td:last-child::before {
        display: none;
    }
}

/* Font-size mai mare pe input-uri/textarea (Safari iOS zoom fix) */
@media (max-width: 768px) {
    input, textarea, select, .form-group input, .form-group textarea, .form-group select {
        font-size: 16px;
    }
    .table {
        font-size: 14px;
    }
    .card {
        padding: 14px 16px;
    }
    h2 { font-size: 20px; }
    h3 { font-size: 16px; }
}

/* ====================== Login page specific ====================== */

body.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.login-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-brand {
    text-align: center;
    margin: 0 0 24px;
    color: var(--accent);
}

.login-brand__logo {
    display: inline-block;
    width: 56px;
    height: 56px;
    line-height: 56px;
    text-align: center;
    background: var(--accent);
    color: #fff;
    border-radius: 12px;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.25);
}

.login-brand__name {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: var(--text);
}

.login-card {
    width: 100%;
    max-width: 480px;
}

.login-card .card { padding: 32px; }

.login-card h1 {
    margin: 0 0 4px;
    font-size: 18px;
    text-align: center;
    color: var(--muted);
    font-weight: 500;
}

/* ====================== Language switcher ====================== */

.lang-switcher {
    display: inline-flex;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.lang-switcher__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    padding: 5px 10px;
    text-decoration: none;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    font-family: ui-monospace, Consolas, monospace;
    letter-spacing: 0.5px;
    border-radius: 4px;
    transition: all 0.15s;
}

.lang-switcher__btn:hover {
    background: rgba(25, 118, 210, 0.08);
    color: var(--accent);
}

.lang-switcher__btn--active {
    background: var(--accent);
    color: #fff;
}

.lang-switcher__btn--active:hover {
    background: var(--accent-hover);
    color: #fff;
}

/* Fixed position doar pe paginile fără topbar (login page) */
body.login-page .lang-switcher,
body.no-topbar .lang-switcher {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* ====================== Dictation recorder (Faza 6.3) ====================== */

.recorder-hint {
    color: var(--muted);
    margin-bottom: 16px;
    font-size: 13px;
    line-height: 1.5;
}

.recorder-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.btn--recorder {
    background: var(--accent);
    padding: 12px 22px;
    font-size: 15px;
}

.btn--recorder.is-recording {
    background: #c62828;
    animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(198, 40, 40, 0.4); }
    50%      { box-shadow: 0 0 0 8px rgba(198, 40, 40, 0); }
}

.btn--recorder-stop {
    background: #c62828;
}

.recorder-icon {
    margin-right: 4px;
    font-size: 14px;
}

.recorder-timer {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    background: #f5f5f5;
    padding: 6px 14px;
    border-radius: 6px;
    min-width: 72px;
    text-align: center;
}

.recorder-status {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 13px;
    min-height: 18px;
}

.recorder-status--active {
    color: #c62828;
    font-weight: 600;
}

.dictation-progress {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: rgba(25, 118, 210, 0.06);
    border-radius: var(--radius);
    margin-top: 20px;
    color: var(--accent);
    font-weight: 600;
}

.dictation-progress p {
    margin: 0;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(25, 118, 210, 0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex: 0 0 auto;
}

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

/* Markdown editor cu preview live */
.content-editor {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.content-editor textarea {
    border: 0;
    border-radius: 0;
    border-right: 1px solid var(--border);
    font-family: ui-monospace, Consolas, monospace;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
    min-height: 280px;
    padding: 14px 16px;
    background: #fafafa;
}

.content-editor textarea:focus {
    outline: none;
    background: #fff;
}

.content-preview {
    padding: 14px 16px;
    background: #fff;
    min-height: 280px;
    max-height: 400px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.6;
}

.content-preview h2,
.content-preview h3,
.content-preview h4 {
    margin: 12px 0 8px;
    font-weight: 600;
}

.content-preview h2 { font-size: 18px; }
.content-preview h3 { font-size: 16px; }
.content-preview h4 { font-size: 14px; }

.content-preview ul,
.content-preview ol {
    margin: 6px 0;
    padding-left: 22px;
}

.content-preview li {
    margin: 3px 0;
}

.content-preview p {
    margin: 6px 0;
}

.content-preview strong {
    color: var(--text);
    font-weight: 700;
}

/* Markdown rendering (dictari.php / consolidated_notes.php view) */
.dictation-content {
    line-height: 1.6;
    font-size: 15px;
    color: var(--text);
}

.dictation-content h2,
.dictation-content h3,
.dictation-content h4 {
    margin: 16px 0 8px;
    font-weight: 600;
    line-height: 1.3;
}

.dictation-content h2 { font-size: 19px; }
.dictation-content h3 { font-size: 17px; }
.dictation-content h4 { font-size: 15px; }

.dictation-content p {
    margin: 8px 0;
}

.dictation-content ul,
.dictation-content ol {
    margin: 8px 0;
    padding-left: 24px;
}

.dictation-content li {
    margin: 4px 0;
}

.dictation-content strong {
    font-weight: 700;
    color: var(--text);
}

.dictation-content em {
    font-style: italic;
}

.dictation-content code {
    background: #f3f3f3;
    padding: 1px 6px;
    border-radius: 3px;
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.9em;
    color: #c7254e;
}

.muted {
    color: var(--muted);
    font-size: 12px;
}

@media (max-width: 768px) {
    .content-editor {
        grid-template-columns: 1fr;
    }
    .content-editor textarea {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }
}

/* ====================== Password toggle (login) ====================== */

.password-wrapper {
    display: flex;
    align-items: stretch;
    gap: 4px;
}

.password-wrapper input {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 12px;
}

.password-toggle {
    flex: 0 0 auto;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0 12px;
    cursor: pointer;
    color: var(--muted);
    line-height: 1;
    display: flex;
    align-items: center;
}

.password-toggle:hover {
    color: var(--text);
    background: #fff;
}

.password-toggle:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.password-toggle__icon {
    font-size: 18px;
    display: inline-block;
    line-height: 1;
}

/* ====================== Consolidare (Faza 6.8) ====================== */

.consolidate-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    padding: 14px 18px;
    background: rgba(25, 118, 210, 0.06);
    border-radius: var(--radius);
    border: 1px solid rgba(25, 118, 210, 0.2);
}

.consolidate-bar #selected-count {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    min-width: 32px;
    text-align: center;
}

.consolidate-bar button {
    margin-left: auto;
}

.consolidate-bar button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Toggle iOS-like (pt selectia de notite) */
.toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
    user-select: none;
}

.toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle__slider {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #ccc;
    border-radius: 24px;
    transition: background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.toggle__slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 2px;
    top: 2px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.toggle input[type="checkbox"]:checked + .toggle__slider {
    background: var(--accent);
}

.toggle input[type="checkbox"]:checked + .toggle__slider::before {
    transform: translateX(20px);
}

/* Randuri "consolidate" (deja folosite ca sursa) */
.is-consolidated {
    opacity: 0.55;
    background: #fafafa;
}

.is-consolidated:hover {
    opacity: 0.85;
}

.badge--consolidated {
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 11px;
}

/* ====================== Quick actions (pe index.php) ====================== */

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    margin: 20px 0 28px;
}

.btn--quick {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 24px 28px;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
    gap: 4px;
    min-height: 150px;
}

.btn--quick:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.25);
}

.btn--quick--secondary {
    background: #fff;
    color: var(--accent);
    border: 1px solid var(--accent);
}

.btn--quick--secondary:hover {
    background: rgba(25, 118, 210, 0.06);
    color: var(--accent);
}

.quick-actions__icon {
    font-size: 28px;
    line-height: 1;
    margin-bottom: 4px;
}

.quick-actions__label {
    font-size: 17px;
    font-weight: 600;
}

.quick-actions__hint {
    font-size: 12px;
    opacity: 0.85;
    font-weight: 400;
    margin-top: 2px;
}

.btn--quick--secondary .quick-actions__hint {
    color: var(--muted);
    opacity: 1;
}

/* ============================================================================
 *  MODULUL PROIECTE (Felia 1) — proiecte.php + proiect.php
 *  Mutat din blocurile <style> inline: CSS-ul nu se pastreaza in fisierele de cod.
 *  (Valorile dinamice — culoare prioritate, culoare buton hub, indentare rand —
 *   raman inline in markup pentru ca depind de date, nu de stil.)
 * ========================================================================== */

/* utilitare */
.is-hidden { display: none !important; }
.spacer { flex: 1; }

/* campuri de formular partajate (creare + modale) */
.fld { display: block; font-size: 12.5px; font-weight: 600; color: #374151; margin: 10px 0 4px; }
.f { width: 100%; border: 1px solid #d5dbe1; border-radius: var(--radius); padding: 8px 10px; font-size: 13.5px; font-family: inherit; }
.frow { display: flex; gap: 12px; flex-wrap: wrap; }
.fcol { flex: 1 1 240px; }
.fcol--fix { flex: 0 1 170px; }
.err { color: var(--error); font-size: 12.5px; margin-top: 8px; }
.err:empty { display: none; }
.check-label { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13.5px; cursor: pointer; }
.form-actions { margin-top: 12px; display: flex; gap: 8px; }

/* badge-uri / chip-uri proiect (NU refolosim .badge global = badge RBAC) */
.type-badge { display: inline-block; background: #ede7f6; color: #5e35b1; border: 1px solid #d1c4e9; border-radius: 12px; padding: 1px 9px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.type-badge--none { background: #eceff1; color: #607d8b; border-color: #cfd8dc; }
.prj-badge { display: inline-block; border-radius: 10px; padding: 2px 9px; font-size: 11px; font-weight: 600; border: 1px solid; }
.prj-badge--active { background: #e8f5e9; color: #2e7d32; border-color: #a5d6a7; }
.prj-badge--inactive { background: #fdf6e3; color: #8a6d3b; border-color: #f0e0b8; }
.prj-badge--lang { background: #eceff1; color: #546e7a; border-color: #cfd8dc; }
.prio-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: #455; background: #f4f6f8; border: 1px solid #e2e8ee; border-radius: 12px; padding: 2px 9px; }
.prio-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.inactive-badge { font-size: 11px; font-weight: 600; color: #8a6d3b; background: #fdf6e3; border: 1px solid #f0e0b8; border-radius: 12px; padding: 1px 9px; }

/* lista proiecte (proiecte.php) */
.proj-listhead { display: flex; align-items: center; gap: 12px; }
.proj-listhead h2 { flex: 1; margin: 0; }
.plist { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.pcard { border: 1px solid #e6ebf0; border-radius: 8px; padding: 12px 14px; background: #fff; cursor: pointer; display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.pcard:hover { border-color: var(--accent); box-shadow: 0 1px 6px rgba(25,118,210,.08); }
.pcard--inactive { opacity: .62; }
.pcard .pmain { flex: 1; min-width: 0; }
.pcard h3 { margin: 0; font-size: 19px; font-weight: 700; color: #16202c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pid { flex: 0 0 auto; align-self: flex-start; font-size: 12px; font-weight: 700; color: #5a6673; background: #eef2f6; border: 1px solid #dde5ec; border-radius: 6px; padding: 2px 8px; font-variant-numeric: tabular-nums; }
.pdel { flex: 0 0 auto; background: none; border: 1px solid #e2c4c4; color: var(--error); border-radius: var(--radius); padding: 5px 9px; font-size: 13px; cursor: pointer; line-height: 1; }
.pdel:hover { background: #fdeceb; border-color: var(--error); }
.pcard .pline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 3px; }
.pcard .meta { display: flex; gap: 8px; flex-wrap: wrap; flex: 0 0 auto; }
.kpi { background: #f7f9fb; border: 1px solid #e6ebf0; border-radius: 8px; padding: 3px 9px; font-size: 11.5px; white-space: nowrap; }
.pcard .open { flex: 0 0 auto; color: var(--accent); font-weight: 600; font-size: 13px; }
.pmuted { color: var(--muted); font-size: 12.5px; }
.proj-empty { margin-top: 16px; color: var(--muted); }
.pdesc { margin-top: 6px; font-size: 14.5px; color: #1f2937; line-height: 1.6; }
.pdesc.clamp { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.pdesc-toggle, .scope-toggle { margin-top: 4px; background: none; border: none; color: var(--accent); font-size: 12.5px; font-weight: 600; cursor: pointer; padding: 2px 0; }
.pdesc-toggle:hover, .scope-toggle:hover { text-decoration: underline; }

/* formular creare proiect */
.newform { margin-top: 12px; border: 1px dashed #cfd8e3; border-radius: 10px; padding: 14px; background: #fafbfc; }
.newform .pmuted { margin-top: 4px; }
.newform textarea.f { min-height: 130px; line-height: 1.6; }

/* pagina proiect: antet */
.back-link { color: var(--muted); text-decoration: none; font-size: 12.5px; }
.prj-header { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; margin-top: 8px; }
.prj-header__main { flex: 1; min-width: 260px; }
.prj-header__main h2 { margin: 0; }
.prj-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.prj-type-row { margin-top: 6px; }
.prj-dates { color: #8a94a0; font-size: 12px; margin: 6px 0 0; }
.hdr-actions { display: flex; flex-direction: column; gap: 8px; }
.btn--danger-ghost { background: #fff; color: var(--error); border: 1px solid #e2c4c4; }
.btn--danger-ghost:hover { background: #fdeceb; }
.prj-scope-wrap { margin: 14px 0 4px; }
.prj-scope { color: #16202c; font-size: 15.5px; line-height: 1.75; width: 100%; }
.prj-scope.clamp { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.health { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.htile { background: #f7f9fb; border: 1px solid #e6ebf0; border-radius: 8px; padding: 6px 12px; font-size: 12px; color: #455; }
.htile b { font-size: 15px; color: var(--accent); display: block; }

/* hub butoane */
.hub { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 4px; }
.hb { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius); font-weight: 600; font-size: 13px; color: #fff; border: none; cursor: pointer; text-decoration: none; opacity: .55; filter: grayscale(.25); }
.hb:hover { opacity: .8; }
/* buton de hub ACTIV (functional) — culoare plina, fara estompare, usor ridicat, ca sa se
   distinga de placeholder-ele „in curand" (care raman la opacity .55 + grayscale). */
.hb--active { opacity: 1; filter: none; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.hb--active:hover { opacity: 1; box-shadow: 0 3px 9px rgba(0,0,0,.26); }
.hb .soon-tag { background: rgba(255,255,255,.28); border-radius: 8px; font-size: 9.5px; padding: 0 6px; font-weight: 700; }
.hub-note { font-size: 11.5px; color: #9aa2ac; width: 100%; margin-top: 2px; }

/* ============================================================================
   HUB PROIECT v2 — carduri in stil dashboard (indigo AP). Inlocuieste .hb rainbow.
   Tokenii --ap-i* sunt definiti la :root (bloc TEMA INDIGO). Sectiune colapsabila .phub.
   ZERO culori inline in markup; fara secventa de inchidere de comentariu in text.
   ============================================================================ */
.phub { margin: 16px 0 4px; border: 1px solid var(--ap-i050, #eceaf7); border-radius: 14px; overflow: hidden; background: #f5f4fb; }
.phub > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 13px 16px; font-weight: 800; color: var(--ap-i900, #221f52); font-size: 14px; }
.phub > summary::-webkit-details-marker { display: none; }
.phub > summary .phub-ic { font-size: 16px; }
.phub > summary .phub-chev { margin-left: auto; color: var(--ap-i600, #4d49ab); transition: transform .2s; font-size: 13px; }
.phub[open] > summary .phub-chev { transform: rotate(90deg); }
.phub-body { padding: 4px 16px 18px; }
.phub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 14px; }

.pc { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--ap-i050, #eceaf7); border-radius: 14px; padding: 16px 18px; box-shadow: 0 4px 14px rgba(11,61,63,.06); display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; transition: transform .15s, box-shadow .15s, border-color .15s; }
.pc::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--ap-i600, #4d49ab); }
.pc:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(11,61,63,.10); border-color: var(--ap-i500, #6a66c9); }
.pc .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--ap-i050, #eceaf7); color: var(--ap-i700, #3d3a8f); display: grid; place-items: center; font-size: 21px; margin-bottom: 2px; }
.pc h3 { font-size: 1.02rem; color: #16232b; font-weight: 700; margin: 0; line-height: 1.25; }
.pc p { font-size: 13px; color: #43555f; margin: 0; line-height: 1.45; }
.pc .go { margin-top: auto; padding-top: 6px; font-size: 13px; font-weight: 700; color: var(--ap-i700, #3d3a8f); }

/* Placeholder „in curand" — indigo estompat, conturat punctat. */
.pc--soon { background: var(--ap-i050, #eceaf7); border-style: dashed; box-shadow: none; cursor: default; }
.pc--soon::before { background: var(--ap-i050, #eceaf7); }
.pc--soon:hover { transform: none; box-shadow: none; border-color: var(--ap-i050, #eceaf7); }
.pc--soon .ic { background: #fff; color: var(--ap-i500, #6a66c9); }
.pc--soon h3 { color: var(--ap-i700, #3d3a8f); }
.pc .soon-tag { position: absolute; top: 12px; right: 12px; background: var(--ap-i600, #4d49ab); color: #fff; font-size: 9px; font-weight: 800; letter-spacing: .03em; padding: 2px 8px; border-radius: 999px; }

/* Subsectiunea Administrare (doar admin). */
.phub-admin { margin-top: 16px; }
.phub-admin-h { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: #6b7c85; font-weight: 800; margin: 0 0 9px; display: flex; align-items: center; gap: 8px; }
.phub-admin-tag { background: #334155; color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 9px; letter-spacing: .03em; }
.pc--admin::before { background: #64748b; }
.pc--admin .ic { background: #eef1f4; color: #475569; }
.pc--admin .go { color: #475569; }

@media (max-width: 520px) { .phub-grid { grid-template-columns: 1fr; } }

/* Stub project_knowledge.php — nota „in curand". */
.pk-lead { color: #43555f; margin: 6px 0 14px; }
.pk-soon { display: flex; align-items: center; gap: 10px; background: var(--ap-i050, #eceaf7); border: 1px dashed var(--ap-i500, #6a66c9); border-radius: 12px; padding: 12px 14px; color: var(--ap-i700, #3d3a8f); font-size: 14px; }
.pk-soon__tag { background: var(--ap-i600, #4d49ab); color: #fff; font-size: 9.5px; font-weight: 800; letter-spacing: .03em; padding: 2px 8px; border-radius: 999px; }

/* toolbar + arbore sectiuni */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 8px; align-items: center; }
.toolbar-hint { color: var(--muted); font-size: 12.5px; }
.tree { border: 1px solid #eceff1; border-radius: 8px; overflow: hidden; }
.srow { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid #f0f2f5; background: #fff; }
.srow:hover { background: #fafcff; }
.srow.dragover { background: #eef4fb; box-shadow: inset 0 2px 0 var(--accent); }
.srow .num { color: #8a94a0; font-variant-numeric: tabular-nums; min-width: 44px; font-weight: 600; font-size: 12.5px; }
.srow .nm { flex: 1; font-size: 13.5px; }
.srow.d0 .nm { font-weight: 600; }
.srow .nm .stype { margin-left: 8px; font-size: 10.5px; font-weight: 600; color: #5e35b1; background: #ede7f6; border: 1px solid #d1c4e9; border-radius: 9px; padding: 0 7px; vertical-align: middle; }
.srow .arts { font-size: 11.5px; color: #1565c0; background: #e3f2fd; border: 1px solid #bbdefb; border-radius: 10px; padding: 1px 8px; cursor: pointer; }
.srow .arts.warn { color: #a5680b; background: #fff8e1; border-color: #ffe082; }
.srow .acts { display: flex; gap: 4px; opacity: .4; }
.srow:hover .acts { opacity: 1; }
.mini { font-size: 12px; border: 1px solid #d5dbe1; background: #fff; border-radius: var(--radius); padding: 3px 7px; cursor: pointer; color: #37474f; line-height: 1; }
.mini:hover { border-color: var(--accent); color: var(--accent); }
.mini.danger:hover { border-color: var(--error); color: var(--error); }
.drag { cursor: grab; color: #b0bcc9; user-select: none; }
.srow .sinfo { font-size: 11.5px; color: #0e7490; background: #e0f7fa; border: 1px solid #b2ebf2; border-radius: 10px; padding: 1px 8px; cursor: pointer; user-select: none; }
.exp { background: #f8fbff; border-bottom: 1px solid #eef2f7; padding: 10px 14px 12px 56px; }
.exp-desc { background: #f8fbff; border-bottom: 1px solid #eef2f7; padding: 10px 14px 12px 56px; white-space: pre-wrap; color: #16202c; font-size: 13px; line-height: 1.6; }
.exp-desc .eh { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; color: #0e7490; margin-bottom: 4px; }
/* #3: panou imbunatatire cu AI (proiect + sectiune) */
.btn--ai { background: #5e35b1; }
.btn--ai:hover { background: #4527a0; }
.ai-panel { margin-top: 12px; border: 1px solid #e5d8f5; background: #faf7fe; border-radius: 10px; padding: 12px; }
.ai-panel .ai-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ai-panel .ai-head b { font-size: 12.5px; color: #5e35b1; }
.ai-row { display: flex; gap: 8px; align-items: center; }
.ai-row .f { flex: 1; }
.ai-preview { margin-top: 10px; border: 1px solid #d7e3ef; background: #fff; border-radius: 8px; overflow: hidden; }
.ai-preview .ph { background: #f2f7fc; border-bottom: 1px solid #e3edf6; padding: 6px 10px; font-size: 11.5px; font-weight: 700; color: #1565c0; text-transform: uppercase; letter-spacing: .3px; }
.ai-preview .pb { padding: 10px 12px; font-size: 13px; line-height: 1.6; max-height: 220px; overflow: auto; white-space: pre-wrap; }
.ai-preview .pf { display: flex; gap: 8px; align-items: center; border-top: 1px solid #eef2f7; padding: 8px 10px; flex-wrap: wrap; }
.ai-preview .ins { color: #8a6d3b; font-size: 12px; }
.ai-panel .lock { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #a5680b; background: #fff8e1; border: 1px solid #ffe082; border-radius: 8px; padding: 6px 10px; }
/* Variante de titlu secțiune (reword titlu — alegere din mai multe) */
.sectitle-opts { display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; }
.sectitle-opt { text-align: left; white-space: normal; }
/* Taburi în modala de secțiune (Titlu / Scope) */
.sec-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: 0 0 14px; }
.sec-tab { appearance: none; background: none; border: 0; border-bottom: 2.5px solid transparent; padding: 8px 14px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; }
.sec-tab.on { color: var(--text); border-bottom-color: #5e35b1; }
.sec-tabpanel { margin-bottom: 4px; }
/* Bilă de calitate (titlu+scope finalizate) */
.qdot { width: 13px; height: 13px; flex: 0 0 auto; border-radius: 50%; border: 1.5px solid #c7ccd2; background: #fff; cursor: pointer; padding: 0; margin: 0 2px; }
.qdot:hover { border-color: #2e7d32; }
.qdot.on { background: #2e7d32; border-color: #2e7d32; box-shadow: 0 0 0 2px #e7f4e8; }
.qcheck { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text); cursor: pointer; margin-right: auto; }
.qcheck .qdot { cursor: default; }
/* Audit structură */
.audit-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.audit-summary { font-size: 13.5px; color: var(--text); line-height: 1.6; margin-bottom: 12px; }
.audit-out { display: flex; flex-direction: column; gap: 10px; }
.audit-ok { color: #2e7d32; font-weight: 600; font-size: 14px; }
.audit-item { border: 1px solid var(--border); border-left: 4px solid #c7ccd2; border-radius: 8px; padding: 10px 12px; background: #fff; }
.audit-item.sev-high { border-left-color: #c62828; }
.audit-item.sev-medium { border-left-color: #ef8f00; }
.audit-item.sev-low { border-left-color: #90a4ae; }
.audit-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.audit-cat { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; padding: 2px 7px; border-radius: 5px; background: #eef1f4; color: #37474f; }
.audit-cat.cat-redundancy { background: #fff3e0; color: #a5680b; }
.audit-cat.cat-contradiction { background: #fbe9e9; color: #8a1c1c; }
.audit-cat.cat-clarity { background: #e8eef7; color: #1a4f8a; }
.audit-cat.cat-gap { background: #ede7f6; color: #5e35b1; }
.audit-cat.cat-order { background: #e0f2f1; color: #00695c; }
.audit-sev { font-size: 11px; color: var(--muted); }
.audit-ttl { font-weight: 600; font-size: 13.5px; }
.audit-detail { font-size: 13px; color: var(--text); line-height: 1.55; margin: 2px 0 6px; }
.audit-secs { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.audit-sec { font-size: 12px; border: 1px solid var(--border); background: #f7f9fb; color: #1a4f8a; border-radius: 20px; padding: 2px 10px; cursor: pointer; }
.audit-sec:hover { background: #eef4fb; border-color: #cfe0f3; }
.audit-sug { font-size: 12.5px; color: #33414f; background: #f6faf6; border: 1px solid #d7ead9; border-radius: 6px; padding: 6px 9px; margin-top: 4px; }
.art { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 12.5px; border-bottom: 1px dashed #e6ebf0; }
.art .t { flex: 1; }
.art .k { color: #5e35b1; font-weight: 600; white-space: nowrap; }
.art .yr { color: #8a94a0; }
.addart { display: flex; gap: 6px; margin-top: 8px; }
.addart input { flex: 1; border: 1px solid #d5dbe1; border-radius: var(--radius); padding: 6px 9px; font-size: 12.5px; }
.aclist { margin-top: 6px; max-height: 180px; overflow: auto; border: 1px solid #eef2f7; border-radius: var(--radius); }
.acrow { display: flex; align-items: center; gap: 8px; padding: 5px 9px; font-size: 12px; border-bottom: 1px solid #f2f5f8; }
.acrow .t { flex: 1; }
.acrow .k { color: #5e35b1; font-weight: 600; white-space: nowrap; }

/* ---- Audit integrat în structură: workspace 2 panouri (Direcția 2, 2026-09-16) ----
   In mod normal panoul stang e full-width (identic cu inainte de audit); butonul
   „Audit structura" adauga .audit-mode pe #prjCard -> grila 2 coloane, hub + health
   ascunse, panoul de audit (dreapta) vizibil. */
.prj-work__right { display: none; }
.audit-only { display: none; }
#prjCard.audit-mode .hub,
#prjCard.audit-mode .phub,
#prjCard.audit-mode .health { display: none; }
#prjCard.audit-mode .audit-only { display: flex; }
#prjCard.audit-mode .prj-work { display: grid; grid-template-columns: 1.05fr .95fr; gap: 0; align-items: start; }
#prjCard.audit-mode .prj-work__left { border-right: 1px solid #eceff1; padding-right: 16px; min-width: 0; }
#prjCard.audit-mode .prj-work__right { display: block; padding-left: 16px; min-width: 0; }
@media (max-width: 860px) {
  #prjCard.audit-mode .prj-work { grid-template-columns: 1fr; }
  #prjCard.audit-mode .prj-work__left { border-right: none; border-bottom: 1px solid #eceff1; padding-right: 0; padding-bottom: 14px; }
  #prjCard.audit-mode .prj-work__right { padding-left: 0; padding-top: 14px; }
}
.panehd { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 2px 0 12px; }
.btn--xs { padding: 3px 9px; font-size: 12px; }
.audit-hint { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.audit-credits { font-size: 11.5px; color: #00695c; background: #e0f2f1; border: 1px solid #b2dfdb; border-radius: 999px; padding: 2px 9px; }

/* flag ⚠ pe rand (cel mai sever + contor) — clickabil, sare la constatare */
.srow .flag { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 8px; white-space: nowrap; cursor: pointer; border: 1px solid transparent; }
.srow .flag.sev-high { color: #c62828; background: #fbe9e9; border-color: #f3c9c9; }
.srow .flag.sev-medium { color: #a5680b; background: #fff3e0; border-color: #ffe0b2; }
.srow .flag.sev-low { color: #607d8b; background: #eef1f4; border-color: #dfe4e9; }
.srow.hl { background: #f3edfb; box-shadow: inset 0 0 0 1px #cbb6ef; }

/* constatare: stare selectata (din click pe ⚠) / rezolvata + bifa */
.audit-item.sel { box-shadow: 0 0 0 2px #cbb6ef; }
.audit-item.done { opacity: .55; }
.audit-item.done .audit-ttl { text-decoration: line-through; }
/* constatare „decisa" de user (toate sectiunile ei au bila verde) — decizia ta invinge auditul */
.audit-item.decided { opacity: .62; border-left-color: #2e7d32; }
.audit-decided { font-size: 10.5px; font-weight: 700; color: #2e7d32; background: #e7f4e8; border: 1px solid #b9dfbd; border-radius: 999px; padding: 1px 8px; margin-left: 4px; }
.audit-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.done-lbl { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); cursor: pointer; }
.done-lbl input { position: absolute; opacity: 0; width: 0; height: 0; }
.done-lbl .ck { width: 15px; height: 15px; border: 1.5px solid #c7ccd2; border-radius: 4px; display: inline-block; position: relative; }
.audit-item.done .done-lbl .ck { background: #2e7d32; border-color: #2e7d32; }
.audit-item.done .done-lbl .ck::after { content: "✓"; color: #fff; font-size: 11px; line-height: 1; position: absolute; left: 2px; top: -1px; }

/* prompt gata de copiat in enrich (titlu/scope) */
.audit-enrich { margin-top: 6px; border: 1px solid #e5d8f5; background: #faf7fe; border-radius: 8px; padding: 8px 10px; }
.audit-enrich .ae-head { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #5e35b1; margin-bottom: 5px; }
.audit-enrich .ae-tgt { font-weight: 600; color: #7c3aed; }
.audit-enrich .ae-body { font-size: 12.5px; color: #2a2340; line-height: 1.55; white-space: pre-wrap; background: #fff; border: 1px solid #ece3fb; border-radius: 6px; padding: 6px 8px; }
.audit-enrich .ae-acts { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }

/* ---- Audit cu registru + tracing (Direcția 2, 2026-09-16) ---- */
/* linia de diff pe rulare */
.audit-diff { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; background: #f4f6f8; border: 1px solid #e6ebf0; border-radius: 9px; padding: 8px 11px; }
.runpill { font-size: 12px; font-weight: 700; color: #5e35b1; background: #ede7f6; border: 1px solid #d1c4e9; border-radius: 999px; padding: 3px 11px; }
.pip { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; border-radius: 999px; padding: 1px 9px; font-size: 12px; }
.pip.new { color: #5e35b1; background: #ede7f6; }
.pip.fixed { color: #2e7d32; background: #e7f4e8; }
.pip.open { color: #a5680b; background: #fff8e1; }
.pip.dec { color: #607d8b; background: #eef1f4; border: 1px solid #dfe4e9; }

/* grupuri Deschise / Rezolvate / Decise */
.audit-group { margin-bottom: 10px; }
.audit-grouphd { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px; margin: 8px 0 8px; }
.audit-grouphd .cnt { color: #9aa2ac; font-weight: 600; }
.audit-grouphd .chev { margin-left: auto; color: #9aa2ac; transition: transform .15s; }
details.audit-fold > summary { display: block; list-style: none; cursor: pointer; }
details.audit-fold > summary::-webkit-details-marker { display: none; }
details.audit-fold > summary::marker { content: ""; }
details.audit-fold[open] .audit-grouphd .chev { transform: rotate(90deg); }

/* istoric per constatare */
.audit-hist { margin-left: auto; font-size: 11px; color: #9aa2ac; white-space: nowrap; }

/* actiune „marchează rezolvat" pe o constatare deschisă */
.audit-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.audit-close { font-size: 11.5px; color: #2e7d32; border: 1px solid #b9dfbd; background: #f2faf3; border-radius: 6px; padding: 2px 9px; cursor: pointer; }
.audit-close:hover { background: #e7f4e8; }

/* constatare rezolvată (în grupul Rezolvate) */
.audit-item.fixed { opacity: .72; border-left-color: #2e7d32; background: #f6fbf6; }
.audit-item.fixed .audit-ttl { text-decoration: line-through; color: var(--muted); }
.fixed-line { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12px; color: #2e7d32; margin-top: 2px; }
.fixed-why { font-size: 12px; color: var(--muted); margin-top: 4px; font-style: italic; }
.audit-reopen { margin-left: auto; font-size: 11.5px; color: #5e35b1; border: 1px solid #d1c4e9; background: #fff; border-radius: 6px; padding: 2px 9px; cursor: pointer; }
.audit-reopen:hover { background: #ede7f6; }

/* taburi Deschise / Rezolvate / Decise (sus în panoul de audit) */
.audit-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid #eceff1; margin-bottom: 6px; }
.audit-tab { appearance: none; background: none; border: 0; border-bottom: 2.5px solid transparent; padding: 7px 12px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.audit-tab:hover { color: var(--text); }
.audit-tab.on { color: var(--text); border-bottom-color: #5e35b1; }
.audit-tab .cnt { font-size: 11px; font-weight: 700; color: #5a6673; background: #eef2f6; border: 1px solid #dde5ec; border-radius: 10px; padding: 0 7px; min-width: 18px; text-align: center; }
.audit-tab.on .cnt { color: #5e35b1; background: #ede7f6; border-color: #d1c4e9; }
.audit-tabbody { display: flex; flex-direction: column; gap: 10px; }

/* numărul stabil al constatării (trasabilitate) */
.audit-no { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; font-weight: 700; color: #5a6673; background: #eef2f6; border: 1px solid #dde5ec; border-radius: 5px; padding: 0 6px; }

/* ---- Audit pe capitole: bara de taburi-săgeată (full-width în mod audit) ---- */
.audit-chapters { display: none; }
#prjCard.audit-mode .audit-chapters { display: flex; flex-wrap: wrap; align-items: center; grid-column: 1 / -1; padding: 2px 0 12px; }
.atab { position: relative; background: #eef1f3; color: #55636e; font-family: inherit; font-weight: 600; font-size: 12.5px; padding: 7px 16px 7px 24px; margin-left: -11px; border: 0; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 50%, calc(100% - 11px) 100%, 0 100%, 11px 50%); }
.atab:first-child { margin-left: 0; padding-left: 14px; clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 50%, calc(100% - 11px) 100%, 0 100%); }
.atab:hover { background: #e3e8ec; z-index: 1; }
.atab.on { background: #5e35b1; color: #fff; z-index: 2; }
.atab .cno { font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; opacity: .85; }
.atab .cnt { font-size: 10.5px; font-weight: 700; background: rgba(0,0,0,.10); border-radius: 999px; padding: 0 6px; min-width: 16px; text-align: center; }
.atab.on .cnt { background: rgba(255,255,255,.22); }
.atab.clean .cnt { background: #e7f4e8; color: #2e7d32; }
.atab.on.clean .cnt { background: rgba(255,255,255,.22); color: #fff; }
.atab.gen { margin-left: 14px; padding: 7px 13px; clip-path: none; border-radius: 9px; background: #fff; border: 1px solid #c6cfd6; color: #131a20; }
.atab.gen.on { background: #1a4f8a; border-color: #1a4f8a; color: #fff; }
.atab.gen .cnt { background: #e8eef7; color: #1a4f8a; }
.atab.gen.on .cnt { background: rgba(255,255,255,.22); color: #fff; }

/* banner „tolerant" în tabul Observații generale */
.audit-tolbanner { font-size: 12.5px; color: #1a4f8a; background: #e8eef7; border: 1px solid #cfe0f3; border-radius: 9px; padding: 9px 12px; margin-bottom: 12px; }

/* tabul „Istoric" (toate rulările) */
.atab.hist { margin-left: 8px; padding: 7px 13px; clip-path: none; border-radius: 9px; background: #fff; border: 1px solid #c6cfd6; color: #131a20; }
.atab.hist.on { background: #37474f; border-color: #37474f; color: #fff; }
.hist-head { font-weight: 700; font-size: 12px; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); margin: 2px 0 10px; }
.hist-row { border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; margin-bottom: 8px; background: #fff; }
.hist-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.hist-when { margin-left: auto; font-size: 11.5px; color: #9aa2ac; font-variant-numeric: tabular-nums; }
.hist-pips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.hist-bar { height: 7px; background: #eef2f6; border-radius: 999px; overflow: hidden; }
.hist-bar > span { display: block; height: 100%; background: #a5680b; border-radius: 999px; }
/* dinamica: ce constatări apar / se închid la fiecare rulare */
.hist-group { margin-top: 8px; }
.hist-gl { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; margin: 4px 0 3px; }
.hist-gl.new { color: #5e35b1; }
.hist-gl.fixed { color: #2e7d32; }
.hist-find { display: flex; align-items: center; gap: 7px; width: 100%; text-align: left; background: #fafbfc; border: 1px solid #eef2f7; border-radius: 6px; padding: 4px 8px; margin: 3px 0; font-size: 12.5px; color: var(--text); cursor: pointer; }
.hist-find:hover { border-color: var(--accent); background: #f7f4fd; }
.hist-find .hist-loc { margin-left: auto; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; color: #8a94a0; background: #eef2f6; border: 1px solid #dde5ec; border-radius: 5px; padding: 0 6px; }
.hist-none { font-size: 12px; color: var(--muted); margin-top: 6px; font-style: italic; }

/* modale + toast */
.ov { position: fixed; inset: 0; background: rgba(20,30,45,.45); display: none; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 50; }
.ov.on { display: flex; }
.modal { background: #fff; border-radius: 12px; max-width: 640px; width: 100%; box-shadow: 0 12px 40px rgba(0,0,0,.25); overflow: hidden; }
.modal--sm { max-width: 460px; }
.modal.big { max-width: 820px; }
.modal h3 { margin: 0; padding: 14px 18px; border-bottom: 1px solid #eceff1; font-size: 15px; }
.modal .mbody { padding: 16px 18px; max-height: 74vh; overflow: auto; }
.modal .mbody p { margin: 0; }
.modal .mfoot { display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid #eceff1; flex-wrap: wrap; align-items: center; }
.modal textarea.f--tall { min-height: 220px; line-height: 1.6; }
.accent-purple { color: #5e35b1; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: #323a45; color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 13px; box-shadow: 0 6px 24px rgba(0,0,0,.25); opacity: 0; transition: opacity .18s, transform .18s; z-index: 80; pointer-events: none; max-width: 80vw; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--error); }
.toast.ok { background: var(--success); }

/* pagina placeholder „in curand" (proiect_curand.php) */
.proj-soon { text-align: center; padding: 48px 24px; }
.proj-soon__icon { font-size: 44px; line-height: 1; margin-bottom: 10px; }
.proj-soon h2 { margin: 0 0 8px; }
.proj-soon__feat { color: #5e35b1; }
.proj-soon p { color: var(--muted); max-width: 520px; margin: 0 auto 18px; }

/* ============================================================================
   MATERIALE (M1) — wizard „Adauga material" (materiale_add.php)
   Vezi MATERIALE_AP_spec.md §6.2. Refoloseste .card/.btn/.form-group/.alert.
   ============================================================================ */

/* indicator pasi */
.mat-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 18px; padding: 0; margin: 4px 0 20px; }
.mat-step-ind { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.mat-step-num { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; background: #fff; }
.mat-step-ind.is-current { color: var(--accent); }
.mat-step-ind.is-current .mat-step-num { border-color: var(--accent); background: var(--accent); color: #fff; }
.mat-step-ind.is-done .mat-step-num { border-color: var(--accent); color: var(--accent); }

/* pas 1: alegeri */
.mat-choices { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 620px) { .mat-choices { grid-template-columns: 1fr 1fr 1fr; } }
.mat-choice { text-align: left; border: 1.5px solid var(--border); background: #fff; border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; font-family: inherit; }
.mat-choice:hover:not(.is-disabled) { border-color: var(--accent); }
.mat-choice.is-selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.mat-choice.is-disabled { opacity: 0.55; cursor: not-allowed; }
.mat-choice__h { font-size: 14px; font-weight: 700; color: var(--text); }
.mat-choice__d { font-size: 12px; color: var(--muted); line-height: 1.4; flex: 1; }
.mat-soon { font-size: 10.5px; font-weight: 600; color: var(--warning); border: 1px solid #f0e2b0; background: #fffbe9; border-radius: 20px; padding: 1px 7px; margin-left: 4px; }

/* chip-uri capabilitate/status */
.chip { display: inline-flex; align-items: center; gap: 6px; border-radius: 20px; padding: 2px 10px; font-size: 11px; font-weight: 600; border: 1px solid transparent; white-space: nowrap; align-self: flex-start; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.85; }
.chip--ok { color: var(--success); background: #e7f2e8; border-color: #cfe3d1; }
.chip--ref { color: #41597a; background: #eaf0f7; border-color: #d6e0ee; }
.chip--ocr { color: var(--warning); background: #fdf4e0; border-color: #f0e2b0; }

/* pas 2: drop + staging */
.mat-drop { border: 1.5px dashed #b8c4d0; border-radius: var(--radius); background: var(--bg); padding: 22px 14px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.mat-drop.is-over { border-color: var(--accent); background: #eef4fb; }
.mat-drop strong { color: var(--text); font-size: 14px; }
.mat-drop__types { font-size: 11.5px; margin-top: 2px; }
.mat-drop .btn { margin-top: 10px; }
.mat-stage { list-style: none; padding: 0; margin: 12px 0 0; border: 1px solid var(--border); border-radius: var(--radius); }
.mat-stage:empty { display: none; }
.mat-stage__row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.mat-stage__row:last-child { border-bottom: 0; }
.mat-stage__title { flex: 1; min-width: 120px; border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 9px; font-size: 13px; font-family: inherit; }
.mat-stage__conv { font-size: 11.5px; white-space: nowrap; }
.mat-stage__rm { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 4px 6px; font-size: 14px; line-height: 1; }
.mat-stage__rm:hover { color: var(--error); }

/* foot */
.mat-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--border); }
.mat-quota { font-size: 12.5px; }
.mat-quota b { color: var(--text); }
.mat-foot__btns { display: flex; gap: 9px; }

/* ============================================================================
   RECOMANDĂ ARTICOLE (rec-mode) — buton „Recomandă articole" -> panou dublu inline.
   Oglinda .audit-mode. Fix de specificitate: #recPane (id) învinge regula generică
   .prj-work__right{display:block} din audit-mode, ca panourile să NU se suprapună.
   ========================================================================== */
.btn--pri { background: var(--accent); color: #fff; }
.btn--pri:hover { background: var(--accent-hover); }

#prjCard.audit-mode #recPane { display: none; }              /* audit nu arată panoul rec */
#prjCard.rec-mode .hub,
#prjCard.rec-mode .phub,
#prjCard.rec-mode .health { display: none; }
#prjCard.rec-mode .audit-only { display: flex; }
#prjCard.rec-mode .prj-work { display: grid; grid-template-columns: 1.05fr .95fr; gap: 0; align-items: start; }
#prjCard.rec-mode .prj-work__left { border-right: 1px solid #eceff1; padding-right: 16px; min-width: 0; }
#prjCard.rec-mode #recPane { display: block; padding-left: 16px; min-width: 0; }
@media (max-width: 920px) {
  #prjCard.rec-mode .prj-work { grid-template-columns: 1fr; }
  #prjCard.rec-mode .prj-work__left { border-right: none; border-bottom: 1px solid #eceff1; padding-right: 0; padding-bottom: 14px; }
  #prjCard.rec-mode #recPane { padding-left: 0; padding-top: 14px; }
}

/* rând selectat în arbore (secțiunea-țintă) */
.srow.recsel { background: #f3edfb; box-shadow: inset 0 0 0 1px #cbb6ef; }

/* corpul panoului */
.rec-body { min-width: 0; }
.rec-hint { color: var(--muted); font-size: 13px; padding: 8px 2px; }
.rec-muted { color: var(--muted); font-size: 12px; }
.rec-lbl { font-size: 11.5px; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); margin: 12px 0 6px; }

.rec-banner { display: flex; gap: 8px; background: #fff8e1; border: 1px solid #ffe082; border-radius: var(--radius); padding: 9px 12px; color: #7a5310; font-size: 12.5px; margin-bottom: 6px; }
.rec-banner .i { font-size: 15px; line-height: 1.2; }

.rec-qrow { display: flex; gap: 8px; align-items: stretch; }
.rec-qrow input { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 8px; padding: 8px 11px; font: inherit; }

.rec-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 4px; }
.rec-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.rec-chip .k { color: var(--muted); font-weight: 600; }
.rec-chip.on { background: #f3edfb; border-color: #b39ddb; }
.rec-chip .tag { font-size: 10.5px; border-radius: 999px; padding: 0 6px; background: #eef1f4; color: var(--muted); border: 1px solid var(--border); }
.rec-chip .tag.llm { background: #ede7f6; color: #5e35b1; border-color: #d1c4e9; }
.rec-qacts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

.rec-searchbar { display: flex; align-items: center; gap: 8px; margin: 16px 0 4px; flex-wrap: wrap; }
.rec-segs { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.rec-segs button { border: 0; background: #fff; color: var(--text); padding: 6px 12px; font: inherit; font-size: 12.5px; cursor: pointer; border-right: 1px solid var(--border); }
.rec-segs button:last-child { border-right: 0; }
.rec-segs button.on { background: var(--accent); color: #fff; }
.rec-meta { margin-left: auto; color: var(--muted); font-size: 12px; }

.rec-results { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.rec-rc { border: 1px solid var(--border); border-radius: var(--radius); padding: 11px 12px; background: #fff; }
.rec-rt { font-weight: 600; line-height: 1.35; }
.rec-rmeta { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.rec-inds { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.rec-ind { font-size: 11.5px; border: 1px solid var(--border); border-radius: 6px; padding: 2px 7px; color: var(--muted); background: var(--bg); display: inline-flex; gap: 5px; align-items: center; }
.rec-ind.cit { color: var(--text); }
.rec-ind.pdf { color: #1b7a4b; background: #e7f6ef; border-color: #bfe6d2; }
.rec-ind.nopdf { color: var(--muted); }
.rec-ind.lic { color: #7a5310; background: #fff3e0; border-color: #ffe0b2; }
.rec-racts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.rec-added { color: #1b7a4b; font-size: 12.5px; font-weight: 600; }

/* evaluare LLM (expandat) */
.rec-eval { margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 10px; }
.rec-gradline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rec-grad { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 10px; }
.rec-grad.primar { background: #d7f5e3; color: #0f6b40; }
.rec-grad.secundar { background: #fdecc8; color: #8a5a09; }
.rec-grad.tangential { background: #eef1f4; color: #5f6b76; }
.rec-prob { font-variant-numeric: tabular-nums; font-weight: 700; }
.rec-bar { height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; flex: 1; min-width: 80px; max-width: 180px; }
.rec-bar > i { display: block; height: 100%; background: #0f6b40; }
.rec-recom { font-size: 12px; border-radius: 6px; padding: 2px 8px; border: 1px solid var(--border); }
.rec-recom.da { color: #1b7a4b; background: #e7f6ef; border-color: transparent; }
.rec-recom.poate { color: #8a5a09; background: #fff3e0; border-color: transparent; }
.rec-recom.nu { color: #b23b3b; background: #fbe9e9; border-color: transparent; }
.rec-reason { font-size: 12.5px; color: var(--text); margin-top: 8px; }
.rec-evi { font-size: 12px; color: var(--muted); border-left: 3px solid var(--border); padding: 3px 0 3px 9px; margin-top: 7px; font-style: italic; }
.rec-prov { font-size: 11px; color: #a5680b; margin-top: 6px; }

/* rezultat PDF pe cardul adăugat (succes / eșec) */
.rec-pdf-ok { color: #1b7a4b; font-size: 12.5px; }
.rec-pdf-warn { color: #a5680b; font-size: 12.5px; }

/* paginare rezultate — buton „Încarcă încă" / notă „toate afișate" */
.rec-more { margin-top: 12px; text-align: center; }
.rec-more .rec-muted { font-size: 12px; }

/* ștergere versiune (× pe chip) + filtru tip */
.rec-chip { position: relative; }
.rec-chip-x { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; line-height: 1; padding: 0 0 0 4px; margin-left: 2px; }
.rec-chip-x:hover { color: #b23b3b; }
.rec-filters { margin: 8px 0 2px; }
.rec-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text); cursor: pointer; }
.rec-check input { margin: 0; }

/* bloc „Referințe recomandate de LLM" (deasupra căutării) */
.rec-reco { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin: 12px 0 4px; background: linear-gradient(180deg, var(--ai-weak, #f3edff), transparent 60px); }
.rec-reco-hd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rec-reco-hd .rec-lbl { flex: 1; }
.rec-reco-hint { color: var(--muted); font-size: 12px; margin: 4px 0 0; }
.rec-recs { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; }
.rec-recs:empty { margin-top: 0; }
.rec-dropped { color: var(--muted); font-size: 11.5px; font-style: italic; }
.rec-rc .rec-rt a, .rec-ind a { color: inherit; text-decoration: none; }
.rec-ind a { color: var(--accent); }
.rec-ind a:hover { text-decoration: underline; }

/* ============================================================================
 * TEMA INDIGO — HEADER GLOBAL (AP). Adăugat 2026-10-08.
 * Re-skin pentru shell-ul partajat (meniu + topbar) pe TOATE paginile, armonizat
 * cu dashboard-ul. Două blocuri: (1) meniul, (2) brand + user + limbă. Reversibil:
 * șterge acest bloc pentru a reveni la header-ul alb/albastru.
 * ========================================================================== */
:root{
  --ap-i900:#221f52; --ap-i700:#3d3a8f; --ap-i600:#4d49ab; --ap-i500:#6a66c9; --ap-i050:#eceaf7;
}

/* ---- Bloc 1: meniul — bandă indigo full-width, lista 80% centrată ---- */
.db-menu{ background:linear-gradient(135deg,var(--ap-i700),var(--ap-i900)); border-bottom:none; }
.db-menu-list{ padding:0; gap:2px; align-items:center; }

.db-menu-item > a,
.db-menu-details > summary{
  display:inline-flex; align-items:center; gap:6px;
  color:rgba(255,255,255,.82); font-weight:600;
  padding:9px 13px; margin:6px 1px; border-radius:999px;
  border-bottom:0 !important; transition:background .15s, color .15s;
}
.db-menu-item > a:hover,
.db-menu-details > summary:hover{ background:rgba(255,255,255,.12); color:#fff; border-bottom-color:transparent; }
.db-menu-item.active > a,
.db-menu-item.active > .db-menu-details > summary{ background:#fff; color:var(--ap-i700); border-bottom-color:transparent; }
.db-menu-details > summary::after{ color:rgba(255,255,255,.65); }
.db-menu-item.active > .db-menu-details > summary::after{ color:var(--ap-i600); }

/* Iconuri SVG sobre, mai mari; preiau culoarea textului (currentColor) */
.db-menu-icon{ display:inline-flex; align-items:center; }
.db-menu-icon svg{ width:19px; height:19px; display:block; }

/* Părinți cu submeniu: wrapperul intern (link cu URL sau label fără URL) trebuie și el
   flex, altfel iconul nu se aliniază cu textul (summary e flex, dar wrapperul din el nu). */
.db-menu-details > summary > .db-menu-link,
.db-menu-details > summary > .db-menu-label-text{
  display:inline-flex; align-items:center; gap:6px;
}

/* Submeniul (dropdown) rămâne alb și lizibil */
.db-menu-children{ border-color:var(--ap-i050); border-radius:12px; box-shadow:0 10px 26px rgba(34,31,82,.18); }
.db-menu-children .db-menu-item > a{ color:var(--text); border-radius:8px; margin:1px 4px; padding:9px 12px; }
.db-menu-children .db-menu-item > a:hover{ background:var(--ap-i050); color:var(--ap-i700); }
.db-menu-children .db-menu-icon svg{ width:16px; height:16px; }

/* ---- Bloc 2: topbar (Asistent Personal / user / limbă) rămâne ALB (nu indigo). ----
   Doar meniul (bloc 1) e indigo. Nu suprascriem .topbar aici: se aplică stilul de bază
   alb din secțiunea „Topbar" de mai sus. */
