/* components.css - Interactive Components & UI Elements */
/* Brand Colors: Primary #00ADB4 (teal), Secondary #008B94 (darker teal), Accent #5FDEE2 (lighter teal) */

/* =================================================================
   BUTTONS
   ================================================================= */
   .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: 1px solid;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    min-height: 40px;
    gap: 8px;
    font-family: inherit;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: #00ADB4;
    color: white;
    border-color: #00ADB4;
}

.btn-primary:hover:not(:disabled) {
    background: #008B94;
    border-color: #008B94;
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: #374151;
    border-color: #e5e7eb;
}

.btn-secondary:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #d1d5db;
}

.btn-danger {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
    border-color: #dc2626;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    min-height: 32px;
}

.btn-large {
    padding: 14px 28px;
    font-size: 16px;
    min-height: 48px;
}

/* New Patient Buttons */
.new-patient-container {
    position: relative;
    display: inline-block;
}

.new-patient-btn {
    background: #00ADB4;
    color: white;
    border: 1px solid #00ADB4;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    font-size: 14px;
}

.new-patient-btn:hover {
    background: #008B94;
    border-color: #008B94;
    transform: translateY(-1px);
}

/* Sidebar New Patient Button - Oblong Style */
.sidebar-new-patient-oblong {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #5FDEE2, #00ADB4);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 600;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 173, 180, 0.3);
    -webkit-tap-highlight-color: rgba(0,0,0,0);
}

.sidebar-new-patient-oblong:hover:not(:disabled) {
    background: linear-gradient(135deg, #00ADB4, #008B94);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 173, 180, 0.4);
}

.sidebar-new-patient-oblong:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 173, 180, 0.3);
}

.sidebar-new-patient-oblong:focus-visible {
    outline: 3px solid rgba(0, 173, 180, 0.35);
    outline-offset: 2px;
}

.new-patient-plus-icon {
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: bold;
    color: #00ADB4;
    line-height: 1;
}

.new-patient-button-text {
    flex: 1;
    text-align: center;
    white-space: nowrap;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Action Buttons */
.action-btn {
    background: #00ADB4;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 80px;
}

.action-btn:hover:not(:disabled) {
    background: #008B94;
    transform: translateY(-1px);
}

.action-btn.secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    min-width: 32px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn.secondary:hover {
    background: #e5e7eb;
}

/* Back Button */
.back-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    font-size: 14px;
}

.back-button:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #1f2937;
}

/* Sidebar Refresh Button */
.sidebar-refresh-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    font-size: 14px;
    color: #6b7280;
    transition: all 0.2s ease;
}

