:root {
    --primary: #6c5ce7;
    --primary-dark: #211a57;
    --primary-soft: #eeeaff;
    --secondary: #ff7ab6;
    --info: #60a5fa;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg: #f6f7fb;
    --card: #ffffff;
    --text: #17143f;
    --muted: #718096;
    --border: #e7eaf3;
    --shadow: 0 12px 32px rgba(31, 27, 79, 0.08);
    --primary-light: #a78bfa;
    --soft-pink: #fce4ec;
    --lavender: #ede7f6;
    --light-blue: #e3f2fd;
    --bg-soft: var(--bg);
    --text-dark: var(--text);
    --text-muted: var(--muted);
    --radius-lg: 20px;
    --radius-md: 14px;
    --shadow-sm: 0 4px 20px rgba(0,0,0,0.05);
    --shadow-md: 0 12px 40px rgba(124,108,255,0.12);
    --shadow-lg: 0 24px 60px rgba(124,108,255,0.18);
}

body {
    font-family: 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-soft);
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
}

.bg-soft-pink { background: var(--soft-pink) !important; color: #c2185b; }
.bg-lavender { background: var(--lavender) !important; color: #5e35b1; }
.bg-blue { background: var(--light-blue) !important; color: #1565c0; }
.bg-pink { background: var(--soft-pink) !important; color: #c2185b; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
}
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-dark), #5a52d5); }

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary), #a78bfa) !important;
}

/* ===== Landing Navbar ===== */
.landing-navbar {
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(124,108,255,0.08);
    padding: 0.75rem 0;
    transition: box-shadow 0.25s ease, background 0.25s ease;
}
.user-navbar {
    box-shadow: 0 4px 20px rgba(31, 27, 79, 0.06);
}
.user-navbar.scrolled {
    background: rgba(255,255,255,0.96);
    box-shadow: 0 6px 24px rgba(31, 27, 79, 0.08);
}
.landing-navbar.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,0.06); }
.landing-navbar .navbar-brand {
    color: var(--text-dark) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.brand-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 1.1rem;
}
.brand-highlight { color: var(--primary); }
.landing-navbar .nav-link {
    color: var(--text-muted);
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}
.landing-navbar .nav-link:hover { color: var(--primary); }
.landing-navbar .nav-link.active {
    color: var(--primary) !important;
    font-weight: 600;
    background: var(--lavender);
}
.btn-nav-admin {
    background: transparent;
    border: 1.5px solid #e2e8f0;
    color: var(--text-muted);
    font-weight: 500;
    padding: 0.45rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
}
.btn-nav-admin:hover { border-color: var(--primary); color: var(--primary); }
.btn-nav-cta { padding: 0.45rem 1.25rem !important; border-radius: 10px !important; font-size: 0.9rem !important; }

