/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

/* CSS Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    vertical-align: baseline;
}

/* General Styles */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
    position: relative;
    min-height: 100vh;
}

/* Use this class for centering form-based pages */
body.form-page {
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    box-sizing: border-box;
}

/* Wrapper for forms and content */
.wrapper {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
}

.wrapper h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

.wrapper p {
    text-align: center;
    margin-bottom: 20px;
    color: #666;
}

/* Form Group */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-help-text {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #4a90e2;
    outline: none;
}

/* Specific styling for number inputs */
.form-group input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
    -webkit-appearance: textfield;
}

.form-group input[type="number"]::-webkit-outer-spin-button,
.form-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.help-block {
    color: #e24a4a;
    font-size: 12px;
    margin-top: 5px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s, transform 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background-color: #4a90e2;
}

.btn-primary:hover {
    background-color: #357abd;
}

.btn-danger {
    background-color: #e24a4a;
}

.btn-danger:hover {
    background-color: #c9302c;
}

input[type="submit"].btn {
    width: auto;
    cursor: pointer;
}


/* Links */
a {
    color: #4a90e2;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Page Header on Dashboard */
.page-header {
    text-align: center;
    margin-bottom: 20px;
}

/* Table styling for admin page */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table th,
.table td {
    border: 1px solid #eee;
    padding: 12px 15px;
    text-align: left;
}

.table th {
    background-color: #f8f8f8;
    font-weight: 600;
}

.table tr:nth-child(even) {
    background-color: #fdfdfd;
}

.table tr:hover {
    background-color: #f1f1f1;
}

/* Adjust wrapper for admin page table */
.admin-wrapper {
    max-width: 900px;
}

/* Dashboard Styles */
.dashboard-content {
    max-width: 550px;
    text-align: center;
}

.profile-header {
    margin-bottom: 25px;
}

.profile-avatar {
    font-size: 80px;
    color: #4a90e2;
    margin-bottom: 15px;
}

.profile-header h2 {
    margin: 0 0 5px 0;
    font-size: 24px;
    font-weight: 600;
}

.profile-header p {
    color: #777;
    margin-top: 5px;
}

.profile-body {
    margin-bottom: 30px;
    text-align: left;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 25px 0;
}

.profile-body h3 {
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.profile-body p {
    color: #555;
    text-align: left;
    margin-bottom: 10px;
    font-size: 16px;
}

.profile-footer .btn {
    margin: 5px;
    display: inline-block;
    width: auto;
    padding: 12px 25px;
}

/* Icons in buttons */
.btn i {
    margin-right: 8px;
}

/* Admin Dashboard Styles */
.admin-dashboard {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.sidebar {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 20px 0;
    min-height: 100vh;
    position: fixed;
    width: 250px;
    top: 0;
    left: 0;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.sidebar-toggle {
    display: none;
    position: fixed;
    top: 15px;
    right: 15px;
    background-color: #2c3e50;
    color: #ecf0f1;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.2s ease;
}

.sidebar-toggle:hover {
    background-color: #34495e;
}

.sidebar-header {
    padding: 0 20px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.sidebar-header h3 {
    margin: 0;
    font-weight: 600;
    color: #ecf0f1;
}

.sidebar-menu {
    padding: 20px 0;
}

.sidebar-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: block;
    padding: 12px 20px;
    color: #ecf0f1;
    text-decoration: none;
    transition: background-color 0.3s;
}

.sidebar-menu a:hover {
    background-color: #34495e;
    border-left: 4px solid #3498db;
    padding-left: 16px; /* Adjust padding to maintain alignment */
}

.sidebar-menu a.active {
    background-color: #34495e;
    border-left: 4px solid #3498db;
    padding-left: 16px; /* Adjust padding to maintain alignment */
    font-weight: 600;
}

.sidebar-menu i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.main-content {
    padding: 20px;
    margin-left: 250px;
    width: calc(100% - 250px);
    flex-grow: 1;
    max-width: 100%;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.content-title h1 {
    margin: 0;
    font-size: 24px;
    color: #2c3e50;
}

.content-actions {
    display: flex;
    gap: 10px;
}

.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 20px;
    overflow: hidden;
    margin-bottom: 20px;
    width: 100%;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    min-width: 800px;
}

.admin-table th {
    background-color: #f8f9fa;
    padding: 14px 15px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
}

.admin-table td {
    padding: 14px 15px;
    border-bottom: 1px solid #e9ecef;
}

.admin-table tr:hover {
    background-color: #f8f9fa;
}

.user-role {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: #e1f5fe;
    color: #0288d1;
    font-size: 12px;
    font-weight: 500;
}

.user-role.admin {
    background-color: #e8f5e9;
    color: #388e3c;
}

/* Clinic status badges */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.active {
    background-color: #e8f5e9;
    color: #388e3c;
}

.status-badge.inactive {
    background-color: #ffebee;
    color: #d32f2f;
}

.text-center {
    text-align: center;
}

.empty-state {
    padding: 30px;
    text-align: center;
    color: #777;
}

/* User Assignment Styles */
.clinic-info {
    padding-bottom: 20px;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.clinic-info h2 {
    margin: 0 0 15px;
    color: #2c3e50;
}

.user-info {
    padding-bottom: 0px;
    margin-bottom: 0px;
    border-bottom: 1px solid #eee;
}

.user-info h2 {
    margin: 0 0 15px;
    color: #2c3e50;
}

.search-box-container {
    margin-bottom: 15px;
}

.role-columns-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.role-column {
    flex: 1;
    min-width: 250px;
    max-width: 100%;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
}

.role-title {
    margin: 0;
    padding: 12px 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.user-assignment-container {
    max-height: 350px;
    overflow-y: auto;
    margin-bottom: 0;
}

.empty-role {
    padding: 15px;
    text-align: center;
    color: #777;
    font-style: italic;
}

.user-assignment-item {
    padding: 0;
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.2s;
}

.user-assignment-item:hover {
    background-color: #f9f9f9;
}

.user-assignment-item:last-child {
    border-bottom: none;
}

.user-item-label {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 15px;
    cursor: pointer;
}

.checkbox-container {
    display: flex !important;
    align-items: center !important;
    flex-direction: row !important;
    cursor: pointer;
    width: 100%;
    position: relative;
}

.user-checkbox {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
    display: inline-block;
}

.user-info {
    overflow: hidden; /* Prevent text overflow */
    cursor: pointer;
    display: inline-block;
}

.user-name {
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    line-height: 1.3;
    margin-bottom: 2px;
}

.user-email {
    font-size: 12px;
    color: #777;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.selection-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.role-filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-left: auto;
}

.role-filter.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-info {
    background-color: #3498db;
}

.btn-info:hover {
    background-color: #2980b9;
}

/* Textarea specific styles */
.form-group textarea {
    min-height: 100px;
    resize: vertical;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.user-count {
    background-color: #f1f8ff;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.user-count i {
    font-size: 24px;
    margin-right: 15px;
    color: #3498db;
}

.search-box {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 300px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Admin Form Styles */
.admin-form {
    width: 100%;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
}

.submit-group {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.form-submit-btn, .form-cancel-btn {
    min-width: 120px;
    text-align: center;
    font-weight: 500;
    padding: 10px 20px;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.role-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.role-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
}

.role-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.role-checkbox label {
    margin: 0;
    cursor: pointer;
}

.has-error input {
    border-color: #e74c3c;
}

/* Mobile responsiveness for admin dashboard */
@media (max-width: 992px) {
    .admin-dashboard {
        flex-direction: column;
    }
    
    .sidebar {
        position: fixed;
        width: 250px;
        height: 100vh;
        min-height: 100vh;
        transform: translateX(-100%);
        box-shadow: none;
        z-index: 1050;
    }
    
    .submit-group {
        justify-content: space-between;
    }
    
    .form-submit-btn, .form-cancel-btn {
        flex: 1;
    }
    
    .sidebar-mobile-open {
        transform: translateX(0);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    }
    
    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .sidebar-menu ul {
        display: flex;
        flex-wrap: wrap;
    }
    
    .sidebar-menu li {
        width: 50%;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 20px;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .content-actions {
        margin-top: 15px;
        width: 100%;
    }
    
    .content-actions .btn {
        width: 100%;
        display: block;
    }
    
    .search-box {
        width: 100%;
    }
    
.action-buttons {
    flex-direction: column;
    width: 100%;
}

.action-buttons .btn,
.action-buttons form,
.action-buttons button {
    margin-bottom: 5px;
    width: 100%;
    min-width: 100%;
}    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

@media (max-width: 768px) {
    .sidebar-menu li {
        width: 100%;
    }
    
    .card {
        padding: 15px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 10px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .submit-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-submit-btn, .form-cancel-btn {
        width: 100%;
    }
    
    .login-container {
        width: 90%;
        max-width: 400px;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .dashboard-row {
        flex-direction: column;
    }
    
    .profile-card, .recent-activity-card {
        width: 100%;
    }
    
    .quick-actions {
        grid-template-columns: 1fr 1fr;
    }
}

/* Dashboard Styles */
.user-welcome {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
}

.stat-card-icon.blue {
    background-color: #4a90e2;
}

.stat-card-icon.green {
    background-color: #2ecc71;
}

.stat-card-icon.orange {
    background-color: #e67e22;
}

.stat-card-icon.purple {
    background-color: #9b59b6;
}

.stat-card-content h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #777;
    font-weight: 500;
}

.stat-value {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.dashboard-row {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.profile-card {
    width: 35%;
    padding: 0 !important;
    overflow: hidden;
    position: relative;
}

.profile-cover {
    height: 120px;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    position: relative;
}

.profile-avatar-container {
    position: relative;
    margin-top: -40px;
    padding: 0 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background-color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #3498db;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.profile-info {
    padding: 20px;
    text-align: left;
}

.profile-info h2 {
    margin: 10px 0 5px;
    font-size: 22px;
    font-weight: 600;
}

.profile-role {
    display: inline-block;
    padding: 4px 10px;
    background-color: #e8f5e9;
    color: #388e3c;
    border-radius: 20px;
    font-size: 12px;
    margin: 5px 0 10px;
}

.profile-email {
    color: #777;
    margin: 0 0 15px;
    font-size: 14px;
}

.profile-actions {
    margin-top: 15px;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid #3498db;
    color: #3498db;
    padding: 8px 16px;
}

.btn-outline:hover {
    background-color: #3498db;
    color: #fff;
}

.user-clinics {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.user-clinics h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #2c3e50;
}

.user-clinics h4 i {
    color: #3498db;
}

.clinic-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.clinic-list li {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    display: flex;
    justify-content: space-between;
}

.clinic-list li:last-child {
    border-bottom: none;
}

.clinic-name {
    font-weight: 500;
    color: #333;
}

.clinic-city {
    color: #777;
    font-size: 12px;
}

.clinic-more {
    font-size: 12px;
    color: #777;
    text-align: center;
    margin-top: 10px;
}

.no-clinics {
    color: #777;
    font-size: 14px;
    font-style: italic;
}

.recent-activity-card {
    flex: 1;
}

.recent-activity-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    font-size: 18px;
    font-weight: 600;
}

.recent-activity-card h3 i {
    color: #3498db;
}

.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-list li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f5f5f5;
}

.activity-list li:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 36px;
    height: 36px;
    background-color: #f0f9ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3498db;
    font-size: 14px;
}

.activity-content {
    flex: 1;
}

.activity-content p {
    margin: 0 0 5px;
    font-size: 14px;
    color: #333;
}

.activity-time {
    font-size: 12px;
    color: #999;
}

.quick-actions-card {
    margin-bottom: 30px;
}

.quick-actions-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    font-size: 18px;
    font-weight: 600;
}

.quick-actions-card h3 i {
    color: #e67e22;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    color: #333;
    text-align: center;
    transition: all 0.3s;
}

.quick-action-btn:hover {
    background-color: #3498db;
    color: white;
    text-decoration: none;
    transform: translateY(-3px);
}

.quick-action-btn i {
    font-size: 24px;
    margin-bottom: 10px;
}

.quick-action-btn span {
    font-size: 14px;
    font-weight: 500;
}

/* Tablet Responsive Adjustments for Dashboard */
@media (max-width: 1200px) {
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .dashboard-row {
        flex-direction: column;
    }
    
    .profile-card, .recent-activity-card {
        width: 100%;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Login Page Styles */
.login-container {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 450px;
    overflow: hidden;
    position: relative;
}

.login-header {
    background-image: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.login-logo {
    font-size: 48px;
    margin-bottom: 15px;
}

.login-header h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 600;
    margin: 0 0 10px;
    letter-spacing: 0.5px;
}

.login-subtitle {
    font-size: 14px;
    opacity: 0.8;
    margin: 0;
}

.login-form-container {
    padding: 20px;
}

.login-form-header {
    margin-bottom: 25px;
    text-align: center;
}

.login-form-header h2 {
    font-size: 24px;
    color: #2c3e50;
    margin: 0 0 5px;
}

.login-form-header p {
    color: #7f8c8d;
    margin: 0;
    font-size: 14px;
}

.login-form-container .form-group {
    margin-bottom: 20px;
}

.login-form-container .form-group label {
    display: block;
    color: #34495e;
    margin-bottom: 8px;
    font-weight: 500;
}

.login-form-container .form-group label i {
    margin-right: 8px;
    color: #3498db;
}

.login-form-container input[type="email"],
.login-form-container input[type="password"],
.login-form-container select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dcdfe6;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s;
}

.login-form-container input:focus,
.login-form-container select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
    outline: none;
}

.login-form-container .btn-block {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 16px;
}

.alert {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.alert i {
    margin-right: 10px;
    font-size: 16px;
}

.alert-danger {
    background-color: #fdecea;
    color: #e74c3c;
    border: 1px solid #fadbd8;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #2ecc71;
}

.d-inline {
    display: inline;
}

/* Consistent action button styling */
.action-buttons .btn,
.action-buttons button {
    min-width: 120px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    margin: 2px 0;
    height: 40px;
    font-size: 14px;
    white-space: nowrap;
}

.action-buttons .btn i,
.action-buttons button i {
    margin-right: 5px;
    font-size: 14px;
}

.action-buttons form {
    margin: 2px 0;
}

.login-footer {
    padding: 15px;
    text-align: center;
    font-size: 12px;
    color: #95a5a6;
    border-top: 1px solid #f5f5f5;
}

/* Media queries for the login page */
@media (max-width: 576px) {
    .login-header {
        padding: 30px 20px;
    }
    
    .login-logo {
        font-size: 40px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .login-form-container {
        padding: 25px 20px;
    }
}

/* Assessment specific styles */
.assessment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.assessment-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
}

.assessment-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.assessment-card.completed {
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.assessment-card.pending {
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.assessment-status {
    font-weight: bold;
    margin-bottom: 10px;
    display: inline-block;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
}

.assessment-status.completed {
    background-color: #d4edda;
    color: #155724;
}

.assessment-status.pending {
    background-color: #f8d7da;
    color: #721c24;
}

.warning-banner {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
}

.warning-banner h4 {
    color: #856404;
    margin: 0 0 10px 0;
}

.radio-group {
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.radio-group input[type="radio"] {
    margin-right: 5px;
}

.radio-group input[type="date"],
.radio-group input[type="number"] {
    margin-left: 10px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Enhanced Session Form Styles - Compact Version */
.session-form {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 20px 25px;
    margin: -20px -25px 20px -25px;
    border-radius: 8px 8px 0 0;
}

.card-header h3 {
    margin: 0 0 5px 0;
    font-size: 20px;
    font-weight: 600;
}

.card-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 13px;
}

.form-section {
    background: white;
    margin: 0 -25px 20px -25px;
    padding: 20px 25px;
    border-left: 3px solid #007bff;
}

.session-number-group {
    max-width: 250px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 14px;
}

.session-input {
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.session-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
    outline: none;
}

.form-help {
    color: #6c757d;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 6px;
}

.section-description {
    color: #6c757d;
    margin-bottom: 15px;
    font-size: 13px;
}

.next-session-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.session-option {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 15px;
    align-items: center;
}

.session-option:hover {
    border-color: #007bff;
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.1);
}

.session-option.active {
    border-color: #007bff;
    background: linear-gradient(135deg, #f8f9ff 0%, #e3f2fd 100%);
    box-shadow: 0 3px 8px rgba(0, 123, 255, 0.15);
}

.session-option input[type="radio"] {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin: 0;
    padding-right: 35px;
}

.option-icon {
    background: #007bff;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.session-option.active .option-icon {
    background: #0056b3;
}

.option-content {
    flex: 1;
}

.option-title {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #495057;
    margin-bottom: 2px;
}

.option-desc {
    display: block;
    color: #6c757d;
    font-size: 12px;
}

.option-input {
    justify-self: end;
}

.date-input, .days-input {
    border: 2px solid #e9ecef;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 180px;
}

.date-input:focus, .days-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
    outline: none;
}

.days-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 150px;
}

.days-input {
    flex: 1;
    text-align: center;
    max-width: 80px;
}

.input-suffix {
    font-weight: 500;
    color: #495057;
    font-size: 13px;
}

.form-actions {
    background: #f8f9fa;
    margin: 0 -25px -20px -25px;
    padding: 20px 25px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 12px;
    justify-content: flex-start;
}

.btn-lg {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-primary.btn-lg {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: none;
    box-shadow: 0 3px 8px rgba(0, 123, 255, 0.3);
}

.btn-primary.btn-lg:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
}

.btn-secondary.btn-lg {
    background: #6c757d;
    border: none;
    color: white;
}

.btn-secondary.btn-lg:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* Disabled state styles */
.session-option input:disabled + .option-input .date-input,
.session-option input:disabled + .option-input .days-input {
    background: #f8f9fa;
    color: #6c757d;
    border-color: #e9ecef;
    cursor: not-allowed;
}

/* Compact viewport optimization */
.compact-layout .main-content {
    padding: 15px;
}

.compact-layout .content-header {
    margin-bottom: 15px;
}

.compact-layout .card {
    margin-bottom: 15px;
    padding: 15px;
}

.compact-layout .form-section {
    margin: 0 -15px 15px -15px;
    padding: 15px;
}

.compact-layout .card-header {
    padding: 15px 20px;
    margin: -15px -15px 15px -15px;
}

/* Optimize form rows for better space usage */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    margin-bottom: 0;
}

/* Better table spacing */
.table-responsive {
    margin-top: 15px;
}

.table th, .table td {
    padding: 8px 12px;
    font-size: 14px;
}

/* Compact alert styles */
.alert {
    padding: 12px 15px;
    margin-bottom: 15px;
    font-size: 14px;
}

/* Medium screen optimizations */
@media (max-width: 1200px) {
    .compact-layout .main-content {
        padding: 12px;
    }
    
    .session-option {
        padding: 12px;
    }
    
    .form-section {
        padding: 15px 20px;
    }
    
    .next-session-options {
        gap: 10px;
    }
}

/* Small screen optimizations */
@media (max-width: 992px) {
    .compact-layout .sidebar {
        transform: translateX(-100%);
    }
    
    .compact-layout .main-content {
        margin-left: 0;
        width: 100%;
        padding: 10px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Badge styles for status indicators */
.assessment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.assessment-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    background: white;
}

.assessment-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.assessment-card.completed {
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.assessment-card.pending {
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.assessment-status {
    font-weight: bold;
    margin-bottom: 10px;
    display: inline-block;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
}

.assessment-status.completed {
    background-color: #d4edda;
    color: #155724;
}

.assessment-status.pending {
    background-color: #f8d7da;
    color: #721c24;
}

.warning-banner {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
}

.warning-banner h4 {
    color: #856404;
    margin: 0 0 10px 0;
}

.radio-group {
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.radio-group input[type="radio"] {
    margin-right: 5px;
}

.radio-group input[type="date"],
.radio-group input[type="number"] {
    margin-left: 10px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Badge styles for status indicators */
.badge {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
}

.badge-success {
    color: #fff;
    background-color: #28a745;
}

.badge-warning {
    color: #212529;
    background-color: #ffc107;
}

.badge-danger {
    color: #fff;
    background-color: #dc3545;
}

/* Assessment form specific styles */
.question-block {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
}

.question-text {
    font-weight: 500;
    margin-bottom: 15px;
    color: #495057;
}

.scale-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.scale-option {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scale-option:hover {
    background: #e9ecef;
}

.scale-option input[type="radio"] {
    margin-right: 10px;
}

.scale-option.selected {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.risk-option {
    display: flex;
    align-items: center;
    margin: 10px 0;
    padding: 15px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.risk-option:hover {
    background: #e9ecef;
}

.risk-option input[type="checkbox"],
.risk-option input[type="radio"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.risk-option.selected {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.score-display {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
}

.interpretation {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
}

/* Form actions styling */
.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-actions .btn {
    min-width: 120px;
}

/* Alert styles */
.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsive design for assessment pages */
@media (max-width: 768px) {
    .assessment-grid {
        grid-template-columns: 1fr;
    }
    
    .scale-options {
        grid-template-columns: 1fr;
    }
    
    .radio-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .radio-group input[type="date"],
    .radio-group input[type="number"] {
        margin-left: 0;
        width: 100%;
        max-width: 200px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    /* Mobile session form styles - Compact */
    .card-header {
        padding: 15px;
        margin: -20px -20px 15px -20px;
    }
    
    .card-header h3 {
        font-size: 18px;
    }
    
    .form-section {
        margin: 0 -20px 15px -20px;
        padding: 15px;
    }
    
    .next-session-options {
        gap: 10px;
    }
    
    .session-option {
        padding: 12px;
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .option-label {
        gap: 10px;
        margin-bottom: 8px;
        padding-right: 30px;
    }
    
    .option-icon {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .option-input {
        justify-self: start;
        width: 100%;
    }
    
    .session-option input[type="radio"] {
        width: 16px;
        height: 16px;
        top: 12px;
        right: 12px;
    }
    
    .date-input, .days-input {
        max-width: 100%;
    }
    
    .days-input-group {
        max-width: 100%;
    }
    
    .form-actions {
        margin: 0 -20px -20px -20px;
        padding: 15px;
        flex-direction: column;
    }
    
    .btn-lg {
        padding: 12px;
        width: 100%;
    }
}

/* Score display styles for assessments */
.score {
    font-weight: bold;
    opacity: 0.8;
}

.score-display {
    display: inline-block;
    font-size: 12px;
    font-weight: bold;
    color: #007bff;
    margin-top: 3px;
    padding: 2px 6px;
    background: rgba(0, 123, 255, 0.1);
    border-radius: 8px;
    margin-left: 5px;
}

/* Patient session and assessment styles */
.session-count {
    font-weight: bold;
    color: #28a745;
    font-size: 16px;
}

.session-count.in-progress {
    color: #ffc107;
}

.session-numbers {
    color: #6c757d;
    font-size: 11px;
}

.session-tests {
    margin-bottom: 8px;
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
}

.session-tests:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.pending-test {
    background: #fff3cd;
    color: #856404;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 11px;
    cursor: pointer;
    border: 1px solid #ffeaa7;
    transition: all 0.3s ease;
    display: inline-block;
    margin: 1px;
}

.pending-test:hover {
    background: #ffc107;
    color: #212529;
    transform: scale(1.05);
}

/* Modal styles */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
    overflow-y: auto;
}

.modal-content {
    background-color: #fefefe;
    margin: 2rem auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: calc(100vh - 4rem);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: slideIn 0.3s;
    z-index: 1001;
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    max-height: calc(100vh - 200px);
}

.assessment-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
    border-left: 4px solid #007bff;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-shrink: 0;
    background-color: #fefefe;
    border-radius: 0 0 8px 8px;
}

.modal-footer .btn {
    margin: 0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Ensure SweetAlert2 appears above everything */
.swal2-container {
    z-index: 10000 !important;
}

.swal2-popup {
    z-index: 10001 !important;
}

/* Responsive table adjustments */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-table {
    min-width: 1200px; /* Ensure table doesn't get too compressed */
}

@media (max-width: 1200px) {
    .admin-table th, .admin-table td {
        padding: 8px 4px;
        font-size: 12px;
    }
    
    .session-tests {
        font-size: 11px;
    }
    
    .pending-test {
        font-size: 10px;
        padding: 1px 4px;
    }
    
    /* Make modal responsive */
    .modal-content {
        margin: 5% auto;
        width: 95%;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 8px;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}

/* Assessment Score Color Coding */
.assessment-score {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    margin: 1px;
    color: white;
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}

.score-green {
    background-color: #28a745;
    border: 1px solid #1e7e34;
}

.score-yellow {
    background-color: #ffc107;
    border: 1px solid #e0a800;
    color: #212529;
    text-shadow: none;
}

.score-orange {
    background-color: #fd7e14;
    border: 1px solid #e55100;
}

.score-red {
    background-color: #dc3545;
    border: 1px solid #bd2130;
}

.session-tests {
    margin-bottom: 8px;
}

.session-tests:last-child {
    margin-bottom: 0;
}

/* Medication Management Styles */
.medicine-search-container {
    position: relative;
}

.medicine-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.medicine-option {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.medicine-option:hover {
    background-color: #f8f9fa;
}

.medicine-option:last-child {
    border-bottom: none;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -7.5px;
    margin-right: -7.5px;
}

.form-row .form-group {
    padding-left: 7.5px;
    padding-right: 7.5px;
}

.col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
}

.col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

@media (max-width: 768px) {
    .col-md-3,
    .col-md-4,
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .form-row .form-group {
        margin-bottom: 15px;
    }
}

.text-danger {
    color: #dc3545;
}

.text-muted {
    color: #6c757d;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.btn-outline-primary {
    color: #007bff;
    border-color: #007bff;
    background-color: transparent;
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.badge {
    display: inline-block;
    padding: 0.25em 0.4em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.badge-info {
    color: #fff;
    background-color: #17a2b8;
}

.table-sm th,
.table-sm td {
    padding: 0.3rem;
}

/* Patient Medications Modal Styles */
.modal-lg {
    max-width: 90%;
    width: 1000px;
    margin: 1rem auto;
    max-height: calc(100vh - 2rem);
}

.modal-lg .modal-body {
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    padding: 1rem;
}

.patient-medications-container {
    max-height: none;
    overflow-y: visible;
}

.session-medications-group {
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    overflow: hidden;
}

.session-header {
    background-color: #f8f9fa;
    margin: 0;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
    color: #495057;
    font-weight: 600;
}

.session-medications-group .table {
    margin-bottom: 0;
}

.session-medications-group .table thead th {
    background-color: #fff;
    border-top: none;
    font-weight: 600;
    color: #495057;
}

@media (max-width: 768px) {
    .modal-lg {
        max-width: 95%;
        width: auto;
        margin: 0.5rem;
        max-height: calc(100vh - 1rem);
    }
    
    .modal-lg .modal-body {
        max-height: calc(100vh - 120px);
        padding: 0.75rem;
    }
    
    .patient-medications-container {
        max-height: none;
    }
    
    .session-header {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
    }
    
    .badge {
        font-size: 0.7rem;
    }
}

/* Additional scroll styling */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Ensure modal stays within viewport */
@media (max-height: 600px) {
    .modal-content {
        margin: 1rem auto;
        max-height: calc(100vh - 2rem);
    }
    
    .modal-lg {
        margin: 0.5rem auto;
        max-height: calc(100vh - 1rem);
    }
    
    .modal-lg .modal-body {
        max-height: calc(100vh - 100px);
    }
}

/* Notifications Panel Styles */
.notifications-panel {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notification-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    border-left: 5px solid #007bff;
}

.notification-card.urgent {
    border-left-color: #dc3545;
    box-shadow: 0 2px 20px rgba(220, 53, 69, 0.15);
}

.notification-card.info {
    border-left-color: #17a2b8;
}

.notification-card.success {
    border-left-color: #28a745;
}

.notification-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.notification-card.urgent .notification-header {
    background: linear-gradient(135deg, #ffe6e6 0%, #ffcccc 100%);
    color: #721c24;
}

.notification-card.info .notification-header {
    background: linear-gradient(135deg, #e6f7ff 0%, #b3e5fc 100%);
    color: #0c5460;
}

.notification-card.success .notification-header {
    background: linear-gradient(135deg, #e6ffe6 0%, #ccffcc 100%);
    color: #155724;
}

.notification-header i {
    font-size: 1.2rem;
}

.notification-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    flex: 1;
}

.notification-count {
    background: #007bff;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.notification-card.urgent .notification-count {
    background: #dc3545;
}

.notification-card.info .notification-count {
    background: #17a2b8;
}

.notification-card.success .notification-count {
    background: #28a745;
}

.notification-content {
    padding: 1.5rem;
}

.notification-desc {
    margin: 0 0 1rem 0;
    color: #6c757d;
    font-size: 0.95rem;
}

.upcoming-sessions-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.session-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.session-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.session-item.urgent-session {
    background: #fff5f5;
    border-color: #fecaca;
}

.session-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.session-patient {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #495057;
}

.session-patient i {
    color: #007bff;
    width: 16px;
}

.patient-details {
    font-weight: normal;
    color: #6c757d;
    font-size: 0.9rem;
}

.session-schedule {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #495057;
}

.session-schedule i {
    color: #28a745;
    width: 16px;
}

.session-date {
    font-weight: 500;
}

.days-until {
    color: #6c757d;
    font-weight: normal;
    font-size: 0.875rem;
}

.session-clinic {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.session-clinic i {
    color: #17a2b8;
    width: 16px;
}

.session-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-call {
    background: #28a745;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-call:hover {
    background: #218838;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-view {
    background: #007bff;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-view:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Responsive Design for Notifications */
@media (max-width: 768px) {
    .notifications-panel {
        margin-bottom: 1.5rem;
    }
    
    .notification-header {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .notification-header h4 {
        font-size: 1rem;
        width: 100%;
    }
    
    .notification-content {
        padding: 1rem;
    }
    
    .session-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .session-info {
        width: 100%;
    }
    
    .session-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .btn-call, .btn-view {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .session-actions {
        justify-content: center;
    }
    
    .btn-call, .btn-view {
        flex: 1;
        justify-content: center;
    }
}

/* Mental Health Monitoring Table Styles */
.mental-health-table-container {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 600px;
    border: 1px solid #ccc;
    background: white;
}

.mental-health-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 800px;
}

.mental-health-table th {
    background-color: #f5f5f5;
    border: 1px solid #ccc;
    padding: 8px;
    text-align: center;
    font-weight: bold;
    color: #333;
}

.mental-health-table td {
    border: 1px solid #ccc;
    padding: 8px;
    text-align: center;
    vertical-align: middle;
}

.mental-health-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.mental-health-table tbody tr:hover {
    background-color: #f0f0f0;
}

.patient-mr {
    font-weight: bold;
    background-color: #e9e9e9 !important;
    text-align: left;
    padding-left: 12px;
}

.worsening-scores {
    background-color: #ffebee !important;
}

.worsening-scores td {
    background-color: #ffebee !important;
    border-left: 3px solid #f44336;
}

.worsening-scores .patient-mr {
    background-color: #ffcdd2 !important;
}

.card-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #17a2b8;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .mental-health-table-container {
        max-height: 400px;
    }
    
    .mental-health-table {
        min-width: 600px;
        font-size: 0.8rem;
    }
    
    .mental-health-table th,
    .mental-health-table td {
        padding: 6px;
    }
}

@media (max-width: 480px) {
    .mental-health-table-container {
        max-height: 300px;
    }
    
    .mental-health-table {
        min-width: 500px;
        font-size: 0.75rem;
    }
    
    .mental-health-table th,
    .mental-health-table td {
        padding: 4px;
    }
}

/* Filter Form Styles */
.filter-form {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.form-row {
    display: flex;
    align-items: end;
    gap: 1rem;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: white;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.warning-icon {
    color: #dc3545;
    margin-left: 0.5rem;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    color: #495057;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #6c757d;
    margin: 0;
}

.session-date-header {
    font-size: 0.8rem !important;
    color: #6c757d !important;
    font-weight: normal !important;
    padding: 0.5rem !important;
    background-color: #f8f9fa !important;
}

/* Medication Report Styles */
.medications-report-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.patient-medication-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: white;
    overflow: hidden;
}

.patient-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.patient-header h4 {
    margin: 0;
    font-size: 1.1rem;
}

.clinic-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
}

.session-medication-group {
    padding: 1.5rem;
    border-bottom: 1px solid #f1f3f4;
}

.session-medication-group:last-child {
    border-bottom: none;
}

.session-header {
    color: #495057;
    margin-bottom: 1rem;
    font-size: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

.medications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.medication-item {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 1rem;
    background: #f8f9fa;
}

.medication-header {
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.medication-header strong {
    color: #495057;
    font-size: 1rem;
}

.generic-name {
    color: #6c757d;
    font-size: 0.85rem;
    font-style: italic;
    margin-left: 0.5rem;
}

.category-badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

.medication-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #495057;
}

.detail-item i {
    color: #007bff;
    width: 16px;
    text-align: center;
}

.detail-item strong {
    min-width: 80px;
}

/* Mobile Responsive for Medication Reports */
@media (max-width: 768px) {
    .medications-grid {
        grid-template-columns: 1fr;
    }
    
    .patient-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .session-medication-group {
        padding: 1rem;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .detail-item strong {
        min-width: auto;
    }
}