/* /var/www/acasa/css/admin_asociatii.css — v1.5 — 19.10.2026 12:10 */
/* v1.5 — bloc „Căutare asociație: navigare cu tastatura (aa-srch-*)” la final. */
/* v1.4 — bloc „Formular Modifică Asociație (aa-f*, aa-dlg*, aa-banner, aa-dirty-bar)” la final. */
/* v1.3 — stări „neocupat” (.aa-pill-neocupat, .aa-neocupat, .aa-sub-neocupat). */
/* v1.2 — bloc nou „Secțiuni pliabile (aa-*)” la final; clasele .summary-item/
          .summary-label/.summary-value nu mai sunt folosite de Vizualizare (rămân
          deocamdată, curățenie ulterioară). */
/* css/admin_asociatii.css - CURATAT SI CORECTAT */

/* Stiluri pentru tabel */
.associations-list table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    border: 2px solid #555;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.associations-list th,
.associations-list td {
    padding: 12px 15px;
    text-align: left;
    border: 1px solid #444;
    color: #f0f0f0;
    background-color: #282828;
}

.associations-list thead th {
    background-color: #333;
    border-bottom: 2px solid #555;
    font-weight: bold;
}

.associations-list tbody tr:hover {
    background-color: #3a3a3a;
}

.associations-list td button {
    margin: 0;
}

/* Container principal */
.container {
    width: 90%;
    max-width: 1400px;
    margin: 30px auto;
    padding: 30px 40px;
    box-sizing: border-box;
    background-color: #282828;
    min-height: 60vh;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border: 1px solid #555;
}

/* Header principal */
#main-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid #555;
    padding-bottom: 10px;
}

#main-title-text {
    margin: 0;
    color: #f0f0f0;
    font-size: 2rem;
}

/* Butoane de acțiune */
.action-buttons {
    display: flex;
    gap: 15px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.action-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

/* Tipuri de butoane */
.list-btn {
    background-color: #7f8c8d;
    color: white;
}

.list-btn:hover {
    background-color: #5c676f;
    box-shadow: 0 4px 12px rgba(127, 140, 141, 0.4);
}

.insert-btn {
    background-color: #2ecc71;
    color: white;
}

.insert-btn:hover {
    background-color: #27ae60;
}

.update-btn {
    background-color: #3498db;
    color: white;
}

.update-btn:hover {
    background-color: #2980b9;
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
}

.delete-btn:hover {
    background-color: #c0392b;
}

.docs-asociatie-btn {
    background-color: #27ae60;
    color: white;
}

.docs-asociatie-btn:hover {
    background-color: #2ecc71;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
}

.docs-sedinte-btn {
    background-color: #e67e22;
    color: white;
}

.docs-sedinte-btn:hover {
    background-color: #f39c12;
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.4);
}

.intretinere-btn {
    background-color: #9b59b6;
    color: white;
}

.intretinere-btn:hover {
    background-color: #8e44ad;
    box-shadow: 0 4px 12px rgba(155, 89, 182, 0.4);
}

.scari-btn {
    background-color: #1abc9c;
    color: white;
}
.scari-btn:hover {
    background-color: #16a085;
}

.apartamente-btn {
    background-color: #2c3e50;
    color: white;
}
.apartamente-btn:hover {
    background-color: #1a252f;
}

.contract-btn {
    background-color: #f39c12;
    color: white;
}
.contract-btn:hover {
    background-color: #d68910;
}

.registre-btn {
    background-color: #0097a7;
    color: white;
}
.registre-btn:hover {
    background-color: #00838f;
}

.rapoarte-btn {
    background-color: #d81b60;
    color: white;
}
.rapoarte-btn:hover {
    background-color: #ad1457;
}

.formulare-btn {
    background-color: #5c6bc0;
    color: white;
}
.formulare-btn:hover {
    background-color: #3949ab;
    box-shadow: 0 4px 12px rgba(92, 107, 192, 0.4);
}

.legislatie-btn {
    background-color: #1a5276;
    color: white;
}
.legislatie-btn:hover {
    background-color: #154360;
    box-shadow: 0 4px 12px rgba(26, 82, 118, 0.4);
}

.summary-btn {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #bdc3c7;
}

.summary-btn:hover {
    background-color: #e0e0e0;
    border-color: #a0a0a0;
}

