/* css/style.css */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* CSS Variables & Theme Configuration */
:root {
    --primary-hsl: 207, 79%, 28%;      /* Deep Clinical Blue #0F4C81 */
    --accent-hsl: 172, 80%, 40%;       /* Modern Teal #14B8A6 */
    --danger-hsl: 0, 84%, 60%;         /* SOS Crimson #EF4444 */
    --warning-hsl: 38, 92%, 50%;       /* Warning Amber #F59E0B */
    --success-hsl: 142, 71%, 45%;      /* Success Emerald #10B981 */
    
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --hover-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --app-max-width: 420px;
    --app-height: 840px;
}

.dark-mode {
    --bg-primary: #0b0f19;
    --bg-secondary: #131c2e;
    --bg-tertiary: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #334155;
    
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --hover-shadow: 0 10px 25px -3px rgb(0 0 0 / 0.5), 0 4px 12px -4px rgb(0 0 0 / 0.5);
    --glass-bg: rgba(19, 28, 46, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #1e293b; /* Dark backdrop for desktop mockup */
    font-family: var(--font-body);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

/* Desktop Simulator Mockup Wrapper */
.device-shell {
    width: 100%;
    height: 100vh;
    max-width: var(--app-max-width);
    max-height: var(--app-height);
    background-color: var(--bg-primary);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: background-color 0.3s ease;
}

@media (min-width: 500px) {
    .device-shell {
        border-radius: 40px;
        border: 12px solid #000000;
        padding-top: 28px;
    }
    
    /* Device Notch */
    .device-shell::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 160px;
        height: 28px;
        background-color: #000000;
        border-bottom-left-radius: 18px;
        border-bottom-right-radius: 18px;
        z-index: 100;
    }
}

/* Device Header / Status Bar */
.status-bar {
    display: none;
    height: 40px;
    padding: 0 24px;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    z-index: 99;
    user-select: none;
    margin-top: 5px;
}

.status-bar .right-icons {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Main Container (Screens Holder) */
.screen-container {
    flex: 1;
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Screen View (Base Class) */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-primary);
    opacity: 0;
    pointer-events: none;
    transform: translateX(30px);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    z-index: 2;
}

.screen-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px 80px 20px; /* space at bottom for nav bar */
}

/* Hide Scrollbar */
.screen-content::-webkit-scrollbar {
    width: 4px;
}
.screen-content::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 4px;
}

/* Bottom Navigation Bar */
.bottom-nav {
    height: 65px;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: 5px;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 90;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.02);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    gap: 4px;
    text-decoration: none;
}

.bottom-nav-item i {
    font-size: 1.25rem;
}

.bottom-nav-item.active {
    color: hsl(var(--primary-hsl));
    transform: translateY(-2px);
}

.bottom-nav-item.active i {
    font-weight: 900;
}

/* Splash Screen Specialities */
#splash-screen {
    background: linear-gradient(135deg, hsl(var(--primary-hsl)) 0%, #031c36 100%);
    justify-content: center;
    align-items: center;
    color: #ffffff;
    transform: none;
}

.splash-logo {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    animation: pulseLogo 2s infinite ease-in-out;
}

.splash-logo i {
    font-size: 3.5rem;
    color: hsl(var(--accent-hsl));
}

@keyframes pulseLogo {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Typography Rules */
h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 700;
}

.section-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-link {
    font-size: 0.8rem;
    color: hsl(var(--accent-hsl));
    cursor: pointer;
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-family: var(--font-body);
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 8px;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, hsl(var(--primary-hsl)) 0%, #175e9b 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 76, 129, 0.25);
}

.btn-primary:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.btn-secondary {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:active {
    background-color: var(--border-color);
}

.btn-accent {
    background-color: hsl(var(--accent-hsl));
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(20, 184, 166, 0.25);
}

.btn-danger {
    background-color: hsl(var(--danger-hsl));
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.25);
}

/* Input Fields */
.input-group {
    margin-bottom: 16px;
    width: 100%;
}