.sidebar-refresh-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Button Loading States */
.btn.loading,
.sidebar-new-patient-oblong.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after,
.sidebar-new-patient-oblong.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-spinner-small {
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* =================================================================
   FORMS
   ================================================================= */
.form-group {
    margin-bottom: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: white;
    box-sizing: border-box;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.filter-input:focus,
.patient-name-input:focus {
    outline: none;
    border-color: #00ADB4;
    box-shadow: 0 0 0 3px rgba(0, 173, 180, 0.1);
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

/* Form Validation States */
.form-input.error,
.form-select.error,
.form-textarea.error,
.form-group.error .form-input,
.form-group.error .form-select,
.form-group.error .form-textarea {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-error {
    color: #ef4444;
    font-size: 12px;
    margin-top: 6px;
    display: none;
    font-weight: 500;
}

.form-group.error .form-error {
    display: block;
}

/* =================================================================
   STATUS BADGES
   ================================================================= */
.status-badge,
.sidebar-status-badge {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    text-align: center;
    border: 1px solid;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-status-badge {
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 9px;
    line-height: 1.2;
}

.status-not-seen,
.sidebar-status-badge.status-not-seen {
    background: #fef3c7;
    color: #92400e;
    border-color: #f59e0b;
}

.status-paused,
.sidebar-status-badge.status-paused {
    background: #e0f7fa;
    color: #00695c;
    border-color: #00ADB4;
}

.status-in-progress,
.sidebar-status-badge.status-in-progress {
    background: #e0f7fa;
    color: #00ADB4;
    border-color: #00ADB4;
}

.status-completed,
.sidebar-status-badge.status-completed {
    background: #d1fae5;
    color: #065f46;
    border-color: #10b981;
}

.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
    border-color: #ef4444;
}

.status-scheduled {
    background-color: #f0f9ff;
    color: #0369a1;
    border: 1px solid #7dd3fc;
}

.status-confirmed {
    background-color: #e0f7fa;
    color: #00695c;
    border: 1px solid #4dd0e1;
}

.status-unknown {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.status-processing,
.sidebar-status-badge.status-processing {
    background: linear-gradient(90deg, #dbeafe, #bfdbfe, #dbeafe);
    background-size: 200% 100%;
    color: #1e40af;
    border: 1px solid #60a5fa;
    animation: processingShimmer 2s ease-in-out infinite;
}

@keyframes processingShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* =================================================================
   MODALS
   ================================================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: 12px;
    padding: 0;
    width: 600px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    position: relative;
    padding: 24px 24px 20px;
    border-bottom: 1px solid #f3f4f6;
    flex-shrink: 0;
    background: #f8f9fa;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    padding-right: 40px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: absolute;
    top: 20px;
    right: 20px;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 24px;
    border-top: 1px solid #f3f4f6;
    background: #f8f9fa;
    flex-shrink: 0;
}

.modal-actions .btn {
    min-width: 100px;
}

/* =================================================================
   PATIENT SEARCH & DROPDOWN
   ================================================================= */
.patient-search {
    flex-shrink: 0;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f3f4;
    margin: 0;
}

.patient-search input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    background: white;
    box-sizing: border-box;
}

.patient-search input:focus {
    outline: none;
    border-color: #00ADB4;
    box-shadow: 0 0 0 3px rgba(0, 173, 180, 0.1);
}

.patient-suggestions {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    margin: 0;
    min-height: 0;
}

.patient-suggestion {
    padding: 16px 24px;
    cursor: pointer;
    border-bottom: 1px solid #f7fafc;
    transition: background-color 0.2s;
    margin: 0;
    flex-shrink: 0;
}

.patient-suggestion:hover {
    background-color: #f8f9fa;
}

.patient-suggestion:last-child {
    border-bottom: none;
}

.suggestion-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 6px;
    font-size: 15px;
}

.suggestion-meta {
    font-size: 13px;
    color: #718096;
    line-height: 1.4;
}

/* =================================================================
   INLINE PATIENT NAME EDITOR
   ================================================================= */
.inline-patient-name-editor {
    position: relative;
    display: inline-block;
    min-width: 200px;
}

.patient-name-display {
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    min-height: 40px;
    box-sizing: border-box;
}

.patient-name-display:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.patient-name-display.placeholder {
    color: #9ca3af;
    font-style: italic;
    border-color: #e5e7eb;
    background: #f9fafb;
}

.patient-name-display.placeholder:hover {
    color: #6b7280;
    background: #f3f4f6;
    border-color: #d1d5db;
}

.patient-name-input-container {
    position: relative;
    display: none;
    min-width: 250px;
}

.patient-name-input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #00ADB4;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 173, 180, 0.1);
    outline: none;
    box-sizing: border-box;
}

.input-actions {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 2px;
}

.save-btn, .cancel-btn {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.save-btn {
    background: #10b981;
    color: white;
}

.save-btn:hover {
    background: #059669;
}

.cancel-btn {
    background: #ef4444;
    color: white;
}

.cancel-btn:hover {
    background: #dc2626;
}

/* Patient Dropdown */
.patient-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.patient-dropdown-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
}

.patient-dropdown-item:hover,
.patient-dropdown-item.selected {
    background: #e0f7fa;
    color: #00ADB4;
}

.patient-dropdown-item:last-child {
    border-bottom: none;
}

.patient-dropdown-item.create-new {
    background: #e0f7fa;
    border-top: 1px solid #b2ebf2;
    color: #00695c;
}

.patient-dropdown-item.create-new:hover {
    background: #b2ebf2;
}

.patient-dropdown-item .patient-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.patient-dropdown-item .patient-notes {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}

/* Left-aligned variant for recording header */
.inline-patient-name-editor.left-aligned {
    position: absolute;
    left: 20px;
    top: 20px;
    z-index: 10;
    min-width: 250px;
}

.inline-patient-name-editor.left-aligned .patient-name-display {
    padding: 12px 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    font-size: 18px;
    color: #1f2937;
    min-height: 48px;
}

.inline-patient-name-editor.left-aligned .patient-name-display:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #00ADB4;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* =================================================================
   NOTIFICATIONS & ALERTS
   ================================================================= */
   .notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    z-index: 1001;
    width: auto; /* Changed from max-width */
    min-width: 20px; /* Minimum width */
    max-width: 400px !important; /* Maximum width */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 500;
    animation: slideInRight 0.3s ease-out;
    border: 1px solid;
}

.notification.success {
    background: #00ADB4 !important;
    color: white !important;
    border-color: #059669 !important;
} 

.notification.error {
    background: #ef4444;
    color: white;
    border-color: #dc2626;
}

.notification.warning {
    background: #f59e0b;
    color: white;
    border-color: #d97706;
}

.notification.info {
    background: #00ADB4;
    color: white;
    border-color: #008B94;
}

.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.success {
    background: #e0f7fa;
    border: 1px solid #00ADB4;
    color: #00695c;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* =================================================================
   CONTEXT MENUS
   ================================================================= */
.context-menu {
    position: fixed;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 180px;
    overflow: hidden;
}

.context-menu-item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid #f1f3f4;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s ease;
}

.context-menu-item:last-child {
    border-bottom: none;
}

.context-menu-item:hover {
    background: #f7fafc;
}

.context-menu-item.danger {
    color: #ef4444;
}

.context-menu-item.danger:hover {
    background: #fef2f2;
}

/* =================================================================
   LOGIN COMPONENTS
   ================================================================= */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: white;
}

