:root {
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --primary-light: #ccfbf1;
    --primary-surface: #f0fdfa;
    --secondary: #0284c7;
    --dark: #0f172a;
    --slate: #334155;
    --muted: #64748b;
    --border: #e2e8f0;
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(0,0,0,0.04);
    --shadow-lg: 0 12px 24px -4px rgba(15,23,42,0.08), 0 4px 12px -2px rgba(15,23,42,0.03);
    --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background-color: var(--bg-page);
    color: var(--slate);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 64px 0;
}

.bg-light {
    background-color: #ffffff;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

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

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

.text-accent {
    color: var(--primary) !important;
}

/* Header & Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 14px 0;
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(13, 148, 136, 0.3);
}

.brand-icon svg {
    width: 22px;
    height: 22px;
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--dark);
    display: block;
    line-height: 1.2;
}

.brand-sub {
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 500;
}

.accent-tag {
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 0.72rem;
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 700;
    margin-left: 2px;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-item {
    text-decoration: none;
    color: var(--slate);
    font-weight: 600;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.nav-item svg {
    width: 17px;
    height: 17px;
}

.nav-item:hover {
    color: var(--primary);
}

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

.nav-status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-surface);
    border: 1px solid var(--primary-light);
    color: var(--primary-dark);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.2);
}

/* Mobile Toggle Button */
.mobile-toggle-btn {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 7px;
    cursor: pointer;
    color: var(--slate);
    transition: all 0.2s;
}

.mobile-toggle-btn:hover {
    background: #f1f5f9;
}

.mobile-toggle-btn svg {
    width: 22px;
    height: 22px;
    display: block;
}

/* Mobile Drawer */
.mobile-nav-drawer {
    display: none;
    flex-direction: column;
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 18px;
    gap: 10px;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--slate);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.mobile-nav-item:hover, .mobile-nav-item:active {
    background: var(--primary-surface);
    color: var(--primary-dark);
}

.mobile-nav-item svg {
    width: 18px;
    height: 18px;
}

/* Hero Section */
.hero {
    padding: 56px 0 28px;
    background: radial-gradient(circle at 50% 0%, rgba(204, 251, 241, 0.45) 0%, transparent 60%);
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid var(--border);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-dark);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.hero-badge svg {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.2;
    margin-bottom: 18px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--muted);
    max-width: 680px;
    margin: 0 auto 28px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(13, 148, 136, 0.35);
}

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

.btn-secondary:hover {
    background: #f1f5f9;
}

.btn-block {
    width: 100%;
}

/* Section Header */
.section-header {
    margin-bottom: 36px;
}

.section-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -0.01em;
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--muted);
    font-size: 1rem;
}

/* App Grid */
.app-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 32px;
    align-items: start;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 28px;
}

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

.card-header-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: var(--radius-md);
    background: var(--primary-surface);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-header-icon svg {
    width: 22px;
    height: 22px;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
}

.card-desc {
    font-size: 0.85rem;
    color: var(--muted);
}

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

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.label-split {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.unit-display {
    font-size: 1.05rem;
    color: var(--dark);
}

.unit-display strong {
    font-size: 1.3rem;
    color: var(--primary);
}

/* Gender Selector Toggle */
.gender-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.gender-option {
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.gender-option input {
    display: none;
}

.gender-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--slate);
}

.gender-icon {
    width: 22px;
    height: 22px;
}

.gender-icon.male {
    color: #0284c7;
}

.gender-icon.female {
    color: #ec4899;
}

.gender-option.active {
    border-color: var(--primary);
    background: var(--primary-surface);
}

.gender-option.active .gender-content {
    color: var(--primary-dark);
}

/* Range Inputs */
.range-wrapper {
    padding: 8px 0;
}

.form-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
    outline: none;
    cursor: pointer;
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: transform 0.1s;
}

.form-range::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.form-range::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.range-ticks {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 6px;
}

.number-quick-input {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--muted);
}

.form-input-compact {
    width: 85px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-weight: 600;
    text-align: right;
    font-size: 0.9rem;
    color: var(--dark);
    outline: none;
}

.form-input-compact:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

/* Alert Box */
.alert-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    margin-bottom: 18px;
}

.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-box svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Result States */
.result-empty-state {
    text-align: center;
    padding: 60px 24px;
}

.empty-illustration {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--primary-surface);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-illustration svg {
    width: 32px;
    height: 32px;
}

.result-empty-state h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.result-empty-state p {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.5;
}

.result-container {
    animation: fadeIn 0.3s ease;
}

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

.result-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.result-tag {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.confidence-badge {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}

/* Status Banner */
.status-banner {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 18px;
    border-radius: var(--radius-md);
    background: #f8fafc;
    border-left: 5px solid #10b981;
    margin-bottom: 24px;
}

.status-icon-box {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    box-shadow: var(--shadow-sm);
}

.status-icon-box svg {
    width: 26px;
    height: 26px;
}

.status-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 4px;
}

.status-desc {
    font-size: 0.88rem;
    color: var(--slate);
    line-height: 1.45;
}

/* Probability Section */
.prob-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.section-mini-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-mini-title svg {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

.prob-item {
    margin-bottom: 12px;
}

.prob-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.prob-track {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.prob-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Recommendations */
.recom-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recom-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.88rem;
    background: #f8fafc;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--slate);
    line-height: 1.5;
}

.recom-bullet {
    color: var(--primary);
    font-weight: bold;
    font-size: 1.1rem;
    line-height: 1;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-normal { background: #d1fae5; color: #065f46; }
.badge-stunted { background: #fef3c7; color: #92400e; }
.badge-severely { background: #fee2e2; color: #991b1b; }
.badge-tinggi { background: #dbeafe; color: #1e40af; }

/* Education Grid */
.edu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.edu-card {
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

.edu-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.edu-icon svg {
    width: 24px;
    height: 24px;
}

.edu-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}

.edu-card p {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.6;
}

/* Custom Table */
.table-card {
    overflow: hidden;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.custom-table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.custom-table th {
    background: #f1f5f9;
    color: var(--dark);
    font-weight: 700;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid var(--border);
}

.custom-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--slate);
}

.custom-table tr:hover td {
    background: #f8fafc;
}

/* Model Spec Grid */
.model-spec-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.spec-item {
    background: white;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.spec-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.spec-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 4px;
}

.spec-detail {
    font-size: 0.78rem;
    color: var(--muted);
}

/* Footer */
.footer {
    padding: 32px 0;
    border-top: 1px solid var(--border);
    background: white;
    text-align: center;
    font-size: 0.88rem;
    color: var(--muted);
}

/* Utilities */
.hidden {
    display: none !important;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive Breakpoints */
@media (max-width: 992px) {
    .app-grid {
        grid-template-columns: 1fr;
    }
    .edu-grid {
        grid-template-columns: 1fr;
    }
    .model-spec-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .hero-title {
        font-size: 2.25rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .mobile-toggle-btn {
        display: block;
    }
    .mobile-nav-drawer:not(.hidden) {
        display: flex;
    }
    .nav-status-badge {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
    .hero {
        padding: 36px 0 20px;
    }
    .hero-title {
        font-size: 1.85rem;
    }
    .hero-subtitle {
        font-size: 0.98rem;
        margin-bottom: 20px;
    }
    .hero-actions {
        flex-direction: column;
    }
    .hero-actions .btn {
        width: 100%;
    }
    .card {
        padding: 20px 16px;
    }
    .model-spec-grid {
        grid-template-columns: 1fr;
    }
}
