* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    padding-bottom: 60px;
    color: #333;
}

/* ============================================
   ROLE SELECTION SCREEN
   ============================================ */

.role-selection-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: -20px;
}

.role-selection-container {
    background: white;
    border-radius: 24px;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.4);
    padding: 50px;
    width: 100%;
    max-width: 700px;
    text-align: center;
}

.role-header {
    margin-bottom: 40px;
}

.clinic-logo-large {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    box-shadow: 0 15px 40px rgba(30, 60, 114, 0.4);
}

.clinic-logo-large svg {
    color: white;
}

.role-header h1 {
    font-size: 32px;
    color: #1e3c72;
    margin-bottom: 10px;
    font-weight: 700;
}

.role-header p {
    color: #666;
    font-size: 16px;
}

.role-cards {
    display: flex;
    gap: 25px;
    margin-bottom: 30px;
}

.role-card {
    flex: 1;
    background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 35px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.role-card:hover {
    transform: translateY(-8px);
    border-color: #667eea;
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.25);
}

.role-card:first-child:hover {
    border-color: #2a5298;
    box-shadow: 0 20px 50px rgba(42, 82, 152, 0.25);
}

.role-card:first-child:hover .role-icon {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

.role-card:last-child:hover {
    border-color: #4caf50;
    box-shadow: 0 20px 50px rgba(76, 175, 80, 0.25);
}

.role-card:last-child:hover .role-icon {
    background: linear-gradient(135deg, #2e7d32 0%, #4caf50 100%);
}

.role-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
}

.role-icon svg {
    color: white;
}

.role-card h3 {
    font-size: 20px;
    color: #1e3c72;
    margin-bottom: 10px;
    font-weight: 600;
}

.role-card p {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.role-footer {
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.role-footer p {
    color: #888;
    font-size: 14px;
}

/* ============================================
   LOGIN SCREEN STYLES
   ============================================ */

.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: -20px;
}

.login-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    padding: 40px;
    width: 100%;
    max-width: 440px;
    text-align: center;
    position: relative;
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: #667eea;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn:hover {
    color: #764ba2;
    transform: translateX(-3px);
}

.login-header {
    margin-bottom: 30px;
    padding-top: 20px;
}

.clinic-logo {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(30, 60, 114, 0.3);
    transition: all 0.3s ease;
}

.clinic-logo.staff-logo {
    background: linear-gradient(135deg, #2e7d32 0%, #4caf50 100%);
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.3);
}

.clinic-logo svg {
    color: white;
}

.login-header h1 {
    font-size: 26px;
    color: #1e3c72;
    margin-bottom: 8px;
    font-weight: 700;
}

.login-header p {
    color: #666;
    font-size: 15px;
    font-weight: 500;
}

.login-form {
    margin-bottom: 20px;
}

.login-form-group {
    margin-bottom: 18px;
    text-align: left;
}

.login-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon svg {
    position: absolute;
    left: 15px;
    color: #667eea;
    z-index: 1;
}

.input-with-icon input {
    width: 100%;
    padding: 14px 15px 14px 48px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.input-with-icon input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.input-with-icon input::placeholder {
    color: #aaa;
}

/* CAPTCHA Section */
.captcha-section {
    margin-bottom: 20px;
    text-align: left;
}

.captcha-section > label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.captcha-container {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.captcha-display {
    flex: 1;
    background: #f0f4ff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.captcha-display canvas {
    display: block;
    width: 100%;
    height: 50px;
}

.captcha-refresh {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.captcha-refresh:hover {
    transform: rotate(180deg);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.captcha-refresh svg {
    color: white;
}

.captcha-input-group {
    margin-top: 10px;
}

.login-error, .error-message {
    background: #ffebee;
    color: #c62828;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 14px;
    border-left: 4px solid #c62828;
    text-align: left;
}

.success-message {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 14px;
    border-left: 4px solid #2e7d32;
    text-align: left;
}

/* Password Strength Meter */
.password-strength-container {
    margin-top: 8px;
}

.password-strength-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.password-strength-meter {
    height: 100%;
    width: 0%;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.password-strength-meter.weak {
    background: linear-gradient(90deg, #f44336, #ff5722);
    width: 20%;
}

.password-strength-meter.medium {
    background: linear-gradient(90deg, #ff9800, #ffc107);
    width: 60%;
}

.password-strength-meter.strong {
    background: linear-gradient(90deg, #8bc34a, #4caf50);
    width: 80%;
}

.password-strength-meter.very-strong {
    background: linear-gradient(90deg, #4caf50, #2e7d32);
    width: 100%;
}

.password-strength-feedback {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.strength-requirement {
    font-size: 11px;
    color: #f44336;
    background: #ffebee;
    padding: 3px 8px;
    border-radius: 4px;
}

.strength-valid {
    font-size: 12px;
    color: #2e7d32;
    background: #e8f5e9;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
}

.password-match-feedback {
    margin-top: 6px;
}

.match-valid {
    font-size: 12px;
    color: #2e7d32;
    background: #e8f5e9;
    padding: 4px 10px;
    border-radius: 4px;
}

.match-invalid {
    font-size: 12px;
    color: #f44336;
    background: #ffebee;
    padding: 4px 10px;
    border-radius: 4px;
}

.login-btn {
    width: 100%;
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.login-btn:active {
    transform: translateY(-1px);
}

.login-footer {
    padding-top: 18px;
    border-top: 1px solid #eee;
}

.login-footer p {
    color: #888;
    font-size: 13px;
    margin-bottom: 10px;
}

/* Signup Link */
.signup-link {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
}

.signup-link p {
    color: #666;
    font-size: 14px;
}

.signup-link a {
    color: #667eea;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.signup-link a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Forgot Password Link */
.forgot-password-link {
    margin-top: 10px;
}

.forgot-password-link a {
    color: #f44336;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.forgot-password-link a:hover {
    color: #d32f2f;
    text-decoration: underline;
}

/* Signup Container */
.signup-container {
    max-width: 450px;
}

.signup-btn {
    background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
}

.signup-btn:hover {
    box-shadow: 0 10px 30px rgba(67, 160, 71, 0.4);
}

.signup-success {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
    border: 1px solid #a5d6a7;
    margin-bottom: 15px;
}

/* ============================================
   MAIN APP STYLES
   ============================================ */

.main-app {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Header */
.header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 20px 30px;
}

.staff-header {
    background: linear-gradient(135deg, #2e7d32 0%, #4caf50 100%);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.header h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.header-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-user-info > span {
    font-size: 14px;
    opacity: 0.9;
}

.user-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.doctor-badge {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.staff-badge {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   TIMEZONE CLOCK DISPLAY (Compact, Right-aligned)
   ============================================ */

.timezone-clock-bar {
    background: rgba(0, 0, 0, 0.1);
    padding: 4px 12px;
    margin-top: 8px;
    border-radius: 6px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.timezone-clock-bar.staff-timezone {
    background: rgba(0, 0, 0, 0.08);
}

.timezone-clock-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.timezone-clock-content svg {
    opacity: 0.8;
    width: 14px;
    height: 14px;
}

.timezone-date {
    font-size: 11px;
    opacity: 0.85;
    font-weight: 500;
    display: none; /* Hide date to save space */
}

.timezone-time {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.15);
    padding: 3px 10px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #ffffff !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.timezone-name {
    font-size: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 3px 8px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    color: #ffffff !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Timezone indicator in appointment cards */
.timezone-indicator {
    font-size: 11px;
    color: #666;
    margin-left: 5px;
    font-weight: 500;
}

.apt-time-converted {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.apt-time-converted .tz-badge {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

/* Role Switcher Button (Super Admin only) */
.btn-role-switcher {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

.btn-role-switcher:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

.btn-role-switcher svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   STAFF DASHBOARD STYLES
   ============================================ */

.staff-stats-section {
    padding: 25px;
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #4caf50;
}

.stat-card:nth-child(2) {
    border-left-color: #2196f3;
}

.stat-card:nth-child(3) {
    border-left-color: #ff9800;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    color: white;
}

.stat-icon.appointments-icon {
    background: linear-gradient(135deg, #2196f3 0%, #42a5f5 100%);
}

.stat-icon.records-icon {
    background: linear-gradient(135deg, #ff9800 0%, #ffb74d 100%);
}

.stat-info h3 {
    font-size: 32px;
    font-weight: 700;
    color: #1e3c72;
    margin-bottom: 5px;
}

.stat-info p {
    font-size: 14px;
    color: #666;
}

.staff-main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    padding: 25px;
}

@media (max-width: 1024px) {
    .staff-main-content {
        grid-template-columns: 1fr;
    }
}

.staff-section {
    background: #fafafa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.staff-section-header {
    background: linear-gradient(135deg, #2e7d32 0%, #4caf50 100%);
}

.staff-action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.registrations-list {
    min-height: 200px;
}

.no-records {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.no-records svg {
    color: #ddd;
    margin-bottom: 15px;
}

.no-records p {
    font-size: 14px;
}

.registration-item {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid #4caf50;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reg-info strong {
    display: block;
    color: #1e3c72;
    font-size: 15px;
    margin-bottom: 4px;
}

.reg-mr {
    font-size: 12px;
    color: #666;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 4px;
}

.reg-details {
    text-align: right;
}

.reg-details span {
    display: block;
    font-size: 13px;
    color: #666;
}

.reg-doctor {
    font-size: 12px !important;
    color: #4caf50 !important;
    font-weight: 500;
}

/* ============================================
   FORM STYLES
   ============================================ */

.demographics-section {
    padding: 25px;
    background: #f8f9fa;
    border-bottom: 2px solid #e0e0e0;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 200px;
}

.form-group.full-width {
    flex: 2;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="date"]:focus,
.form-group input[type="tel"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

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

.form-help {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.btn-retrieve {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 28px;
    white-space: nowrap;
}

.btn-retrieve:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(42, 82, 152, 0.4);
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    padding: 25px;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* Section Headers */
.section-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 6px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.section-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Intake Section */
.intake-section {
    background: #fafafa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

/* Clinical Section */
.clinical-section {
    background: #fafafa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

/* Highlight Field */
.highlight-field {
    background: #e8f5e9;
    padding: 15px;
    border-radius: 6px;
    border: 2px solid #4caf50;
}

.highlight-field label {
    color: #2e7d32;
    font-weight: 700;
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.radio-group input[type="radio"] {
    width: auto;
    margin-right: 5px;
}

.radio-group label {
    display: inline;
    font-weight: normal;
    margin: 0;
    cursor: pointer;
}

/* Upload Area */
.upload-area {
    margin-top: 10px;
}

.upload-placeholder {
    border: 3px dashed #2a5298;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f0f4ff;
}

.upload-placeholder:hover {
    background: #e0e8ff;
    border-color: #1e3c72;
}

.upload-placeholder svg {
    color: #2a5298;
    margin-bottom: 10px;
}

.upload-placeholder p {
    margin: 5px 0;
    color: #2a5298;
    font-weight: 600;
}

.upload-hint {
    font-size: 12px;
    color: #666;
    font-weight: normal;
}

.uploaded-files {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.uploaded-file-item {
    background: #e3f2fd;
    padding: 12px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid #2196f3;
}

.uploaded-file-item span {
    flex: 1;
    color: #1976d2;
    font-weight: 500;
}

.uploaded-file-item button {
    background: #f44336;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.uploaded-file-item button:hover {
    background: #d32f2f;
}

.file-type-badge {
    background: #e3f2fd;
    color: #1976d2;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Security - File Upload Feedback */
.file-upload-info {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    padding: 8px 12px;
    background: #f5f5f5;
    border-radius: 6px;
    border-left: 3px solid #2196f3;
}

/* Vitals Grid */
.vitals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.vital-item {
    background: #e8f5e9;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #4caf50;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.vital-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
    background: #c8e6c9;
}

.vital-icon {
    font-size: 32px;
}

.vital-item span {
    font-weight: 600;
    color: #2e7d32;
    font-size: 14px;
}

.vital-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #4caf50;
    border-radius: 4px;
    text-align: center;
    font-size: 12px;
}

/* Review of Systems */
.review-systems-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.system-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.system-item span {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .slider {
    background-color: #4caf50;
}

.toggle-switch input:checked + .slider:before {
    transform: translateX(26px);
}

/* Assessment Section */
.assessment-section {
    padding: 25px;
    background: #f8f9fa;
    border-top: 2px solid #e0e0e0;
}

.signature-group {
    margin-top: 20px;
}

.signature-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.signature-line {
    border-top: 2px solid #333;
    padding-top: 10px;
    min-height: 60px;
    position: relative;
}

.signature-text {
    font-family: 'Brush Script MT', cursive;
    font-size: 24px;
    color: #2a5298;
    position: absolute;
    right: 0;
    top: 10px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    padding: 25px;
    justify-content: center;
    background: #f8f9fa;
    border-top: 2px solid #e0e0e0;
}

.btn {
    padding: 14px 30px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(42, 82, 152, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 117, 125, 0.4);
}

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

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.4);
}

/* ============================================
   VITALS INPUT GRID (Staff Data Entry)
   ============================================ */

.vitals-input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.vital-input-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.vital-input-item label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
}

.vital-input-item input {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease;
}

.vital-input-item input:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* File Upload Area */
.file-upload-area {
    border: 3px dashed #4caf50;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f1f8e9;
    position: relative;
}

.file-upload-area:hover {
    background: #e8f5e9;
    border-color: #2e7d32;
}

.file-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-area p {
    color: #4caf50;
    font-weight: 500;
    margin: 0;
}

.uploaded-files-list {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.uploaded-files-list .uploaded-file-item {
    background: #e8f5e9;
    border-left-color: #4caf50;
}

.uploaded-files-list .file-name {
    color: #2e7d32;
}

.uploaded-files-list .file-size {
    color: #666;
    font-size: 12px;
    margin-left: 10px;
}

/* Tab styles */
.tabs {
    display: flex;
    gap: 8px;
    padding: 20px 25px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: none;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 14px 28px;
    border: none;
    background: linear-gradient(135deg, #e0e0e0 0%, #d0d0d0 100%);
    color: #555;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    border-radius: 10px 10px 0 0;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
}

.tab-btn:hover {
    background: linear-gradient(135deg, #c5cae9 0%, #9fa8da 100%);
    color: #1a237e;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

#staffApp .tab-btn.active {
    background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
    color: white;
    border-bottom: none;
    box-shadow: 0 4px 15px rgba(67, 160, 71, 0.4);
}

#staffApp .tab-btn:hover:not(.active) {
    background: linear-gradient(135deg, #a5d6a7 0%, #81c784 100%);
    color: #1b5e20;
}

.tab-content {
    display: none;
    padding: 25px;
}

.tab-content.active {
    display: block;
}

/* Readonly badge */
.readonly-badge {
    background: #ff9800;
    color: white;
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: 10px;
    text-transform: uppercase;
    font-weight: 700;
}

/* Readonly input fields */
.readonly-input {
    background: #f5f5f5 !important;
    color: #666 !important;
    cursor: not-allowed;
}

.readonly-form {
    background: #fafafa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px dashed #e0e0e0;
}

/* Doctor Patient Details View */
#doctorPatientDetails {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#doctorPatientDetails .main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-top: 20px;
    margin-bottom: 20px;
}

@media (max-width: 1024px) {
    #doctorPatientDetails .main-content {
        grid-template-columns: 1fr;
    }
}

#doctorPatientDetails .intake-section,
#doctorPatientDetails .clinical-section {
    background: #fafafa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    display: block !important;
}

#doctorPatientDetails .section-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 15px 20px;
    margin-bottom: 15px;
    border-radius: 6px;
}

#doctorPatientDetails .section-header h2 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
    margin: 0;
}

#doctorPatientDetails .section-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#doctorPatientDetails .assessment-section {
    background: #e3f2fd;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #2196f3;
    margin-top: 20px;
}

#doctorPatientDetails .action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

#doctorPatientDetails .action-buttons .btn {
    padding: 12px 25px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    border: none;
}

#doctorPatientDetails .action-buttons .btn-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

#doctorPatientDetails .action-buttons .btn-secondary {
    background: #64748b;
    color: white;
}

/* Vitals input grid for doctor view */
#doctorPatientDetails .vitals-input-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    #doctorPatientDetails .vitals-input-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

#doctorPatientDetails .vital-input-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#doctorPatientDetails .vital-input-item label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

#doctorPatientDetails .vital-input-item input {
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 14px;
}

#doctorPatientDetails .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

#doctorPatientDetails .form-group {
    flex: 1;
    min-width: 200px;
}

#doctorPatientDetails .form-group.full-width {
    flex: 100%;
    min-width: 100%;
}

#doctorPatientDetails .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

#doctorPatientDetails .form-group input,
#doctorPatientDetails .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

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

#doctorPatientDetails .form-group input:focus,
#doctorPatientDetails .form-group textarea:focus {
    outline: none;
    border-color: #2a5298;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

/* Staff section spacing */
#staffRegisterTab .staff-section {
    margin-bottom: 20px;
}

/* Button large */
.btn-large {
    padding: 15px 30px;
    font-size: 16px;
}

/* Patient list styles */
.patient-list {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: visible;
}

.patient-list-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #1e3c72;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.patient-list-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.patient-list-item .patient-name {
    font-weight: 600;
    color: #1e3c72;
    font-size: 15px;
}

.patient-list-item .patient-mr {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
}

.patient-list-item .patient-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.patient-list-item .status-pending {
    background: #fff3e0;
    color: #e65100;
}

.patient-list-item .status-reviewed {
    background: #e8f5e9;
    color: #2e7d32;
}

.patient-list-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.btn-view-details {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-view-details:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 60, 114, 0.4);
}

/* Edit button */
.btn-edit {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
}

.btn-edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4);
}

/* Delete button */
.btn-delete {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
}

.btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

/* Readonly input */
.readonly-input {
    background-color: #f0f0f0 !important;
    color: #666 !important;
    cursor: not-allowed;
}

/* Search box */
.search-box {
    margin-bottom: 15px;
}

.search-box input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #1e3c72;
    box-shadow: 0 0 0 3px rgba(30, 60, 114, 0.1);
}

/* Doctor notes readonly for staff */
.doctor-notes-readonly {
    background: #f3e5f5;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #9c27b0;
    margin-top: 20px;
}

.doctor-notes-readonly h4 {
    color: #7b1fa2;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.doctor-notes-readonly .notes-content {
    background: white;
    padding: 15px;
    border-radius: 6px;
    margin-top: 10px;
}

.doctor-notes-readonly .notes-content p {
    margin: 8px 0;
    color: #333;
}

.doctor-notes-readonly .notes-content strong {
    color: #7b1fa2;
}

.no-notes {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Patient info card */
.patient-info-card {
    background: #e3f2fd;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.info-grid div {
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
}

.info-grid strong {
    color: #1976d2;
    margin-right: 8px;
}

/* Availability grid for doctors */
.availability-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.availability-day {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.availability-day label {
    min-width: 150px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.availability-day input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.availability-day input[type="time"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.availability-day .time-select,
.time-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    min-width: 110px;
}

/* Appointment list styles */
.appointment-list {
    max-height: 400px;
    overflow-y: auto;
}

.appointment-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.appointment-item.pending {
    border-left: 4px solid #ff9800;
}

.appointment-item.approved {
    border-left: 4px solid #4caf50;
}

.appointment-item.declined {
    border-left: 4px solid #f44336;
}

.apt-patient-info strong {
    color: #1e3c72;
    display: block;
    margin-bottom: 3px;
}

.apt-patient-info span {
    font-size: 12px;
    color: #666;
}

.apt-actions {
    display: flex;
    gap: 8px;
}

.apt-actions button {
    padding: 8px 15px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-approve {
    background: #4caf50;
    color: white;
}

.btn-approve:hover {
    background: #388e3c;
}

.btn-reschedule {
    background: #2196f3;
    color: white;
}

.btn-reschedule:hover {
    background: #1976d2;
}

.btn-decline {
    background: #f44336;
    color: white;
}

.btn-decline:hover {
    background: #d32f2f;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.pending {
    background: #fff3e0;
    color: #e65100;
}

.status-badge.approved {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-badge.declined {
    background: #ffebee;
    color: #c62828;
}

/* Info text */
.info-text {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    padding: 10px 15px;
    background: #e3f2fd;
    border-radius: 6px;
    border-left: 4px solid #2196f3;
}

/* Days checkbox group */
.days-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 8px;
}

.days-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: normal;
}

.days-checkbox-group label:hover {
    background: #e8f5e9;
    border-color: #4caf50;
}

.days-checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.days-checkbox-group input[type="checkbox"]:checked + label,
.days-checkbox-group label:has(input:checked) {
    background: #4caf50;
    color: white;
    border-color: #4caf50;
}

/* Doctors list */
.doctors-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.doctor-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 10px;
    border-left: 4px solid #2196f3;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.doctor-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.doctor-info h4 {
    margin: 0 0 8px 0;
    color: #1e3c72;
    font-size: 18px;
}

.doctor-specialty {
    color: #2196f3;
    font-weight: 600;
    margin: 4px 0;
}

.doctor-email {
    color: #666;
    font-size: 13px;
    margin: 4px 0;
}

.doctor-days {
    color: #4caf50;
    font-size: 13px;
    margin: 4px 0;
}

.doctor-time {
    color: #ff9800;
    font-size: 12px;
    margin: 4px 0;
}

.doctor-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.doctor-fee {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
}

.btn-edit-doctor {
    background: #2196f3;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-edit-doctor:hover {
    background: #1976d2;
}

.btn-delete-doctor {
    background: #f44336;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-delete-doctor:hover {
    background: #d32f2f;
}

.doctor-phone {
    color: #666;
    font-size: 13px;
    margin: 4px 0;
}

.doctor-exp {
    color: #9c27b0;
    font-size: 12px;
    margin: 4px 0;
}

.doctor-consult-type {
    color: #4caf50;
    font-size: 13px;
    font-weight: 600;
    margin: 4px 0;
}

/* Pre-registration Cards (Doctor & Staff Authorization) */
.preregistered-list, .staff-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preregistered-card, .staff-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px;
    background: white;
    border-radius: 10px;
    border-left: 4px solid #ff9800;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.preregistered-card:hover, .staff-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
}

.preregistered-info h4, .staff-info h4 {
    margin: 0 0 6px 0;
    color: #1e3c72;
    font-size: 16px;
}

.preregistered-email, .staff-email {
    color: #666;
    font-size: 13px;
    margin: 4px 0;
}

.preregistered-added, .staff-created {
    color: #9e9e9e;
    font-size: 12px;
    margin: 4px 0;
}

.preregistered-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-remove-prereg {
    background: #f44336;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-remove-prereg:hover {
    background: #d32f2f;
}

.section-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    padding: 10px 15px;
    background: #fff3e0;
    border-left: 3px solid #ff9800;
    border-radius: 4px;
}

/* Zoom Meetings Tab Styles */
.zoom-host-info {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.host-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    margin-bottom: 10px;
}

.host-badge svg {
    background: rgba(255,255,255,0.2);
    padding: 8px;
    border-radius: 50%;
}

.host-description {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

.zoom-meetings-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.zoom-meeting-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.zoom-meeting-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.zoom-meeting-card.upcoming {
    border-left: 5px solid #4caf50;
}

.zoom-meeting-card.past {
    border-left: 5px solid #9e9e9e;
    opacity: 0.8;
}

.zoom-meeting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

.meeting-status {
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    text-transform: uppercase;
}

.meeting-status.upcoming {
    background: #e8f5e9;
    color: #2e7d32;
}

.meeting-status.past {
    background: #eeeeee;
    color: #616161;
}

.meeting-date-time {
    font-size: 15px;
    color: #333;
}

.zoom-meeting-body {
    padding: 20px;
}

.meeting-participants {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.participant {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.participant .label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
}

.participant .value {
    font-size: 15px;
    color: #333;
    font-weight: 600;
}

.participant .value.host {
    color: #2196f3;
}

.meeting-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.detail-row .label {
    font-size: 13px;
    color: #666;
    min-width: 90px;
}

.detail-row .value {
    font-family: 'Consolas', 'Monaco', monospace;
    background: #f5f5f5;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
}

.detail-row .meeting-id {
    color: #1976d2;
    font-weight: 600;
}

.detail-row .meeting-password {
    color: #e65100;
    font-weight: 600;
}

.detail-row .meeting-link {
    color: #1976d2;
    text-decoration: none;
    word-break: break-all;
    font-size: 13px;
}

.detail-row .meeting-link:hover {
    text-decoration: underline;
}

.btn-copy-small {
    background: #e3f2fd;
    color: #1976d2;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-copy-small:hover {
    background: #bbdefb;
}

.btn-copy-small.copied {
    background: #c8e6c9;
    color: #2e7d32;
}

.zoom-meeting-actions {
    display: flex;
    gap: 12px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.btn-join-meeting {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-join-meeting:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.btn-copy-all {
    background: white;
    color: #1976d2;
    border: 2px solid #1976d2;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-copy-all:hover {
    background: #e3f2fd;
}

/* Staff Zoom badge in appointment list */
.staff-zoom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    background: #e3f2fd;
    padding: 10px 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.zoom-badge {
    background: #2196f3;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.btn-zoom-join {
    background: #4caf50;
    color: white;
    padding: 5px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
}

.btn-copy-link {
    background: #ff9800;
    color: white;
    border: none;
    padding: 5px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

@media (max-width: 768px) {
    .meeting-participants {
        grid-template-columns: 1fr;
    }

    .zoom-meeting-actions {
        flex-direction: column;
    }

    .detail-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Appointment actions for staff */
.apt-actions-staff {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.apt-email {
    display: block;
    font-size: 11px;
    color: #888;
}

.apt-booked-by {
    display: block;
    font-size: 11px;
    color: #6366f1;
    font-weight: 500;
    margin-top: 4px;
}

.btn-resend {
    background: #ff9800;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-resend:hover {
    background: #f57c00;
}

.btn-delete-apt {
    background: #f44336;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-delete-apt:hover {
    background: #d32f2f;
}

/* Availability info */
.availability-info {
    background: #e8f5e9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #4caf50;
}

/* ============================================
   PATIENT VISITS TAB STYLES
   ============================================ */

/* Patient info display in visits */
.patient-info-display {
    background: #e3f2fd;
    padding: 15px 20px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid #2196f3;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.patient-info-display p {
    margin: 0;
    color: #1565c0;
    font-size: 14px;
}

.patient-info-display strong {
    color: #0d47a1;
}

/* Visits list */
.visits-list {
    max-height: 400px;
    overflow-y: auto;
}

.visit-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    border-left: 4px solid #9c27b0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    transition: all 0.3s ease;
}

.visit-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.visit-info {
    min-width: 150px;
}

.visit-info strong {
    display: block;
    color: #1e3c72;
    font-size: 15px;
}

.visit-mr {
    font-size: 11px;
    color: #888;
    display: block;
    margin-top: 2px;
}

.visit-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.visit-date {
    background: #e3f2fd;
    color: #1565c0;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.visit-doctor {
    color: #666;
    font-size: 12px;
}

.visit-complaint {
    flex: 1;
    min-width: 150px;
    color: #555;
    font-size: 13px;
    font-style: italic;
    padding: 0 15px;
}

.visit-actions {
    display: flex;
    gap: 8px;
}

.btn-view-visit {
    background: #9c27b0;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-view-visit:hover {
    background: #7b1fa2;
}

.btn-delete-visit {
    background: #f44336;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-delete-visit:hover {
    background: #d32f2f;
}

/* File upload area styles */
.file-upload-area {
    border: 2px dashed #9c27b0;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    background: #fce4ec;
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    background: #f8bbd9;
    border-color: #7b1fa2;
}

.file-upload-area input[type="file"] {
    width: 100%;
    cursor: pointer;
}

.file-upload-area p {
    color: #9c27b0;
    margin-top: 8px;
    font-size: 13px;
}

.uploaded-files-list {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ============================================
   MODAL STYLES
   ============================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 20px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.modal-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 25px;
}

.modal-body .form-group {
    margin-bottom: 15px;
}

.modal-body .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.modal-body .form-group input,
.modal-body .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.modal-body .form-group input:focus,
.modal-body .form-group textarea:focus {
    outline: none;
    border-color: #1e3c72;
}

.modal-footer {
    padding: 15px 25px 25px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Appointment Filters */
.appointment-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #666;
}

.filter-btn:hover {
    border-color: #1e3c72;
    color: #1e3c72;
}

.filter-btn.active {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border-color: transparent;
}

/* Doctor Appointment Actions */
.apt-actions-doctor {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.btn-approve {
    background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-approve:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 160, 71, 0.4);
}

.btn-reschedule {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-reschedule:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

.btn-decline {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-decline:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

/* Status badges */
.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge.pending {
    background: #fff3e0;
    color: #e65100;
}

.status-badge.approved {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-badge.rescheduled {
    background: #e3f2fd;
    color: #1565c0;
}

.status-badge.declined {
    background: #ffebee;
    color: #c62828;
}

/* Rescheduled info */
.reschedule-info {
    background: #e3f2fd;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    color: #1565c0;
    margin-top: 5px;
}

.reschedule-info strong {
    color: #0d47a1;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet breakpoint */
@media (max-width: 992px) {
    .modal-content {
        width: 95%;
        max-width: 450px;
    }

    .patient-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .patient-list-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px;
    }

    .patient-list-actions .btn-view-details,
    .patient-list-actions .btn-edit,
    .patient-list-actions .btn-delete {
        flex: 1;
        min-width: 80px;
        text-align: center;
    }

    .appointment-card {
        padding: 15px;
    }

    .apt-actions {
        flex-wrap: wrap;
        gap: 8px;
    }

    .apt-actions button {
        flex: 1;
        min-width: 80px;
    }
}

@media (max-width: 768px) {
    .role-cards {
        flex-direction: column;
    }

    .form-row {
        flex-direction: column;
    }

    .form-group {
        min-width: 100%;
    }

    .vitals-grid {
        grid-template-columns: 1fr;
    }

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

    .review-systems-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons,
    .staff-action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .header h1 {
        font-size: 16px;
    }

    .login-container,
    .role-selection-container {
        padding: 30px 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* Modal improvements for mobile */
    .modal-content {
        width: 95%;
        max-width: none;
        margin: 10px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-body {
        padding: 15px;
    }

    .modal-footer {
        flex-direction: column;
        gap: 10px;
    }

    .modal-footer .btn {
        margin: 0;
    }

    /* Doctor card improvements */
    .doctor-card {
        flex-direction: column;
    }

    .doctor-actions {
        width: 100%;
        justify-content: stretch;
        gap: 10px;
    }

    .doctor-actions button {
        flex: 1;
    }

    /* Appointment actions */
    .apt-actions {
        flex-direction: column;
    }

    .apt-actions button {
        width: 100%;
    }

    /* Tab navigation */
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        white-space: nowrap;
        padding: 10px 15px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .vitals-input-grid {
        grid-template-columns: 1fr;
    }

    .section-header h2 {
        font-size: 14px;
    }

    .patient-card {
        padding: 12px;
    }

    .role-card {
        padding: 20px;
    }

    .role-icon svg {
        width: 40px;
        height: 40px;
    }
}

/* ============================================
   STAFF NOTIFICATIONS
   ============================================ */

.notifications-banner {
    background: white;
    border-radius: 12px;
    margin: 0 25px 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border-left: 4px solid #2196f3;
}

.notifications-header {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notifications-header h3 {
    margin: 0;
    color: #1565c0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-clear-notifications {
    background: transparent;
    border: 1px solid #1565c0;
    color: #1565c0;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-clear-notifications:hover {
    background: #1565c0;
    color: white;
}

.notifications-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #fffde7;
}

.notification-item.approved {
    border-left: 3px solid #4caf50;
}

.notification-item.rescheduled {
    border-left: 3px solid #2196f3;
}

.notification-item.declined {
    border-left: 3px solid #f44336;
}

.notification-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.notification-item.approved .notification-icon {
    background: #e8f5e9;
}

.notification-item.rescheduled .notification-icon {
    background: #e3f2fd;
}

.notification-item.declined .notification-icon {
    background: #ffebee;
}

.notification-content {
    flex: 1;
}

.notification-message {
    margin: 0;
    color: #333;
    font-size: 14px;
    line-height: 1.4;
}

.notification-message strong {
    color: #1e3c72;
}

.notification-time {
    display: block;
    font-size: 11px;
    color: #888;
    margin-top: 4px;
}

.notification-dismiss {
    background: none;
    border: none;
    color: #999;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s;
}

.notification-dismiss:hover {
    color: #f44336;
}

/* Notification card in stats */
.notification-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.notification-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.notification-icon {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.stat-card.notification-card .stat-icon.notification-icon svg {
    color: white;
}

/* Appointment card styles for doctor dashboard */
.appointment-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.appointment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.appointment-card.pending {
    border-left: 4px solid #ff9800;
}

.appointment-card.approved {
    border-left: 4px solid #4caf50;
}

.appointment-card.rescheduled {
    border-left: 4px solid #2196f3;
}

.appointment-card.declined {
    border-left: 4px solid #f44336;
}

.apt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.apt-header h4 {
    margin: 0;
    color: #1e3c72;
    font-size: 18px;
}

.apt-details {
    margin-bottom: 15px;
}

.apt-details p {
    margin: 5px 0;
    color: #555;
    font-size: 14px;
}

.apt-details strong {
    color: #333;
}

.apt-result {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
}

.apt-result p {
    margin: 5px 0;
    font-size: 13px;
    color: #555;
}

.apt-result strong {
    color: #1e3c72;
}

.apt-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

/* No records styles */
.no-records {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.no-records svg {
    margin-bottom: 15px;
    opacity: 0.5;
}

.no-records p {
    margin: 0;
    font-size: 15px;
}

/* ============================================
   NOTIFICATION BELL & DROPDOWN
   ============================================ */

.notification-bell-container {
    position: relative;
    display: inline-block;
}

.btn-notification-bell {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-notification-bell:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-notification-bell svg {
    color: white;
    stroke: white;
}

.notif-count {
    position: absolute;
    top: 0;
    right: 0;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    max-height: 450px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    overflow: hidden;
    margin-top: 10px;
}

.notif-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
}

.notif-dropdown-header h4 {
    margin: 0;
    font-size: 16px;
}

.notif-dropdown-header button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 11px;
    cursor: pointer;
    transition: background 0.3s;
}

.notif-dropdown-header button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.notif-dropdown-list {
    max-height: 350px;
    overflow-y: auto;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.3s;
}

.notif-item:hover {
    background: #f8f9fa;
}

.notif-item.unread {
    background: #fffde7;
}

.notif-item.unread:hover {
    background: #fff9c4;
}

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

.notif-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    background: #f0f0f0;
}

.notif-icon.approved {
    background: #e8f5e9;
    color: #2e7d32;
}

.notif-icon.rescheduled {
    background: #e3f2fd;
    color: #1565c0;
}

.notif-icon.declined {
    background: #ffebee;
    color: #c62828;
}

.notif-icon.pending {
    background: #fff3e0;
    color: #e65100;
}

.notif-item-content {
    flex: 1;
}

.notif-item-content p {
    margin: 0;
    font-size: 13px;
    color: #333;
    line-height: 1.4;
}

.notif-item-content strong {
    color: #1e3c72;
}

.notif-time {
    display: block;
    font-size: 11px;
    color: #888;
    margin-top: 4px;
}

.notif-empty {
    padding: 40px 20px;
    text-align: center;
    color: #888;
    font-size: 14px;
}

/* Staff header notification bell styling */
#staffApp .notif-dropdown-header {
    background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
}

/* Responsive dropdown */
@media (max-width: 480px) {
    .notification-dropdown {
        width: 300px;
        right: -50px;
    }
}

/* ============================================
   ZOOM MEETING STYLES
   ============================================ */

.zoom-meeting-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 1px solid #2196f3;
    border-radius: 8px;
    padding: 12px 15px;
    margin-top: 10px;
}

.zoom-meeting-info p {
    margin: 4px 0;
    font-size: 13px;
    color: #1565c0;
}

.zoom-meeting-info p:first-child {
    font-weight: 600;
    margin-bottom: 8px;
}

.btn-zoom-start,
.btn-zoom-join {
    display: inline-block;
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 8px;
    margin-top: 8px;
    transition: all 0.3s ease;
}

.btn-zoom-start:hover,
.btn-zoom-join:hover {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.btn-copy-link {
    display: inline-block;
    background: #fff;
    color: #1976d2;
    border: 1px solid #1976d2;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: all 0.3s ease;
}

.btn-copy-link:hover {
    background: #e3f2fd;
    border-color: #1565c0;
}

/* Staff Zoom Meeting Info */
.staff-zoom {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: #4caf50;
    padding: 8px 12px;
}

.staff-zoom span {
    font-size: 12px;
    color: #2e7d32;
}

.zoom-badge {
    background: #4caf50;
    color: white !important;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.staff-zoom .btn-zoom-join {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    padding: 6px 12px;
    margin-top: 0;
}

.staff-zoom .btn-copy-link {
    padding: 5px 10px;
    margin-top: 0;
    color: #388e3c;
    border-color: #388e3c;
}

/* Super Admin Badge */
.super-admin-indicator {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 10px;
}

/* ============================================
   SEARCHABLE DROPDOWN COMPONENT
   ============================================ */

.searchable-dropdown {
    position: relative;
    width: 100%;
}

.searchable-dropdown .dropdown-toggle {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
}

.searchable-dropdown .dropdown-toggle:hover {
    border-color: #667eea;
}

.searchable-dropdown .dropdown-toggle:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.searchable-dropdown .dropdown-toggle .selected-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #333;
}

.searchable-dropdown .dropdown-toggle .selected-text.placeholder {
    color: #999;
}

.searchable-dropdown .dropdown-toggle .dropdown-arrow {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #666;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.searchable-dropdown.open .dropdown-toggle .dropdown-arrow {
    transform: rotate(180deg);
}

.searchable-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #667eea;
    border-top: none;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    max-height: 300px;
    overflow: hidden;
}

.searchable-dropdown.open .dropdown-menu {
    display: block;
}

.searchable-dropdown.open .dropdown-toggle {
    border-color: #667eea;
    border-radius: 10px 10px 0 0;
}

.searchable-dropdown .dropdown-search {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.searchable-dropdown .dropdown-search input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.searchable-dropdown .dropdown-search input:focus {
    border-color: #667eea;
}

.searchable-dropdown .dropdown-search input::placeholder {
    color: #999;
}

.searchable-dropdown .dropdown-options {
    max-height: 220px;
    overflow-y: auto;
}

.searchable-dropdown .dropdown-option {
    padding: 12px 15px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.searchable-dropdown .dropdown-option:last-child {
    border-bottom: none;
}

.searchable-dropdown .dropdown-option:hover {
    background: #f0f4ff;
}

.searchable-dropdown .dropdown-option.selected {
    background: #e8efff;
    color: #667eea;
    font-weight: 600;
}

.searchable-dropdown .dropdown-option.hidden {
    display: none;
}

.searchable-dropdown .no-results {
    padding: 15px;
    text-align: center;
    color: #999;
    font-style: italic;
}

/* Hide the original select when using searchable dropdown */
.searchable-dropdown select {
    display: none;
}

/* ============================================
   LOCAL DOCTOR REFERRAL SECTION
   ============================================ */

.referral-section {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8efff 100%);
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.referral-title {
    color: #1e3c72;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.referral-title::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='8.5' cy='7' r='4'/%3E%3Cline x1='20' y1='8' x2='20' y2='14'/%3E%3Cline x1='23' y1='11' x2='17' y2='11'/%3E%3C/svg%3E");
    background-size: 14px;
    background-position: center;
    background-repeat: no-repeat;
}

.referral-description {
    color: #666;
    font-size: 13px;
    margin: 0 0 15px 0;
    font-style: italic;
}

.new-referral-form {
    background: white;
    border: 1px solid #d0d0d0;
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
}

.new-referral-form h4 {
    color: #1e3c72;
    font-size: 14px;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.referral-form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: flex-end;
}

.referral-info {
    background: white;
    border-radius: 8px;
    padding: 12px 15px;
    margin-top: 10px;
    border-left: 4px solid #667eea;
}

.referral-info p {
    margin: 5px 0;
    font-size: 13px;
    color: #555;
}

.referral-info p strong {
    color: #1e3c72;
}

.btn-small {
    padding: 8px 16px !important;
    font-size: 13px !important;
}

/* ============================================
   READONLY TEXTAREA AND STAFF DATA STYLES
   ============================================ */

.readonly-textarea {
    background-color: #f8f9fa !important;
    border: 1px solid #e0e0e0 !important;
    color: #333 !important;
    cursor: default !important;
    resize: none !important;
}

.readonly-section {
    background-color: #fafbfc;
    border-radius: 10px;
    padding: 15px;
    border: 1px dashed #d0d0d0;
}

.readonly-section .form-group input,
.readonly-section .form-group textarea {
    background-color: #f0f2f5 !important;
    border-color: #d0d0d0 !important;
}

.staff-note {
    margin-top: 15px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #e8f4f8 0%, #f0f7fa 100%);
    border-radius: 8px;
    font-size: 13px;
    color: #1e3c72;
    border-left: 4px solid #667eea;
}

.staff-note span {
    font-weight: 600;
    color: #667eea;
}

/* Doctor's Assessment Section - Editable styling */
.assessment-section {
    background: linear-gradient(135deg, #fff9e6 0%, #fffbf0 100%);
    border: 2px solid #ffc107;
    border-radius: 12px;
    margin-top: 20px;
    padding: 20px;
}

.assessment-section .section-header h2 {
    color: #856404;
}

.assessment-section textarea,
.assessment-section input:not([readonly]) {
    border: 2px solid #ffc107 !important;
    background: white !important;
}

.assessment-section textarea:focus,
.assessment-section input:not([readonly]):focus {
    border-color: #e0a800 !important;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.2) !important;
}

/* Staff view - Doctor's Assessment Read-Only */
.doctor-assessment-readonly {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border: 2px solid #4caf50;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.doctor-assessment-readonly .section-header h2 {
    color: #2e7d32;
}

.doctor-assessment-readonly .readonly-badge {
    background: #4caf50;
}

.doctor-assessment-readonly textarea,
.doctor-assessment-readonly input {
    background-color: #f0f7f0 !important;
    border: 1px solid #a5d6a7 !important;
    color: #1b5e20 !important;
}

/* Assessment content display for staff view */
.assessment-content {
    padding: 15px;
}

.assessment-field {
    margin-bottom: 15px;
}

.assessment-field label {
    display: block;
    font-weight: 600;
    color: #2e7d32;
    margin-bottom: 5px;
    font-size: 13px;
    text-transform: uppercase;
}

.assessment-field .readonly-value {
    background: #f5f5f5;
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    min-height: 40px;
}

.assessment-meta {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed #a5d6a7;
}

.assessment-meta p {
    margin: 5px 0;
    font-size: 13px;
    color: #555;
}

.assessment-meta strong {
    color: #2e7d32;
}

.no-notes {
    text-align: center;
    padding: 30px;
    color: #888;
}

.no-notes p {
    margin: 0;
    font-style: italic;
}

/* ============================================
   FOLLOW-UP VISIT STYLES
   ============================================ */

.follow-up-section {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 12px;
    border: 2px solid #2196f3;
}

.follow-up-header {
    margin-bottom: 15px;
}

.follow-up-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    color: #1565c0;
    font-size: 16px;
}

.follow-up-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #1976d2;
    cursor: pointer;
}

.follow-up-options {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #90caf9;
}

.previous-visit-info {
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #90caf9;
}

.previous-visit-info h4 {
    color: #1565c0;
    margin-bottom: 10px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.prev-visit-details p {
    margin: 5px 0;
    font-size: 14px;
}

.prev-visit-details strong {
    color: #1976d2;
}

.prev-medications-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #90caf9;
}

.prev-medications-section h4 {
    color: #2e7d32;
    margin-bottom: 10px;
}

.prev-medications-display {
    padding: 12px;
    background: #e8f5e9;
    border-radius: 6px;
    border-left: 4px solid #4caf50;
    font-size: 14px;
    white-space: pre-wrap;
    min-height: 40px;
}

/* Meeting Completed Styles */
.meeting-status.completed {
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    color: white;
}

.meeting-status.completed::before {
    content: "✓ ";
}

.btn-mark-complete {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.btn-mark-complete:hover {
    background: linear-gradient(135deg, #388e3c 0%, #2e7d32 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
}

.btn-mark-complete:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Staff Mark Complete Button */
.btn-mark-complete-staff {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.btn-mark-complete-staff:hover {
    background: linear-gradient(135deg, #388e3c 0%, #2e7d32 100%);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(76, 175, 80, 0.4);
}

/* Staff Completion Info */
.completion-info-staff {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 6px;
    font-size: 12px;
    color: #2e7d32;
    margin: 5px 0;
}

.completion-info-staff .completed-badge {
    background: #4caf50;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 11px;
}

.btn-add-followup {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.btn-add-followup:hover {
    background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

.zoom-meeting-card.completed {
    border: 2px solid #4caf50;
    background: linear-gradient(135deg, #f1f8e9 0%, #e8f5e9 100%);
}

.zoom-meeting-card.completed .zoom-meeting-header {
    background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
}

.completion-info {
    margin-top: 10px;
    padding: 10px;
    background: #e8f5e9;
    border-radius: 6px;
    font-size: 13px;
}

.completion-info p {
    margin: 3px 0;
    color: #2e7d32;
}

.followup-scheduled {
    margin-top: 10px;
    padding: 10px;
    background: #e3f2fd;
    border-radius: 6px;
    border-left: 4px solid #2196f3;
}

.followup-scheduled p {
    margin: 3px 0;
    font-size: 13px;
    color: #1565c0;
}

/* Follow-up modal styles */
.followup-modal-content {
    max-width: 500px;
}

.followup-modal-content .form-group {
    margin-bottom: 15px;
}

.followup-modal-content .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.followup-modal-content .form-group input,
.followup-modal-content .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

/* Appointment Card Completed Status */
.appointment-card.completed {
    border: 2px solid #4caf50;
    background: linear-gradient(135deg, #f1f8e9 0%, #e8f5e9 100%);
}

.appointment-card.completed .apt-header {
    background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
}

.status-badge.completed {
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    color: white;
}

/* Filter button for completed */
.filter-btn[data-filter="completed"] {
    border-color: #4caf50;
}

.filter-btn[data-filter="completed"].active {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
}

/* ============================================
   EMAIL VALIDATION FEEDBACK STYLES
   ============================================ */

.email-validation-feedback {
    font-size: 12px;
    margin-top: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    display: none;
}

.email-validation-feedback:not(:empty) {
    display: block;
}

.email-validation-feedback.error {
    color: #d32f2f;
    background: #ffebee;
    border-left: 3px solid #d32f2f;
}

.email-validation-feedback.warning {
    color: #f57c00;
    background: #fff3e0;
    border-left: 3px solid #f57c00;
}

.email-validation-feedback.success {
    color: #388e3c;
    background: #e8f5e9;
    border-left: 3px solid #388e3c;
}

.email-validation-feedback.checking {
    color: #1976d2;
    background: #e3f2fd;
    border-left: 3px solid #1976d2;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Email input styling based on validation state */
input[type="email"].invalid {
    border-color: #d32f2f !important;
    background: #fff5f5;
}

input[type="email"].valid {
    border-color: #388e3c !important;
}

input[type="email"].checking {
    border-color: #1976d2 !important;
}

/* ============================================
   PATIENT DATA SPREADSHEET
   ============================================ */

/* Header button */
.btn-patient-data {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, #2e7d32, #4caf50);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    white-space: nowrap;
}

.btn-patient-data:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Full Page Layout */
.patient-data-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f5f5f5;
    z-index: 9000;
    overflow-y: auto;
    animation: fadeInPage 0.3s ease-out;
}

@keyframes fadeInPage {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.patient-data-page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 24px;
    background: white;
    border-bottom: 2px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
    flex-wrap: wrap;
}

.patient-data-page-header h2 {
    flex: 1;
    margin: 0;
    color: #2e7d32;
    font-size: 20px;
}

.btn-back-dashboard {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-back-dashboard:hover {
    background: #e8e8e8;
}

.patient-data-page-body {
    padding: 20px 24px;
    padding-bottom: 80px;
}

.followup-indicator {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    background: #e3f2fd;
    color: #1565c0;
}

.patient-data-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.patient-data-search-group {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.patient-data-search-group input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.patient-data-search-group input:focus {
    border-color: #4caf50;
    outline: none;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.patient-data-search-group select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.patient-data-export-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-export {
    padding: 7px 14px;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}

.btn-export:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.btn-export:active {
    transform: translateY(0);
}

.btn-export-pdf { background: #d32f2f; }
.btn-export-excel { background: #2e7d32; }
.btn-export-csv { background: #1565c0; }
.btn-export-json { background: #e65100; }

.patient-data-record-count {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

/* Spreadsheet Container */
.spreadsheet-container {
    overflow-x: auto;
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    max-height: 70vh;
    overflow-y: auto;
}

.spreadsheet-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}

.spreadsheet-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.spreadsheet-table th {
    background: linear-gradient(135deg, #2e7d32, #4caf50);
    color: white;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    user-select: none;
}

.spreadsheet-table th.expand-col-header {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
}

.spreadsheet-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #e8e8e8;
    border-right: 1px solid #f0f0f0;
    white-space: nowrap;
    vertical-align: middle;
}

/* Main data rows are clickable */
.spreadsheet-table tbody tr.data-main-row {
    cursor: pointer;
    transition: background 0.15s;
}

.spreadsheet-table tbody tr.data-main-row:hover {
    background: #e8f5e9 !important;
}

.spreadsheet-table tbody tr.data-main-row.visit-row {
    background: #fffde7;
}

.spreadsheet-table tbody tr.data-main-row.visit-row:hover {
    background: #fff9c4 !important;
}

/* Expand/collapse toggle */
.expand-toggle-cell {
    width: 40px;
    min-width: 40px;
    max-width: 40px;
    text-align: center;
    padding: 10px 8px !important;
}

.expand-icon {
    display: inline-block;
    font-size: 11px;
    color: #888;
    transition: color 0.2s;
}

.expand-icon.expanded {
    color: #2e7d32;
}

.data-main-row:hover .expand-icon {
    color: #2e7d32;
}

/* Patient data detail row */
.pd-detail-row td {
    padding: 0 !important;
    border-bottom: 2px solid #c8e6c9;
    background: #f8fdf8;
}

/* Detail panel inside expanded rows */
.patient-detail-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 20px;
}

.detail-section {
    flex: 1 1 260px;
    min-width: 220px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 16px;
}

.detail-section-title {
    font-size: 12px;
    font-weight: 700;
    color: #2e7d32;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e8f5e9;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.detail-label {
    font-size: 11px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.detail-value {
    font-size: 14px;
    color: #333;
    word-break: break-word;
}

/* Row number column */
.spreadsheet-table td:nth-child(2) {
    text-align: center;
    color: #888;
    font-size: 13px;
    width: 45px;
}

/* Alternating row colors for main rows only */
.spreadsheet-table tbody tr.data-main-row:nth-of-type(4n+1) {
    background: #f9f9f9;
}

.patient-indicator {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    background: #e8f5e9;
    color: #2e7d32;
}

.visit-indicator {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    background: #fff8e1;
    color: #f57f17;
}

/* Pagination */
.spreadsheet-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 0;
    flex-wrap: wrap;
}

.spreadsheet-pagination button {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.spreadsheet-pagination button:hover:not(:disabled) {
    background: #e8f5e9;
    border-color: #4caf50;
}

.spreadsheet-pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.spreadsheet-pagination button.active {
    background: #4caf50;
    color: white;
    border-color: #4caf50;
}

/* Backup Reminder Notification */
.backup-reminder-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-left: 4px solid #ff9800;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    max-width: 380px;
    animation: slideInRight 0.4s ease-out;
}

.backup-reminder-notification h4 {
    margin: 0 0 6px 0;
    color: #e65100;
    font-size: 14px;
}

.backup-reminder-notification p {
    margin: 0 0 12px 0;
    color: #555;
    font-size: 13px;
    line-height: 1.4;
}

.backup-reminder-actions {
    display: flex;
    gap: 8px;
}

.backup-reminder-actions button {
    padding: 6px 14px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.backup-reminder-actions .btn-reminder-go {
    background: #ff9800;
    color: white;
}

.backup-reminder-actions .btn-reminder-dismiss {
    background: #eee;
    color: #666;
}

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

/* Responsive */
@media (max-width: 768px) {
    .btn-patient-data span {
        display: none;
    }

    .patient-data-page-header {
        padding: 10px 12px;
        gap: 8px;
    }

    .patient-data-page-header h2 {
        font-size: 16px;
    }

    .patient-data-page-body {
        padding: 12px;
    }

    .patient-data-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .patient-data-search-group {
        flex-direction: column;
    }

    .patient-data-export-btns {
        justify-content: center;
    }

    .spreadsheet-container {
        max-height: 60vh;
    }

    .spreadsheet-table {
        font-size: 13px;
    }

    .spreadsheet-table th,
    .spreadsheet-table td {
        padding: 8px 10px;
    }

    .patient-detail-panel {
        padding: 12px;
        gap: 10px;
    }

    .detail-section {
        flex: 1 1 100%;
    }

    .detail-grid {
        grid-template-columns: 1fr 1fr;
    }

    .pd-detail-row td {
        padding: 0 !important;
    }

    .detail-value {
        font-size: 13px;
    }
}

/* ========================================
   PRINT STYLES - A4 Landscape
   ======================================== */
@page {
    size: A4 landscape;
    margin: 8mm 6mm;
}

@media print {
    /* Reset page-level layout */
    body {
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Hide everything except patient data page */
    body > *:not(.patient-data-page),
    .staff-container,
    .login-container,
    .admin-container,
    #loginApp,
    #staffApp,
    #adminApp {
        display: none !important;
    }

    /* Make patient data page fill the page normally */
    .patient-data-page {
        position: static !important;
        overflow: visible !important;
        background: white !important;
        animation: none !important;
        z-index: auto !important;
    }

    /* Hide non-print UI elements */
    .btn-back-dashboard,
    .patient-data-export-btns,
    .patient-data-toolbar,
    .spreadsheet-pagination,
    .backup-reminder,
    .expand-toggle-cell,
    .expand-col-header {
        display: none !important;
    }

    /* Show all detail rows when printing */
    .pd-detail-row {
        display: table-row !important;
    }

    /* Simplify page header for print */
    .patient-data-page-header {
        position: static !important;
        border-bottom: 2px solid #333 !important;
        padding: 4mm 0 2mm 0 !important;
        background: white !important;
    }

    .patient-data-page-header h2 {
        font-size: 14pt !important;
        color: #000 !important;
        text-align: center !important;
    }

    .patient-data-page-body {
        padding: 2mm 0 !important;
    }

    .patient-data-record-count {
        font-size: 8pt !important;
        color: #333 !important;
        text-align: center !important;
        margin-bottom: 2mm !important;
    }

    /* Remove container scroll constraints */
    .spreadsheet-container {
        overflow: visible !important;
        max-height: none !important;
        border: none !important;
        border-radius: 0 !important;
    }

    /* Table: fit to page width */
    .spreadsheet-table {
        width: 100% !important;
        min-width: 0 !important;
        font-size: 9pt !important;
        border-collapse: collapse !important;
    }

    /* Remove sticky positioning for print */
    .spreadsheet-table thead {
        position: static !important;
        display: table-header-group !important;
    }

    /* Header cells */
    .spreadsheet-table th {
        background: #333 !important;
        color: white !important;
        padding: 4px 6px !important;
        font-size: 8pt !important;
        font-weight: 700 !important;
        border: 0.5px solid #666 !important;
    }

    /* Data cells */
    .spreadsheet-table td {
        padding: 3px 6px !important;
        font-size: 8pt !important;
        border: 0.5px solid #ccc !important;
        white-space: normal !important;
    }

    /* Detail panel for print */
    .patient-detail-panel {
        padding: 4mm 2mm !important;
    }

    .detail-section {
        border: 0.5px solid #ccc !important;
        padding: 2mm !important;
        break-inside: avoid;
    }

    .detail-section-title {
        font-size: 8pt !important;
        color: #333 !important;
    }

    .detail-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
        gap: 4px !important;
    }

    .detail-item {
        gap: 1px !important;
    }

    .detail-value {
        font-size: 8pt !important;
    }

    .detail-label {
        font-size: 7pt !important;
    }

    .pd-detail-row td {
        padding: 0 !important;
        background: #f9f9f9 !important;
    }

    .spreadsheet-table tbody tr.visit-row,
    .spreadsheet-table tbody tr.data-main-row.visit-row {
        background: #f9f9e8 !important;
    }

    /* Indicators for print */
    .patient-indicator,
    .visit-indicator,
    .followup-indicator {
        padding: 0 3px !important;
        font-size: 7pt !important;
        border-radius: 3px !important;
    }

    /* Avoid breaking rows across pages */
    .spreadsheet-table tr {
        page-break-inside: avoid !important;
    }
}
