:root {
    --primary-color: #006E33;
    --secondary-color: #E67E22;
    --background-color: #f5f5f5;
    --border-color: #ddd;
    --text-color: #333;
    --sidebar-width: 250px;
    --header-height: 60px;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
}

:root {
    --primary: #00712D;
    --primary-light: #009f40;
    --primary-dark: #005020;
    --secondary: #FF9100;
    --secondary-light: #ffb040;
    --secondary-dark: #cc7400;
    --background: #FFFBE6;
    --text: #2c3e50;
    --border: #ddd;
    --shadow: 0 2px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}


.pd-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
}

.tab-link {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px 8px 0 0;
    background: #fff;
    color: var(--text);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.tab-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab-link:hover::before {
    transform: scaleX(1);
}

.tab-link.active {
    background: var(--primary);
    color: white;
}

.pd-tab-content {
    display: none;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition);
}

.pd-tab-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.button, 
.save-document,
.save-consultation {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.button:hover,
.save-document:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,113,45,0.2);
}

.button-secondary {
    background: var(--secondary);
    color: white;
}

.button-secondary:hover {
    background: var(--secondary-light);
    box-shadow: 0 4px 12px rgba(255,145,0,0.2);
}

.editor-wrapper {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
}

.editor-wrapper:focus-within {
    box-shadow: 0 0 0 2px var(--primary-light);
}

.form-field {
    margin-bottom: 1.5rem;
}

.form-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text);
}

input[type="text"],
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: var(--transition);
}

input[type="text"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-light);
    border-radius: 50%;
    border-top-color: transparent;
    
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.save-success {
    animation: saveSuccess 0.5s ease;
}

@keyframes saveSuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.prescription-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.prescription-table th {
    background: var(--primary);
    color: white;
    padding: 1rem;
    text-align: left;
}

.prescription-table td {
    padding: 1rem;
    background: white;
    border-bottom: 1px solid var(--border);
}

.prescription-table tr:last-child td {
    border-bottom: none;
}

.prescription-table tr:hover td {
    background: var(--background);
}

.template-manager {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.template-selector {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: var(--transition);
}

.template-selector:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

@media print {
    body {
        background: white;
    }

    .pd-tabs,
    .save-document,
    .template-manager {
        display: none;
    }

    .pd-tab-content {
        box-shadow: none;
        padding: 0;
    }
}

/* Clinical Notes */
.info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.info-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
}

.info-item label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.clinical-notes .form-group {
    margin-bottom: 1.5rem;
}

.clinical-input {
    width: 100%;
    height: 100px;
    padding: 0.5rem;
    border: 1px solid #ddd;
}