/* Secțiuni principale */
#search-section,
#list-section {
    background-color: transparent;
    padding: 0;
    margin-top: 0;
    box-shadow: none;
    border: none;
    display: block;
}

/* Secțiuni de formular */
.form-section {
    display: none;
    padding: 30px;
    border-radius: 10px;
    background-color: #333;
    margin-top: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
}

.form-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.form-section h3 {
    margin: 0 0 20px 0;
    color: #bbbbbb;
    padding-bottom: 15px;
    font-size: 1.8rem;
    border-bottom: 2px solid #999999;
}

.form-section h4 {
    color: #3498db;
    margin: 0 0 15px 0;
    font-size: 1.3rem;
    padding-bottom: 8px;
    border-bottom: 1px solid #555;
}

/* Căutare și autocomplete */
.search-input-container {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    max-width: 550px;
}

#search_cif {
    flex-grow: 1;
    min-width: 200px;
    max-width: 500px;
}

.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 900;
    background-color: #3a3a3a;
    border: 1px solid #555;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    display: none;
    border-radius: 0 0 4px 4px;
    width: 100%;
    max-width: 500px;
}

.autocomplete-item {
    padding: 10px 15px;
    cursor: pointer;
    color: #f0f0f0;
    border-bottom: 1px solid #444;
    transition: background-color 0.2s;
    font-size: 0.95rem;
}

.autocomplete-item:hover {
    background-color: #555;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

/* Layout formular */
.form-columns {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.column {
    flex: 1 1 30%;
    min-width: 300px;
}

/* Elemente de formular */
.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #bbbbbb;
    font-size: 1rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group input[type="tel"],
.form-group textarea,
.form-group input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #555;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
    background-color: #3a3a3a;
    color: #f0f0f0;
}

.form-group input[type="text"][readonly],
.form-group input[type="tel"][readonly] {
    background-color: #555;
    color: #aaa;
}

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

.form-group input[type="file"] {
    padding: 8px 12px;
    background-color: #2e2e2e;
}

.char-count {
    position: absolute;
    right: 15px;
    bottom: 14px;
    font-size: 0.8rem;
    color: #7f8c8d;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 2px 6px;
    border-radius: 8px;
    pointer-events: none;
}

/* Link-uri fișiere existente */
.existing-file-link {
    display: inline-block;
    margin-bottom: 10px;
    padding: 8px 12px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
}

.existing-file-link:hover {
    background-color: #2980b9;
}

/* Acțiuni formular */
.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #555;
}

.submit-btn, .cancel-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
}

.submit-btn {
    background-color: #2ecc71;
    color: white;
}

.submit-btn:hover {
    background-color: #27ae60;
}

.cancel-btn {
    background-color: #95a5a6;
    color: white;
}

.cancel-btn:hover {
    background-color: #7f8c8d;
}

/* Listă asociații */
.associations-list ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.associations-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 15px 20px;
    background-color: #3a3a3a;
    border-radius: 8px;
    border: 1px solid #555;
}

.associations-list li span,
.associations-list a {
    color: #bbbbbb;
    text-decoration: none;
    transition: color 0.3s ease;
    flex-grow: 1;
}

.associations-list a:hover {
    color: #3498db;
}

.delete-link {
    background-color: transparent;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.2s, color 0.2s;
    padding: 0;
    margin-left: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.delete-link:hover {
    color: #c0392b;
    transform: scale(1.1);
}

/* Mesaje */
.message {
    padding: 20px !important;
    margin: 20px 0 !important;
    border-radius: 8px !important;
    font-weight: bold !important;
    max-width: 100% !important;
    display: block !important;
    text-align: center !important;
    font-size: 18px !important;
    z-index: 1000 !important;
    position: relative !important;
}

.message.success {
    background-color: #d4edda !important;
    color: #155724 !important;
    border: 2px solid #c3e6cb !important;
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.3) !important;
}

.message.error {
    background-color: #f8d7da !important;
    color: #721c24 !important;
    border: 2px solid #f5c6cb !important;
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.3) !important;
}

.message.warning {
    background-color: #fff3cd !important;
    color: #856404 !important;
    border: 2px solid #ffeeba !important;
    box-shadow: 0 0 15px rgba(241, 196, 15, 0.3) !important;
}

/* Link înapoi */
.back-link {
    display: inline-block;
    margin-top: 30px;
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
}

.back-link:hover {
    text-decoration: underline;
}

