/* Portal Administrativ — Bloc D44: stiluri */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    padding: 20px;
    color: #333;
}
.container {
    max-width: 960px;
    margin: auto;
    background: white;
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* ================= DASHBOARD / LANDING PAGE ================= */
.app-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f2f5;
}
.app-header h1 {
    margin: 0;
    color: #1a202c;
    font-size: 26px;
}
.app-header p {
    margin: 6px 0 0 0;
    color: #666;
    font-size: 14px;
}

/* Bara Statistici Rapide */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 10px;
    margin-bottom: 20px;
    background: #f8fafc;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}
.stat-box {
    text-align: center;
    padding: 6px;
}
.stat-box:not(:last-child) {
    border-right: 1px solid #e2e8f0;
}
.stat-num {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #1e293b;
}
.stat-label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Căutare Globală */
.global-search-box {
    margin-bottom: 22px;
    position: relative;
}
.global-search-box input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%2364748b" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>') no-repeat 14px center;
    transition: border-color 0.2s;
}
.global-search-box input:focus {
    border-color: #007bff;
    outline: none;
}
#global-search-results {
    display: none;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    margin-top: 6px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    max-height: 280px;
    overflow-y: auto;
}
.global-search-item {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
}
.global-search-item:hover {
    background-color: #f0f9ff;
}

/* Grid Butoane Principale */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 25px;
}
.menu-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    width: 100%;
}
.menu-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}
.menu-card-left {
    display: flex;
    align-items: center;
    gap: 15px;
}
.menu-card-icon {
    font-size: 28px;
    background: rgba(255,255,255,0.2);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
}
.menu-card-title {
    font-size: 16px;
    font-weight: bold;
    display: block;
    margin-bottom: 4px;
}
.menu-card-desc {
    font-size: 12px;
    opacity: 0.92;
    display: block;
}

