/* ============================================
   SISTEM PAKAR - MAIN STYLESHEET
   Modern, Minimalis, Indigo + Amber
   ============================================ */

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

/* --- CSS Variables --- */
:root {
    --primary: #4F46E5;
    --primary-dark: #3730A3;
    --primary-darker: #312E81;
    --primary-light: #E0E7FF;
    --primary-50: #EEF2FF;

    --accent: #F59E0B;
    --accent-dark: #D97706;
    --accent-light: #FEF3C7;
    --accent-50: #FFFBEB;

    --bg: #F8FAFC;
    --bg-alt: #F1F5F9;
    --surface: #FFFFFF;
    --surface-hover: #F8FAFC;

    --text: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --text-light: #CBD5E1;

    --border: #E2E8F0;
    --border-light: #F1F5F9;

    --success: #10B981;
    --success-light: #D1FAE5;
    --success-dark: #059669;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --danger-dark: #DC2626;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --info: #3B82F6;
    --info-light: #DBEAFE;

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;

    --sidebar-width: 280px;
    --header-height: 72px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    font-size: 15px;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
}

h1 { font-size: 2.5rem; letter-spacing: -0.025em; }
h2 { font-size: 1.875rem; letter-spacing: -0.02em; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }

p { color: var(--text-secondary); }

/* --- Container --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   PUBLIC NAVBAR
   ============================================ */
.navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text);
}

.navbar-brand .brand-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.navbar-nav a {
    padding: 8px 18px;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.navbar-nav a:hover,
.navbar-nav a.active {
    background: var(--primary-50);
    color: var(--primary);
}

.navbar-nav .nav-cta {
    background: var(--primary);
    color: white !important;
    padding: 10px 24px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.navbar-nav .nav-cta:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4);
}

/* Mobile burger */
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text);
    padding: 8px;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--bg) 60%, var(--accent-50) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    animation: fadeInUp 0.8s ease;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-light);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: 0.03em;
}

.hero-badge svg {
    width: 16px;
    height: 16px;
}

.hero h1 {
    font-size: 3.25rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
    line-height: 1.7;
    max-width: 520px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
    max-width: 420px;
    width: 100%;
    position: relative;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: calc(var(--radius-xl) + 2px);
    z-index: -1;
    opacity: 0.15;
}

.hero-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.hero-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.hero-card-header h4 {
    font-size: 1rem;
    font-weight: 700;
}

.hero-card-header p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.hero-symptom-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hero-symptom-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

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

.hero-symptom-item.checked .check {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.hero-symptom-item.checked {
    background: var(--primary-50);
    color: var(--primary-dark);
}

/* ============================================
   STATS SECTION
   ============================================ */
.stats-section {
    padding: 60px 0;
    background: var(--surface);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.stat-card {
    text-align: center;
    padding: 24px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
}

/* ============================================
   FEATURES SECTION
   ============================================ */
.features-section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 56px;
}

.section-header h2 {
    margin-bottom: 16px;
}

.section-header p {
    font-size: 1.05rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 36px;
    transition: var(--transition-slow);
    position: relative;
    overflow: hidden;
}

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

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: var(--transition);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-50);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.feature-card h4 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.feature-card p {
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.4;
}

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

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

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.4);
    color: white;
}

.btn-accent {
    background: var(--accent);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-accent:hover {
    background: var(--accent-dark);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-50);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: var(--success-dark);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: var(--danger-dark);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 8px 16px;
}

.btn-ghost:hover {
    background: var(--bg-alt);
    color: var(--text);
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.825rem;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius);
}