/* ===== Hero ===== */
.landing-page .hero-section {
    background: linear-gradient(160deg, #ffffff 0%, #f5f3ff 40%, #fce7f3 100%);
    min-height: 90vh;
    padding-bottom: 2rem;
}
.min-vh-80 { min-height: 80vh; }
.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    pointer-events: none;
}
.hero-blob-1 { width: 500px; height: 500px; background: #c4b5fd; top: -100px; right: -100px; }
.hero-blob-2 { width: 350px; height: 350px; background: #fbcfe8; bottom: 0; left: -80px; }
.hero-blob-3 { width: 200px; height: 200px; background: #bfdbfe; top: 40%; left: 30%; opacity: 0.3; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: white;
    color: var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(124,108,255,0.15);
}
.hero-title {
    font-size: clamp(1.85rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}
.text-gradient {
    background: linear-gradient(135deg, var(--primary), #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-lead {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 540px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn-hero-primary {
    padding: 0.85rem 1.75rem !important;
    border-radius: 12px !important;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(124,108,255,0.35);
}
.btn-hero-secondary {
    background: white;
    border: 2px solid #e2e8f0;
    color: var(--text-dark);
    padding: 0.85rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s;
}
.btn-hero-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: white;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}
.trust-item i { color: #22c55e; }

/* Hero layout */
.hero-row {
    min-height: 75vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 0;
}
.hero-content {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.hero-badge {
    margin-bottom: 24px;
}
.hero-title {
    max-width: 780px;
    font-size: 56px;
    line-height: 1.2;
    margin-bottom: 28px;
}
.hero-lead {
    max-width: 700px;
    font-size: 20px;
    line-height: 1.8;
    margin-bottom: 36px;
}
.hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}
.hero-trust {
    display: flex;
    justify-content: center;
    gap: 36px;
    flex-wrap: wrap;
    margin-top: 10px;
}

/* ===== Stats ===== */
.stats-section { margin-top: -3rem; position: relative; z-index: 2; padding-bottom: 1rem; }
.stats-bar {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    border: 1px solid rgba(124,108,255,0.08);
}
.stat-item { text-align: center; flex: 1; min-width: 100px; }
.stat-number {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}
.stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.35rem; font-weight: 500; }
.stat-divider { width: 1px; height: 40px; background: #e2e8f0; }

/* ===== Sections ===== */
.section-padding { padding: 5rem 0; }
.section-header { max-width: 640px; margin: 0 auto 1rem; }
.section-tag {
    display: inline-block;
    background: var(--lavender);
    color: var(--primary);
    padding: 0.3rem 0.85rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.section-title {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}
.section-subtitle { color: var(--text-muted); font-size: 1.05rem; margin-top: 0.75rem; }

/* Feature cards */
.feature-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f1f5f9;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.feature-card.featured {
    border: 2px solid var(--primary);
    background: linear-gradient(180deg, #faf5ff 0%, white 100%);
}
.feature-card-badge {
    position: absolute;
    top: 1rem; right: 1rem;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
    text-transform: uppercase;
}
.feature-card-icon {
    width: 56px; height: 56px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}
.icon-lavender { background: var(--lavender); color: #5e35b1; }
.icon-pink { background: var(--soft-pink); color: #c2185b; }
.icon-blue { background: var(--light-blue); color: #1565c0; }
.feature-card h5 { font-weight: 700; margin-bottom: 0.75rem; }
.feature-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }
.feature-list {
    list-style: none;
    padding: 0; margin: 1rem 0 0;
    border-top: 1px solid #f1f5f9;
    padding-top: 1rem;
}
.feature-list li {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 0.25rem 0;
    padding-left: 1.25rem;
    position: relative;
}
.feature-list li::before {
    content: '';
    position: absolute;
    left: 0; top: 0.65rem;
    width: 6px; height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

/* How it works */
.how-section { background: var(--bg-soft); }
.steps-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}
.step-item {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f1f5f9;
    transition: transform 0.2s;
    position: relative;
    overflow: hidden;
}
.step-item:hover { transform: translateY(-4px); }
.step-item::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
}
.step-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--lavender);
    line-height: 1;
    margin-bottom: 0.75rem;
}
.step-content h5 { font-weight: 700; margin-bottom: 0.5rem; }
.step-content p { color: var(--text-muted); font-size: 0.9rem; margin: 0; line-height: 1.6; }

/* Category cards */
.category-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f1f5f9;
    transition: all 0.3s;
    height: 100%;
}
.category-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.category-icon {
    width: 72px; height: 72px;
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.25rem;
}
.category-wash .category-icon { background: #dbeafe; color: #2563eb; }
.category-moist .category-icon { background: #fce7f3; color: #db2777; }
.category-sun .category-icon { background: #fef3c7; color: #d97706; }
.category-card h4 { font-weight: 700; margin-bottom: 0.75rem; }
.category-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }
.category-meta {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}
.category-meta span {
    background: var(--bg-soft);
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Skin & ingredients */
.skin-ingredient-section { background: linear-gradient(180deg, var(--bg-soft) 0%, white 100%); }
.chip-group-title { font-weight: 600; color: var(--text-dark); margin-bottom: 0.75rem; }
.chip-group-title i { color: var(--primary); margin-right: 0.35rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1.5px solid transparent;
}
.chip-normal { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.chip-dry { background: #fef3c7; color: #b45309; border-color: #fde68a; }
.chip-oily { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.chip-combo { background: #f3e8ff; color: #7c3aed; border-color: #e9d5ff; }
.chip-acne { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.chip-dull { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.chip-dehydrated { background: #e0f2fe; color: #0369a1; border-color: #bae6fd; }
.chip-pigment { background: #fce7f3; color: #be185d; border-color: #fbcfe8; }
.ingredient-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
}
.ingredient-item {
    background: white;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #f1f5f9;
    display: flex; align-items: center; gap: 0.5rem;
}
.ingredient-item i { font-size: 0.4rem; color: var(--primary); }
.match-levels { background: white; padding: 1.25rem; border-radius: var(--radius-md); border: 1px solid #f1f5f9; }
.match-level {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.4rem 0;
    font-size: 0.9rem;
}
.match-level small { color: var(--text-muted); margin-left: auto; }
.level-badge { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.level-1 { background: #ef4444; }
.level-2 { background: #f59e0b; }
.level-3 { background: #06b6d4; }
.level-4 { background: var(--primary); }
.level-5 { background: #22c55e; }

/* CTA */
.cta-section { padding: 0 0 5rem; }
.cta-box {
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 50%, #ec4899 100%);
    border-radius: var(--radius-lg);
    padding: 3rem;
    color: white;
    box-shadow: var(--shadow-lg);
}
.cta-title { font-weight: 800; font-size: clamp(1.35rem, 2.5vw, 1.85rem); margin-bottom: 0.75rem; }
.cta-text { opacity: 0.9; font-size: 1.05rem; }
.btn-cta-white {
    background: white !important;
    color: var(--primary) !important;
    font-weight: 700;
    border-radius: 12px !important;
    padding: 0.85rem 1.75rem !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.btn-cta-white:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,0,0,0.2); }

/* Disclaimer */
.disclaimer-box-enhanced {
    display: flex;
    gap: 1rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    align-items: flex-start;
}
.disclaimer-icon {
    width: 40px; height: 40px;
    background: #fef3c7;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #d97706;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.disclaimer-box-enhanced strong { display: block; margin-bottom: 0.25rem; color: #92400e; }
.disclaimer-box-enhanced p { color: #78350f; font-size: 0.9rem; line-height: 1.6; }
.disclaimer-box { border-radius: 12px; }

/* Site footer */
.site-footer {
    background: var(--text-dark);
    color: rgba(255,255,255,0.75);
}
.footer-brand {
    color: white;
    font-size: 1.15rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.footer-brand i { color: var(--primary-light); }
.footer-desc { font-size: 0.9rem; line-height: 1.7; max-width: 320px; }
.footer-heading { color: white; font-weight: 600; margin-bottom: 1rem; font-size: 0.9rem; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.footer-links a:hover { color: white; }
.footer-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.footer-tags span {
    background: rgba(255,255,255,0.08);
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.footer-note { color: rgba(255,255,255,0.5); line-height: 1.6; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.45); }

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(24px);
    animation: fadeUp 0.7s ease forwards;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Legacy compat */
.info-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}
.info-card:hover { transform: translateY(-4px); }
.info-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Navbar (non-landing) */
.navbar-brand { color: var(--primary) !important; }
.nav-link.active { color: var(--primary) !important; font-weight: 600; }

/* Form */
.form-card { border-radius: 16px; overflow: hidden; }
.skin-option input { display: none; }
.skin-option-box {
    display: block;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.skin-option input:checked + .skin-option-box {
    border-color: var(--primary);
    background: var(--lavender);
}

/* ===== Recommendation result page ===== */
.recommendation-page {
    --result-bg: linear-gradient(180deg, #f8f6ff 0%, #f3f0fa 40%, #faf9fc 100%);
    background: var(--result-bg);
}
.recommendation-page-main {
    padding: 1.75rem 0 2.5rem;
    scroll-padding-top: 88px;
}
.container--result { max-width: 1140px; }
.result-hero { margin-bottom: 1.35rem; }
.result-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: #5b21b6;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.65rem;
}
.result-hero__title {
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.03em;
    margin-bottom: 0.35rem;
}
.result-hero__subtitle {
    color: var(--muted);
    margin: 0;
    font-size: 0.88rem;
}
.result-method-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.9rem;
    border-radius: 50px;
    background: rgba(108, 92, 231, 0.08);
    border: 1px solid rgba(108, 92, 231, 0.15);
    color: #5b21b6;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}
.result-category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem;
    background: rgba(255,255,255,0.7);
    border: 1px solid var(--border);
    border-radius: 14px;
    backdrop-filter: blur(8px);
}
.result-category-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.result-category-nav__link:hover {
    background: var(--primary-soft);
    color: var(--primary);
}
.result-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}
.result-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}
.result-summary-card {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 1.25rem 1.35rem;
    margin-bottom: 2rem;
}
.result-summary-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}
.result-summary-item__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.05rem;
}
.result-summary-item__label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    font-weight: 600;
}
.result-summary-item__value {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
    word-break: break-word;
}
.category-section {
    margin-bottom: 2.25rem;
    padding: 1.35rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}
.category-wash { border-top: 3px solid #60a5fa; }
.category-moist { border-top: 3px solid #a78bfa; }
.category-sun { border-top: 3px solid #fbbf24; }
.category-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.category-header__icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}
.category-wash .category-header__icon { background: #dbeafe; color: #2563eb; }
.category-moist .category-header__icon { background: #ede9fe; color: #6d28d9; }
.category-sun .category-header__icon { background: #fef3c7; color: #d97706; }
.category-header__text { flex: 1; min-width: 200px; }
.category-header__title {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0 0 0.25rem;
    color: var(--text);
}
.category-header__desc {
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.5;
    max-width: 640px;
}
.btn-ranking-modal {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 600;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}
.btn-ranking-modal:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary-dark);
    box-shadow: 0 4px 14px rgba(108, 92, 231, 0.12);
}
.recommendation-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(31, 27, 79, 0.06);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.recommendation-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(31, 27, 79, 0.1);
}
.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.82rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.rank-badge-1 { background: linear-gradient(135deg, #fde68a, #f59e0b); color: #78350f; }
.rank-badge-2 { background: linear-gradient(135deg, #e5e7eb, #9ca3af); color: #374151; }
.rank-badge-3 { background: linear-gradient(135deg, #fdba74, #ea580c); color: #fff; }
.product-showcase {
    height: 240px;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: #f1f5f9;
}
.product-showcase__visual {
    position: absolute;
    inset: 0;
}
.product-showcase__hero {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.product-showcase--custom .product-showcase__hero {
    object-fit: contain;
    object-position: center bottom;
    padding: 0.75rem 1rem 1.25rem;
    filter: drop-shadow(0 18px 28px rgba(15, 23, 42, 0.16));
}
.recommendation-card:hover .product-showcase--catalog .product-showcase__hero {
    transform: scale(1.06);
}
.recommendation-card:hover .product-showcase--custom .product-showcase__hero {
    transform: scale(1.04) translateY(-2px);
}
.product-showcase__glow {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 12%, rgba(255,255,255,0.55) 0%, transparent 38%),
        radial-gradient(circle at 82% 18%, rgba(255,255,255,0.28) 0%, transparent 32%);
    pointer-events: none;
}
.product-showcase__shade {
    position: absolute;
    inset: auto 0 0;
    height: 58%;
    background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.42) 100%);
    pointer-events: none;
}
.product-showcase--custom .product-showcase__shade {
    height: 42%;
    background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.12) 100%);
}
.product-showcase__caption {
    position: absolute;
    left: 14px;
    right: 64px;
    bottom: 14px;
    z-index: 2;
    color: #fff;
    text-shadow: 0 2px 10px rgba(15, 23, 42, 0.35);
}
.product-showcase__caption-brand {
    display: block;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    opacity: 0.92;
}
.product-showcase__caption-name {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.35;
    opacity: 0.96;
}
.product-showcase.placeholder-wash { background: linear-gradient(180deg, #eff6ff, #dbeafe); }
.product-showcase.placeholder-moist { background: linear-gradient(180deg, #ecfdf5, #d1fae5); }
.product-showcase.placeholder-sun { background: linear-gradient(180deg, #fff7ed, #fde68a); }
.product-showcase.placeholder-default { background: linear-gradient(180deg, #f5f3ff, #ede9fe); }
.product-showcase--custom.placeholder-wash { background: linear-gradient(165deg, #f8fbff 0%, #eef4ff 55%, #e8f0ff 100%); }
.product-showcase--custom.placeholder-moist { background: linear-gradient(165deg, #f7fef9 0%, #eefcf4 55%, #e7f8ef 100%); }
.product-showcase--custom.placeholder-sun { background: linear-gradient(165deg, #fffdf8 0%, #fff8eb 55%, #fff1d6 100%); }
.product-showcase.rank-showcase-1::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid rgba(245, 158, 11, 0.45);
    border-radius: inherit;
    pointer-events: none;
    z-index: 5;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35);
}
.product-showcase__category-chip {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(15, 23, 42, 0.38);
    border: 1px solid rgba(255,255,255,0.28);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
}
.product-showcase__category-chip i { font-size: 0.78rem; }
.product-showcase--custom .product-showcase__category-chip {
    color: var(--primary-dark);
    background: rgba(255,255,255,0.94);
    border-color: rgba(108, 92, 231, 0.12);
}
.product-showcase .score-ring {
    z-index: 4;
    width: 52px;
    height: 52px;
    bottom: 12px;
    right: 12px;
    background: rgba(255,255,255,0.97);
    border: 2px solid rgba(255,255,255,0.9);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}
.product-showcase .score-ring__svg { width: 44px; height: 44px; }
.product-showcase .score-ring__value { font-size: 0.7rem; font-weight: 800; }
.score-ring__svg { width: 38px; height: 38px; transform: rotate(-90deg); }
.score-ring {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.95);
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}
.score-ring__bg { fill: none; stroke: #e5e7eb; stroke-width: 3; }
.score-ring__fill { fill: none; stroke-width: 3; stroke-linecap: round; }
.score-ring__fill.progress-sangat-cocok { stroke: #16a34a; }
.score-ring__fill.progress-cocok { stroke: #2563eb; }
.score-ring__fill.progress-cukup-cocok { stroke: #f59e0b; }
.score-ring__fill.progress-kurang-cocok { stroke: #f97316; }
.score-ring__fill.progress-tidak-cocok { stroke: #dc2626; }
.score-ring__fill.progress-default { stroke: #9ca3af; }
.score-ring__value {
    position: absolute;
    font-size: 0.62rem;
    font-weight: 800;
    color: var(--text);
}
.recommendation-card__body {
    padding: 1rem 1.1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}
.score-row--compact .score-row__main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}
.score-row--compact .score-number { font-size: 1.5rem; }
.match-metrics--bars { gap: 0.45rem; display: flex; flex-direction: column; }
.metric-bar__head {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    color: var(--muted);
    margin-bottom: 0.15rem;
}
.metric-bar__head strong { color: var(--text); font-size: 0.72rem; }
.metric-bar__track {
    height: 4px;
    background: #eef0f6;
    border-radius: 50px;
    overflow: hidden;
}
.metric-bar__fill {
    height: 100%;
    background: var(--primary);
    border-radius: 50px;
    transition: width 0.6s ease;
}
.metric-bar__fill--condition { background: #8b5cf6; }
.metric-bar__fill--ingredient { background: #06b6d4; }
.product-details-collapse {
    border: 1px solid #f0f0f5;
    border-radius: 10px;
    overflow: hidden;
}
.product-details-collapse summary {
    padding: 0.45rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: #fafbfe;
}
.product-details-collapse summary::-webkit-details-marker { display: none; }
.product-details-collapse__body { padding: 0.55rem 0.65rem 0.65rem; }
.chip-group--compact { margin-bottom: 0.45rem; }
.chip-group--compact:last-child { margin-bottom: 0; }
.recommendation-reason {
    padding: 0.55rem 0.65rem;
    background: linear-gradient(135deg, #faf8ff, #f5f3ff);
    border-radius: 10px;
    border-left: 3px solid var(--primary);
}
.recommendation-reason .reason-text {
    font-size: 0.78rem;
    line-height: 1.5;
    color: #4b5563;
    margin: 0;
}
.recommendation-reason .reason-text.clamped {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.recommendation-reason .reason-toggle {
    background: none;
    border: none;
    padding: 0;
    margin-top: 0.25rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
}
.product-category-badge {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary);
    background: var(--primary-soft);
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
}
.btn-ranking-modal__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    height: 1.4rem;
    padding: 0 0.35rem;
    border-radius: 50px;
    background: rgba(108, 92, 231, 0.12);
    font-size: 0.72rem;
    font-weight: 700;
    margin-left: 0.25rem;
}
.btn-action-warning {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fdba74;
    font-weight: 600;
}
.btn-action-warning:hover {
    background: #ffedd5;
    color: #9a3412;
    border-color: #fb923c;
}
.product-brand {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}
.product-title {
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.35;
    margin: 0;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.score-row__top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.35rem;
}
.score-row__label { font-size: 0.75rem; color: var(--muted); font-weight: 600; }
.score-number {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary-dark);
    line-height: 1;
}
.score-progress {
    height: 8px;
    background: #eef0f6;
    border-radius: 50px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}
.score-progress__bar {
    height: 100%;
    width: 0;
    border-radius: 50px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.score-progress__bar.is-animated { width: var(--score-width, 0%); }
.progress-sangat-cocok { background: #16a34a; }
.progress-cocok { background: #2563eb; }
.progress-cukup-cocok { background: #f59e0b; }
.progress-kurang-cocok { background: #f97316; }
.progress-tidak-cocok { background: #dc2626; }
.progress-default { background: #9ca3af; }
.match-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 700;
}
.match-sangat-cocok { background: #dcfce7; color: #15803d; }
.match-cocok { background: #dbeafe; color: #1d4ed8; }
.match-cukup-cocok { background: #fef3c7; color: #b45309; }
.match-kurang-cocok { background: #ffedd5; color: #c2410c; }
.match-tidak-cocok { background: #fee2e2; color: #b91c1c; }
.match-default { background: #f3f4f6; color: #4b5563; }
.match-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.35rem;
}
.match-metric {
    justify-content: center;
    background: #f8f9fc;
    color: var(--muted);
    font-size: 0.68rem;
    padding: 0.35rem 0.25rem;
    text-align: center;
}
.match-metric strong { color: var(--text); display: block; font-size: 0.78rem; }
.chip-group__label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 0.3rem;
}
.chip-list { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.ingredient-chip {
    padding: 0.18rem 0.5rem;
    border-radius: 50px;
    font-size: 0.68rem;
    font-weight: 600;
    background: #ede9fe;
    color: #5b21b6;
}
.info-chip {
    padding: 0.18rem 0.5rem;
    border-radius: 50px;
    font-size: 0.68rem;
    font-weight: 600;
}
.info-chip-skin { background: #dbeafe; color: #1e40af; }
.info-chip-condition { background: #fce7f3; color: #9d174d; }
.recommendation-reason {
    background: #f8f7ff;
    border: 1px solid #ebe8ff;
    border-radius: 12px;
    padding: 0.75rem 0.85rem;
    margin-top: auto;
}
.recommendation-reason i {
    color: var(--primary);
    margin-right: 0.25rem;
}
.recommendation-reason .reason-text {
    margin: 0.25rem 0 0;
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--text);
}
.recommendation-reason .reason-text.clamped {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.recommendation-reason .reason-text.is-expanded { -webkit-line-clamp: unset; }
.medical-alert {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid var(--warning);
    border-radius: 16px;
    padding: 1rem 1.15rem;
    margin: 1.5rem 0 0;
}
.medical-alert > i { color: #d97706; font-size: 1.25rem; flex-shrink: 0; margin-top: 0.1rem; }
.medical-alert strong { display: block; margin-bottom: 0.25rem; color: #92400e; }
.medical-alert p { margin: 0; font-size: 0.85rem; line-height: 1.55; color: #78350f; }
.action-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.5rem 0 1rem;
}
.btn-action-primary,
.btn-action-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.35rem;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.btn-action-primary {
    background: linear-gradient(135deg, var(--primary), #5a52d5);
    color: #fff;
    border: none;
    box-shadow: 0 8px 22px rgba(108, 92, 231, 0.28);
}
.btn-action-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(108, 92, 231, 0.35); }
.btn-action-secondary {
    background: #fff;
    color: var(--primary);
    border: 1.5px solid var(--border);
}
.btn-action-secondary:hover {
    background: var(--primary-soft);
    border-color: var(--primary);
    color: var(--primary-dark);
    transform: translateY(-2px);
}
.ranking-modal .modal-content { border-radius: 16px; border: none; box-shadow: var(--shadow-lg); }
.ranking-modal-table thead th {
    background: #f8f9fc;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    padding: 0.75rem 1rem;
    white-space: nowrap;
}
.ranking-modal-table tbody td { padding: 0.75rem 1rem; font-size: 0.85rem; vertical-align: middle; }
.ranking-modal-rank { font-weight: 800; color: var(--primary); }

@media (max-width: 991.98px) {
    .result-summary-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .category-header { flex-direction: column; }
    .btn-ranking-modal { width: 100%; justify-content: center; }
}
@media (max-width: 575.98px) {
    .recommendation-page-main { padding: 1.25rem 0 2rem; }
    .result-summary-card { grid-template-columns: 1fr; }
    .category-section { padding: 1rem; border-radius: 16px; }
    .action-bar { flex-direction: column; }
    .btn-action-primary, .btn-action-secondary { width: 100%; }
    .match-metrics { grid-template-columns: 1fr; }
}

/* Legacy result aliases */
.result-page { background: var(--result-bg, #f7f5ff); }

/* Admin */
.admin-layout { min-height: 100vh; }
.sidebar {
    background: linear-gradient(180deg, #4a4571, #2d2a4a);
    min-height: 100vh;
}
.sidebar .nav-link {
    color: rgba(255,255,255,0.75);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    margin: 2px 8px;
}
.sidebar .nav-link:hover, .sidebar .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: white;
}
.sidebar-brand { font-size: 1.1rem; font-weight: bold; }
.stat-card {
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.stat-card .stat-icon {
    width: 48px; height: 48px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
}

@media (max-width: 991.98px) {
    .hero-row {
        min-height: auto;
        padding: 2rem 0;
    }
    .hero-title { max-width: 100%; font-size: 2.5rem; }
    .hero-lead { max-width: 100%; font-size: 1.1rem; }
}

@media (max-width: 768px) {
    .hero-section h1, .hero-title { font-size: 1.75rem; }
    .hero-title { max-width: 100%; }
    .hero-lead { font-size: 1.1rem; max-width: 100%; }
    .stats-bar { flex-direction: column; }
    .stat-divider { width: 60px; height: 1px; }
    .section-padding { padding: 3.5rem 0; }
    .cta-box { padding: 2rem; text-align: center; }
    .ingredient-grid { grid-template-columns: 1fr; }
    .steps-timeline { grid-template-columns: 1fr; }
    .btn-nav-cta { width: 100%; }
    .hero-row {
        min-height: auto;
        padding: 2rem 0;
    }
}

@media print {
    .no-print { display: none !important; }
}

/* Admin sidebar styles: see assets/css/admin.css (loaded on all admin pages) */

/* ===== Shared admin list / data page utilities ===== */
.filter-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.data-card { overflow: hidden; }
.product-table thead th { font-size: 0.72rem; }
.product-table tbody td { font-size: 0.875rem; }
.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.soft-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.6rem;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}
.status-badge.badge-status-active { background: #d1fae5; color: #047857; }
.status-badge.badge-status-inactive { background: #f1f5f9; color: #64748b; }

/* ===== User (Pengguna) area ===== */
.user-page { background: var(--bg-soft); }
.user-main { min-height: 60vh; }
.user-page-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.user-page-intro { max-width: 640px; margin-left: auto; margin-right: auto; }
.edu-card { border-radius: var(--radius-md); }
.edu-list { padding-left: 1.1rem; }
.edu-list li { margin-bottom: 0.5rem; }
.ingredient-edu-item {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.85rem 1rem;
}
.ingredient-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}
.skin-option input:checked + .skin-option-box,
.skin-option-box.is-selected {
    border-color: var(--primary);
    background: var(--primary-soft);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.12);
}
.skin-option-check .skin-option-box { position: relative; padding-right: 2.25rem; padding-top: 0.25rem; }
.skin-option-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.65rem;
    background: rgba(108, 92, 231, 0.1);
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    transition: background 0.2s ease, color 0.2s ease;
}
.skin-option input:checked + .skin-option-box .skin-option-icon,
.skin-option-box.is-selected .skin-option-icon {
    background: var(--primary);
    color: #fff;
}
.skin-option-checkmark {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: transparent;
    transition: all 0.2s ease;
}
.skin-option-check input:checked + .skin-option-box .skin-option-checkmark,
.skin-option-box.is-selected .skin-option-checkmark {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}
#skinTypeFeedback,
#skinConditionFeedback { display: none; }
#skinTypeFieldset.is-invalid #skinTypeFeedback,
#skinConditionFieldset.is-invalid #skinConditionFeedback { display: block; }
.profile-summary .profile-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    font-weight: 600;
}
.profile-summary .profile-value {
    font-weight: 700;
    color: var(--text-dark);
}
.disclaimer-inline { line-height: 1.55; }
.result-category-section { scroll-margin-top: 80px; }

/* ===== Print report (user) ===== */
.print-report-body {
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    background: #f0f2f8;
    color: var(--text-dark);
}
.print-toolbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
}
.print-report {
    max-width: 900px;
    margin: 1.5rem auto 2rem;
    background: #fff;
    padding: 2.5rem 2.75rem;
    box-shadow: var(--shadow-sm);
    border-radius: 4px;
}
.print-report-institution {
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 700;
}
.print-report-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0.35rem 0;
    line-height: 1.4;
}
.print-report-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.print-report-header {
    border-bottom: 2px solid var(--primary);
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
}
.print-meta-table th {
    width: 18%;
    background: #f8f9fc;
    font-size: 0.8rem;
}
.print-report-method {
    background: #f8f9fc;
    border-left: 3px solid var(--primary);
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.55;
}
.print-category-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 1.25rem 0 0.65rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border);
}
.print-result-table { font-size: 0.82rem; }
.print-result-table thead th {
    background: #f1f3f9;
    font-size: 0.75rem;
}
.print-explanation-row td {
    background: #fafbfe;
    font-size: 0.78rem;
    line-height: 1.5;
}
.print-disclaimer {
    margin-top: 1.5rem;
    padding: 0.85rem 1rem;
    background: #fff8e6;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-size: 0.8rem;
    line-height: 1.55;
}
.print-report-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border);
}

@media print {
    .no-print { display: none !important; }
    .print-report-body { background: #fff; }
    .print-report {
        margin: 0;
        box-shadow: none;
        padding: 0;
        max-width: 100%;
    }
    .print-toolbar { display: none !important; }
}

/* Result page — unified action toolbar */
.result-action-toolbar {
    margin-top: 1.5rem;
    padding: 0.85rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(31, 27, 79, 0.06);
}
.result-action-toolbar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1rem;
}
.result-action-toolbar__group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
}
.result-action-toolbar__divider {
    width: 1px;
    height: 2rem;
    background: linear-gradient(180deg, transparent, #e2e8f0, transparent);
    flex-shrink: 0;
}
.result-action-form {
    margin: 0;
    display: flex;
}
.result-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.65rem;
    padding: 0.55rem 1.1rem;
    border-radius: 12px;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.result-action-btn i { font-size: 1rem; flex-shrink: 0; }
.result-action-btn--primary {
    background: linear-gradient(135deg, var(--primary) 0%, #5a52d5 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(108, 92, 231, 0.28);
}
.result-action-btn--primary:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(108, 92, 231, 0.34);
}
.result-action-btn--secondary {
    background: #fff;
    color: var(--primary);
    border-color: #e2e8f0;
}
.result-action-btn--secondary:hover {
    background: var(--primary-soft);
    border-color: #c4b5fd;
    color: var(--primary-dark);
}
.result-action-btn--outline {
    background: #fff;
    color: #9a3412;
    border-color: #fdba74;
}
.result-action-btn--outline:hover {
    background: #fff7ed;
    border-color: #fb923c;
    color: #7c2d12;
}
.ranking-modal__content { border-radius: 16px; border: none; overflow: hidden; }
.ranking-modal .modal-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
@media (max-width: 767px) {
    .result-summary-card { grid-template-columns: repeat(2, 1fr); }
    .category-header { flex-direction: column; }
    .btn-ranking-modal { width: 100%; justify-content: center; }
    .result-action-toolbar { padding: 0.75rem; border-radius: 16px; }
    .result-action-toolbar__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
    }
    .result-action-toolbar__divider { display: none; }
    .result-action-toolbar__group,
    .result-action-toolbar__group--tools {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
        width: 100%;
    }
    .result-action-btn {
        width: 100%;
        min-height: 2.75rem;
        padding: 0.6rem 0.75rem;
        font-size: 0.8rem;
    }
    .result-action-btn span { overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 380px) {
    .result-action-toolbar__group,
    .result-action-toolbar__group--tools {
        grid-template-columns: 1fr;
    }
}
@media (min-width: 992px) {
    .result-action-toolbar__inner { flex-wrap: nowrap; }
    .result-action-toolbar__group { flex-shrink: 0; }
}

/* ===== Content pages (About, etc.) ===== */
.content-page {
    background: linear-gradient(180deg, #f8f6ff 0%, #faf9fc 50%, #fff 100%);
}
.content-page-main {
    padding: 2rem 0 3rem;
}
.content-page-hero {
    max-width: 720px;
    margin: 0 auto 2.25rem;
}
.content-page-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    background: linear-gradient(135deg, #ede9fe, #ddd6fe);
    color: #5b21b6;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.content-page-title {
    font-size: clamp(1.5rem, 3.5vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 0.65rem;
}
.content-page-lead {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--muted);
    margin: 0;
}
.content-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem 1.6rem;
    box-shadow: 0 8px 28px rgba(31, 27, 79, 0.05);
    margin-bottom: 1.75rem;
    position: relative;
    overflow: hidden;
}
.content-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #a78bfa);
}
.content-panel__icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 1rem;
}
.content-panel__title {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: var(--text);
}
.content-panel__text {
    font-size: 0.92rem;
    line-height: 1.7;
    color: #4b5563;
    margin-bottom: 0.85rem;
}
.content-section { margin-bottom: 1.75rem; }
.content-section__title {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text);
}
.feature-tile {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    height: 100%;
    padding: 1rem 1.05rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.feature-tile:hover {
    border-color: #ddd6fe;
    box-shadow: 0 8px 22px rgba(108, 92, 231, 0.08);
    transform: translateY(-2px);
}
.feature-tile__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.feature-tile__title {
    font-size: 0.88rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--text);
}
.feature-tile__desc {
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--muted);
    margin: 0;
}
.method-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.15rem;
    padding: 1.1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 4px 18px rgba(31, 27, 79, 0.04);
}
.method-flow__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 72px;
    flex: 1;
    padding: 0.35rem 0.25rem;
    position: relative;
}
.method-flow__num {
    position: absolute;
    top: 0;
    right: 0.15rem;
    font-size: 0.62rem;
    font-weight: 800;
    color: #c4b5fd;
}
.method-flow__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-bottom: 0.35rem;
}
.method-flow__label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}
.method-flow__desc {
    font-size: 0.65rem;
    color: var(--muted);
    line-height: 1.3;
    margin-top: 0.1rem;
}
.method-flow__arrow {
    color: #d1d5db;
    font-size: 0.75rem;
    flex-shrink: 0;
    padding: 0 0.1rem;
}
.about-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 96px;
}
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
}
.stat-card {
    text-align: center;
    padding: 1rem 0.5rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(31, 27, 79, 0.04);
}
.stat-card__value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
}
.stat-card__label {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-top: 0.2rem;
}
.scope-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.15rem 1.2rem;
    box-shadow: 0 4px 18px rgba(31, 27, 79, 0.04);
}
.scope-card__title {
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.scope-card__title i { color: var(--primary); }
.scope-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
}
.scope-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.65rem;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
}
.scope-chip--wash { background: #dbeafe; color: #1d4ed8; }
.scope-chip--moist { background: #ede9fe; color: #6d28d9; }
.scope-chip--sun { background: #fef3c7; color: #b45309; }
.scope-card__list {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.8rem;
    line-height: 1.65;
    color: var(--muted);
}
.scope-card__list li { margin-bottom: 0.25rem; }
.about-cta-card {
    background: linear-gradient(145deg, #f5f3ff 0%, #ede9fe 100%);
    border: 1px solid #ddd6fe;
    border-radius: 18px;
    padding: 1.25rem 1.3rem;
    text-align: center;
}
.about-cta-card__title {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    color: var(--text);
}
.about-cta-card__text {
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.55;
    margin-bottom: 1rem;
}
.content-disclaimer {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.9rem 1rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 14px;
    font-size: 0.8rem;
}
.content-disclaimer > i {
    color: #d97706;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}
.content-disclaimer strong {
    display: block;
    color: #92400e;
    margin-bottom: 0.2rem;
    font-size: 0.82rem;
}
.content-disclaimer p {
    margin: 0;
    line-height: 1.55;
    color: #78350f;
    font-size: 0.78rem;
}

@media (max-width: 991.98px) {
    .about-sidebar { position: static; }
    .method-flow__arrow { display: none; }
    .method-flow__step { min-width: calc(33.33% - 0.5rem); }
}
@media (max-width: 575.98px) {
    .content-page-main { padding: 1.25rem 0 2rem; }
    .method-flow__step { min-width: calc(50% - 0.35rem); }
    .stat-card__value { font-size: 1.25rem; }
}