/* Secțiune rezumat */
.data-summary-section {
    padding: 20px;
    border-radius: 8px;
    background-color: #333;
    margin-top: 20px;
    border: 1px solid #555;
}

.summary-columns {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.summary-item {
    padding: 10px 0;
    border-bottom: 1px solid #555;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-label {
    font-weight: normal;
    color: #bbbbbb;
    flex-basis: 50%;
    padding-right: 10px;
}

.summary-value {
    font-weight: 600;
    flex-basis: 50%;
    text-align: right;
    color: #f0f0f0;
}

.summary-value .value-missing {
    color: #e74c3c;
    font-weight: 600;
}

.summary-value .value-ok {
    color: #2ecc71;
}

.summary-value .summary-link {
    color: #3498db;
    text-decoration: none;
    transition: color 0.2s;
}

.summary-value .summary-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Stiluri specifice pentru secțiunea ședințe */
#documents_sedinte-section textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

#documents_sedinte-section .form-group,
#documents_asociatie-section .form-group {
    width: 100%;
}

/* Stiluri pentru lista de ședințe */
#sedinte-list-container {
    background-color: #282828;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
}

#sedinte-list-container .meeting-item {
    background-color: #3a3a3a;
    border: 1px solid #555;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
    color: #f0f0f0;
}

#sedinte-list-container .meeting-header {
    color: #f0f0f0;
    border-bottom: 1px solid #555;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

#sedinte-list-container .meeting-summary {
    color: #bbbbbb;
    line-height: 1.4;
}

#sedinte-list-container .upload-date {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Butoane pentru ședințe */
.meeting-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.meeting-actions .view-btn,
.meeting-actions .modify-btn,
.meeting-actions .delete-btn {
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.meeting-actions .view-btn {
    background-color: #3498db;
}

.meeting-actions .view-btn:hover {
    background-color: #2980b9;
}

.meeting-actions .modify-btn {
    background-color: #f39c12;
}

.meeting-actions .modify-btn:hover {
    background-color: #e67e22;
}

.meeting-actions .delete-btn {
    background-color: #e74c3c;
}

.meeting-actions .delete-btn:hover {
    background-color: #c0392b;
}

.meeting-actions .delete-btn:disabled,
.meeting-actions .modify-btn:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

/* Filtru ani */
.year-filter-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: #333;
    border-radius: 8px;
    border: 1px solid #555;
}

.year-filter-container label {
    font-weight: bold;
    color: #bbbbbb;
    margin: 0;
}

#year-selector {
    padding: 8px 12px;
    border: 1px solid #555;
    border-radius: 4px;
    background: #3a3a3a;
    color: #f0f0f0;
    font-size: 14px;
    min-width: 180px;
}

.meeting-count {
    color: #7f8c8d;
    font-size: 14px;
    font-weight: bold;
}

/* Design responsiv */
@media (max-width: 1200px) {
    .form-columns {
        flex-wrap: wrap;
    }
    .column {
        flex: 1 0 45%;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 20px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
    }
    
    .form-columns {
        flex-direction: column;
    }
    
    .column {
        flex: 1 0 100%;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .submit-btn, .cancel-btn {
        width: 100%;
    }
    
    .search-input-container {
        flex-direction: column;
        align-items: flex-start;
        max-width: 100%;
    }
    
    #search_cif {
        max-width: 100%;
        width: 100%;
        min-width: unset;
    }
    
    .autocomplete-results {
        max-width: 100%;
        width: 100%;
    }
    
    #main-header-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    #insert-main-btn {
        width: 100%;
    }
    
    .year-filter-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    #year-selector {
        width: 100%;
        min-width: auto;
    }
    
    .meeting-actions {
        flex-direction: column;
    }
    
    .meeting-actions .view-btn,
    .meeting-actions .modify-btn,
    .meeting-actions .delete-btn {
        width: 100%;
        text-align: center;
    }
    /* Stil pentru butonul Contracte */
.action-buttons.navigation-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

/* Stil general pentru toate butoanele din navigare */
.action-buttons.navigation-buttons .action-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 180px;
}