.login-form {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    position: relative;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.login-logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
}

.login-logo-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
}

.login-brand {
    font-size: 28px;
    font-weight: 700;
    color: #00ADB4;
    margin: 0;
    letter-spacing: -0.5px;
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 32px;
    text-align: center;
}

.signup-link {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
    font-size: 14px;
    color: #6b7280;
}

.signup-link a {
    color: #00ADB4;
    text-decoration: none;
    font-weight: 600;
}

.signup-link a:hover {
    text-decoration: underline;
}

/* =================================================================
   EXISTING DATA SUMMARY
   ================================================================= */
.existing-data-summary {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.existing-data-summary .summary-header h3 {
    margin: 0 0 16px 0;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
}

.existing-data-summary .summary-content p {
    color: #374151;
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.5;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.summary-stats .stat-item {
    text-align: center;
}

.summary-stats .stat-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #00ADB4;
    margin-bottom: 4px;
}

.summary-stats .stat-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    font-weight: 500;
}

.summary-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* =================================================================
   ERROR STATE
   ================================================================= */
.error-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.error-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.6;
}

.error-state h3 {
    color: #1f2937;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 600;
}

.error-state p {
    color: #6b7280;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.5;
}

/* =================================================================
   NAVIGATION & SIDEBAR UPDATES
   ================================================================= */
.nav-item.active {
    background-color: #e0f7fa !important;
    border-left-color: #00ADB4 !important;
    color: #00ADB4 !important;
    font-weight: 600;
}

.sidebar.collapsed .nav-item.active {
    background-color: #e0f7fa !important;
    border: 2px solid #00ADB4 !important;
}

/* =================================================================
   PATIENT NOTES
   ================================================================= */
.patient-notes {
    font-size: 12px;
    color: #718096;
    font-style: italic;
    margin-top: 2px;
}

/* =================================================================
   ANIMATIONS
   ================================================================= */
.patient-name-updated {
    animation: highlightSuccess 0.5s ease-out;
}