.input-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.input-field {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-field:focus {
    outline: none;
    border-color: hsl(var(--accent-hsl));
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

/* Cards & Lists */
.card {
    background-color: var(--bg-secondary);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:active {
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

/* Home Dashboard Widgets */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, hsl(var(--primary-hsl)) 0%, hsl(var(--accent-hsl)) 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Quick Actions Grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.quick-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-secondary);
    border-radius: 14px;
    aspect-ratio: 1;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-action-item:active {
    transform: scale(0.92);
    box-shadow: none;
    background-color: var(--bg-tertiary);
}

.quick-action-item i {
    font-size: 1.4rem;
    margin-bottom: 6px;
    color: hsl(var(--primary-hsl));
}

.quick-action-item.emergency {
    border: 1.5px solid rgba(239, 68, 68, 0.3);
}
.quick-action-item.emergency i {
    color: hsl(var(--danger-hsl));
}

.quick-action-item span {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
}

/* Health Score Gauge Widget */
.health-score-card {
    background: linear-gradient(135deg, hsl(var(--primary-hsl)) 0%, #1e3a5f 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.health-score-info h4 {
    color: #ffffff;
    font-size: 1.2rem;
}

.health-score-info p {
    color: rgba(255,255,255,0.7);
    font-size: 0.75rem;
    margin-top: 4px;
}

.health-gauge-container {
    position: relative;
    width: 70px;
    height: 70px;
}

.health-gauge-svg {
    transform: rotate(-90deg);
}

.gauge-bg {
    fill: none;
    stroke: rgba(255,255,255,0.15);
    stroke-width: 6;
}

.gauge-fill {
    fill: none;
    stroke: hsl(var(--accent-hsl));
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.8s ease-in-out;
}

.gauge-val {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
}

/* Notification Widget Item */
.widget-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 12px;
    border-left: 4px solid var(--border-color);
}

.widget-alert.info {
    border-left-color: hsl(var(--primary-hsl));
    background-color: rgba(15, 76, 129, 0.05);
}
.widget-alert.warning {
    border-left-color: hsl(var(--warning-hsl));
    background-color: rgba(245, 158, 11, 0.05);
}
.widget-alert.success {
    border-left-color: hsl(var(--success-hsl));
    background-color: rgba(16, 185, 129, 0.05);
}

.widget-alert i {
    font-size: 1.2rem;
}
.widget-alert.info i { color: hsl(var(--primary-hsl)); }
.widget-alert.warning i { color: hsl(var(--warning-hsl)); }
.widget-alert.success i { color: hsl(var(--success-hsl)); }

.widget-alert-content {
    flex: 1;
}

.widget-alert-title {
    font-size: 0.8rem;
    font-weight: 600;
}

.widget-alert-desc {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Daily Health Tip Widget */
.health-tip-box {
    background-color: rgba(20, 184, 166, 0.05);
    border: 1px dashed hsl(var(--accent-hsl));
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
    display: flex;
    gap: 10px;
}

.health-tip-box i {
    color: hsl(var(--accent-hsl));
    font-size: 1.2rem;
    margin-top: 2px;
}

.health-tip-text {
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--text-secondary);
}

/* Search Engine Styling */
.search-container {
    position: relative;
    margin-bottom: 14px;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.search-container i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.filter-btn-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: hsl(var(--accent-hsl));
    cursor: pointer;
    font-size: 1.1rem;
}

/* Dynamic Filter Panel */
.filter-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1);
    background-color: var(--bg-secondary);
    border-radius: 12px;
    border: 0 solid var(--border-color);
    margin-bottom: 14px;
}

.filter-panel.open {
    max-height: 500px;
    border-width: 1px;
    padding: 14px;
    transition: max-height 0.3s ease-in-out;
}

.filter-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 8px;
    margin-top: 10px;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.chip {
    padding: 6px 12px;
    border-radius: 20px;
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    user-select: none;
}

.chip:active {
    transform: scale(0.95);
}

.chip.selected {
    background-color: rgba(20, 184, 166, 0.1);
    color: hsl(var(--accent-hsl));
    border-color: hsl(var(--accent-hsl));
    font-weight: 500;
}

/* Card components for Doctors/Hospitals */
.entity-card {
    display: flex;
    gap: 14px;
    align-items: center;
}

.entity-image {
    width: 65px;
    height: 65px;
    border-radius: 12px;
    object-fit: cover;
    background-color: var(--bg-tertiary);
}

.entity-info {
    flex: 1;
}

.entity-name {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.entity-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.entity-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.entity-rating i {
    color: hsl(var(--warning-hsl));
}

.entity-fee {
    font-size: 0.85rem;
    font-weight: 700;
    color: hsl(var(--accent-hsl));
    margin-left: auto;
    text-align: right;
}

/* Onboarding Welcome Elements */
.auth-logo-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    text-align: center;
}

.auth-logo-area i {
    font-size: 3rem;
    color: hsl(var(--primary-hsl));
    margin-bottom: 12px;
}

.biometrics-trigger-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 25px 0;
    cursor: pointer;
}