/* Culori distincte pentru toate butoanele de navigație */
.action-buttons.navigation-buttons .summary-btn      { background-color: #f0f0f0; color: #333; }
.action-buttons.navigation-buttons .update-btn       { background-color: #3498db; color: white; }
.action-buttons.navigation-buttons .scari-btn        { background-color: #1abc9c; color: white; }
.action-buttons.navigation-buttons .delete-btn       { background-color: #e74c3c; color: white; }
.action-buttons.navigation-buttons .docs-asociatie-btn { background-color: #27ae60; color: white; }
.action-buttons.navigation-buttons .docs-sedinte-btn { background-color: #e67e22; color: white; }
.action-buttons.navigation-buttons .apartamente-btn  { background-color: #2c3e50; color: white; }
.action-buttons.navigation-buttons .contract-btn     { background-color: #f39c12; color: white; }
.action-buttons.navigation-buttons .intretinere-btn  { background-color: #9b59b6; color: white; }
.action-buttons.navigation-buttons .registre-btn     { background-color: #0097a7; color: white; }
.action-buttons.navigation-buttons .rapoarte-btn     { background-color: #d81b60; color: white; }

}


/* Stiluri pentru gestionarea blocurilor */
.bloc-input-container {
    position: relative;
}

.bloc-dropdown {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 300px;
    overflow-y: auto;
    margin-top: 5px;
}

.bloc-dropdown .dropdown-item {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.bloc-dropdown .dropdown-item:last-child {
    border-bottom: none;
}

.bloc-dropdown .dropdown-item:hover {
    background-color: #f5f5f5;
}

.bloc-dropdown .dropdown-item.selected {
    background-color: #e3f2fd;
    border-left: 3px solid #2196f3;
}

.bloc-dropdown .dropdown-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
    color: #666;
}

.bloc-dropdown .dropdown-item div {
    flex: 1;
}

.bloc-dropdown .dropdown-item strong {
    display: block;
    font-weight: 600;
    color: #333;
}

.bloc-dropdown .dropdown-item small {
    display: block;
    font-size: 11px;
    color: #777;
    margin-top: 2px;
}

.bloc-dropdown .dropdown-header {
    padding: 8px 15px;
    background: #f8f9fa;
    color: #666;
    font-weight: 600;
    font-size: 12px;
    border-bottom: 1px solid #eee;
}

.bloc-dropdown .dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 5px 0;
}

.bloc-dropdown .dropdown-item.new-item {
    background-color: #f0fff4;
    border-left: 3px solid #4caf50;
}

.bloc-dropdown .dropdown-item.new-item:hover {
    background-color: #e8f5e9;
}

/* Stiluri pentru input-ul de bloc */
input.bloc-empty {
    border-color: #95a5a6 !important;
    background-color: #f8f9fa !important;
}

input.bloc-existing {
    border-color: #4caf50 !important;
    background-color: #f1f8e9 !important;
}

input.bloc-new {
    border-color: #2196f3 !important;
    background-color: #e3f2fd !important;
}

/* Butoane rapide */
.bloc-quick-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-small {
    padding: 4px 8px;
    font-size: 12px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-small:hover {
    background: #e9ecef;
    border-color: #ccc;
}

/* Text de ajutor */
.bloc-help {
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.bloc-help i {
    margin-right: 5px;
}

/* Dropdown trigger */
.dropdown-trigger {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
}

.dropdown-trigger:hover {
    color: #333;
}


/* Corectare pentru modal - culori vizibile */
.modal-overlay * {
    color: #333 !important; /* Text întunecat */
}

.modal-content h2,
.modal-content h3,
.modal-content h4 {
    color: #2c3e50 !important;
}

.modal-content p,
.modal-content li,
.modal-content span {
    color: #333 !important;
}

/* Asigură-te că butoanele sunt vizibile */
.modal-content button {
    color: white !important;
    background-color: #3498db !important;
}

.modal-content button:hover {
    background-color: #2980b9 !important;
}


/* ==========================================================================
   v1.2 — SECȚIUNI PLIABILE (aa-*) — strat de prezentare comun
   Folosit acum de Vizualizare (populateSummary); va fi adoptat de „Modifică”.
   Categorii accent: asoc (asociație), pers (conducere), adm (administrare/
   reprezentanți), aud (audit).
   ========================================================================== */
.aa-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin: 0 0 12px;
}

.aa-tool-btn {
    background: transparent;
    color: #bbbbbb;
    border: 1px solid #555;
    border-radius: 6px;
    padding: 4px 12px;
    font-size: 0.85rem;
    cursor: pointer;
}

.aa-tool-btn:hover {
    color: #fff;
    border-color: #888;
}

/* Secțiunea: fundal alternant + accent lateral pe categorie */
.aa-sec {
    --aa-acc: #3498db;
    background: #2f2f2f;
    border-left: 4px solid var(--aa-acc);
    margin: 0 0 10px;
}

.aa-sec:nth-of-type(even) {
    background: #363636;
}

.aa-cat-asoc { --aa-acc: #3498db; }
.aa-cat-pers { --aa-acc: #1abc9c; }
.aa-cat-adm  { --aa-acc: #e67e22; }
.aa-cat-aud  { --aa-acc: #7f8c8d; }

/* Antetul (bară mai închisă, clicabilă) */
.aa-sec-hdr {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    background: #3a3a3a;
    color: #e8e8e8;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    user-select: none;
}

.aa-sec:nth-of-type(even) > .aa-sec-hdr {
    background: #404040;
}

.aa-sec-hdr:hover {
    background: #474747;
}

.aa-sec-hdr:focus-visible {
    outline: 2px solid var(--aa-acc);
    outline-offset: -2px;
}

.aa-chev {
    color: var(--aa-acc);
    width: 14px;
    transition: transform 0.15s;
}

.aa-sec.aa-inchisa .aa-chev {
    transform: rotate(-90deg);
}

.aa-sec.aa-inchisa > .aa-sec-body {
    display: none;
}

.aa-sec-body {
    padding: 6px 14px 10px;
}

/* Pastila „N lipsă” / „complet” */
.aa-pill {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 10px;
    white-space: nowrap;
}

.aa-pill-lipsa {
    background: #4a2622;
    color: #f1948a;
}

.aa-pill-ok {
    background: #1f3d2b;
    color: #82e0aa;
}

.aa-pill-neocupat {
    background: #3d3d3d;
    color: #9a9a9a;
    font-weight: 400;
}

/* Bloc-persoană complet gol: nu e eroare, e funcție neocupată */
.aa-neocupat {
    color: #8a8a8a;
    font-style: italic;
    padding: 4px 0;
}

.aa-sub-neocupat {
    border-style: dashed;
    opacity: 0.75;
}

.aa-sub-neocupat .aa-sub-hdr {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
    color: #9a9a9a;
}

/* Rând etichetă | valoare — valoarea stă lângă etichetă, nu la marginea dreaptă */
.aa-row {
    display: grid;
    grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
    gap: 14px;
    align-items: baseline;
    padding: 6px 0;
    border-bottom: 1px dotted #4a4a4a;
}

.aa-row:last-child {
    border-bottom: none;
}

.aa-lab {
    color: #9a9a9a;
    font-size: 0.9rem;
}

.aa-val {
    color: #eeeeee;
    overflow-wrap: anywhere;
}

.aa-val .value-missing {
    color: #e74c3c;
    font-weight: 600;
}

/* Tag-ul god (stil inline din godTagJs) poate trece pe rândul următor în etichetă */
.aa-lab .god-tag {
    display: inline-block;
    margin: 2px 0 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
}

/* Fișier prezent: „chip” */
.aa-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #5dade2;
    border: 1px solid #3d5a70;
    border-radius: 5px;
    padding: 1px 9px;
    font-size: 0.9rem;
    text-decoration: none;
}

.aa-chip:hover {
    background: #2c3e50;
    color: #fff;
}

/* Sub-blocuri (Comitet Executiv): 2 coloane cât permite lățimea */
.aa-sub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 12px;
    padding-top: 4px;
}

.aa-sub {
    border: 1px solid #4a4a4a;
    border-radius: 8px;
    padding: 8px 12px;
}

.aa-sub-hdr {
    display: flex;
    align-items: center;
    color: #cccccc;
    font-weight: 600;
    margin-bottom: 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid #4a4a4a;
}

.aa-sub .aa-row {
    grid-template-columns: minmax(100px, 150px) minmax(0, 1fr);
}

@media (max-width: 600px) {
    .aa-row,
    .aa-sub .aa-row {
        grid-template-columns: 1fr;
        gap: 2px;
    }
    .aa-sub-grid {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================================
   v1.4 — FORMULAR „MODIFICĂ ASOCIAȚIE”
   Clase proprii (aa-*) — NU .form-group: pe pagină există reguli inline cu
   !important pe „.form-group input” (admin_asociatii.php) care s-ar amesteca.
   ========================================================================== */
.aa-banner {
    background: #4a2622;
    border: 1px solid #c0392b;
    border-left: 6px solid #e74c3c;
    color: #f5b7b1;
    padding: 12px 16px;
    margin: 0 0 16px;
    line-height: 1.5;
}

.aa-banner-titlu {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ff8a7a;
    margin-bottom: 4px;
}

.aa-banner-insert {
    background: #1d3346;
    border-color: #2980b9;
    border-left-color: #3498db;
    color: #aed6f1;
}

.aa-banner-insert .aa-banner-titlu {
    color: #85c1e9;
}

.aa-edit-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin: 0 0 12px;
}

/* Rând: etichetă | control — aceeași grilă ca în Vizualizare */
#asociatie-form .aa-frow {
    display: grid;
    grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    padding: 8px 0;
    border-bottom: 1px dotted #4a4a4a;
}

#asociatie-form .aa-frow:last-child {
    border-bottom: none;
}

#asociatie-form .aa-flab {
    color: #9a9a9a;
    font-size: 0.9rem;
    padding-top: 9px;
    margin: 0;
    font-weight: normal;
}

#asociatie-form .aa-flab .god-tag {
    display: inline-block;
    margin: 2px 0 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
}

#asociatie-form .aa-fwrap {
    display: flex;
    gap: 6px;
}

#asociatie-form .aa-inp,
#asociatie-form .aa-file {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #555;
    border-radius: 4px;
    background: #3a3a3a;
    color: #f0f0f0;
    font-size: 1rem;
    color-scheme: dark;
}

#asociatie-form .aa-file {
    background: #2e2e2e;
    margin-top: 6px;
}

#asociatie-form .aa-inp:focus {
    outline: none;
    border-color: #3498db;
}

#asociatie-form .aa-hint {
    display: block;
    color: #7f8c8d;
    font-size: 0.8rem;
    margin-top: 3px;
}

#asociatie-form .aa-fmeta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.8rem;
    min-height: 0;
}

#asociatie-form .aa-fnote:not(:empty) {
    margin-top: 4px;
}

#asociatie-form .aa-cnt {
    color: #7f8c8d;
    margin-left: auto;
    white-space: nowrap;
    margin-top: 2px;
}

#asociatie-form .aa-cnt-limita {
    color: #e74c3c;
}