.btn-icon.btn-sm {
    width: 34px;
    height: 34px;
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.form-label .required {
    color: var(--danger);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--text);
    background: var(--surface);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-control::placeholder {
    color: var(--text-light);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 42px;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ============================================
   CHECKBOX / TOGGLE GEJALA
   ============================================ */
.gejala-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 12px;
}

.gejala-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.gejala-item:hover {
    border-color: var(--primary-light);
    background: var(--primary-50);
}

.gejala-item.selected {
    border-color: var(--primary);
    background: var(--primary-50);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.gejala-item input[type="checkbox"] {
    display: none;
}

.gejala-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
    color: transparent;
}

.gejala-item.selected .gejala-checkbox {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.gejala-kode {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.gejala-nama {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.gejala-item.selected .gejala-nama {
    color: var(--primary-dark);
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

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

.card-header h3 {
    font-size: 1.15rem;
}

.card-body {
    padding: 28px;
}

.card-footer {
    padding: 20px 28px;
    border-top: 1px solid var(--border-light);
    background: var(--bg);
}

/* ============================================
   TABLE
   ============================================ */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead th {
    background: var(--bg);
    padding: 14px 20px;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table tbody td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
    color: var(--text-secondary);
    vertical-align: middle;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: var(--bg);
}

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

.table .kode-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: var(--primary-50);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: var(--radius-full);
}

.table .actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ============================================
   ALERTS / FLASH MESSAGES
   ============================================ */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    font-weight: 500;
    animation: fadeInDown 0.3s ease;
    position: relative;
}

.alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    line-height: 1;
}

.alert-success {
    background: var(--success-light);
    color: var(--success-dark);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error {
    background: var(--danger-light);
    color: var(--danger-dark);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background: var(--warning-light);
    color: var(--accent-dark);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-info {
    background: var(--info-light);
    color: #1D4ED8;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.alert-close {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.5;
    color: inherit;
    transition: var(--transition);
}

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

/* ============================================
   DIAGNOSIS RESULT
   ============================================ */
.result-container {
    max-width: 900px;
    margin: 0 auto;
}

.result-header {
    text-align: center;
    padding: 48px 0 40px;
}

.result-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 20px;
}

.result-icon.found {
    background: var(--danger-light);
    color: var(--danger);
}

.result-icon.not-found {
    background: var(--success-light);
    color: var(--success);
}

.result-icon.warning {
    background: var(--warning-light);
    color: var(--warning);
}

.result-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}

.result-card-header {
    padding: 28px 32px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid var(--border-light);
}

.result-disease-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--danger), #DC2626);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.result-disease-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.result-disease-kode {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.result-section {
    padding: 28px 32px;
    border-bottom: 1px solid var(--border-light);
}

.result-section:last-child {
    border-bottom: none;
}

.result-section-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-gejala-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.result-gejala-list li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--primary-50);
    color: var(--primary-dark);
    border-radius: var(--radius-full);
    font-size: 0.825rem;
    font-weight: 500;
}

.result-solusi {
    background: var(--accent-50);
    border-radius: var(--radius);
    padding: 24px;
    border-left: 4px solid var(--accent);
}

.result-solusi p {
    color: var(--text-secondary);
    font-size: 0.925rem;
    line-height: 1.8;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 40px 0;
}

/* ============================================
   ADMIN LAYOUT
   ============================================ */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--text);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    overflow-y: auto;
    transition: var(--transition-slow);
}

.sidebar-brand {
    padding: 24px 28px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sidebar-brand span {
    font-weight: 700;
    font-size: 1.05rem;
}

.sidebar-menu {
    padding: 16px 0;
    list-style: none;
}

.sidebar-menu-label {
    padding: 12px 28px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 28px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-menu a.active {
    color: white;
    background: rgba(79, 70, 229, 0.15);
    border-left-color: var(--primary);
}

.sidebar-menu a .menu-icon {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.sidebar-menu a .menu-badge {
    margin-left: auto;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border-light);
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 30;
}

.admin-header-left h2 {
    font-size: 1.35rem;
    font-weight: 700;
}

.admin-header-left p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--bg);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.admin-user .avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
}

.admin-content {
    padding: 32px;
    flex: 1;
}

/* Mobile sidebar toggle */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text);
    padding: 8px;
}

/* ============================================
   DASHBOARD STATS
   ============================================ */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.dash-stat-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: var(--transition);
}

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

.dash-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.dash-stat-icon.gejala {
    background: var(--primary-50);
    color: var(--primary);
}

.dash-stat-icon.penyakit {
    background: var(--danger-light);
    color: var(--danger);
}

.dash-stat-icon.rule {
    background: var(--accent-light);
    color: var(--accent-dark);
}

.dash-stat-icon.diagnosa {
    background: var(--success-light);
    color: var(--success-dark);
}

.dash-stat-info h3 {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
}