.biometrics-ring {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 2px solid hsl(var(--accent-hsl));
    display: flex;
    align-items: center;
    justify-content: center;
    color: hsl(var(--accent-hsl));
    font-size: 2.2rem;
    position: relative;
}

.biometrics-ring::before {
    content: '';
    position: absolute;
    top: -4px; left: -4px; right: -4px; bottom: -4px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: hsl(var(--accent-hsl));
    animation: spinRing 2s linear infinite;
    opacity: 0;
}

.biometrics-trigger-area.scanning .biometrics-ring::before {
    opacity: 1;
}

@keyframes spinRing {
    to { transform: rotate(360deg); }
}

.biometrics-label {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Multi-Step Form Steps */
.step-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.step-bar-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--border-color);
    z-index: 1;
    transform: translateY(-50%);
}

.step-bar-progress {
    position: absolute;
    top: 50%;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: hsl(var(--accent-hsl));
    z-index: 2;
    transform: translateY(-50%);
    transition: width 0.3s ease;
}

.step-node {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 3;
    transition: all 0.3s ease;
}

.step-node.active {
    border-color: hsl(var(--primary-hsl));
    background-color: hsl(var(--primary-hsl));
    color: #ffffff;
}

.step-node.completed {
    border-color: hsl(var(--accent-hsl));
    background-color: hsl(var(--accent-hsl));
    color: #ffffff;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: slideInUp 0.3s ease;
}

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

/* Canvas & Digital Signature Pad */
.signature-canvas-container {
    width: 100%;
    background-color: var(--bg-secondary);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.sig-canvas {
    width: 100%;
    height: 150px;
    display: block;
    background-color: #fafafa;
    cursor: crosshair;
}

.dark-mode .sig-canvas {
    background-color: #1a2538;
}

.canvas-controls {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background-color: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

/* Live Queue Screen Elements */
.queue-status-circle {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: linear-gradient(135deg, hsl(var(--accent-hsl)) 0%, #0d9488 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 20px auto;
    box-shadow: 0 10px 20px rgba(20, 184, 166, 0.25);
    position: relative;
}

.queue-status-circle::after {
    content: '';
    position: absolute;
    top: -8px; left: -8px; right: -8px; bottom: -8px;
    border-radius: 50%;
    border: 2px solid hsl(var(--accent-hsl));
    opacity: 0.4;
    animation: ripple 2s infinite ease-out;
}

@keyframes ripple {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.15); opacity: 0; }
}

.queue-num {
    font-size: 2.8rem;
    font-weight: 800;
    font-family: var(--font-heading);
    line-height: 1;
}

.queue-lbl {
    font-size: 0.75rem;
    font-weight: 500;
    opacity: 0.9;
}

/* Consultation Module */
.consultation-timer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    background-color: rgba(239, 68, 68, 0.1);
    color: hsl(var(--danger-hsl));
    font-weight: 600;
    font-size: 0.8rem;
}