/* Butonul X (golire câmp / ștergere fișier) */
#asociatie-form .aa-x {
    flex: 0 0 36px;
    width: 36px;
    min-height: 36px;
    padding: 0;
    background: transparent;
    border: 1px solid #7b3a33;
    border-radius: 4px;
    color: #e74c3c;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}

#asociatie-form .aa-x:hover {
    background: #e74c3c;
    color: #fff;
}

#asociatie-form .aa-x[hidden] {
    display: none;
}

#asociatie-form .aa-fexist {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
}

#asociatie-form .aa-x-fisier {
    flex: 0 0 30px;
    width: 30px;
    min-height: 28px;
    font-size: 1.1rem;
}

/* Stări de rând */
#asociatie-form .aa-r-mod .aa-inp {
    border-color: #e67e22;
}

#asociatie-form .aa-r-mod .aa-fnote,
#asociatie-form .aa-r-fnou .aa-fnote {
    color: #f0b27a;
}

#asociatie-form .aa-r-golit .aa-inp {
    border-color: #e74c3c;
    background: #3d2a28;
}

#asociatie-form .aa-r-golit .aa-fnote,
#asociatie-form .aa-r-fsters .aa-fnote {
    color: #f1948a;
    font-weight: 600;
}

#asociatie-form .aa-r-fsters .aa-chip {
    text-decoration: line-through;
    opacity: 0.55;
}