.dash-stat-info p {
    font-size: 0.825rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--bg) 50%, var(--accent-50) 100%);
    padding: 24px;
}

.login-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 440px;
    border: 1px solid var(--border-light);
    animation: fadeInUp 0.5s ease;
}

.login-card .login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-card .login-logo .brand-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.3);
}

.login-card h2 {
    text-align: center;
    margin-bottom: 8px;
    font-size: 1.5rem;
}

.login-card .login-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 32px;
}

.login-card .btn {
    width: 100%;
    padding: 14px;
    font-size: 0.95rem;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--text);
    color: rgba(255, 255, 255, 0.6);
    padding: 40px 0 30px;
    margin-top: auto;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.7);
}

.footer a:hover {
    color: white;
}

/* ============================================
   DIAGNOSIS PAGE
   ============================================ */
.diagnosis-page {
    padding: 48px 0 80px;
}

.diagnosis-header {
    text-align: center;
    margin-bottom: 48px;
}

.diagnosis-header h1 {
    font-size: 2rem;
    margin-bottom: 12px;
}

.diagnosis-header p {
    font-size: 1rem;
    max-width: 560px;
    margin: 0 auto;
}

.diagnosis-form-actions {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
    margin-top: 32px;
}

.selected-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-50);
    color: var(--primary);
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

/* ============================================
   PAGE HEADER (PUBLIC)
   ============================================ */
.page-header {
    background: linear-gradient(135deg, var(--primary-50) 0%, var(--bg) 100%);
    padding: 40px 0;
    border-bottom: 1px solid var(--border-light);
}

.page-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.page-breadcrumb a {
    color: var(--text-muted);
}

.page-breadcrumb a:hover {
    color: var(--primary);
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 60px 24px;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state h4 {
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ============================================
   BADGE
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-primary {
    background: var(--primary-50);
    color: var(--primary);
}

.badge-success {
    background: var(--success-light);
    color: var(--success-dark);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger-dark);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--accent-dark);
}

/* ============================================
   CHECKBOX GROUP (Admin Rule Form)
   ============================================ */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
    padding: 4px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
}

.checkbox-item:hover {
    background: var(--primary-50);
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .navbar, .footer, .result-actions, .no-print {
        display: none !important;
    }
    
    body {
        background: white;
        font-size: 12pt;
    }
    
    .result-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .result-container {
        max-width: 100%;
    }
}

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

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease;
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease;
}

/* Staggered animations */
.stagger > * {
    animation: fadeInUp 0.5s ease backwards;
}

.stagger > *:nth-child(1) { animation-delay: 0s; }
.stagger > *:nth-child(2) { animation-delay: 0.05s; }
.stagger > *:nth-child(3) { animation-delay: 0.1s; }
.stagger > *:nth-child(4) { animation-delay: 0.15s; }
.stagger > *:nth-child(5) { animation-delay: 0.2s; }
.stagger > *:nth-child(6) { animation-delay: 0.25s; }
.stagger > *:nth-child(7) { animation-delay: 0.3s; }
.stagger > *:nth-child(8) { animation-delay: 0.35s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
    }
    
    .navbar-toggle {
        display: block;
    }
    
    .navbar-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--surface);
        padding: 16px;
        flex-direction: column;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
    }
    
    .navbar-nav.show {
        display: flex;
    }
    
    .hero {
        padding: 40px 0 60px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .gejala-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    /* Admin sidebar mobile */
    .admin-sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .admin-sidebar.show {
        transform: translateX(0);
        --sidebar-width: 280px;
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .admin-content {
        padding: 20px;
    }
    
    .admin-header {
        padding: 16px 20px;
    }
    
    .result-card-header,
    .result-section {
        padding: 20px;
    }
    
    .footer .container {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .checkbox-group {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   DIAGNOSIS ADMIN RIWAYAT
   ============================================ */
.gejala-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.gejala-tag {
    display: inline-block;
    padding: 2px 8px;
    background: var(--primary-50);
    color: var(--primary);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

/* ============================================
   MODAL CONFIRM
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 440px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    animation: fadeInUp 0.3s ease;
    text-align: center;
}

.modal-content .modal-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.modal-content h3 {
    margin-bottom: 8px;
}

.modal-content p {
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}
