/* ============================================
   Sistem Pakar Diagnosa Penyakit Pernapasan
   Custom Stylesheet - Medical Theme
   ============================================ */

:root {
    --primary: #0d6efd;
    --primary-dark: #0a4bc7;
    --primary-light: #e8f0fe;
    --secondary: #1a73e8;
    --accent: #00b4d8;
    --gradient-start: #0d47a1;
    --gradient-mid: #1565c0;
    --gradient-end: #42a5f5;
    --bg-light: #f0f4f8;
    --bg-card: #ffffff;
    --text-dark: #1a202c;
    --text-muted: #6b7280;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

/* ============================================
   Navbar
   ============================================ */
.glass-navbar {
    background: rgba(13, 71, 161, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 0;
    transition: var(--transition);
    z-index: 1050;
}

.glass-navbar.scrolled {
    background: rgba(13, 71, 161, 0.98);
    padding: 8px 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.glass-navbar .navbar-brand {
    font-size: 1.3rem;
    letter-spacing: -0.5px;
}

.glass-navbar .nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 16px !important;
    border-radius: 8px;
    transition: var(--transition);
}

.glass-navbar .nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
}

.glass-navbar .btn-light {
    font-size: 0.85rem;
    padding: 8px 20px;
    transition: var(--transition);
}

.glass-navbar .btn-light:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #0d1b2a 0%, #0d47a1 50%, #1565c0 100%);
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(66, 165, 245, 0.15) 0%, transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(0, 180, 216, 0.1) 0%, transparent 40%);
}

.hero-badge .badge-glow {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(66, 165, 245, 0.15);
    border: 1px solid rgba(66, 165, 245, 0.3);
    border-radius: 50px;
    color: #90caf9;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -1.5px;
}

.gradient-text {
    background: linear-gradient(135deg, #42a5f5, #00b4d8, #80deea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    max-width: 550px;
}

.hero-subtitle strong {
    color: #90caf9;
}

.btn-hero-primary {
    padding: 14px 32px;
    background: linear-gradient(135deg, #42a5f5, #1e88e5);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(66, 165, 245, 0.4);
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(66, 165, 245, 0.5);
    color: #fff;
}

.btn-hero-outline {
    padding: 14px 32px;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
}

.btn-hero-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    transform: translateY(-3px);
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #42a5f5;
}

.stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
}

/* Hero Illustration */
.hero-illustration {
    position: relative;
    width: 400px;
    height: 400px;
}

.lung-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    background: rgba(66, 165, 245, 0.08);
    border: 2px solid rgba(66, 165, 245, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 3s ease-in-out infinite;
}

.lung-icon i {
    font-size: 5rem;
    color: rgba(66, 165, 245, 0.6);
}

.floating-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    animation: float 4s ease-in-out infinite;
}

.floating-card i {
    font-size: 1.4rem;
    color: #42a5f5;
}

.card-1 {
    top: 15%;
    left: 5%;
    animation-delay: 0s;
}

.card-2 {
    top: 60%;
    right: 5%;
    animation-delay: 1s;
}

.card-3 {
    bottom: 10%;
    left: 15%;
    animation-delay: 2s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(66, 165, 245, 0.2);
    }

    50% {
        box-shadow: 0 0 0 30px rgba(66, 165, 245, 0);
    }
}

/* ============================================
   Sections
   ============================================ */
.section-padding {
    padding: 100px 0;
}

.bg-light-custom {
    background: linear-gradient(180deg, #f0f4f8 0%, #ffffff 100%);
}

.section-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 500px;
    margin: 8px auto 0;
}