#asociatie-form .aa-r-fsters .aa-x-fisier {
    display: none;
}

#asociatie-form .aa-revino {
    background: transparent;
    border: 1px solid #666;
    color: #ddd;
    border-radius: 4px;
    padding: 0 8px;
    margin-left: 6px;
    font-size: 0.8rem;
    cursor: pointer;
}

#asociatie-form .aa-revino:hover {
    border-color: #aaa;
    color: #fff;
}

/* Pastile: container + „modificat” */
.aa-pills {
    margin-left: auto;
    display: flex;
    gap: 6px;
    align-items: center;
}

.aa-pills .aa-pill {
    margin-left: 0;
}

.aa-pill-mod {
    background: #4a3215;
    color: #f8c471;
}

/* Sub-bloc complet gol în editare: rămâne editabil, doar vizual atenuat */
#asociatie-form .aa-sub-gol {
    border-style: dashed;
}

#asociatie-form .aa-sub .aa-frow {
    grid-template-columns: minmax(100px, 150px) minmax(0, 1fr);
}

/* Bara fixă de modificări nesalvate */
.aa-dirty-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 10px 16px;
    background: #3b2a12;
    border-top: 3px solid #e67e22;
    color: #f8c471;
    font-weight: 600;
}

.aa-dirty-bar[hidden] {
    display: none;
}

