/* ============================================
   REGISTRU PACIENTI - STILURI GENERALE
   ============================================ */

/* Container principal */
.registru-wrap,
.registru-list-wrap,
.registru-fisa-wrap {
    max-width: 1200px;
    margin: 20px auto;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* ============================================
   BANNER
   ============================================ */
.registru-banner,
.registru-list-banner {
    background: #2c3e50;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.badge,
.badge-list {
    background: #27ae60;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

/* ============================================
   FORMULAR
   ============================================ */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 14px;
}

.form-group label .required {
    color: #e74c3c;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52,152,219,0.15);
}

.form-group input:read-only {
    background: #e9ecef;
    cursor: not-allowed;
}

/* ============================================
   BUTOANE GENERALE
   ============================================ */
.btn-submit {
    padding: 12px 40px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.btn-submit:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(52,152,219,0.4);
}

.btn-add-list {
    padding: 10px 20px;
    background: #27ae60;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-add-list:hover {
    background: #219a52;
    color: white;
    transform: translateY(-2px);
}

.btn-search-list {
    padding: 10px 25px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.btn-search-list:hover {
    background: #2980b9;
}

.btn-clear-list {
    padding: 10px 20px;
    background: #e9ecef;
    color: #495057;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

.btn-clear-list:hover {
    background: #dee2e6;
}

.btn-back-fisa {
    padding: 8px 16px;
    background: #e9ecef;
    color: #495057;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-back-fisa:hover {
    background: #dee2e6;
}

/* ============================================
   LISTA PACIENTI
   ============================================ */
.registru-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.registru-list-header h2 {
    color: #2c3e50;
    margin: 0;
}

.registru-search-list {
    margin-bottom: 20px;
}

.search-group-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-group-list input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    min-width: 200px;
}

.search-group-list input:focus {
    border-color: #3498db;
    outline: none;
}

.table-responsive-list {
    overflow-x: auto;
    background: white;
    border-radius: 10px;
    padding: 15px;
}

.registru-table-list {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.registru-table-list thead {
    background: #f8f9fa;
}

.registru-table-list th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
}

.registru-table-list td {
    padding: 10px 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.registru-table-list tbody tr:hover {
    background: #f8f9fa;
}

.cnp-list {
    font-family: monospace;
    font-size: 13px;
}

.diagnostic-list {
    display: inline-block;
    padding: 3px 10px;
    background: #e8f4fd;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.actions-list {
    display: flex;
    gap: 8px;
}

.btn-fisa-list {
    padding: 5px 10px;
    background: #e8f4fd;
    color: #3498db;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 16px;
}

.btn-fisa-list:hover {
    background: #d1e7f5;
    transform: scale(1.1);
}

.btn-delete-list {
    padding: 5px 10px;
    background: #fde8e8;
    color: #e74c3c;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-delete-list:hover {
    background: #fcd5d5;
    transform: scale(1.1);
}

.registru-empty-list {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 10px;
}

.registru-empty-list p {
    font-size: 18px;
    color: #6c757d;
}

/* ============================================
   FISA PACIENT - STILURI GENERALE
   ============================================ */
.fisa-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.fisa-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.fisa-header-left h2 {
    color: #2c3e50;
    margin: 0;
}

.fisa-header-right {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.fisa-badge {
    padding: 6px 14px;
    background: #2c3e50;
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.fisa-badge.fisa-name {
    background: #3498db;
}

.fisa-info-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.fisa-info-item {
    font-size: 14px;
    color: #2c3e50;
}

.fisa-info-item strong {
    color: #6c757d;
}

.fisa-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    background: white;
    border-radius: 10px;
    padding: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    flex-wrap: wrap;
}

.fisa-tab {
    padding: 10px 25px;
    background: transparent;
    color: #6c757d;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    flex: 1;
    text-align: center;
    min-width: 100px;
}

.fisa-tab:hover {
    background: #f8f9fa;
    color: #2c3e50;
}

.fisa-tab.active {
    background: #3498db;
    color: white;
}

.fisa-content {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    min-height: 300px;
}

/* ============================================
   STILIZARE TAB DATE PERSONALE - MODERN
   ============================================ */

/* Container principal */
.fisa-tab-date {
    padding: 5px 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Header cu buton editare */
.fisa-tab-date > div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 2px solid #eef2f7;
    background: linear-gradient(to right, #f8fafc, transparent);
    border-radius: 10px;
}

.fisa-tab-date > div:first-child h3 {
    margin: 0;
    color: #1a202c;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.3px;
}

.fisa-tab-date > div:first-child h3 .emoji {
    width: 26px;
    height: 26px;
}

/* Butoane moderne */
.btn-edit-pacient {
    padding: 8px 24px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
    letter-spacing: 0.3px;
}

.btn-edit-pacient:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
    color: white;
    text-decoration: none;
    background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
}

.btn-cancel-edit {
    padding: 8px 24px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    letter-spacing: 0.3px;
}

.btn-cancel-edit:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
    color: white;
    text-decoration: none;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.btn-save-edit {
    padding: 12px 44px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
    letter-spacing: 0.5px;
}

.btn-save-edit:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.45);
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Mod citire - carduri moderne */
.fisa-view-mode {
    padding: 5px 0;
}

.fisa-view-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 30px;
    margin-bottom: 12px;
}

.fisa-view-item {
    padding: 10px 14px;
    background: #fafbfc;
    border-radius: 10px;
    border: 1px solid #f1f3f5;
    transition: all 0.2s ease;
}

.fisa-view-item:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
    transform: translateX(2px);
}

.fisa-view-item.full-width {
    grid-column: 1 / -1;
}

.fisa-view-item label {
    display: block;
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 3px;
    font-weight: 700;
}

.fisa-view-item .fisa-view-value {
    font-size: 15px;
    color: #0f172a;
    padding: 2px 0;
    font-weight: 500;
}

.fisa-view-item .fisa-view-value strong {
    font-weight: 700;
    color: #0f172a;
}

/* Diagnostic badge modern */
.diagnostic-badge {
    display: inline-block;
    padding: 5px 20px;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    color: #3730a3;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid #a5b4fc;
    box-shadow: 0 1px 4px rgba(79, 70, 229, 0.15);
}

/* Observații moderne */
.fisa-view-item.full-width .fisa-view-value {
    background: linear-gradient(135deg, #f1f5f9 0%, #f8fafc 100%);
    padding: 14px 18px;
    border-radius: 10px;
    border-left: 4px solid #4f46e5;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 14px;
    color: #0f172a;
    line-height: 1.7;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.03);
}

/* Mod editare - formular modern */
.fisa-edit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
    margin-bottom: 16px;
}

.fisa-edit-grid .form-group {
    margin-bottom: 4px;
}

.fisa-edit-grid .form-group label {
    display: block;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
    font-size: 13px;
    letter-spacing: 0.2px;
}

.fisa-edit-grid .form-group label .required {
    color: #ef4444;
    margin-left: 2px;
}

.fisa-edit-grid .form-group input,
.fisa-edit-grid .form-group select,
.fisa-edit-grid .form-group textarea {
    width: 100%;
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    background: #fafbfc;
    box-sizing: border-box;
    transition: all 0.3s ease;
    font-family: inherit;
}

.fisa-edit-grid .form-group input:focus,
.fisa-edit-grid .form-group select:focus,
.fisa-edit-grid .form-group textarea:focus {
    border-color: #4f46e5;
    outline: none;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
    background: #ffffff;
}

.fisa-edit-grid .form-group input:read-only {
    background: #f1f5f9;
    cursor: not-allowed;
    color: #64748b;
}

.fisa-edit-grid .form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Formular - câmpuri full width */
.fisa-tab-date .form-group:not(.fisa-edit-grid .form-group) {
    margin-bottom: 16px;
}

.fisa-tab-date .form-group:not(.fisa-edit-grid .form-group) label {
    display: block;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
    font-size: 13px;
    letter-spacing: 0.2px;
}

.fisa-tab-date .form-group:not(.fisa-edit-grid .form-group) label .required {
    color: #ef4444;
}

.fisa-tab-date .form-group:not(.fisa-edit-grid .form-group) input,
.fisa-tab-date .form-group:not(.fisa-edit-grid .form-group) textarea {
    width: 100%;
    padding: 10px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    background: #fafbfc;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.fisa-tab-date .form-group:not(.fisa-edit-grid .form-group) input:focus,
.fisa-tab-date .form-group:not(.fisa-edit-grid .form-group) textarea:focus {
    border-color: #4f46e5;
    outline: none;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
    background: #ffffff;
}

/* Acțiuni editare */
.fisa-edit-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 28px;
    padding-top: 22px;
    border-top: 2px solid #eef2f7;
}

/* ============================================
   MESAJE SUCCES/EROARE
   ============================================ */
.registru-success {
    padding: 14px 20px;
    background: #ecfdf5;
    color: #065f46;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #a7f3d0;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 1px 4px rgba(16, 185, 129, 0.1);
}

.registru-success::before {
    content: "✅";
    font-size: 18px;
}

.registru-error {
    padding: 14px 20px;
    background: #fef2f2;
    color: #991b1b;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #fca5a5;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 1px 4px rgba(239, 68, 68, 0.1);
}

.registru-error::before {
    content: "⚠️";
    font-size: 18px;
}

/* ============================================
   FOOTER
   ============================================ */
.registru-footer,
.registru-list-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #6c757d;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .fisa-view-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .fisa-edit-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .registru-wrap,
    .registru-list-wrap,
    .registru-fisa-wrap {
        padding: 15px;
        margin: 10px;
    }
    
    .fisa-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .fisa-tabs {
        flex-direction: column;
    }
    
    .fisa-tab {
        min-width: auto;
    }
    
    .fisa-tab-date > div:first-child {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px 16px;
    }
    
    .fisa-tab-date > div:first-child h3 {
        font-size: 18px;
    }
    
    .btn-edit-pacient,
    .btn-cancel-edit {
        text-align: center;
        justify-content: center;
        width: 100%;
    }
    
    .fisa-edit-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .fisa-edit-actions .btn-cancel-edit,
    .fisa-edit-actions .btn-save-edit {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .search-group-list {
        flex-direction: column;
    }
    
    .search-group-list input {
        width: 100%;
    }
    
    .registru-table-list {
        font-size: 12px;
    }
    
    .registru-table-list th,
    .registru-table-list td {
        padding: 6px 8px;
    }
    
    .fisa-view-item .fisa-view-value {
        font-size: 14px;
    }
    
    .fisa-view-item {
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .fisa-tab-date {
        padding: 0;
    }
    
    .fisa-view-item .fisa-view-value {
        font-size: 13px;
    }
    
    .diagnostic-badge {
        font-size: 13px;
        padding: 4px 14px;
    }
    
    .btn-save-edit {
        padding: 10px 30px;
        font-size: 14px;
    }
}

  @media print {
		  .btn-print-raport{ display: none !important; }
}