/* SafePulse Design System (Web Migration) */
:root {
    --brand-navy: #0F172A;
    --brand-blue: #0EA5E9;
    --brand-purple: #8B5CF6;
    --brand-green: #10B981;
    --brand-orange: #F59E0B;
    --brand-red: #EF4444;
    --bg-light: #F8FAFC;
    --text-main: #334155;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(226, 232, 240, 0.5);
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, blinkmacsystemfont, 'Segoe UI', roboto, oxygen, ubuntu, cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Auth Pages (Login/Role) */
.auth-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F8FAFC 0%, #E2E8F0 100%);
}

.auth-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 24px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--card-shadow);
}

.logo-main {
    width: 64px;
    height: 64px;
    margin-bottom: 1.5rem;
}

h1 {
    font-weight: 800;
    color: var(--brand-navy);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #64748B;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    background: white;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-input:focus {
    border-color: var(--brand-blue);
    outline: none;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    border-radius: 14px;
    background: var(--brand-navy);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

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

/* Dashboard UI */
.dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    height: 100vh;
}

.sidebar {
    background: white;
    border-right: 1px solid #E2E8F0;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 2.5rem;
    background: #F8FAFC;
    height: 100vh;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 3rem;
    font-weight: 950;
    font-size: 1.5rem;
    color: var(--brand-navy);
}

.nav-links {
    list-style: none;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem;
    border-radius: 16px;
    text-decoration: none;
    color: #64748B;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s;
    margin-bottom: 0.5rem;
}

.nav-item i {
    font-size: 1.1rem;
    width: 20px;
}

.nav-item:hover {
    background: #F1F5F9;
    color: var(--brand-blue);
}

.nav-item.active {
    background: #F0F9FF;
    color: var(--brand-blue);
    border: 1px solid rgba(14, 165, 233, 0.1);
}

/* --- MOBILE RESPONSIVENESS & PARITY --- */
@media (max-width: 1024px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 70px;
        flex-direction: row;
        padding: 0 1rem;
        z-index: 1000;
        border-top: 1px solid #E2E8F0;
        border-right: none;
        background: white;
        justify-content: space-around;
        align-items: center;
    }

    .sidebar .logo {
        display: none !important;
    }

    .sidebar nav {
        display: flex;
        flex-direction: row;
        width: 100%;
        justify-content: space-around;
        margin: 0;
    }

    .nav-item {
        flex-direction: column;
        gap: 4px;
        padding: 8px;
        margin: 0;
        font-size: 0.65rem;
        color: #94A3B8;
        background: transparent !important;
        border: none !important;
    }

    .nav-item i {
        font-size: 1.3rem;
        width: auto;
    }

    .nav-item span {
        display: block;
    }

    .nav-item.active {
        color: var(--brand-blue);
    }

    .nav-item:last-child {
        display: none; /* Hide logout in bottom bar */
    }

    .main-content {
        padding: 1.5rem;
        padding-bottom: 100px;
        height: auto;
    }

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

    .disease-card {
        flex-direction: row;
        gap: 1.5rem;
        padding: 1.5rem;
        align-items: center;
        text-align: left;
    }

    .icon-box {
        margin-bottom: 0px;
        width: 50px;
        height: 50px;
    }
}

/* Cards & Sections */
.dashboard-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #F1F5F9;
}

.score-hero {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    color: white;
    padding: 2rem;
    border-radius: 24px;
    margin-bottom: 2.5rem;
    text-align: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.disease-card {
    cursor: pointer;
    transition: all 0.2s;
    background: white;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 24px;
    text-decoration: none;
    color: var(--brand-navy);
    font-weight: 700;
}

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

.icon-box {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.icon-box i { font-size: 1.8rem; color: white; }

/* Disease Colors (Matching App) */
.bg-kidney { background: #FF4081; }
.bg-heart { background: #29B6F6; }
.bg-lung { background: #1DE9B6; }
.bg-cancer { background: #E040FB; }
.bg-liver { background: #FFAB00; }
.bg-alz { background: #7C4DFF; }

.section-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 2.5rem 0 1.5rem 0;
}

/* Badges */
.badge {
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-low { background: #DCFCE7; color: #166534; }
.badge-med { background: #FEF9C3; color: #854D0E; }
.badge-high { background: #FEE2E2; color: #991B1B; }

/* Assessment Flow */
.stepper-container {
    max-width: 800px;
    margin: 0 auto;
}

.step-card {
    background: white;
    border-radius: 24px;
    padding: 3rem;
    box-shadow: var(--card-shadow);
}

.step-header {
    border-bottom: 2px solid #F1F5F9;
    padding-bottom: 1.5rem;
    margin-bottom: 2.5rem;
}

.input-label {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: block;
}

/* Animations */
.transition-page {
    transition: opacity 0.3s ease;
}

.fade-out { opacity: 0; }
.fade-in { opacity: 1; }