.save-notes {
    background: #28a745;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Document Templates */
.certificate-template h1 {
    text-align: center;
    color: #2c3e50;
}

/* Print Styles */
@media print {
    .pd-tabs, .save-document, .clinical-input {
        display: none !important;
    }
    
    .clinic-letter {
        padding: 20px;
    }
    
    .clinic-header {
        color: #000 !important;
        font-size: 24pt !important;
    }
    
    .clinic-footer {
        border-top: 2px solid #000 !important;
    }
}

/* Screen Styles */
.clinic-letter {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.clinic-header {
    color: #2c3e50;
    border-bottom: 2px solid #2c3e50;
    padding-bottom: 15px;
}

.patient-info {
    border-collapse: collapse;
    margin: 20px 0;
}

.patient-info th, 
.patient-info td {
    padding: 8px;
    border: 1px solid #ddd;
}

.clinic-footer {
    margin-top: 40px;
    color: #666;
}

/* Template Manager */
.template-manager {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    display: flex;
    gap: 10px;
}

.template-selector {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.save-as-template {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.save-as-template:hover {
    background: #138496;
}

/* Encounter Info Styling */
.section-title {
    color: #2c3e50;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.detail-item {
    margin-bottom: 15px;
    display: flex;
    align-items: baseline;
}

.detail-item label {
    font-weight: 600;
    min-width: 120px;
    margin-right: 15px;
    color: #7f8c8d;
}

/* Clinical Details Styling */
.clinical-category {
    margin-bottom: 25px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
}

.clinical-category h4 {
    color: #3498db;
    margin-bottom: 10px;
}

.clinical-content {
    white-space: pre-wrap;
    line-height: 1.6;
}

/* Prescriptions Table */
.prescription-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.prescription-table th,
.prescription-table td {
    padding: 12px;
    border: 1px solid #ecf0f1;
    text-align: left;
}

.prescription-table th {
    background-color: #3498db;
    color: white;
}

.prescription-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.no-records {
    color: #95a5a6;
    font-style: italic;
    padding: 15px;
    text-align: center;
}

/* Clinical List Styling */
.clinical-list {
    list-style-type: none;
    padding-left: 20px;
}

.clinical-list li {
    margin-bottom: 8px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.clinical-list li strong {
    color: #2c3e50;
    margin-right: 10px;
}

/* Modal Styles */
.pd-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pd-modal.active {
    opacity: 1;
    visibility: visible;
}

.pd-modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 90%;
    width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.pd-modal.active .pd-modal-content {
    transform: translateY(0);
}

.pd-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 5px;
    z-index: 1;
}

.pd-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pd-modal-header h3 {
    margin: 0;
}

.pd-modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.pd-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    text-align: right;
}

.document-date {
    color: #666;
    margin-bottom: 15px;
    font-style: italic;
}

/* Loading animation */
.loading {
    text-align: center;
    padding: 40px;
}

.loading:after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 2px solid #ccc;
    border-radius: 50%;
    border-top-color: var(--primary);
    
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ...existing code... */

.consultation-field {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.consultation-field.has-changes {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

.consultation-field.has-changes:before {
    content: '•';
    color: #2271b1;
    position: absolute;
    right: 10px;
    top: 10px;
}

/* ...existing code... */

/* Driver's License Report Styles */
.driver-license-header {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.patient-info-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.file-upload-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.file-input-wrapper {
    border: 2px dashed #ddd;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.file-input-wrapper:hover {
    border-color: var(--primary);
}

.file-help {
    color: #666;
    font-size: 0.9em;
    margin-top: 10px;
}

.reports-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.reports-table th,
.reports-table td {
    padding: 12px;
    border: 1px solid #ddd;
    text-align: left;
}

.reports-table th {
    background: var(--primary);
    color: white;
}

.reports-table tr:nth-child(even) {
    background: #f8f9fa;
}

/* ...existing code... */

/* Driver's License Reports Tab Styles */
.driver-license-reports-list {
    margin-top: 20px;
}

.reports-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.reports-table th,
.reports-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.reports-table th {
    background: var(--primary);
    color: white;
    font-weight: 500;
}

.reports-table tr:hover {
    background: #f8f9fa;
}

.file-type {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
}

.file-type.pdf {
    background: #ffebee;
    color: #c62828;
}

.file-type.png {
    background: #e3f2fd;
    color: #1565c0;
}

.download-report {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: var(--primary);
    color: white;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.download-report:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.download-report .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.no-reports-message {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #666;
}

/* ...existing code... */

/* Patients List Styles */
.pd-patients-list {
    margin: 20px 0;
}

.pd-patients-header {
    margin-bottom: 0px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pd-search-box {
    display: flex;
    gap: 10px;
}

.pd-search-box input[type="search"] {
    min-width: 300px;
    padding: 6px 12px;
}

.pd-patients-table {
    margin-top: 20px;
}

.pd-patients-table th {
    font-weight: 600;
}

.pd-patients-table .actions {
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

.pd-action:hover {
    color: var(--primary-light);
    transform: scale(1.1);
}

.pd-action.delete {
    color: #dc3545;
}

.pd-action.delete:hover {
    color: #bd2130;
}

@media screen and (max-width: 782px) {
    .pd-patients-table .actions {
        flex-wrap: wrap;
    }
    
    .pd-search-box input[type="search"] {
        min-width: 200px;
    }
}

/* ...existing code... */

/* Frontend Patients List Styles */
.pd-patients-list-frontend {
    max-width: 100%;
    margin: 2rem auto;
    padding: 10px 1rem;
}

.pd-search-input {
    min-width: 300px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-right: 10px;
}

.pd-search-button {
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.pd-search-button:hover {
    background: var(--primary-dark);
}

.pd-table-container {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.pd-patients-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.pd-patients-table th,
.pd-patients-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid hsla(0, 0%, 50.2%, 0);
    vertical-align: middle;
    transition: all 0.3s ease;
}

.pd-patients-table th {
    background: var(--primary);
    color: white;
    font-weight: 500;
}

.pd-actions a {
    color: var(--text-dark);
    margin: 0 0.5rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pd-patients-table tr:hover {
    background: var(--background);
}

.pd-pagination {
    margin-top: 2rem;
    text-align: center;
}

.pd-pagination ul {
    display: inline-flex;
    gap: 5px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pd-pagination a,
.pd-pagination span {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text);
}

.pd-pagination a:hover,
.pd-pagination span.current {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ...existing code... */

/* Patients List Additional Styles */
.pd-patients-header h2 {
    color: var(--primary);
    font-size: 1.75rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
    
}

.pd-patients-summary {
    background: #e8f5e9;
    border-radius: var(--border-radius-md);
    padding: 1.25rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    animation: slideUp 0.5s ease-out;
}

.pd-patients-summary p {
    margin: 0;
    color: var(--text);
    font-weight: 500;
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .pd-patients-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .pd-search-form {
        margin-top: 1rem;
        max-width: 100%;
    }
}
/* ...existing code... */

/* ...existing code... */

.consultation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.consultation-header-content {
    flex: 1;
}

.consultation-header-content h4 {
    margin: 0 0 10px 0;
    color: var(--primary);
}

.consultation-actions {
    margin-left: 15px;
}

.consultation-actions .pd-action.edit {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: var(--primary);
    color: white;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.consultation-actions .pd-action.edit:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.consultation-actions .pd-action.edit .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* ...existing code... */

/* ...existing code... */

.medical-reports-list {
    margin: 20px 0;
    padding: 15px;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.medical-reports-list .reports-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.medical-reports-list .reports-table th,
.medical-reports-list .reports-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.medical-reports-list .file-type {
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 0.85em;
    text-transform: uppercase;
}

.medical-reports-list .file-type.pdf {
    background: #ffebee;
    color: #c62828;
}

.medical-reports-list .file-type.png {
    background: #e8f5e9;
    color: #2e7d32;
}

.no-reports-message {
    text-align: center;
    padding: 30px;
    background: #f5f5f5;
    border-radius: 5px;
    margin: 20px 0;
}

/* ...existing code... */

/* Ensure icons are visible for all roles */
.pd-action .dashicons {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.action-buttons {
    display: flex !important;
    gap: 10px;
    visibility: visible !important;
    opacity: 1 !important;
}

@media (max-width: 768px) {
    .sidebar-toggle {
        display: block;
    }
}


.button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-close {
        display: block;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .header {
        padding: 1rem;
    }
    
    .dashboard-actions {
        flex-direction: column;
        gap: 1rem;
    }
}
.admin-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    transition: background 0.2s ease;
}

.admin-profile:hover {
    background: var(--secondary-color);
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    transition: margin-left var(--transition-speed);
    width:100%;
    background-color: #f8fafc;
}



[type=button]:focus, [type=button]:hover, [type=submit]:focus, [type=submit]:hover, button:focus, button:hover {
    color: #fff;
    background-color: #005528;
    text-decoration: none;
}

[type=button], [type=submit], button {
    display: inline-block;
    font-weight: 500;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    -webkit-user-select: none;
    -moz-user-select: none;
    user-select: none;
    background-color: #005528;
    border: 1px solid #005528;
    padding: .5rem 1rem;
    font-size: 1rem;
    border-radius: 3px;
    transition: all .3s;
}



/* Main content area */
.main-content {
    flex: 1;
    position: relative;
    margin-left: 0; /* Shift content to the right to make space for sidebar */
    width: 10000px;
}

/* Header */
.header {
    height: var(--header-height);
    background-color: var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    color: white;
    position: relative;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
}

.admin-profile {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.admin-profile img {
    width: 36px;
    height: 36px !important;
    border-radius: 50% !important;
    margin-right: 10px;
    border: 2px solid white !important;
}

.fullscreen-toggle {
    margin-left: 20px;
    cursor: pointer;
    font-size: 18px;
}

/* Content area */
.content {
    padding: 0;
    margin-top: 0;
  background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
table td, table th {
    padding: 15px;
    line-height: 1.5;
    vertical-align: top;
    border: 1px solid hsla(0, 0%, 100.2%, .5019607843);
}
table caption+thead tr:first-child td, table caption+thead tr:first-child th, table colgroup+thead tr:first-child td, table colgroup+thead tr:first-child th, table thead:first-child tr:first-child td, table thead:first-child tr:first-child th {
    border-block-start: 1px solid hsla(0, 0%, 90.2%, .5019607843);
}





:root {
    /* ## Variables for Header/Main Content (Updated to match image) ## */
    --primary: #00712d; /* Main Green */
    --background-color: #f8f9fe; /* Light grey page background */
    --white: #fff;
    --header-height: 60px; /* Adjust if needed */
    --notification-bg: #ff9f43; /* Orange from image */
    --text-muted: #8898aa; /* Common grey for subtitles/descriptions */
    --text-dark: #32325d; /* Common dark text color */
    --text-light: #525f7f; /* Lighter grey text */
    --stats-card-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    --bottom-nav-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    --border-radius-sm: .375rem; /* approx 6px */
    --border-radius-md: .5rem; /* approx 8px */

    /* Stats Icon BG Colors from Image */
    --color-patient: #f5365c; /* Red/Pink */
    --color-doctor: #fb6340; /* Orange */
    --color-appointment: #11cdef; /* Light Blue */
    --color-revenue: #2dce89; /* Teal/Green */
    --color-employee: #f5365c; /* Red/Pink */
    --color-clinic: #fb6340; /* Orange */
    --color-visit: #11cdef; /* Light Blue */

    /* ## Variables for Sidebar (Mostly from original CSS - UNTOUCHED) ## */
    --sidebar-bg: #ffffff;
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 65px;
    --link-text-color: #000000; /* Original text color */
    --link-icon-color: var(--primary); /* Original icon color */
    --link-hover-bg: #f6f9fc; /* Original hover */
    --link-active-bg: var(--primary); /* Original active */
    --link-active-text: #ffffff; /* Original active text */
    --toggler-line-color: #8898aa;
    --header-border: rgba(0, 0, 0, .05);
}

/* Basic Body Styles (Updated for overall consistency) */
*, :after, :before {
    box-sizing: border-box;
}
body.g-sidenav-hidden { /* Adjust when sidebar is hidden */
    padding-left: var(--sidebar-collapsed-width);
}
a {
   color: var(--primary);
   text-decoration: none;
   background-color: transparent;
}
a:hover {
   color: #005724; /* Slightly darker primary on hover */
   text-decoration: none;
}
ul {
    padding-left: 0;
    list-style: none;
    margin-top: 0;
    margin-bottom: 1rem;
}

/* --- START Sidebar Container Styles (Original - UNTOUCHED) --- */
.sidenav {
    display: block;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: var(--sidebar-width); /* Start expanded */
    height: 100vh; /* Use viewport height */
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1050; /* Original z-index */
    padding-top: 0;
    padding-left: 0;
    padding-right: 0;
    border-width: 0 1px 0 0;
    border-style: solid;
    background-color: var(--sidebar-bg);
    border-color: var(--header-border);
    box-shadow: 0 0 2rem 0 rgba(136,152,170,.15);
    transition: all .4s ease; /* Original transition */
    border-top-left-radius: 15px !important; /* Original radius (check comment vs code) */
}

/* Merged duplicate rule from original */
.scrollbar-inner {
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-top-right-radius: 10px; /* Original radius */
    scrollbar-width: none; /* Hide standard scrollbar */
    -ms-overflow-style: none; /* Hide scrollbar for IE/Edge */
}

/* --- START Sidebar Header Styles (Original - UNTOUCHED) --- */
/* Merged duplicate rule from original */
.sidenav-header {
    height: 78px; /* Original height */
    display: flex;
    align-items: center;
    flex-shrink: 0;
    border-bottom: 1px solid var(--header-border);
    border-top-right-radius: 10px; /* Original radius */
    /* Note: Original had padding in .sidenav-toggler, not directly here */
    padding-left: 1rem; /* Add some padding for logo based on structure */
    padding-right: 0; /* Toggler has its own padding */
}

.sidenav .navbar-brand {
    padding: 0;
    margin-right: auto; /* Push toggler right */
    display: block; /* Keep as block */
    opacity: 1;
    visibility: visible;
    transition: opacity 0.2s ease, visibility 0s ease; /* Original transition */
}
.sidenav .navbar-brand-img,
.sidenav .navbar-brand>img {
    max-height: 3.6rem; /* Original size */
    max-width: 100%;
    display: block;
    margin-left: .5rem; /* Original margin */
}

/* Toggler Button (Original - UNTOUCHED) */
.sidenav-toggler {
    background: none;
    border: none;
    cursor: pointer;
    padding: 1.5rem; /* Original padding */
    display: inline-block;
    flex-shrink: 0;
}
.sidenav-toggler-inner {
    width: 18px;
    position: relative;
}
.sidenav-toggler-line {
    height: 2px;
    background-color: var(--toggler-line-color);
    display: block;
    position: relative;
    width: 18px;
    transition: all .15s ease;
}
.sidenav-toggler-line:not(:last-child) {
    margin-bottom: 3px; /* Original spacing */
}
.sidenav-toggler.active .sidenav-toggler-line:first-child,
.sidenav-toggler.active .sidenav-toggler-line:last-child {
    width: 13px; /* Original active state */
    transform: translateX(5px); /* Original active state */
}
/* --- END Sidebar Header Styles --- */


/* --- START Navigation Area Styles (Original - UNTOUCHED) --- */
.navbar-inner {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-left: 1.5rem; /* Original padding */
    padding-right: 1.5rem; /* Original padding */
}

/* Original Custom Scrollbar Attempt */
.navbar-inner:hover {
    scrollbar-color: #00712d transparent; /* thumb color, track color */
}
.navbar-inner::-webkit-scrollbar {
    width: 0px; /* Hide vertical */
    height: 0px; /* Hide horizontal */
    background-color: transparent; /* Ensure track is also transparent */
    transition: width 0.2s ease-out, height 0.2s ease-out; /* Add transition for width/height change */
}
.navbar-inner:hover::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
.navbar-inner::-webkit-scrollbar-track { background: transparent; border-radius: 5px; }
.navbar-inner::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 0; /* Flat top/bottom ends */
}
.navbar-inner::-webkit-scrollbar-thumb:hover { background: #00712d; }
.navbar-inner {
    scrollbar-width: none; /* Hide standard scrollbar */
    -ms-overflow-style: none; /* Hide scrollbar for IE/Edge */
    overflow-y: auto; /* Keep vertical scrolling enabled */
    overflow-x: hidden; /* Disable horizontal scrolling */
}

/* Navbar Collapse Wrapper (Original - UNTOUCHED) */
.navbar-collapse {
    display: block !important;
    margin-left: -1.5rem; /* Original margin */
    margin-right: -1.5rem; /* Original margin */
}

/* Navigation List (Original - UNTOUCHED) */
.navbar-nav {
    display: flex;
    flex-direction: column;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
    margin-left: 0; /* Original margin */
    margin-right: 0; /* Original margin */
}

.navbar-nav .nav-item {
    margin-top: 2px; /* Original margin */
}

.navbar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: .675rem 1rem; /* Original padding */
    font-size: .875rem; /* Original font size */
    font-weight: 400; /* Original font weight */
    color: var(--link-text-color); /* Uses original variable */
    text-decoration: none;
    white-space: nowrap;
    border-radius: .375rem; /* Original radius */
    transition: background-color 0.2s ease, color 0.2s ease;
}

.navbar-nav .nav-link i {
    min-width: 30px; /* Original min-width */
    text-align: center;
    font-size: .9375rem; /* Original icon size */
    line-height: 1.44rem; /* Original line height */
    color: var(--link-icon-color); /* Uses original variable */
    margin-right: 15px; /* Original margin */
    flex-shrink: 0;
    transition: color 0.2s ease, margin-right 0.3s ease;
}

.nav-link-text {
    flex-grow: 1;
    opacity: 1;
    transition: opacity 0.1s ease; /* Original transition */
    white-space: nowrap;
}

/* Submenu Arrow (Original - UNTOUCHED) */
.submenu-arrow {
    margin-left: auto;
    font-size: 0.7em;
    color: #ced4da; /* Original color */
    opacity: 1;
    transition: opacity 0.1s ease, transform 0.15s ease;
}
.submenu-arrow i {
    margin-right: 0;
    min-width: auto;
    font-size: inherit;
    color: inherit;
    transition: all .15s ease;
    font-weight: 700; /* Original font weight */
}
.nav-link[aria-expanded=true] .submenu-arrow i {
    transform: rotate(90deg);
    color: var(--primary); /* Original color */
}

/* Hover State (Original - UNTOUCHED) */
.navbar-nav .nav-link:hover {
    background-color: var(--link-hover-bg); /* Uses original variable */
    color: #212529; /* Original hover text color */
}
.navbar-nav .nav-link:hover i {
    color: var(--link-icon-color); /* Uses original variable */
}

/* Active State (Original - UNTOUCHED) */
.navbar-nav .nav-link.active {
    background: var(--link-active-bg); /* Uses original variable */
    color: var(--link-active-text) !important; /* Uses original variable */
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(50,50,93,.11), 0 1px 3px rgba(0,0,0,.08);
    border-radius: .375rem; /* Original radius */
}
.navbar-nav .nav-link.active i,
.navbar-nav .nav-link.active .submenu-arrow {
    color: var(--link-active-text) !important; /* Uses original variable */
}
/* --- END Navigation Area Styles --- */


/* --- START Collapsed State Styles (Original - UNTOUCHED) --- */
/* Using body class .g-sidenav-hidden */
.g-sidenav-hidden .sidenav {
    max-width: var(--sidebar-collapsed-width);
    width: var(--sidebar-collapsed-width);
}

.g-sidenav-hidden .sidenav .navbar-brand {
    display: none; /* Use display none */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    margin-right: 0;
    transition: opacity 0.1s ease, visibility 0s ease 0.1s, display 0s ease 0.1s; /* Original */
}

.g-sidenav-hidden .sidenav .sidenav-header {
    justify-content: center; /* Center the toggler */
    padding: 1.5rem 0.5rem; /* Adjust padding */
}
.g-sidenav-hidden .sidenav .sidenav-header .sidenav-toggler {
    margin-left: 0; /* Reset margin */
    padding: 0; /* Reset padding */
}

.g-sidenav-hidden .sidenav .nav-link-text,
.g-sidenav-hidden .sidenav .submenu-arrow {
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: opacity 0.1s ease, width 0s ease 0.1s, margin 0s ease 0.1s; /* Original */
    margin-left: 0 !important;
    pointer-events: none;
    flex-grow: 0; /* Added for safety */
    flex-shrink: 1; /* Added for safety */
    white-space: nowrap; /* Added for safety */
}

.g-sidenav-hidden .sidenav .navbar-nav .nav-link {
    justify-content: center; /* Center icon */
    padding: .675rem 0.5rem; /* Adjusted padding */
    margin-left: 0; /* Added for safety */
    margin-right: 0; /* Added for safety */
}
.g-sidenav-hidden .sidenav .navbar-nav .nav-link i {
    margin-right: 0; /* Remove icon margin */
    min-width: auto; /* Reset min-width */
}
.g-sidenav-hidden .sidenav .navbar-nav .nav-item {
     padding: 0; /* Original */
}
/* --- END Collapsed State Styles --- */


/* --- START Header Styles (MERGED FINAL - Positioning Adjusted) --- */
.main-header {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    height: auto; /* Allow height to adapt */
    color: var(--white);
    display: flex;
    flex-direction: column;
    transition: left 0.3s ease; /* Match sidebar transition */
    /* Removed box-shadow, doesn't seem present in overlap image */
}

body.g-sidenav-hidden .main-header {
    left: var(--sidebar-collapsed-width);
}

.admin-section img {
    width: 36px;
    height: 36px;
    border-radius: 50% !important;
    margin-right: 10px;
    border: 2px solid white !important;
}


/* Top bar of the header */
.main-header .user-profile {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Align items to the right */
    padding: 0 20px; /* Horizontal padding */ 
    width: 100%;  
}
.main-header .user-profile1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px; /* Horizontal padding */
    height: var(--header-height);
    width: 100%;
    flex-shrink: 0;
    border-bottom: 1px solid hsla(0, 0%, 100%, .1); /* Subtle separator */
    background-color: var(--primary); /* Give this part the green background */
    position: relative; /* Needed for z-index */
    z-index: 1102; /* Ensure top bar is above overlapping content */
}

.main-header .admin-section {
    display: flex;
    align-items: center;
    gap: 2px; /* Space between avatar, name, icon */
}

.main-header .admin-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid hsla(0, 0%, 100%, .2); /* Optional subtle border */
}

.main-header .admin-section span {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--white);
}

.main-header .admin-section i {
    font-size: 16px;
    color: var(--white);
    cursor: pointer;
}

/* Lower green area of the header */
.header.bg-primary {
    background-color: var(--primary) !important; /* Ensure green */
    position: relative; /* Needed for z-index */
    z-index: 1101; /* Below top bar, but above default content */
    width: 100%;
}
.pb-6 { /* Control height of lower green area */
    padding-bottom: 4.5rem !important;
}
.header .container-fluid {
    padding-left: 30px; /* Match main content padding */
    padding-right: 30px; /* Match main content padding */
    min-height: 1px; /* Ensure padding applies */
}
/* --- END Header Styles --- */


/* --- START Main Content Specific Styles (MERGED FINAL - Positioning Adjusted) --- */

.main-content {
    transition: none;
    padding: 30px;
    position: relative;
    z-index: 1;
    margin-top: 40px;
}

.dashboard-header {
    position: relative;
    margin-top: -70px;
    margin-bottom: 30px;
    padding-left: 30px;
    padding-right: 30px;
    box-sizing: border-box;
    z-index: 1105;
}

.notification-banner {
    background-color: var(--notification-bg);
    color: var(--white);
    padding: 15px 25px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
    width: 100%;
    box-sizing: border-box;
}

.notification-banner p {
    margin: 0;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Dashboard Statistics Cards */
.dashboard-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px; /* Reduced from 25px */
    margin-bottom: 21px; /* Reduced from 30px */
}

.stats-card {
    flex: 1 1 calc(25% - 14px); /* Adjusted calculation with new gap */
    min-width: 161px; /* Reduced from 230px */
    background-color: var(--white);
    border-radius: var(--border-radius-md);
    box-shadow: var(--stats-card-shadow);
    display: flex;
    overflow: hidden;
    position: relative;
}

.stats-card-body {
    padding: 14px 18px; /* Reduced from 20px 25px */
    flex: 1; /* Take available space */
}

.stats-card-title {
    color: var(--text-muted);
    font-size: 0.53rem; /* Reduced from 0.75rem */
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0 0 6px 0; /* Reduced from 8px */
    display: flex;
    align-items: center;
}
.stats-card-title i.fa-info-circle {
    font-size: 0.63em; /* Reduced from 0.9em */
    margin-left: 6px; /* Reduced from 8px */
    color: var(--text-muted);
}

.stats-card-value {
    color: var(--text-dark);
    font-size: 1.23rem; /* Reduced from 1.75rem */
    font-weight: 600;
    margin: 0 0 7px 0; /* Reduced from 10px */
    line-height: 1.2;
}

.stats-card-text {
    color: var(--text-light);
    font-size: 0.56rem; /* Reduced from 0.8rem */
    margin: 0;
    line-height: 1.4;
}

.stats-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 11px; /* Reduced from 15px */
    color: var(--white);
    font-size: 1.26rem; /* Reduced from 1.8rem */
    border-radius: 50%;
    margin: auto 14px auto 0; /* Reduced from 20px */
    height: 42px; /* Reduced from 60px */
    width: 42px; /* Reduced from 60px */
    box-shadow: 0 3px 6px rgba(0,0,0,0.15); /* Slightly reduced shadow */
}

/* Card Icon Background Colors */
.bg-patient { background-color: var(--color-patient); }
.bg-doctor { background-color: var(--color-doctor); }
.bg-appointment { background-color: var(--color-appointment); }
.bg-revenue { background-color: var(--color-revenue); }
.bg-employee { background-color: var(--color-employee); }
.bg-clinic { background-color: var(--color-clinic); }
.bg-visit { background-color: var(--color-visit); }
/* Add other bg colors if needed */

/* Dashboard Bottom Navigation */
.dashboard-bottom-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* Space between nav items */
    margin-top: 20px; /* Space above nav */
    justify-content: center;
}

.bottom-nav-item {
    padding: 8px 18px; /* Adjust padding for button size */
    background-color: var(--white);
    border-radius: var(--border-radius-sm);
    color: var(--text-light); /* Default text color */
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    box-shadow: var(--bottom-nav-shadow);
    border: 1px solid #dee2e6; /* Subtle border */
}

.bottom-nav-item:hover {
    background-color: #f8f9fa; /* Lighter grey hover */
    color: var(--text-dark);
    border-color: #ced4da;
    box-shadow: 0 3px 7px rgba(0, 0, 0, 0.07); /* Slightly raise on hover */
    transform: translateY(-1px); /* Slight lift */
}

.bottom-nav-item.active {
    background-color: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 4px 8px rgba(0, 113, 45, 0.3); /* Shadow matching primary color */
}
.bottom-nav-item.active:hover {
    background-color: #005724; /* Darker primary on hover */
    border-color: #005724;
    transform: translateY(0); /* Remove lift on active hover */
    box-shadow: 0 4px 8px rgba(0, 113, 45, 0.3);
}

/* Utility - Text Primary Color */
.text-primary {
    color: var(--primary)!important;
}
a.text-primary:focus, a.text-primary:hover {
    color: #005724!important; /* Darker primary for hover */
}
/* --- END Main Content Specific Styles --- */

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Medication autocomplete styling */
.ui-autocomplete {
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 9999;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.ui-autocomplete .ui-menu-item {
    padding: 8px 12px;
    cursor: pointer;
}

.ui-autocomplete .ui-menu-item:hover {
    background: #f5f5f5;
}

.medication-autocomplete {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#medication-instructions {
    width: 100%;
    min-height: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.save-default-instructions {
    margin-top: 10px;
    margin-bottom: 20px;
}

.prescription-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.prescription-table th,
.prescription-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.prescription-table th {
    background-color: #f5f5f5;
}

.delete-prescription {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.delete-prescription:hover {
    background-color: #d32f2f;
}

.no-prescriptions {
    font-style: italic;
    color: #666;
}

/* Select2 customization */
.select2-container--default .select2-selection--single {
    height: 38px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 28px;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #007bff;
}

.select2-dropdown {
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#medication-instructions, 
#medication-instructions-select {
    width: 100%;
    min-height: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}

.save-default-instructions {
    margin-top: 10px;
    margin-bottom: 20px;
    display: none;
}

.prescription-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.prescription-table th,
.prescription-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.prescription-table th {
    background-color: #f5f5f5;
}

.delete-prescription {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.delete-prescription:hover {
    background-color: #d32f2f;
}

.no-prescriptions {
    font-style: italic;
    color: #666;
}

/* ... existing CSS ... */

  /* Prescription date picker styling */
  .prescription-date-picker {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.prescription-date-picker label {
    margin-right: 10px;
    font-weight: bold;
}

.prescription-date-picker input[type="date"] {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.prescription-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.prescription-actions button {
    margin-top: 10px;
}

@media print {
    .prescription-date-picker {
        display: none;
    }
}

.button-secondary:focus {
    box-shadow: 0 0 0 0.2rem rgba(130, 138, 145, 0.5); /* Secondary focus color */
}

.save-default-instructions {
    margin-top: 15px; /* A bit less than form-row for visual grouping */
    margin-bottom: 20px;
    text-align: left; /* Or 'center' if preferred */
}

.form-actions {
    margin-top: 30px;
    text-align: right; /* Align submit button to the right */
    border-top: 1px solid var(--medium-gray);
    padding-top: 20px;
}

/* --- Utility --- */
.hidden {
    display: none !important;
}
/* --- Form Elements --- */
.prescription-form .form-row {
    margin-bottom: 20px;
}



.prescription-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057; /* Slightly lighter than main text */
}

.prescription-form input[type="text"],
.prescription-form input[type="email"],
.prescription-form input[type="password"],
.prescription-form select,
.prescription-form textarea {
    width: 100%;
    padding: var(--input-padding-y) var(--input-padding-x);
    font-size: 1rem; /* 16px */
    line-height: 1.5;
    color: var(--text-color);
    background-color: var(--white);
    background-clip: padding-box;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.prescription-form input[type="text"]:focus,
.prescription-form input[type="email"]:focus,
.prescription-form input[type="password"]:focus,
.prescription-form select:focus,
.prescription-form textarea:focus {
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.prescription-form textarea {
    resize: vertical;
    min-height: 100px;
}

.prescription-form ::placeholder {
    color: #6c757d;
    opacity: 1;
}

/* --- Select2 Specific Styling --- */
/* Ensure these styles are loaded AFTER Select2's default CSS if you use its CDN */
.select2-container--default .select2-selection--single {
    height: calc(1.5em + (var(--input-padding-y) * 2) + 2px); /* Match input height */
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: var(--text-color);
    line-height: calc(1.5em + (var(--input-padding-y) * 2)); /* Adjust for vertical centering */
    padding-left: var(--input-padding-x);
    padding-right: 20px; /* Space for arrow */
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: calc(1.5em + (var(--input-padding-y) * 2) - 2px); /* Match height minus borders */
    top: 1px; /* Align with border */
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #6c757d; /* Placeholder color */
}

.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.select2-dropdown {
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--primary-color);
    color: var(--white);
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: var(--input-padding-y) var(--input-padding-x);
}
.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--primary-color);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}