/* Feature Cards */
.feature-card {
    padding: 40px 30px;
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.bg-primary-soft {
    background: #e3f2fd;
    color: #1565c0;
}

.bg-success-soft {
    background: #e8f5e9;
    color: #2e7d32;
}

.bg-info-soft {
    background: #e0f7fa;
    color: #00838f;
}

/* Disease Cards */
.disease-card {
    padding: 28px 24px;
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.disease-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.disease-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.disease-card:hover::before {
    transform: scaleX(1);
}

.disease-code {
    display: inline-block;
    padding: 4px 12px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #0d47a1, #1565c0, #42a5f5);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

/* Footer */
.footer-section {
    padding: 30px 0;
    background: #0d1b2a;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

/* ============================================
   Login Page
   ============================================ */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d1b2a 0%, #0d47a1 50%, #1565c0 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(66, 165, 245, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.login-wrapper::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 180, 216, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.97);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
}

.login-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #0d47a1, #42a5f5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(13, 71, 161, 0.3);
}

.login-icon i {
    font-size: 2rem;
    color: #fff;
}

.form-floating .form-control {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    height: 56px;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-floating .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.1);
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #0d47a1, #1565c0);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
}

.btn-login:hover {
    background: linear-gradient(135deg, #0a3a8a, #0d47a1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 71, 161, 0.35);
    color: #fff;
}

/* ============================================
   Dashboard Styles
   ============================================ */
.dashboard-wrapper {
    min-height: 100vh;
    background: var(--bg-light);
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background: linear-gradient(135deg, #0d47a1, #1565c0);
    color: #fff;
    flex-shrink: 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1040;
    transition: transform 0.3s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.4rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-menu {
    padding: 20px 15px;
    list-style: none;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 8px;
}

.sidebar-menu .nav-link {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 12px 16px;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-menu .nav-link:hover,
.sidebar-menu .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

/* Main Content Wrapper */
.main-wrapper {
    flex-grow: 1;
    margin-left: 260px;
    width: calc(100% - 260px);
    transition: margin-left 0.3s ease, width 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* Mobile Header (Hidden on Desktop) */
.mobile-header {
    display: none;
    background: linear-gradient(135deg, #0d47a1, #1565c0);
    padding: 15px 20px;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.mobile-header .brand {
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
    text-decoration: none;
    margin: 0;
}

.hamburger-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 0;
}

.dashboard-content {
    padding: 30px;
    flex-grow: 1;
}

/* Responsive Rules for Mobile */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-left: 0;
        width: 100%;
    }

    .mobile-header {
        display: flex;
    }

    .dashboard-content {
        padding: 20px 15px;
    }

    /* Overlay background when sidebar is open */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1035;
        display: none;
    }

    .sidebar-overlay.show {
        display: block;
    }
}

/* Welcome Card */
.welcome-card {
    background: linear-gradient(135deg, #0d47a1, #1565c0);
    border-radius: var(--radius-lg);
    padding: 40px;
    color: #fff;
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.welcome-card h2 {
    font-weight: 700;
    font-size: 1.8rem;
}

.welcome-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

/* Stat Cards */
.stat-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 28px 24px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
}

.stat-card .stat-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Data Card (Tables) */
.data-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 30px;
}

.data-card-header {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.data-card-header h5 {
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
}

.data-card-body {
    padding: 0;
}

.table {
    margin: 0;
    font-size: 0.9rem;
}

.table thead th {
    background: #f8fafc;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 20px;
    white-space: nowrap;
}

.table tbody td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.table tbody tr:hover {
    background: #f8fafc;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge-code {
    display: inline-block;
    padding: 4px 10px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.badge-rule {
    display: inline-block;
    padding: 2px 8px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 2px;
}

/* ============================================
   Diagnosa Page
   ============================================ */
.diagnosa-container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
}

.symptom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.symptom-item {
    position: relative;
}

.symptom-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.symptom-label {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.symptom-label:hover {
    border-color: #90caf9;
    background: #f8fafc;
}

.symptom-item input:checked+.symptom-label {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.symptom-check {
    width: 22px;
    height: 22px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.symptom-item input:checked+.symptom-label .symptom-check {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.symptom-item input:checked+.symptom-label .symptom-check::after {
    content: '✓';
    font-size: 0.75rem;
    font-weight: 700;
}

.symptom-code {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.symptom-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.btn-diagnosa {
    padding: 16px 40px;
    background: linear-gradient(135deg, #0d47a1, #1565c0);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.05rem;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(13, 71, 161, 0.3);
}

.btn-diagnosa:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(13, 71, 161, 0.4);
    color: #fff;
}

/* ============================================
   Diagnosa Bertahap (Step-by-Step)
   ============================================ */

/* Step Indicator */
.step-indicator-container {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
}

.step-progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 14px;
}

.step-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #0d47a1, #42a5f5);
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.step-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.step-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.step-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background: linear-gradient(135deg, #0d47a1, #1565c0);
    color: #fff;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.step-kandidat {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: #e3f2fd;
    color: #0d47a1;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Selected Symptoms Card */
.selected-symptoms-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.selected-symptoms-header {
    padding: 16px 24px;
    background: #f0f9f4;
    border-bottom: 1px solid #c8e6c9;
}

.selected-symptoms-header h6 {
    margin: 0;
    font-weight: 700;
    color: #2e7d32;
    font-size: 0.9rem;
}

.selected-symptoms-body {
    padding: 16px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.selected-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
    border: 1px solid #c8e6c9;
    border-radius: 50px;
    font-size: 0.82rem;
    transition: var(--transition);
}

.selected-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.15);
}

.chip-step {
    width: 22px;
    height: 22px;
    background: #2e7d32;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    flex-shrink: 0;
}

.chip-code {
    font-weight: 700;
    color: #1b5e20;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.chip-name {
    font-weight: 500;
    color: #33691e;
}

.chip-check {
    color: #43a047;
    font-size: 0.9rem;
}

/* Symptom Grid Step (Radio) */
.symptom-grid-step {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.symptom-item-step {
    position: relative;
}

.symptom-item-step input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.symptom-label-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 12px;
    padding: 24px 16px;
    background: #fff;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
    height: 100%;
}

.symptom-label-step:hover {
    border-color: #90caf9;
    background: #f8fafc;
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.08);
}

.symptom-item-step input:checked+.symptom-label-step {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.15);
    transform: translateY(-4px);
}

.symptom-radio-circle {
    display: none;
}

.symptom-item-step input:checked+.symptom-label-step .symptom-name-step {
    color: var(--primary);
    font-weight: 700;
}

.symptom-detail {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex: 1;
}

.symptom-name-step {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.symptom-radio-icon {
    display: none;
}

/* Step Action Buttons */
.step-actions {
    text-align: center;
    margin-bottom: 40px;
}

.btn-diagnosa-step {
    padding: 16px 40px;
    background: linear-gradient(135deg, #9e9e9e, #bdbdbd);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.05rem;
    transition: var(--transition);
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-diagnosa-step.active,
.btn-diagnosa-step:not([disabled]) {
    background: linear-gradient(135deg, #0d47a1, #1565c0);
    box-shadow: 0 4px 20px rgba(13, 71, 161, 0.3);
    cursor: pointer;
    opacity: 1;
}

.btn-diagnosa-step.active:hover,
.btn-diagnosa-step:not([disabled]):hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(13, 71, 161, 0.4);
    color: #fff;
}

.step-secondary-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.btn-selesai {
    padding: 10px 24px;
    background: linear-gradient(135deg, #2e7d32, #43a047);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.88rem;
    transition: var(--transition);
    text-decoration: none;
}

.btn-selesai:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
    color: #fff;
}

.btn-reset-step {
    padding: 10px 24px;
    background: transparent;
    color: #ef6c00;
    border: 2px solid #ffcc80;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
    text-decoration: none;
}

.btn-reset-step:hover {
    background: #fff3e0;
    border-color: #ff9800;
    color: #e65100;
    transform: translateY(-2px);
}

.btn-back-step {
    padding: 10px 24px;
    background: transparent;
    color: var(--text-muted);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
    text-decoration: none;
}

.btn-back-step:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: var(--text-dark);
    transform: translateY(-2px);
}

/* Step responsive */
@media (max-width: 576px) {
    .step-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .symptom-detail {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .step-secondary-actions {
        flex-direction: column;
    }

    .selected-symptoms-body {
        flex-direction: column;
    }

    .selected-chip {
        width: 100%;
    }
}

/* ============================================
   Loading Overlay
   ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 27, 42, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.loading-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: var(--radius-xl);
    padding: 48px 56px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 360px;
    width: 90%;
}

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

.loading-pulse {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #0d47a1, #42a5f5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: loadingPulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(13, 71, 161, 0.4);
}

.loading-pulse i {
    font-size: 2rem;
    color: #fff;
}

@keyframes loadingPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 71, 161, 0.4);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 0 20px rgba(13, 71, 161, 0);
        transform: scale(1.05);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(13, 71, 161, 0);
        transform: scale(1);
    }
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.loading-dots span {
    width: 10px;
    height: 10px;
    background: #42a5f5;
    border-radius: 50%;
    animation: loadingBounce 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0s;
}

@keyframes loadingBounce {

    0%,
    80%,
    100% {
        transform: scale(0.6);
        opacity: 0.4;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.loading-title {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
    font-size: 1.1rem;
}

.loading-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

/* ============================================
   Hasil Diagnosa
   ============================================ */
.result-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 24px;
    transition: var(--transition);
}

.result-card:hover {
    box-shadow: var(--shadow-md);
}

.result-header {
    padding: 24px 28px;
    background: linear-gradient(135deg, #0d47a1, #1565c0);
    color: #fff;
}

.result-header h4 {
    font-weight: 700;
    margin: 0;
}

.result-header .result-latin {
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    font-size: 0.9rem;
}

.result-body {
    padding: 28px;
}

.result-section {
    margin-bottom: 20px;
}

.result-section:last-child {
    margin-bottom: 0;
}

.result-section h6 {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-section h6 i {
    color: var(--primary);
}

.result-section p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    margin: 0;
}

.no-result {
    text-align: center;
    padding: 60px 20px;
}

.no-result-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    background: #fff3e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #ef6c00;
}

/* ============================================
   Modal Styles
   ============================================ */
.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #0d47a1, #1565c0);
    color: #fff;
    border: none;
    padding: 20px 28px;
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-body {
    padding: 28px;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 16px 28px;
}

/* ============================================
   Form Styles
   ============================================ */
.form-control,
.form-select {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.1);
}

.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-dark);
    margin-bottom: 6px;
}

/* ============================================
   Button Styles
   ============================================ */
.btn-primary-custom {
    background: linear-gradient(135deg, #0d47a1, #1565c0);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 24px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, #0a3a8a, #0d47a1);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(13, 71, 161, 0.3);
    color: #fff;
}

.btn-action {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: none;
    font-size: 0.85rem;
    transition: var(--transition);
    margin: 2px;
}

.btn-action:hover {
    transform: translateY(-2px);
}

.btn-edit {
    background: #e3f2fd;
    color: #1565c0;
}

.btn-edit:hover {
    background: #bbdefb;
    color: #0d47a1;
}

.btn-delete {
    background: #ffebee;
    color: #c62828;
}

.btn-delete:hover {
    background: #ffcdd2;
    color: #b71c1c;
}

.btn-info-detail {
    background: #e0f2f1;
    color: #00695c;
}

.btn-info-detail:hover {
    background: #b2dfdb;
    color: #004d40;
}

/* ============================================
   Alert Styles
   ============================================ */
.alert-custom {
    border: none;
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-success-custom {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.alert-danger-custom {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #ef5350;
}

.alert-warning-custom {
    background: #fff3e0;
    color: #e65100;
    border-left: 4px solid #ff9800;
}

.alert-info-custom {
    background: #e3f2fd;
    color: #0d47a1;
    border-left: 4px solid #42a5f5;
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 16px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-stats {
        gap: 16px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .section-padding {
        padding: 60px 0;
    }

    .login-card {
        padding: 32px 24px;
    }

    .welcome-card {
        padding: 28px;
    }

    .welcome-card h2 {
        font-size: 1.4rem;
    }

    .data-card-header {
        padding: 16px 20px;
    }

    .table thead th,
    .table tbody td {
        padding: 12px 16px;
    }

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

    .btn-hero-primary,
    .btn-hero-outline {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    .hero-actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .hero-actions .me-3 {
        margin-right: 0 !important;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .data-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

/* ============================================
   Register & Auth Links
   ============================================ */
.auth-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.auth-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ============================================
   Pagination
   ============================================ */
.pagination .page-link {
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.85rem;
    padding: 8px 14px;
    border-radius: 8px;
    margin: 0 2px;
    transition: var(--transition);
}

.pagination .page-link:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
}

.pagination .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}

/* =========================================
   PRINT STYLES (REPORT GENERATION)
========================================= */
@media print {
    /* Hide unwanted elements */
    .sidebar,
    .sidebar-overlay,
    button[onclick="window.print()"],
    .welcome-card button {
        display: none !important;
    }

    /* Expand main wrapper */
    .app-container {
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .main-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }

    @page {
        /* Memberikan jarak fisik (margin) standar pada kertas agar tidak mepet */
        margin: 15mm 20mm;
    }

    body,
    .dashboard-wrapper {
        background: #fff !important;
        background-color: #fff !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .container,
    .diagnosa-container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
    }

    /* Hide background images or gradients */
    .result-header {
        background: transparent !important;
        background-color: #f8fafc !important;
        border-bottom: 2px solid #e2e8f0;
        color: #000 !important;
        padding: 15px !important;
    }

    .result-header h4,
    .result-latin,
    .result-header .text-white-50 {
        color: #000 !important;
    }

    /* Card styling for print */
    .data-card,
    .result-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        margin-bottom: 20px !important;
    }

    .result-section,
    .result-header,
    .alert {
        break-inside: avoid !important;
        page-break-inside: avoid !important;
    }

    .alert {
        border: 1px solid #ddd !important;
    }

    /* Print Header Styles */
    .print-header {
        margin-bottom: 30px !important;
    }

    .print-header h2 {
        font-size: 24pt !important;
    }

    /* Ensure colors print correctly */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }

    /* Typography adjustments */
    body {
        font-size: 11pt;
        color: #000;
    }

    /* Hide URLs on print for links */
    a[href]:after {
        content: none !important;
    }
}

/* ============================================
   Custom Alerts
   ============================================ */
.alert-custom {
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 14px 20px;
}

.alert-success-custom {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #43a047;
}

.alert-danger-custom {
    background: #fce4ec;
    color: #c62828;
    border-left: 4px solid #e53935;
}

.alert-warning-custom {
    background: #fff8e1;
    color: #e65100;
    border-left: 4px solid #ff9800;
}

.alert-info-custom {
    background: #e3f2fd;
    color: #0d47a1;
    border-left: 4px solid #42a5f5;
}

/* ============================================
   Action Buttons (Tables)
   ============================================ */
.btn-action {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    border: none;
    transition: var(--transition);
    cursor: pointer;
    padding: 0;
}

.btn-action.btn-edit {
    background: #e3f2fd;
    color: #1565c0;
}

.btn-action.btn-edit:hover {
    background: #bbdefb;
    transform: translateY(-2px);
}

.btn-action.btn-delete {
    background: #fce4ec;
    color: #c62828;
}

.btn-action.btn-delete:hover {
    background: #f8bbd0;
    transform: translateY(-2px);
}

.btn-action.btn-info-detail {
    background: #e0f7fa;
    color: #00838f;
}

.btn-action.btn-info-detail:hover {
    background: #b2ebf2;
    transform: translateY(-2px);
}

/* ============================================
   Primary Custom Button
   ============================================ */
.btn-primary-custom {
    background: linear-gradient(135deg, #0d47a1, #1565c0);
    color: #fff;
    border: none;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, #0a3a8a, #0d47a1);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 71, 161, 0.3);
}

/* ============================================
   Auth Link
   ============================================ */
.auth-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.auth-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    text-align: center;
    padding: 40px 20px !important;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

/* ============================================
   Print Styles for Dashboard Laporan
   ============================================ */
@media print {
    .sidebar, .sidebar-overlay, .mobile-header,
    .btn-primary-custom, .btn, button,
    .welcome-card .btn {
        display: none !important;
    }

    .main-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .welcome-card {
        background: #f8fafc !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .welcome-card h2, .welcome-card p {
        color: #000 !important;
    }

    .stat-card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }

    .data-card {
        box-shadow: none !important;
        break-inside: avoid;
    }

    canvas {
        max-width: 100% !important;
    }
}