.consultation-timer i {
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.rich-editor {
    min-height: 120px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
}

.rich-editor:focus {
    border-color: hsl(var(--accent-hsl));
}

/* Prescription Medicines List Form Builder */
.med-item-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.medicine-pill-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    background-color: var(--bg-tertiary);
    font-size: 0.75rem;
    margin-right: 6px;
    margin-bottom: 6px;
}

.medicine-pill-tag i {
    cursor: pointer;
    color: hsl(var(--danger-hsl));
}

/* SOS / Emergency Pulser screen */
.sos-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background-color: #0b0f19;
    color: #ffffff;
    padding: 20px;
    text-align: center;
}

.sos-pulser {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background-color: hsl(var(--danger-hsl));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 800;
    color: #ffffff;
    box-shadow: 0 0 40px rgba(239, 68, 68, 0.6);
    cursor: pointer;
    position: relative;
    margin: 30px 0;
}

.sos-pulser::before, .sos-pulser::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: hsl(var(--danger-hsl));
    opacity: 0.4;
    z-index: -1;
    animation: sosPulse 1.8s infinite ease-out;
}

.sos-pulser::after {
    animation-delay: 0.9s;
}

@keyframes sosPulse {
    0% { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.8); opacity: 0; }
}

.sos-countdown {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: hsl(var(--danger-hsl));
}

/* Modals */
.modal-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-end;
    z-index: 110;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 100%;
    background-color: var(--bg-primary);
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding: 24px 20px;
    max-height: 80%;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.open .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

/* Chat Assistant style */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.8rem;
    line-height: 1.4;
}

.chat-bubble.bot {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    align-self: flex-start;
    border-top-left-radius: 2px;
}

.chat-bubble.user {
    background-color: hsl(var(--primary-hsl));
    color: #ffffff;
    align-self: flex-end;
    border-top-right-radius: 2px;
}

.chat-input-area {
    display: flex;
    gap: 8px;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    background-color: var(--bg-primary);
}

/* Quick Details Rows */
.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-secondary);
}

.detail-value {
    font-weight: 600;
}

/* Top Back Navigation Header */
.screen-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.back-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
}

.back-btn:active {
    background-color: var(--bg-tertiary);
}

/* Registration Multi-step Wizard Styles */
.step-indicator-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 15px 0 25px 0;
    padding: 0 10px;
}

.step-node {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    position: relative;
    transition: all 0.3s ease;
    z-index: 2;
}

.step-node.active {
    background-color: hsl(var(--accent-hsl));
    border-color: hsl(var(--accent-hsl));
    color: white;
    box-shadow: 0 0 10px rgba(20, 184, 166, 0.4);
}

.step-node.completed {
    background-color: var(--bg-secondary);
    border-color: hsl(var(--accent-hsl));
    color: hsl(var(--accent-hsl));
}

.step-line {
    flex: 1;
    height: 3px;
    background-color: var(--border-color);
    margin: 0 -2px;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.step-line.filled {
    background-color: hsl(var(--accent-hsl));
}

.register-step {
    display: none;
    animation: fadeInStep 0.4s ease forwards;
}

.register-step.active {
    display: block;
}

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

/* Photo Upload Circle */
.photo-picker-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.photo-preview-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background-color: var(--bg-tertiary);
    border: 3px dashed var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: all 0.2s ease;
}

.photo-preview-circle:hover {
    border-color: hsl(var(--accent-hsl));
    background-color: rgba(20, 184, 166, 0.05);
}

.photo-preview-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-picker-label {
    margin-top: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* BMI Badges */
.bmi-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 8px;
    vertical-align: middle;
}

.bmi-underweight {
    background-color: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.bmi-normal {
    background-color: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.bmi-overweight {
    background-color: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.bmi-obese {
    background-color: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

/* Wizard Button Group */
.wizard-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.wizard-buttons .btn {
    flex: 1;
    margin: 0;
}

/* Edit Profile Tabs Styling */
.tab-btn.active {
    background-color: hsl(var(--accent-hsl)) !important;
    color: white !important;
    border-color: hsl(var(--accent-hsl)) !important;
}