@keyframes highlightSuccess {
    0% {
        background-color: #d1fae5;
        transform: scale(1.05);
    }
    100% {
        background-color: transparent;
        transform: scale(1);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* =================================================================
   SCROLLBARS
   ================================================================= */
.patient-suggestions::-webkit-scrollbar,
.patient-dropdown::-webkit-scrollbar,
.sidebar-schedule-list::-webkit-scrollbar,
.table-body::-webkit-scrollbar {
    width: 6px;
}

.patient-suggestions::-webkit-scrollbar-track,
.patient-dropdown::-webkit-scrollbar-track,
.sidebar-schedule-list::-webkit-scrollbar-track,
.table-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.patient-suggestions::-webkit-scrollbar-thumb,
.patient-dropdown::-webkit-scrollbar-thumb,
.sidebar-schedule-list::-webkit-scrollbar-thumb,
.table-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.patient-suggestions::-webkit-scrollbar-thumb:hover,
.patient-dropdown::-webkit-scrollbar-thumb:hover,
.sidebar-schedule-list::-webkit-scrollbar-thumb:hover,
.table-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* =================================================================
   MOBILE RESPONSIVE
   ================================================================= */
@media (max-width: 768px) {
    .inline-patient-name-editor {
        min-width: 180px;
    }
    
    .patient-name-input-container {
        min-width: 200px;
    }
    
    .patient-name-input {
        font-size: 16px;
    }
    
    .patient-dropdown {
        max-height: 200px;
    }
    
    .inline-patient-name-editor.left-aligned {
        left: 10px;
        top: 10px;
        min-width: 200px;
    }
    
    .inline-patient-name-editor.left-aligned .patient-name-display {
        font-size: 16px;
        padding: 10px 14px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .new-patient-btn {
        padding: 10px 16px;
        font-size: 12px;
    }

    .new-patient-btn span:last-child {
        display: none;
    }

    .modal {
        width: 95vw;
        margin: 20px;
    }

    .modal-header,
    .modal-actions {
        padding: 16px 20px;
    }

    .summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .context-menu {
        min-width: 160px;
    }

    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .sidebar-new-patient-oblong {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .new-patient-plus-icon {
        width: 18px;
        height: 18px;
        font-size: 12px;
    }

    .login-form {
        padding: 24px;
        margin: 10px;
    }
    
    .login-title {
        font-size: 20px;
    }
    
    .login-brand {
        font-size: 24px;
    }
    
    .login-logo-icon {
        width: 48px;
        height: 48px;
    }
    
    .form-input {
        font-size: 16px;
    }
}

@media (max-width: 640px) {
    .form-input {
        font-size: 16px;
    }
}

/* DESKTOP SIDEBAR ICON ALIGNMENT FIX - Add to your CSS */

/* =================================================================
   DESKTOP SIDEBAR NEW PATIENT BUTTON ICON ALIGNMENT
   ================================================================= */

/* Only apply on desktop - don't affect mobile */
@media (min-width: 481px) {
    
    /* Fix the new patient button container alignment */
    .sidebar-new-patient {
        padding: 16px 20px;
        border-bottom: 1px solid #e1e5e9;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Fix the new patient button itself */
    .sidebar-new-patient-btn {
        width: 100%;
        padding: 12px 16px;
        background: #00ADB4;
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 44px; /* Same as nav items */
    }
    
    /* Fix the plus icon alignment */
    .new-patient-icon {
        width: 20px; /* Same as nav icons */
        height: 20px; /* Same as nav icons */
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    /* Ensure the plus icon itself is centered */
    .new-patient-icon i {
        width: 16px;
        height: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Fix navigation items for consistency */
    .nav-item {
        padding: 16px 20px;
        display: flex;
        align-items: center;
        gap: 12px;
        cursor: pointer;
        transition: all 0.2s ease;
        border-left: 3px solid transparent;
        color: #6b7280;
        font-size: 14px;
        font-weight: 500;
        min-height: 52px; /* Consistent height */
    }
    
    /* Ensure nav icons are properly sized and aligned */
    .nav-icon {
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    .nav-icon i {
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Hover states */
    .sidebar-new-patient-btn:hover {
        background: #008B94;
        transform: translateY(-1px);
    }
    
    .nav-item:hover {
        background: #f8fafc;
        color: #374151;
    }
    
    .nav-item.active {
        background: #e0f7fa;
        color: #00ADB4;
        border-left-color: #00ADB4;
    }
    
    /* User info alignment */
    .user-info {
        margin-top: auto;
        padding: 20px;
        border-top: 1px solid #e1e5e9;
        display: flex;
        align-items: center;
        gap: 12px;
        min-height: 52px; /* Consistent with nav items */
    }
    
    .user-avatar {
        width: 40px;
        height: 40px;
        background: #00ADB4;
        color: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        font-size: 14px;
        flex-shrink: 0;
    }
}

/* Simple Delete Modal */
.delete-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.delete-modal-overlay.show {
    display: flex;
}

.delete-modal {
    background: white;
    border-radius: 12px;
    padding: 32px;
    width: 400px;
    max-width: 90vw;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.delete-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.delete-message {
    color: #6b7280;
    margin-bottom: 8px;
    font-size: 14px;
}

.delete-patient-name {
    font-weight: 600;
    color: #ef4444;
    margin-bottom: 24px;
}

.delete-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.delete-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 100px;
}

.delete-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.cancel-btn {
    background: #f3f4f6;
    color: #374151;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 100px;
}

.cancel-btn:hover {
    background: #e5e7eb;
    transform: translateY(-1px);
}