body {
	color: #333;
}
button {
    	margin-top: 5px;
}
.screen-margin {
	/* max-width:1100px;*/
	margin-top:80px;
	margin-bottom:80px;
	padding-bottom:100px; /* space for fixed footer */
}

/* Fixed footer styling used by includes.php */
.fixed-footer {
	/*position: fixed;*/
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	z-index: 9999;
	min-height: 56px; /* adjust if you want a taller footer */
	display: flex;
	align-items: center;
	justify-content: center;
}

.rosu{
	background-color: #853;
	color: 358;
}

.verde{
	background-color: #385;
	color: 358;
}
.scris_form{
	width: 100%;
	min-height: 500px;
}
.row{
	background-color: #caf7d099;
}
input, textarea {
	padding: 5px;
	margin-bottom: 3px;
}
.txa_form{
	width: 100%;
	min-height: 150px;
}
.h50{
	min-height:50px;
}

.ico {
    height: 30px;
}
.pic{
		height: 80px;
}

/* Patient List Table Styling */
.pacient-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.pacient-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 10px;
    text-align: left;
    font-weight: 600;
    border: none;
}
.pacient-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}
.pacient-table tr:hover td {
    background-color: #f8f9ff;
}
.pacient-table tr:last-child td {
    border-bottom: none;
}
.action-btn {
    margin: 0 2px;
    padding: 6px 10px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    font-size: 12px;
    transition: all 0.2s;
}
.edit-btn {
    background-color: #2196F3;
    color: white;
}
.edit-btn:hover {
    background-color: #1976D2;
    transform: translateY(-1px);
}
.delete-btn {
    background-color: #f44336;
    color: white;
}
.delete-btn:hover {
    background-color: #d32f2f;
    transform: translateY(-1px);
}
.view-btn {
    background-color: #4CAF50;
    color: white;
}
.view-btn:hover {
    background-color: #388E3C;
    transform: translateY(-1px);
}
.pagination-container {
    margin-top: 20px;
    text-align: center;
}
.pagination-btn {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    background-color: #f1f1f1;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}
.pagination-btn:hover {
    background-color: #ddd;
}
.pagination-btn.active {
    background-color: #667eea;
    color: white;
}

/* Action buttons container styling */
.pacient-table td.w3-center {
    text-align: center;
    vertical-align: middle;
}
.pacient-table td.w3-center .action-btn {
    display: inline-block;
    margin: 2px;
}

/* Patient Form Styling */
.patient-form-container {
    max-width: 800px;
    margin: 0 auto;
}

.patient-form-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.patient-form-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.patient-form-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.patient-form-header p {
    margin: 5px 0 0 0;
    opacity: 0.9;
    font-size: 14px;
}

.patient-form-body {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.form-group.required label::after {
    content: " *";
    color: #f44336;
    font-weight: bold;
}

.form-label {
    min-width: 150px;
    font-weight: 600;
    color: #333;
    margin-right: 20px;
    font-size: 14px;
}

.form-input {
    flex: 1;
}

.form-input input,
.form-input select,
.form-input textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.form-input input:focus,
.form-input select:focus,
.form-input textarea:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.form-actions {
    text-align: center;
    padding: 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.btn-submit {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.btn-back {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    margin-left: 10px;
    transition: background-color 0.3s ease;
}

.btn-back:hover {
    background: #5a6268;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .patient-form-body {
        padding: 20px;
    }

    .form-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-label {
        min-width: auto;
        margin-bottom: 8px;
        margin-right: 0;
    }

    .form-actions {
        padding: 15px;
    }

    .btn-submit {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Consultation Form Styling */
.consultation-form-container {
    max-width: 800px;
    margin: 0 auto;
}

.consultation-form-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.consultation-form-header {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    padding: 20px;
    text-align: center;
}

.consultation-form-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.consultation-form-header p {
    margin: 5px 0 0 0;
    opacity: 0.9;
    font-size: 14px;
}

.consultation-form-body {
    padding: 30px;
}

.consultation-form-group {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.consultation-form-group.required label::after {
    content: " *";
    color: #f44336;
    font-weight: bold;
}

.consultation-form-label {
    min-width: 150px;
    font-weight: 600;
    color: #333;
    margin-right: 20px;
    font-size: 14px;
}

.consultation-form-input {
    flex: 1;
}

.consultation-form-input input,
.consultation-form-input select,
.consultation-form-input textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.consultation-form-input input:focus,
.consultation-form-input select:focus,
.consultation-form-input textarea:focus {
    outline: none;
    border-color: #2196F3;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.consultation-form-input textarea {
    min-height: 150px;
    resize: vertical;
    font-family: inherit;
}

/* Preview Form Styling */
.preview-form-container {
    max-width: 800px;
    margin: 0 auto;
}

.preview-form-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.preview-form-header {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
    padding: 20px;
    text-align: center;
}

.preview-form-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.preview-form-header p {
    margin: 5px 0 0 0;
    opacity: 0.9;
    font-size: 14px;
}

.preview-form-body {
    padding: 30px;
}

.preview-data-list {
    margin-bottom: 30px;
}

.preview-field {
    display: flex;
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #FF9800;
}

.preview-field-label {
    min-width: 200px;
    font-weight: 600;
    color: #333;
    margin-right: 20px;
    font-size: 14px;
}

.preview-field-value {
    flex: 1;
    color: #555;
    line-height: 1.5;
}

.preview-actions {
    text-align: center;
    padding: 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-preview-edit {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-preview-edit:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-preview-confirm {
    background: linear-gradient(135deg, #4CAF50, #388E3C);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-preview-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

/* Responsive adjustments for preview form */
@media (max-width: 768px) {
    .preview-form-body {
        padding: 20px;
    }

    .preview-field {
        flex-direction: column;
    }

    .preview-field-label {
        min-width: auto;
        margin-bottom: 8px;
        margin-right: 0;
    }

    .preview-actions {
        flex-direction: column;
        gap: 10px;
    }

    .btn-preview-edit,
    .btn-preview-confirm {
        width: 100%;
    }
}

/* Consultation List Styles */
.consultation-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.consultation-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.consultation-header h2 {
    margin: 0 0 10px 0;
    font-size: 2.2em;
    font-weight: 300;
}

.consultation-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1em;
}

.consultation-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.consultation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.consultation-info {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.consultation-patient {
    font-size: 1.4em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.consultation-details {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.consultation-detail {
    display: flex;
    align-items: center;
    font-size: 0.95em;
    color: #666;
}

.consultation-detail i {
    margin-right: 8px;
    width: 16px;
    color: #667eea;
}

.consultation-actions {
    padding: 15px 20px;
    background: #f8f9fa;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-consultation {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-view {
    background: #28a745;
    color: white;
}

.btn-view:hover {
    background: #218838;
    transform: translateY(-1px);
}

.btn-edit {
    background: #007bff;
    color: white;
}

.btn-edit:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-delete:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.consultation-empty {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.consultation-empty i {
    font-size: 4em;
    color: #ddd;
    margin-bottom: 20px;
}

.consultation-empty h3 {
    margin-bottom: 10px;
    color: #999;
}

.consultation-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.consultation-count {
    background: #e9ecef;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    color: #495057;
}

.consultation-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-filter {
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.btn-filter:hover {
    background: #e9ecef;
}

.btn-filter.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Patient-specific consultation header */
.patient-consultation-header {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    margin-bottom: 20px;
}

.patient-consultation-header .consultation-header h2 {
    font-size: 1.8em;
}

.patient-actions {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.patient-actions h3 {
    margin: 0 0 10px 0;
    color: #856404;
    font-size: 1.1em;
}

.patient-actions .btn-consultation {
    margin-right: 10px;
    margin-bottom: 5px;
}

/* Compact Table Styles */
.consultation-table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.consultation-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.3em;
}

.consultation-table thead {
    background: #f8f9fa;
}

.consultation-table th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.consultation-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: middle;
}

.consultation-table tbody tr:hover {
    background: #f8f9fa;
}

.patient-compact strong {
    display: block;
    color: #2c3e50;
    font-size: 0.95em;
}

.patient-compact small {
    color: #6c757d;
    font-size: 0.8em;
}

.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #4CAF50;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
}

.type-badge i {
    font-size: 1em;
}

.action-buttons {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-action.btn-view {
    background: #28a745;
    color: white;
}

.btn-action.btn-view:hover {
    background: #218838;
    transform: scale(1.1);
}

.btn-action.btn-edit {
    background: #007bff;
    color: white;
}

.btn-action.btn-edit:hover {
    background: #0056b3;
    transform: scale(1.1);
}

.btn-action.btn-delete {
    background: #dc3545;
    color: white;
}

.btn-action.btn-delete:hover {
    background: #c82333;
    transform: scale(1.1);
}

.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.no-data i {
    font-size: 3em;
    color: #dee2e6;
    margin-bottom: 10px;
}

.no-data div {
    font-size: 1.1em;
    font-weight: 500;
    margin-bottom: 5px;
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.pagination {
    display: flex;
    gap: 4px;
    align-items: center;
}

.page-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #007bff;
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.page-link:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.page-link.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.page-dots {
    padding: 0 8px;
    color: #6c757d;
    font-weight: 500;
}

/* Responsive table */
@media (max-width: 768px) {
    .consultation-table-container {
        overflow-x: auto;
    }

    .consultation-table {
        min-width: 600px;
    }

    .consultation-table th,
    .consultation-table td {
        padding: 8px 4px;
        font-size: 0.8em;
    }

    .patient-compact strong {
        font-size: 2em;
    }

    .type-badge {
        font-size: 0.85em;
        padding: 4px 8px;
    }

    .type-badge-text {
        display: none;
    }

    .action-buttons {
        gap: 2px;
    }

    .btn-action {
        width: 24px;
        height: 24px;
        font-size: 0.7em;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 2px;
    }

    .page-link {
        padding: 6px 8px;
        font-size: 0.8em;
    }
}

/* Patient list styling */
.patient-list-name {
    font-size: 18px !important;
    font-weight: bold !important;
    color: #2c3e50 !important;
}

.patient-list-cnp {
    font-size: 16px !important;
    font-weight: bold !important;
    color: #34495e !important;
    font-family: 'Courier New', monospace !important;
}

/* Programari (Appointments) Styling - Similar to Consultations */
.programari-container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 0 20px;
}

.programari-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.programari-header h2 {
    margin: 0 0 10px 0;
    font-size: 2.2em;
    font-weight: 300;
}

.programari-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1em;
}

/* Make calendar container fit better */
.programari-container .calendar-container {
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.programari-container .calendar-header {
    padding: 20px;
}

.programari-container .legend-container {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.programari-container .legend-item {
    display: inline-flex;
    align-items: center;
    margin-right: 20px;
    font-size: 0.9em;
    color: #495057;
}

.programari-container .legend-color {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 8px;
    border: 1px solid rgba(0,0,0,0.1);
}

/* Admin panel styling improvements */
.programari-container .admin-panel {
    margin-top: 20px;
}

.programari-container .admin-panel h4 {
    margin-top: 0;
    color: #495057;
    font-size: 1.2em;
}

.programari-container .selected-days-info {
    background: white;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    color: #495057;
    font-weight: 500;
    border-left: 4px solid #667eea;
}

/* Form styling in admin panel */
.programari-container .day-params-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.programari-container .day-params-form .form-group label {
    display: block;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.programari-container .day-params-form input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95em;
    transition: all 0.3s ease;
}

.programari-container .day-params-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.programari-container .form-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.programari-container .form-actions button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.programari-container .form-actions button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Modal improvements */
.programari-container .slots-modal {
    max-width: 800px;
    border-radius: 12px;
    overflow: hidden;
}

.programari-container .slots-modal header {
    padding: 20px;
}

.programari-container .slots-modal .modal-body {
    padding: 25px;
}

.programari-container .day-params-card {
    margin-bottom: 20px;
}

.programari-container .day-params-card h4 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    color: #495057;
}

.programari-container .form-row-compact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.programari-container .form-group-compact label {
    display: block;
    font-size: 0.85em;
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
}

.programari-container .form-group-compact input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Patient search modal */
.programari-container .patient-search-modal {
    max-width: 600px;
    border-radius: 12px;
    overflow: hidden;
}

.programari-container .patient-search-results {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 15px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .programari-container {
        padding: 0 10px;
    }

    .programari-header h2 {
        font-size: 1.6em;
    }

    .programari-header p {
        font-size: 0.95em;
    }

    .programari-container .day-params-form .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .programari-container .form-row-compact {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .programari-container .form-actions {
        flex-direction: column;
    }

    .programari-container .form-actions button {
        width: 100%;
    }

    .programari-container .legend-item {
        display: block;
        margin-bottom: 10px;
    }
}