.aa-bar-btn {
    border: none;
    border-radius: 4px;
    padding: 7px 16px;
    font-weight: 600;
    cursor: pointer;
}

.aa-bar-renunta {
    background: #7f8c8d;
    color: #fff;
}

.aa-bar-salveaza {
    background: #2ecc71;
    color: #fff;
}

#asociatie-form.aa-are-mod {
    padding-bottom: 70px;           /* să nu acopere bara butoanele de jos */
}

/* Dialoguri Da/Nu */
.aa-dlg-ov {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
}

.aa-dlg {
    width: 92%;
    max-width: 640px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    background: #2f2f2f;
    color: #e8e8e8;
    border: 1px solid #555;
    border-top: 5px solid #3498db;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

.aa-dlg-pericol {
    border-top-color: #e74c3c;
}

.aa-dlg-titlu {
    padding: 14px 18px 6px;
    font-size: 1.2rem;
    font-weight: 700;
}

.aa-dlg-pericol .aa-dlg-titlu {
    color: #ff8a7a;
}

.aa-dlg-corp {
    padding: 6px 18px 12px;
    overflow-y: auto;
    line-height: 1.5;
}

.aa-dlg-mic {
    font-size: 0.85rem;
    color: #aaa;
}

.aa-dlg-val {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 8px;
    background: #3a3a3a;
    border-radius: 4px;
    color: #fff;
    overflow-wrap: anywhere;
}

.aa-dlg-btns {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 18px 16px;
    border-top: 1px solid #444;
}

.aa-dlg-btns button {
    padding: 9px 20px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
}

.aa-dlg-nu {
    background: #555;
    color: #fff;
    border: 1px solid #777;
}

.aa-dlg-da {
    background: #3498db;
    color: #fff;
    border: 1px solid #3498db;
}

.aa-dlg-da-pericol {
    background: #c0392b;
    border-color: #c0392b;
}

.aa-dlg-btns button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.aa-dlg-btns button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Rezumatul modificărilor */
.aa-dif-sec {
    margin: 10px 0 4px;
    padding: 3px 8px;
    background: #3a3a3a;
    color: #ccc;
    font-weight: 600;
}

.aa-dif-rand {
    display: grid;
    grid-template-columns: minmax(110px, 170px) minmax(0, 1fr);
    gap: 10px;
    padding: 3px 8px;
    border-bottom: 1px dotted #444;
    overflow-wrap: anywhere;
}

.aa-dif-lab {
    color: #9a9a9a;
}

.aa-dif-vechi {
    color: #aaa;
    text-decoration: line-through;
}

.aa-dif-nou {
    color: #82e0aa;
}

.aa-dif-sters {
    color: #f1948a;
    font-weight: 700;
}

@media (max-width: 600px) {
    #asociatie-form .aa-frow,
    #asociatie-form .aa-sub .aa-frow,
    .aa-dif-rand {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    #asociatie-form .aa-flab {
        padding-top: 0;
    }
    .aa-dirty-bar {
        flex-wrap: wrap;
    }
}


/* ==========================================================================
   v1.5 — CĂUTARE ASOCIAȚIE: navigare cu tastatura (aa-srch-*)
   Evidențierea e o clasă pusă de JS (săgeți SAU mișcarea mouse-ului). :hover CSS e
   neutralizat ca să nu existe două rânduri „selectate” când mouse-ul stă pe loc.
   ========================================================================== */
.autocomplete-results .autocomplete-item:hover {
    background-color: transparent;
}

.autocomplete-results .autocomplete-item.aa-srch-activ {
    background-color: #555;
    box-shadow: inset 3px 0 0 #3498db;
}

.autocomplete-item .aa-srch-hit {
    color: #5dade2;
    font-weight: 700;
}

.autocomplete-item.aa-srch-activ .aa-srch-hit {
    color: #ffffff;
}
