/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
    overflow-x: hidden;
}

/* ========== HOMEPAGE STYLES ========== */

/* Landing Navigation */
.landing-nav {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

.logo i {
    font-size: 28px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #666;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #667eea;
}

.btn-outline {
    padding: 10px 24px;
    border: 2px solid #667eea;
    background: transparent;
    color: #667eea;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-primary {
    padding: 10px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #667eea;
    cursor: pointer;
}

/* Hero Section */
.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 48px;
    color: #2d3748;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
}

.hero-stats {
    display: flex;
    gap: 30px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stat i {
    font-size: 32px;
    color: #667eea;
}

.stat strong {
    display: block;
    font-size: 24px;
    color: #2d3748;
}

.stat span {
    font-size: 14px;
    color: #666;
}

/* Hero Image with Floating Cards */
.hero-image {
    position: relative;
    height: 400px;
}

.floating-card {
    position: absolute;
    background: white;
    padding: 20px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    animation: float 3s ease-in-out infinite;
}

.floating-card i {
    font-size: 32px;
    color: #667eea;
}

.floating-card span {
    font-weight: 600;
    color: #2d3748;
}

.card-1 {
    top: 50px;
    left: 50px;
    animation-delay: 0s;
}

.card-2 {
    top: 180px;
    right: 50px;
    animation-delay: 1s;
}

.card-3 {
    bottom: 50px;
    left: 100px;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Features Section */
.features {
    background: white;
    padding: 80px 40px;
}

.features h2 {
    text-align: center;
    font-size: 40px;
    color: #2d3748;
    margin-bottom: 10px;
}

.section-subtitle {
    text-align: center;
    color: #666;
    font-size: 18px;
    margin-bottom: 50px;
}

.features-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.feature-card {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 15px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon i {
    font-size: 28px;
    color: white;
}

.feature-card h3 {
    font-size: 22px;
    color: #2d3748;
    margin-bottom: 15px;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    padding: 8px 0;
    color: #666;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-list i {
    color: #27ae60;
    font-size: 14px;
}

/* How It Works Section */
.how-it-works {
    padding: 80px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.how-it-works h2 {
    text-align: center;
    font-size: 40px;
    margin-bottom: 10px;
}

.how-it-works .section-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.steps {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.step {
    text-align: center;
}

.step-number {
    width: 80px;
    height: 80px;
    background: white;
    color: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.step p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    background: white;
    padding: 80px 40px;
    text-align: center;
}

.cta-section h2 {
    font-size: 40px;
    color: #2d3748;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

/* Footer */
.landing-footer {
    background: #2d3748;
    color: white;
    padding: 60px 40px 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 20px;
    margin-bottom: 20px;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: color 0.3s;
}

.footer-section li:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* ========== AUTH SCREEN STYLES ========== */

#auth-screen {
    display: block;
    min-height: 100vh;
}

.auth-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.auth-left {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: white;
}

.auth-branding h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.auth-branding p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-feature {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 18px;
}

.auth-feature i {
    font-size: 24px;
}

.auth-right {
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    position: relative;
}

.back-btn {
    position: absolute;
    top: 30px;
    left: 30px;
    background: none;
    border: 2px solid #e0e0e0;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    color: #666;
    font-weight: 500;
    transition: all 0.3s;
}

.back-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.auth-container {
    width: 100%;
    max-width: 500px;
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-btn {
    flex: 1;
    padding: 14px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
}

.tab-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.tab-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-form h2 {
    font-size: 32px;
    color: #2d3748;
    margin-bottom: 10px;
}

.form-subtitle {
    color: #666;
    margin-bottom: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2d3748;
    font-weight: 500;
}

.form-group label i {
    margin-right: 8px;
    color: #667eea;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.btn-block {
    width: 100%;
}

.message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* ========== DASHBOARD STYLES ========== */

#dashboard-screen {
    display: block;
}

.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: width 0.3s;
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-item span:not(.badge) {
    display: none;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: #667eea;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.3s;
}

.sidebar-toggle:hover {
    background: #f0f0f0;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 10px;
    overflow-y: auto;
}

.nav-item {
    width: 100%;
    padding: 15px 20px;
    margin-bottom: 8px;
    background: transparent;
    border: none;
    border-radius: 10px;
    text-align: left;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
    color: #666;
    position: relative;
}

.nav-item i {
    font-size: 20px;
    min-width: 20px;
}

.nav-item:hover {
    background: #f0f0f0;
    color: #667eea;
}

.nav-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.badge {
    position: absolute;
    right: 15px;
    background: #e74c3c;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

.sidebar-footer {
    padding: 20px 10px;
    border-top: 1px solid #e0e0e0;
}

/* Main Content */
.dashboard-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f5f7fa;
}

.dashboard-header {
    background: white;
    padding: 25px 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #667eea;
    cursor: pointer;
}

.header-left h1 {
    font-size: 28px;
    color: #2d3748;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
    font-weight: 500;
}

.user-info i {
    font-size: 24px;
    color: #667eea;
}

.dashboard-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

.module {
    display: none;
}

.module.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Analytics Module */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon i {
    font-size: 32px;
    color: white;
}

.stat-info h3 {
    font-size: 36px;
    color: #2d3748;
    margin-bottom: 5px;
}

.stat-info p {
    color: #666;
    font-size: 14px;
}

.quick-actions {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.quick-actions h2 {
    font-size: 24px;
    color: #2d3748;
    margin-bottom: 25px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.action-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px 20px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-align: center;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.action-card i {
    font-size: 36px;
}

.action-card span {
    font-size: 16px;
    font-weight: 600;
}

/* Module Styles */
.module h2 {
    font-size: 32px;
    color: #2d3748;
    margin-bottom: 10px;
}

.module-description {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

/* Lab Analyzer Styles */
#lab-report-input {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    margin-bottom: 20px;
    resize: vertical;
}

#lab-report-input:focus {
    outline: none;
    border-color: #667eea;
}

.result-container {
    margin-top: 30px;
}

.loading-spinner {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #667eea;
}

.loading-spinner i {
    font-size: 32px;
    margin-bottom: 15px;
    display: block;
}

/* Enhanced Lab Results Styles */
.lab-results-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.results-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-header h3 {
    margin: 0;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.results-summary {
    display: flex;
    gap: 15px;
}

.summary-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.normal-badge {
    background: rgba(46, 213, 115, 0.3);
}

.abnormal-badge {
    background: rgba(255, 71, 87, 0.3);
}

.results-table-wrapper {
    padding: 30px;
    overflow-x: auto;
}

.results-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.results-table thead th {
    background: #f8f9fa;
    color: #2d3748;
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e0e0e0;
}

.results-table thead th i {
    margin-right: 8px;
    color: #667eea;
}

.result-row {
    transition: all 0.3s ease;
}

.result-row:hover {
    background: #f8f9fa;
    transform: scale(1.01);
}

.result-row td {
    padding: 18px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.result-row.normal {
    background: linear-gradient(90deg, rgba(46, 213, 115, 0.05) 0%, transparent 100%);
}

.result-row.abnormal {
    background: linear-gradient(90deg, rgba(255, 71, 87, 0.05) 0%, transparent 100%);
}

.test-name {
    color: #2d3748;
    font-size: 15px;
}

.test-value {
    color: #667eea;
    font-weight: 600;
    font-size: 16px;
}

.test-unit {
    color: #666;
    font-size: 14px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.status-badge.normal {
    background: #d4edda;
    color: #155724;
}

.status-badge.abnormal {
    background: #f8d7da;
    color: #721c24;
}

.status-badge i {
    font-size: 12px;
}

.ai-explanation {
    background: linear-gradient(135deg, #e8f4f8 0%, #f0e8f8 100%);
    padding: 30px;
    margin: 0;
    border-top: 3px solid #667eea;
}

.explanation-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.explanation-header i {
    font-size: 28px;
    color: #667eea;
}

.explanation-header h4 {
    color: #2d3748;
    margin: 0;
    font-size: 20px;
}

.explanation-content {
    color: #4a5568;
    line-height: 1.8;
    font-size: 15px;
}

.disclaimer {
    background: #fff3cd;
    padding: 20px 30px;
    margin: 0;
    border-top: 3px solid #ffc107;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.disclaimer i {
    font-size: 24px;
    color: #856404;
    margin-top: 2px;
}

.disclaimer-content {
    flex: 1;
    font-size: 14px;
    color: #856404;
    line-height: 1.6;
}

/* Old table styles - keeping for backward compatibility */
.result-container table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    background: white;
}

.result-container th {
    background: #667eea;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}

.result-container td {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.result-container tr:hover {
    background: #f8f9fa;
}

.result-container tr.abnormal {
    background: #ffe6e6;
}

.result-container tr.normal {
    background: #e6ffe6;
}

/* Chat Module Styles */
.chat-container {
    height: 400px;
    overflow-y: auto;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    background: #f8f9fa;
}

.chat-message {
    padding: 15px 20px;
    margin-bottom: 15px;
    border-radius: 15px;
    max-width: 70%;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.user {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-left: auto;
    text-align: right;
}

.chat-message.ai {
    background: white;
    border: 2px solid #e0e0e0;
}

.chat-input-container {
    display: flex;
    gap: 10px;
}

.chat-input-container input {
    flex: 1;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
}

.chat-input-container input:focus {
    outline: none;
    border-color: #667eea;
}

.chat-input-container button {
    padding: 14px 24px;
}

/* List Container Styles */
.list-container {
    margin-top: 20px;
}

.medication-card,
.doctor-card,
.notification-card {
    background: white;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 15px;
    border-left: 5px solid #667eea;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.medication-card:hover,
.doctor-card:hover,
.notification-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.notification-card.unread {
    background: #e8f4f8;
    border-left-color: #e74c3c;
    font-weight: 600;
}

.notification-card {
    cursor: pointer;
}

.medication-card h4,
.doctor-card h4 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 20px;
}

.medication-card p,
.doctor-card p,
.notification-card p {
    margin: 5px 0;
    color: #666;
}

.medication-card button {
    margin-top: 10px;
    padding: 8px 16px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.medication-card button:hover {
    background: #c0392b;
}

/* Doctors Grid */
.doctors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.doctor-card button {
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.doctor-card button:hover {
    background: #229954;
}

/* Form Modal Styles */
.form-modal {
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin-top: 20px;
    border: 2px solid #e0e0e0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.form-modal h3 {
    color: #667eea;
    margin-bottom: 20px;
}

.form-modal input,
.form-modal select,
.form-modal textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
}

.form-modal input:focus,
.form-modal select:focus,
.form-modal textarea:focus {
    outline: none;
    border-color: #667eea;
}

.form-modal textarea {
    min-height: 100px;
    resize: vertical;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.form-modal label {
    display: block;
    margin-bottom: 8px;
    color: #2d3748;
    font-weight: 500;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.form-actions button {
    flex: 1;
}

.btn-secondary {
    padding: 12px 24px;
    background: #e0e0e0;
    color: #333;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #d0d0d0;
}

/* Profile Form Styles */
.profile-form input,
.profile-form select {
    width: 100%;
    padding: 14px;
    margin-bottom: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
}

.profile-form input:focus,
.profile-form select:focus {
    outline: none;
    border-color: #667eea;
}

.profile-form label {
    display: block;
    margin-bottom: 8px;
    color: #2d3748;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-image {
        height: 300px;
    }
    
    .auth-wrapper {
        grid-template-columns: 1fr;
    }
    
    .auth-left {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links.mobile-active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 70px;
        right: 20px;
        background: white;
        padding: 20px;
        border-radius: 10px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        z-index: 1000;
    }
    
    .hero {
        padding: 40px 20px;
    }
    
    .hero-content h1 {
        font-size: 32px;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .features,
    .how-it-works,
    .cta-section {
        padding: 60px 20px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: fixed;
        left: -280px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s;
    }
    
    .sidebar.mobile-active {
        left: 0;
    }
    
    .mobile-sidebar-toggle {
        display: block;
    }
    
    .dashboard-header {
        padding: 20px;
    }
    
    .dashboard-content {
        padding: 20px;
    }
    
    .doctors-grid {
        grid-template-columns: 1fr;
    }
    
    .chat-message {
        max-width: 85%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* Clinician View Styles */
.clinician-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-box {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-box i {
    font-size: 40px;
    color: #667eea;
}

.stat-box h3 {
    font-size: 32px;
    color: #2d3748;
    margin: 0;
}

.stat-box p {
    color: #666;
    margin: 0;
    font-size: 14px;
}

.draft-card {
    background: white;
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border-left: 5px solid #667eea;
}

.draft-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.draft-time {
    color: #666;
    font-size: 14px;
}

.draft-model {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.draft-question,
.draft-response {
    margin-bottom: 20px;
}

.draft-question strong,
.draft-response strong {
    display: block;
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 16px;
}

.draft-question p,
.draft-response p {
    color: #4a5568;
    line-height: 1.6;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.draft-actions {
    display: flex;
    gap: 15px;
}

.btn-approve,
.btn-reject {
    flex: 1;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-approve {
    background: #27ae60;
    color: white;
}

.btn-approve:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.btn-reject {
    background: #e74c3c;
    color: white;
}

.btn-reject:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

/* Chat Status Styles */
.pending-review {
    padding: 20px;
    background: #fff3cd;
    border-radius: 10px;
    border-left: 5px solid #ffc107;
}

.review-status {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
}

.review-status.approved {
    background: #d4edda;
    color: #155724;
}

.chat-message.ai.loading {
    background: #e8f4f8;
    color: #667eea;
}

/* Lab History Panel */
.lab-history-panel {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.lab-history-panel h3 {
    color: #2d3748;
    font-size: 22px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lab-history-panel h3 i {
    color: #667eea;
}

.no-history {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.history-list {
    display: grid;
    gap: 15px;
}

.history-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #667eea;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.history-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-left-color: #764ba2;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.history-date {
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.history-badge {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.history-badge i.fa-exclamation-triangle {
    color: #e74c3c;
}

.history-badge i.fa-check-circle {
    color: #27ae60;
}

.history-preview {
    color: #4a5568;
    font-size: 14px;
}


/* Clinician Edit Functionality */
.response-edit {
    margin-top: 10px;
}

.edit-textarea {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    border: 2px solid #007bff;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    background-color: #f8f9fa;
}

.edit-textarea:focus {
    outline: none;
    border-color: #0056b3;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.btn-edit {
    background-color: #17a2b8;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    margin-right: 8px;
}

.btn-edit:hover {
    background-color: #138496;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(23, 162, 184, 0.3);
}

.btn-save-edit {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    margin-right: 8px;
}

.btn-save-edit:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.btn-cancel-edit {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    margin-right: 8px;
}

.btn-cancel-edit:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.edit-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #28a745;
    font-weight: 600;
    font-size: 0.9em;
    margin-left: 10px;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Clinician Notes Section */
.clinician-notes {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    border-left: 5px solid #5a67d8;
}

.clinician-notes strong {
    color: #ffffff;
    font-size: 16px;
    display: block;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.notes-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 2px solid #9f7aea;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    background-color: #f3f0ff;
    color: #2d3748;
}

.notes-textarea:focus {
    outline: none;
    border-color: #7c3aed;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.notes-textarea::placeholder {
    color: #a0aec0;
    font-style: italic;
}

.notes-display {
    background-color: #f3f0ff;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
    border: 2px solid #9f7aea;
}

.notes-content {
    color: #2d3748;
    line-height: 1.6;
    font-size: 14px;
}

.notes-badge {
    display: inline-block;
    background-color: #7c3aed;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Enhanced Draft Card for Edit Mode */
.draft-card {
    transition: all 0.3s ease;
}

.draft-card:has(.response-edit[style*="display: block"]) {
    border: 2px solid #007bff;
    box-shadow: 0 8px 16px rgba(0, 123, 255, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .edit-textarea,
    .notes-textarea {
        font-size: 16px; /* Prevent zoom on mobile */
    }
    
    .btn-edit,
    .btn-save-edit,
    .btn-cancel-edit {
        padding: 8px 16px;
        font-size: 13px;
    }
}


/* Clinician Notes Display in Patient Chat */
.clinician-notes-display {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    border-left: 5px solid #5a67d8;
    animation: slideIn 0.5s ease;
}

.clinician-notes-display .notes-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: rgba(255, 255, 255, 0.95);
    color: #5a67d8;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.clinician-notes-display .notes-content {
    color: #ffffff;
    line-height: 1.7;
    font-size: 14px;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced chat message styling for edited responses */
.chat-message.ai:has(.clinician-notes-display) {
    border-left: 4px solid #667eea;
    background: linear-gradient(to right, #f8f9ff, #ffffff);
}

/* File Upload Styles */
.input-method-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

.toggle-btn {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.toggle-btn:hover {
    border-color: #667eea;
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.toggle-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

.toggle-btn i {
    font-size: 16px;
}

.input-section {
    display: none;
}

.input-section.active {
    display: block;
}

.file-upload-container {
    margin-bottom: 20px;
}

.file-upload-area {
    border: 3px dashed #cbd5e0;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f7fafc;
}

.file-upload-area:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.file-upload-area i {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 15px;
}

.file-upload-area h3 {
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 18px;
}

.file-upload-area p {
    color: #64748b;
    margin-bottom: 20px;
}

.file-info {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    border: 1px solid #e2e8f0;
}

.file-info p {
    margin: 5px 0;
    font-size: 13px;
    color: #4a5568;
}

.file-info strong {
    color: #2d3748;
}

.file-selected-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f0fdf4;
    border: 2px solid #86efac;
    border-radius: 8px;
    margin-bottom: 15px;
}

.file-selected-info i {
    font-size: 24px;
    color: #22c55e;
}

.file-selected-info span {
    flex: 1;
    color: #166534;
    font-weight: 600;
}

.btn-remove-file {
    background: transparent;
    border: none;
    color: #dc2626;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-remove-file:hover {
    background: #fee2e2;
}

.upload-progress {
    margin: 20px 0;
    padding: 20px;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    width: 0%;
}

#progress-text {
    text-align: center;
    color: #4a5568;
    font-weight: 600;
    margin: 0;
}

/* Drag and drop styles */
.file-upload-area.drag-over {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

/* Error message styles */
.error-message {
    background: #fef2f2;
    border: 2px solid #fecaca;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    margin: 20px 0;
}

.error-message i {
    font-size: 48px;
    color: #dc2626;
    margin-bottom: 15px;
}

.error-message h3 {
    color: #991b1b;
    margin-bottom: 10px;
}

.error-message p {
    color: #7f1d1d;
    margin-bottom: 15px;
}

.error-message ul {
    text-align: left;
    max-width: 400px;
    margin: 15px auto;
    color: #7f1d1d;
}

.error-message ul li {
    margin: 8px 0;
}

.error-message .btn-primary {
    margin-top: 15px;
}

/* Chat Integration Section */
.chat-integration-section {
    background: linear-gradient(135deg, #e8f4f8 0%, #f0e8f8 100%);
    padding: 30px;
    margin: 0;
    border-top: 3px solid #667eea;
    text-align: center;
}

.btn-chat-integration {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-chat-integration:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.btn-chat-integration i {
    font-size: 20px;
}

.chat-integration-hint {
    color: #4a5568;
    font-size: 14px;
    margin-top: 12px;
    margin-bottom: 0;
}

/* Chat Context Indicator */
.chat-context-indicator {
    background: linear-gradient(135deg, #e8f4f8 0%, #f0e8f8 100%);
    border-left: 4px solid #667eea;
    padding: 12px 16px;
    margin-bottom: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #4a5568;
    font-weight: 600;
    animation: slideIn 0.3s ease;
}

.chat-context-indicator i {
    color: #667eea;
    font-size: 16px;
}