/* Culori Carduri */
.card-teal { background: linear-gradient(135deg, #0d9488, #0f766e); }
.card-blue { background: linear-gradient(135deg, #007bff, #0056b3); }
.card-green { background: linear-gradient(135deg, #10b981, #059669); }
.card-purple { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.card-orange { background: linear-gradient(135deg, #f97316, #c2410c); }
.card-indigo { background: linear-gradient(135deg, #4f46e5, #3730a3); }

/* Submeniu Adeverinte */
.submenu-container {
    display: none;
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 15px;
    margin-top: -10px;
    margin-bottom: 20px;
    grid-column: span 2;
    animation: fadeIn 0.2s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}
.submenu-title {
    font-size: 12px;
    font-weight: bold;
    color: #475569;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.submenu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.submenu-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 600;
    color: #1e293b;
    transition: all 0.2s;
    text-align: left;
}
.submenu-btn:hover {
    border-color: #007bff;
    background-color: #f0f7ff;
    color: #0056b3;
}

/* Panou Backup Dashboard */
.backup-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.backup-panel-info h3 {
    margin: 0 0 3px 0;
    font-size: 15px;
    color: #1e293b;
    text-decoration: none;
    text-align: left;
}
.backup-panel-info p {
    margin: 0;
    font-size: 12.5px;
    color: #64748b;
}

/* ================= SECTIUNI SECUNDARE ================= */
.app-section {
    display: none;
}
.back-nav {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.btn-back {
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}
.btn-back:hover {
    background-color: #e2e8f0;
}

/* ================= STILURI FORMULARE ================= */
.form-panel {
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    font-family: Arial, sans-serif;
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 12px;
}
.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 12px;
}
.form-group {
    margin-bottom: 12px;
}
.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 13px;
    color: #334155;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 14px;
    font-family: inherit;
    background-color: #fff;
}
.form-group textarea {
    resize: vertical;
    min-height: 75px;
}
.checkbox-group {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 8px 0;
}
.checkbox-group label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: normal;
    cursor: pointer;
    margin: 0;
    font-size: 14px;
}
.btn-action {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.2s;
}
.btn-action:hover { background-color: #0056b3; }
.btn-action:disabled { opacity: 0.65; cursor: not-allowed; }
.btn-action.teal { background-color: #0d9488; }
.btn-action.teal:hover { background-color: #0f766e; }
.btn-action.green { background-color: #10b981; }
.btn-action.green:hover { background-color: #059669; }
.btn-action.purple { background-color: #8b5cf6; }
.btn-action.purple:hover { background-color: #6d28d9; }
.btn-action.orange { background-color: #f97316; }
.btn-action.orange:hover { background-color: #c2410c; }
.btn-action.amber { background-color: #d97706; }
.btn-action.amber:hover { background-color: #b45309; }
.btn-action.indigo { background-color: #4f46e5; }
.btn-action.indigo:hover { background-color: #3730a3; }
.btn-action.slate { background-color: #1e293b; }
.btn-action.slate:hover { background-color: #0f172a; }

.editing-banner {
    display: none;
    background-color: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: bold;
    justify-content: space-between;
    align-items: center;
}
.btn-cancel-form-edit {
    background: #fff;
    border: 1px solid #d97706;
    color: #92400e;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
}
.current-file-hint {
    font-size: 12px;
    color: #0369a1;
    margin-top: 6px;
    font-weight: 600;
    display: none;
}
.existing-files-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}
.existing-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    color: #0369a1;
    padding: 4px 9px;
    border-radius: 5px;
    font-size: 12px;
}
.existing-file-chip a {
    color: #0369a1;
    text-decoration: none;
    font-weight: 600;
}
.existing-file-chip a:hover {
    text-decoration: underline;
}
.btn-remove-chip {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
    font-weight: bold;
    padding: 1px 5px;
    line-height: 1.2;
}
.btn-remove-chip:hover {
    background: #dc2626;
    color: #fff;
}

/* ================= GENERATOR CONVOCATOR / RECONVOCATOR AG ================= */
.convocator-box {
    background-color: #fff7ed;
    border: 1px solid #fdba74;
}
.agenda-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}
.agenda-item-row {
    display: flex;
    gap: 6px;
    align-items: center;
}
.agenda-item-num {
    font-weight: bold;
    color: #9a3412;
    min-width: 24px;
    font-size: 13px;
}
.agenda-item-row input {
    flex: 1;
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    font-size: 13.5px;
    background: #fff;
}
.btn-agenda-tool {
    padding: 6px 9px;
    border: 1px solid #cbd5e1;
    background: #fff;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    color: #334155;
}
.btn-agenda-tool:hover {
    background: #f1f5f9;
}
.btn-agenda-del {
    color: #dc2626;
    border-color: #fecaca;
}
.btn-agenda-del:hover {
    background: #fee2e2;
}
.btn-add-agenda {
    background: #fff;
    border: 1px dashed #ea580c;
    color: #c2410c;
    padding: 7px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12.5px;
    font-weight: bold;
}
.btn-add-agenda:hover {
    background: #ffedd5;
}
.convocator-preview-wrapper {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 25px 30px;
    margin-top: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    font-family: 'Times New Roman', Times, serif;
    color: #000;
    overflow-x: auto;
}
.conv-doc-sheet {
    width: 100%;
    box-sizing: border-box;
    line-height: 1.5;
    font-size: 14px;
}
.conv-doc-sheet .conv-title {
    text-align: center;
    font-size: 19px;
    font-weight: bold;
    text-transform: uppercase;
    margin: 10px 0 4px 0;
    letter-spacing: 0.6px;
}
.conv-doc-sheet .conv-subtitle {
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 16px;
    color: #111;
}
.conv-box-dates {
    border: 1px solid #333;
    background-color: #fafafa;
    padding: 10px 14px;
    margin: 12px 0;
    font-size: 13.5px;
}
.conv-box-dates p {
    margin: 4px 0;
}
.conv-agenda-preview {
    margin: 8px 0 14px 0;
    padding-left: 22px;
}
.conv-agenda-preview li {
    margin-bottom: 5px;
    text-align: justify;
}

/* ================= STILURI DOCUMENT ADEVERINTA ================= */
.document-sheet {
    font-family: 'Times New Roman', Times, serif;
    line-height: 1.6;
    color: #000;
    padding: 10px 20px;
    background: white;
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    font-size: 13px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}
.header-left {
    line-height: 1.4;
}
.header-left strong {
    font-size: 14px;
    display: block;
    margin-bottom: 2px;
}
.header-right {
    text-align: right;
    font-weight: bold;
    margin-top: 25px;
}
h3 {
    text-align: center;
    margin-bottom: 35px;
    text-decoration: underline;
    font-size: 20px;
}
.content {
    margin-bottom: 40px;
    font-size: 15px;
    text-align: justify;
}
.content p {
    margin: 10px 0;
}
.debt-paragraph {
    font-weight: bold;
    margin: 15px 0 !important;
}
.signatures {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    font-size: 15px;
}
.signatures div {
    text-align: center;
    width: 220px;
}
.btn-container {
    text-align: center;
    margin-top: 30px;
    font-family: Arial, sans-serif;
}
.btn-export {
    background-color: #28a745;
    color: white;
    padding: 14px 28px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.btn-export:hover {
    background-color: #218838;
}

/* ================= STILURI ISTORIC & TABELE ================= */
.history-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
    font-family: Arial, sans-serif;
}
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}
.history-header h2 {
    margin: 0;
    font-size: 18px;
    color: #1e293b;
}
.history-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.btn-export-hist {
    padding: 7px 11px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.btn-export-xls { background-color: #1d6f42; }
.btn-export-xls:hover { background-color: #155331; }
.btn-export-pdf { background-color: #dc3545; }
.btn-export-pdf:hover { background-color: #c82333; }
.btn-import-xls { background-color: #0284c7; }
/* Autentificare */
#ecran-autentificare {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(15, 23, 42, 0.92);
    display: flex; align-items: center; justify-content: center; padding: 16px;
}
.auth-box { background: #fff; border-radius: 12px; padding: 28px; width: 100%; max-width: 360px; box-shadow: 0 10px 40px rgba(0,0,0,0.3); }
.auth-box h2 { margin: 0; color: #1a202c; }
.auth-subtitlu { margin: 4px 0 18px; color: #64748b; font-size: 13px; }
.auth-box label { display: block; font-size: 13px; font-weight: bold; margin-bottom: 6px; }
.auth-box input { width: 100%; box-sizing: border-box; padding: 10px; font-size: 15px; border: 2px solid #e2e8f0; border-radius: 8px; margin-bottom: 12px; }
.auth-box button { width: 100%; }
#auth-mesaj { margin-top: 12px; font-size: 13px; color: #b91c1c; white-space: pre-line; }
#auth-mesaj:empty { display: none; }
.app-header { position: relative; }
.btn-deconectare { position: absolute; top: 0; right: 0; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 6px; padding: 5px 10px; font-size: 12px; cursor: pointer; color: #475569; }
.btn-deconectare:hover { background: #e2e8f0; }
@media (max-width: 768px) { .btn-deconectare { position: static; display: block; margin: 0 0 10px auto; } }

/* Câmpuri completate automat (scara / etaj din numărul apartamentului) */
input.camp-auto, select:disabled { background-color: #f1f5f9; color: #334155; cursor: not-allowed; opacity: 1; }
.btn-import-xls:hover { background-color: #0369a1; }
.btn-import-pdf { background-color: #7c3aed; }
.btn-import-pdf:hover { background-color: #6d28d9; }
.btn-backup { background-color: #475569; }
.btn-backup:hover { background-color: #334155; }
.btn-backup-zip { background-color: #0f766e; }
.btn-backup-zip:hover { background-color: #115e59; }

.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.filter-bar input,
.filter-bar select {
    flex: 1;
    min-width: 180px;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    font-size: 13px;
    background-color: #fff;
}

.table-responsive {
    overflow-x: auto;
}
.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}
.history-table th, .history-table td {
    border: 1px solid #e2e8f0;
    padding: 8px;
    text-align: left;
}
.history-table th {
    background-color: #f8fafc;
    font-weight: bold;
    color: #475569;
}
.history-table tr:nth-child(even) {
    background-color: #fcfcfc;
}
.action-buttons-cell {
    white-space: nowrap;
}
.btn-small {
    padding: 4px 7px;
    font-size: 11px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    color: white;
    margin-right: 2px;
}
/* Registru Proprietari: pagină mai lată, email-uri care se rup pe rânduri,
   coloana „Acțiuni” fixată la dreapta ca butoanele să rămână vizibile și la derulare orizontală */
.container.container-lat { max-width: 1320px; }
.prop-table th, .prop-table td { padding: 6px; }
.prop-table td.col-email { overflow-wrap: anywhere; min-width: 120px; }
.prop-table th:last-child,
.prop-table td.action-buttons-cell {
    position: sticky;
    right: 0;
    z-index: 1;
    background-color: #fff;
    box-shadow: -3px 0 5px rgba(0, 0, 0, 0.06);
}
.prop-table th:last-child { background-color: #f8fafc; }
.prop-table tr:nth-child(even) td.action-buttons-cell { background-color: #fcfcfc; }
.prop-table td.col-scara, .prop-table td.col-ap,
.prop-table td.col-ebloc, .prop-table td.col-tip { text-align: center; }
.prop-table td.col-fond { text-align: right; white-space: nowrap; }
.prop-table td a { color: inherit; text-decoration: none; }
.prop-table td a:hover { text-decoration: underline; }

/* Mobil: fiecare proprietar devine un card (antet: scara · ap. · tip, apoi numele,
   apoi perechi etichetă–valoare, butoanele pe toată lățimea, ușor de apăsat) */
@media (max-width: 768px) {
    .prop-table, .prop-table tbody { display: block; width: 100%; }
    .prop-table thead { display: none; }
    .prop-table tr {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 4px 8px;
        background: #fff !important;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        padding: 12px;
        margin-bottom: 12px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }
    .prop-table td {
        display: block;
        border: none;
        padding: 0;
        text-align: left !important;
        font-size: 14px;
    }
    .prop-table td.camp-gol { display: none !important; }
    .prop-table td.col-scara { order: 1; }
    .prop-table td.col-scara::before { content: 'Sc. '; color: #64748b; font-size: 13px; }
    .prop-table td.col-ap { order: 2; }
    .prop-table td.col-ap::before { content: '· Ap. '; color: #64748b; font-size: 13px; }
    .prop-table td.col-tip { order: 3; margin-left: auto; font-size: 12px; color: #475569; background: #f1f5f9; border-radius: 10px; padding: 2px 8px; }
    .prop-table td.col-nume { order: 4; flex-basis: 100%; font-size: 16px; margin: 4px 0 6px; }
    .prop-table td.col-fond, .prop-table td.col-ebloc, .prop-table td.col-email,
    .prop-table td.col-tel, .prop-table td.col-alte-tel {
        order: 5;
        flex-basis: 100%;
        display: flex;
        gap: 8px;
        white-space: normal;
        padding: 3px 0;
        border-top: 1px dashed #eef2f6;
    }
    .prop-table td.col-fond::before, .prop-table td.col-ebloc::before, .prop-table td.col-email::before,
    .prop-table td.col-tel::before, .prop-table td.col-alte-tel::before {
        content: attr(data-label);
        flex: 0 0 38%;
        color: #64748b;
        font-size: 13px;
    }
    .prop-table td.col-email a, .prop-table td.col-tel a { color: #0369a1; }
    .prop-table td.action-buttons-cell {
        order: 6;
        flex-basis: 100%;
        position: static;
        box-shadow: none;
        background: transparent !important;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        margin-top: 8px;
    }
    .prop-table td.action-buttons-cell .btn-small {
        margin: 0;
        padding: 10px 4px;
        font-size: 13px;
        border-radius: 6px;
    }
}
.btn-view { background-color: #0ea5e9; }
.btn-view:hover { background-color: #0284c7; }
.btn-edit { background-color: #f59e0b; color: #000; font-weight: bold; }
.btn-edit:hover { background-color: #d97706; }
.btn-load { background-color: #007bff; }
.btn-load:hover { background-color: #0056b3; }
.btn-del { background-color: #dc3545; }
.btn-del:hover { background-color: #c82333; }
.empty-history {
    text-align: center;
    color: #777;
    padding: 20px;
    font-style: italic;
    font-size: 13px;
}
.badge-type {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    background-color: #e0f2fe;
    color: #0369a1;
}
.badge-file {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    background-color: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
    margin-top: 3px;
    margin-right: 3px;
}
.badge-ok {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    background-color: #dcfce7;
    color: #166534;
}
.badge-warn {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    background-color: #fef3c7;
    color: #92400e;
}
.badge-exp {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    background-color: #fee2e2;
    color: #991b1b;
}

/* ================= STILURI MODAL EDITARE & PREVIEW ================= */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.modal-content {
    background: white;
    padding: 25px;
    border-radius: 10px;
    width: 520px;
    max-width: 92%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
    font-family: Arial, sans-serif;
}
.modal-content.preview-modal-box {
    width: 860px;
    max-width: 95%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    max-height: 92vh;
    max-height: 92dvh;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 10px;
    margin-bottom: 12px;
    flex-shrink: 0;
}
.modal-header h3 {
    margin: 0;
    text-decoration: none;
    font-size: 18px;
    text-align: left;
    color: #1e293b;
}
.btn-close-modal {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #64748b;
    line-height: 1;
}
.btn-close-modal:hover {
    color: #0f172a;
}
.preview-tabs-bar {
    display: none;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}
.preview-tab-btn {
    padding: 5px 10px;
    font-size: 12px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}
.preview-tab-btn.active {
    background: #0284c7;
    color: white;
    border-color: #0284c7;
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.preview-body-container {
    flex: 1;
    overflow-y: auto;
    background: #525659;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 120px;
}
.preview-body-container.doc-mode {
    background: #f1f5f9;
}
.preview-body-container iframe {
    width: 100%;
    height: 68vh;
    border: none;
    background: white;
    border-radius: 4px;
}
.preview-body-container img {
    max-width: 100%;
    max-height: 68vh;
    object-fit: contain;
    background: white;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.preview-doc-sheet {
    background: white;
    width: 100%;
    max-width: 720px;
    padding: 30px 35px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
    border-radius: 4px;
    font-family: 'Times New Roman', Times, serif;
    color: #000;
    line-height: 1.55;
    font-size: 15px;
}
.preview-meta-grid {
    display: grid;
    grid-template-columns: 195px 1fr;
    gap: 8px 12px;
    font-family: Arial, sans-serif;
    font-size: 13.5px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 14px;
}
.preview-meta-label {
    font-weight: bold;
    color: #475569;
}
.preview-notes-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 12px;
    border-radius: 6px;
    font-family: Arial, sans-serif;
    font-size: 13.5px;
    white-space: pre-wrap;
}

/* ================= RESPONSIVE MOBILE ================= */
.modal-overlay { height: 100vh; height: 100dvh; }
.preview-modal-box .modal-footer { background: #fff; position: relative; z-index: 2; }
.preview-body-container iframe { height: min(68vh, 100%); min-height: 200px; }
@media (max-height: 600px), (max-width: 768px) {
    .modal-content.preview-modal-box { padding: 12px; }
    .preview-modal-box .modal-header { margin-bottom: 6px; padding-bottom: 6px; }
    .preview-modal-box .modal-footer { margin-top: 8px; gap: 6px; }
    .preview-body-container img { max-height: 50vh; }
    .preview-body-container iframe { height: 50vh; }
}
@media (max-width: 768px) {
    body { padding: 10px; }
    .container { padding: 18px; }
    /* Statistici compacte: 4 coloane × 2 rânduri, etichete scurte (data-scurt) */
    .stats-bar { grid-template-columns: repeat(4, 1fr); gap: 4px 2px; padding: 8px 4px; margin-bottom: 14px; }
    .stat-box { padding: 3px 1px; }
    .stat-box:not(:last-child) { border-right: none; }
    .stat-num { font-size: 17px; line-height: 1.2; }
    .stat-label { font-size: 10.5px; letter-spacing: 0; text-transform: none; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .stat-label[data-scurt] { font-size: 0; }
    .stat-label[data-scurt]::after { content: attr(data-scurt); font-size: 10.5px; }
    .menu-grid { grid-template-columns: 1fr; }
    .submenu-container { grid-column: span 1; }
    .submenu-grid { grid-template-columns: 1fr; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; gap: 8px; }
    .preview-meta-grid { grid-template-columns: 1fr; }
    .signatures { flex-direction: column; gap: 30px; align-items: center; }
    .header-container { flex-direction: column; gap: 10px; }
    .header-right { margin-top: 0; text-align: left; }
}

/* ================= NOTIFICĂRI & ANUNȚURI ================= */
.notif-doc-sheet { font-family: 'Times New Roman', Times, serif; width: 100%; box-sizing: border-box; font-size: 15px; line-height: 1.5; color: #000; background: #fff; }
.notif-doc-sheet .notif-title { text-align: center; font-size: 34px; font-weight: bold; letter-spacing: 4px; margin: 26px 0 4px 0; text-transform: uppercase; }
.notif-doc-sheet .notif-subtitle { text-align: center; font-size: 20px; font-weight: bold; margin-bottom: 22px; text-transform: uppercase; }
.notif-doc-sheet .notif-box { border: 2px solid #000; padding: 14px 18px; margin: 14px 0 20px 0; font-size: 18px; text-align: center; line-height: 1.7; }
.notif-doc-sheet .notif-box strong { font-size: 20px; }
.notif-doc-sheet .notif-body { white-space: pre-line; text-align: justify; font-size: 15.5px; }
.notif-doc-sheet .signatures { margin-top: 40px; }
#notif-preview-area { border: 1px dashed #94a3b8; background: #fff; padding: 18px; border-radius: 8px; overflow-x: auto; }

/* ================= SETĂRI ASOCIAȚIE ================= */
.antet-butoane { position: absolute; top: 0; right: 0; display: flex; gap: 6px; }
.antet-butoane .btn-deconectare { position: static; }
.setari-structura { grid-template-columns: repeat(4, 1fr); }
.setari-info { font-size: 13px; margin: 4px 0 6px; padding: 8px 10px; border-radius: 6px; }
.setari-info:empty { display: none; }
.setari-ok { background: #f0fdf4; color: #166534; }
.setari-eroare { background: #fef2f2; color: #991b1b; }
.setari-butoane { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; align-items: center; }
.setari-butoane .btn-action { width: auto; margin: 0; }
@media (max-width: 768px) {
    .antet-butoane { position: static; justify-content: flex-end; margin-bottom: 10px; }
    .antet-butoane .btn-deconectare { display: inline-block; margin: 0; }
    .setari-structura { grid-template-columns: 1fr 1fr; }
}
#section-setari .form-panel h3 { text-align: left; text-decoration: none; font-size: 16px; margin: 22px 0 10px; color: #334155; }
#section-setari .form-panel h3:first-child { margin-top: 0; }

/* ================= CONTURI: președinte / cenzor ================= */
.auth-link { display: block; margin: 10px auto 0; background: none; border: none; color: #0369a1; font-size: 13px; cursor: pointer; text-decoration: underline; width: auto !important; }
#auth-mesaj.auth-info { color: #334155; }
#auth-recuperare label { display: block; font-size: 13px; font-weight: bold; margin-bottom: 6px; }
#auth-recuperare input { width: 100%; box-sizing: border-box; padding: 10px; font-size: 15px; border: 2px solid #e2e8f0; border-radius: 8px; margin-bottom: 12px; }
#rec-cod { text-transform: uppercase; letter-spacing: 1px; font-family: monospace; }
.eticheta-rol { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; border-radius: 6px; padding: 5px 10px; font-size: 12px; white-space: nowrap; }
.card-slate { background: linear-gradient(135deg, #64748b, #334155); }
.setari-nota { font-size: 13px; color: #64748b; margin: 0 0 10px; }
.setari-btn { width: auto !important; margin: 0 !important; }
.coduri-box { margin-top: 12px; padding: 12px 14px; border: 2px dashed #f59e0b; border-radius: 8px; background: #fffbeb; }
.coduri-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin-top: 10px; }
.coduri-lista code { font-size: 16px; letter-spacing: 1px; background: #fff; border: 1px solid #fde68a; border-radius: 6px; padding: 6px 8px; text-align: center; }

/* Contul de cenzor: doar citire. Ascundem formularele (în afara celor marcate .permis-cenzor) și butoanele care modifică date.
   Restricția reală e pe server (api.php răspunde 403); aici doar nu le afișăm. */
.rol-cenzor .form-panel:not(.permis-cenzor),
.rol-cenzor .backup-panel,
.rol-cenzor [onclick*="deschideModalGeneric"],
.rol-cenzor [onclick*="incarcaGeneric"],
.rol-cenzor [onclick*="stergeGeneric"],
.rol-cenzor [onclick*="deschideModalEditare"],
.rol-cenzor [onclick*="incarcaAdeverinta"],
.rol-cenzor [onclick*="stergeAdeverinta"],
.rol-cenzor [onclick*="notifReutilizeaza"],
.rol-cenzor [onclick*="notifSterge"],
.rol-cenzor [onclick*="stergeTotiProprietarii"],
.rol-cenzor [onclick*="import-"],
.rol-cenzor [onclick*="deschideSectiune('debite')"],
.rol-cenzor [onclick*="deschideSectiune('nr_persoane')"],
.rol-cenzor .prop-table .col-email,
.rol-cenzor .prop-table .col-tel,
.rol-cenzor .prop-table .col-alte-tel { display: none !important; }
@media (max-width: 768px) { .antet-butoane { flex-wrap: wrap; } .eticheta-rol { order: -1; } }

/* ================= RAPOARTE CENZOR ================= */
.rap-table td.rap-data { white-space: nowrap; }
.rap-note { font-size: 12px; color: #64748b; margin-top: 3px; white-space: pre-line; }
@media (max-width: 768px) {
    /* Pe telefon fiecare raport devine un card: data + tip sus, titlul, apoi perioada / fișiere / autor, butoanele jos */
    .rap-table, .rap-table tbody { display: block; width: 100%; }
    .rap-table thead { display: none; }
    .rap-table tr {
        display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px;
        background: #fff !important; border: 1px solid #e2e8f0; border-radius: 10px;
        padding: 12px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }
    .rap-table td { display: block; border: none; padding: 0; font-size: 14px; }
    .rap-table td.camp-gol { display: none !important; }
    .rap-table td.rap-data { order: 1; font-size: 13px; color: #64748b; }
    .rap-table td.rap-tip { order: 2; margin-left: auto; }
    .rap-table td.rap-tip .badge-type { white-space: normal; text-align: right; display: inline-block; }
    .rap-table td.rap-titlu { order: 3; flex-basis: 100%; font-size: 15.5px; margin: 4px 0 6px; }
    .rap-table td.rap-perioada, .rap-table td.rap-fisiere, .rap-table td.rap-autor {
        order: 4; flex-basis: 100%; display: flex; gap: 8px; padding: 3px 0; border-top: 1px dashed #eef2f6; overflow-wrap: anywhere;
    }
    .rap-table td.rap-perioada::before, .rap-table td.rap-fisiere::before, .rap-table td.rap-autor::before {
        content: attr(data-label); flex: 0 0 34%; color: #64748b; font-size: 13px;
    }
    .rap-table td.action-buttons-cell {
        order: 5; flex-basis: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 6px; margin-top: 8px;
    }
    .rap-table td.action-buttons-cell .btn-small { margin: 0; padding: 10px 4px; font-size: 13px; border-radius: 6px; }
}

/* ================= PREVIZUALIZARE: fereastră mare pe ecrane de calculator ================= */
@media (min-width: 769px) and (min-height: 601px) {
    .modal-content.preview-modal-box {
        width: min(1280px, 94vw);
        max-width: none;
        height: 92vh;
        height: 92dvh;
    }
    .preview-body-container { min-height: 0; }
    .preview-body-container iframe { height: 100%; min-height: 0; }
    .preview-body-container img { max-height: 100%; }
    .preview-doc-sheet { max-width: 860px; }
}

/* ================= MOD DEMO ================= */
.banda-demo { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between;
    background: repeating-linear-gradient(135deg, #fef3c7, #fef3c7 12px, #fde68a 12px, #fde68a 24px);
    border: 1px solid #f59e0b; color: #78350f; border-radius: 8px; padding: 10px 14px; margin: -10px 0 18px; font-size: 13.5px; }
.banda-demo button { background: #92400e; color: #fff; border: none; border-radius: 6px; padding: 7px 12px; font-size: 13px; font-weight: bold; cursor: pointer; }
.banda-demo button:hover { background: #78350f; }
.rol-cenzor #btn-date-exemplu { display: none; }
.mod-demo .ascuns-in-demo { display: none !important; }
.auth-demo { margin-top: 14px; padding: 10px 12px; background: #fffbeb; border: 1px dashed #f59e0b; border-radius: 8px; font-size: 13px; color: #78350f; }
.auth-demo code, .setari-nota code { background: #fef3c7; padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.comutator-demo { display: flex; gap: 8px; align-items: center; font-weight: bold; font-size: 14px; margin: 6px 0 4px; }
.comutator-demo input { width: 18px; height: 18px; }

/* Atributul hidden ascunde întotdeauna, chiar dacă elementul are display: flex / inline-block din alte reguli */
[hidden] { display: none !important; }
.auth-demo-titlu { font-weight: bold; margin-bottom: 10px; font-size: 14px; }
.auth-demo .btn-action { width: 100%; margin: 0 0 8px; }
.auth-demo .auth-demo-cenzor { background: #475569; }
.auth-demo .auth-demo-cenzor:hover { background: #334155; }
.auth-demo-nota { font-size: 12px; margin-top: 4px; }
