/* ============================================================
   SISTEM INFORMASI STUNTING & GIZI - Custom Stylesheet
   ============================================================ */

   :root {
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --primary-light: #14b8a6;
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --dark: #134e4a;
    --body-bg: #f0fdf4;
    --card-shadow: 0 4px 24px rgba(13,148,136,0.08);
    --radius: 16px;
}

* { font-family: 'Plus Jakarta Sans', sans-serif; }
body { background: var(--body-bg); color: #1e293b; }

/* === ANIMASI === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(100px); }
    to   { opacity: 1; transform: translateX(0); }
}
.fade-in { animation: fadeIn .5s ease; }

/* === TOMBOL CUSTOM === */
.btn-primary-custom {
    background: var(--primary); color: #fff; border: none;
    font-weight: 600; border-radius: 10px; padding: .5rem 1.25rem;
    transition: all .2s;
}
.btn-primary-custom:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }

.btn-accent-custom {
    background: var(--accent); color: #fff; border: none;
    font-weight: 600; border-radius: 10px; padding: .5rem 1.25rem;
    transition: all .2s;
}
.btn-accent-custom:hover { background: var(--accent-dark); color: #fff; }

.btn-danger-custom {
    background: #ef4444; color: #fff; border: none;
    font-weight: 600; border-radius: 10px; padding: .5rem 1.25rem;
    transition: all .2s;
}
.btn-danger-custom:hover { background: #dc2626; color: #fff; }

/* === BADGE STATUS === */
.badge-gizi-baik   { background: #dcfce7; color: #166534; }
.badge-gizi-kurang  { background: #fef3c7; color: #92400e; }
.badge-gizi-buruk   { background: #fee2e2; color: #991b1b; }
.badge-stunting     { background: #fee2e2; color: #991b1b; }
.badge-normal       { background: #dcfce7; color: #166534; }
.badge-lebih        { background: #fef3c7; color: #92400e; }
.badge-kat-stunting { background: #fee2e2; color: #991b1b; }
.badge-kat-gizi     { background: #dcfce7; color: #166534; }
.badge-kat-umum     { background: #e0e7ff; color: #3730a3; }

/* === FORM === */
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 .15rem rgba(13,148,136,0.15);
}
.table th {
    font-weight: 700; font-size: .8rem;
    text-transform: uppercase; color: #64748b; letter-spacing: .5px;
}

/* === TOAST === */
.toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 9999; }
.custom-toast {
    background: #fff; border-radius: 12px; padding: 1rem 1.5rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12); margin-bottom: .5rem;
    animation: slideIn .3s ease; display: flex; align-items: center; gap: .75rem;
    min-width: 300px; border-left: 4px solid var(--primary);
}
.custom-toast.error { border-left-color: #ef4444; }
.custom-toast i { font-size: 1.2rem; }

/* ============================================================
   LAYOUT PUBLIK
   ============================================================ */
   .pub-nav {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(13,148,136,0.1);
    padding: .75rem 0;
    position: sticky; top: 0; z-index: 1050;
}
.pub-nav .navbar-brand { font-weight: 800; font-size: 1.25rem; color: var(--dark); }
.pub-nav .navbar-brand i { color: var(--primary); margin-right: 6px; }
.pub-nav .nav-link {
    color: #475569; font-weight: 500; padding: .5rem 1rem !important;
    border-radius: 8px; transition: all .2s;
}
.pub-nav .nav-link:hover,
.pub-nav .nav-link.active { color: var(--primary); background: rgba(13,148,136,0.06); }

/* Hero */
.hero {
    background: linear-gradient(135deg, #0f766e 0%, #0d9488 40%, #14b8a6 100%);
    position: relative; overflow: hidden; padding: 5rem 0 4rem;
}
.hero::before {
    content: ''; position: absolute; top: -50%; right: -20%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(245,158,11,0.15) 0%, transparent 70%);
    border-radius: 50%;
}
.hero::after {
    content: ''; position: absolute; bottom: -30%; left: -10%;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}
.hero h1 { font-weight: 800; font-size: 2.75rem; color: #fff; line-height: 1.2; }
.hero p  { color: rgba(255,255,255,0.85); font-size: 1.1rem; max-width: 600px; }
.hero .btn-accent {
    background: var(--accent); color: #fff; font-weight: 700;
    padding: .75rem 2rem; border-radius: 12px; border: none;
    font-size: 1rem; transition: all .25s;
}
.hero .btn-accent:hover {
    background: #d97706; color: #fff; transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245,158,11,0.3);
}
.hero .btn-outline-light { border-radius: 12px; padding: .75rem 2rem; font-weight: 600; }

/* Stat Card */
.stat-card {
    background: #fff; border-radius: var(--radius); padding: 1.5rem;
    box-shadow: var(--card-shadow); border: 1px solid rgba(13,148,136,0.06);
    transition: transform .25s, box-shadow .25s;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(13,148,136,0.12); }
.stat-card .stat-icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
}
.stat-card .stat-value { font-size: 1.75rem; font-weight: 800; color: var(--dark); }
.stat-card .stat-label { color: #64748b; font-size: .85rem; font-weight: 500; }

/* Card Artikel */
.card-article {
    background: #fff; border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--card-shadow); border: 1px solid rgba(13,148,136,0.06);
    transition: transform .25s, box-shadow .25s;
}
.card-article:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(13,148,136,0.14); }
.card-article .card-img-top {
    height: 200px; object-fit: cover;
    background: linear-gradient(135deg, #0d9488, #14b8a6);
}
.card-article .card-body { padding: 1.25rem; }
.card-article .card-title { font-weight: 700; font-size: 1rem; color: var(--dark); line-height: 1.4; }
.card-article .card-title a { color: inherit; text-decoration: none; }
.card-article .card-title a:hover { color: var(--primary); }

/* Section Title */
.section-title     { font-weight: 800; font-size: 1.75rem; color: var(--dark); margin-bottom: .25rem; }
.section-subtitle  { color: #64748b; font-size: .95rem; margin-bottom: 2rem; }

/* Quick Link */
.quick-link {
    background: #fff; border-radius: var(--radius); padding: 1.5rem; text-align: center;
    box-shadow: var(--card-shadow); border: 1px solid rgba(13,148,136,0.06);
    transition: all .25s; text-decoration: none; color: var(--dark);
}
.quick-link:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(13,148,136,0.12); color: var(--primary); }
.quick-link .ql-icon {
    width: 60px; height: 60px; border-radius: 16px; margin: 0 auto .75rem;
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.quick-link h6    { font-weight: 700; margin-bottom: .25rem; }
.quick-link small  { color: #94a3b8; }

/* Page Content */
.page-content-area {
    background: #fff; border-radius: var(--radius); padding: 2rem;
    box-shadow: var(--card-shadow);
}
.page-content-area h2 { color: var(--dark); font-weight: 800; margin-bottom: 1rem; }
.page-content-area h3 { color: var(--primary-dark); font-weight: 700; margin: 1.5rem 0 .75rem; }
.page-content-area ul, .page-content-area ol { padding-left: 1.25rem; }
.page-content-area li { margin-bottom: .5rem; }
.page-content-area table { margin: 1rem 0; }

/* Kalkulator */
.calc-section {
    background: #fff; border-radius: var(--radius); padding: 2rem;
    box-shadow: var(--card-shadow); margin-bottom: 1.5rem;
}
.calc-result {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border: 2px solid var(--primary-light); border-radius: 12px; padding: 1.5rem;
    display: none;
}
.calc-result.show { display: block; animation: fadeIn .4s; }
.result-value { font-size: 2rem; font-weight: 800; }
.result-label { color: #64748b; font-size: .85rem; }
.zscore-bar { height: 8px; border-radius: 4px; position: relative; background: #e2e8f0; }
.zscore-bar .fill { height: 100%; border-radius: 4px; transition: width .5s; }

/* Search Box */
.search-box {
    background: #fff; border-radius: 12px; padding: .75rem 1.25rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06); border: 2px solid transparent;
    transition: border-color .2s;
}
.search-box:focus-within { border-color: var(--primary); }
.search-box input { border: none; outline: none; background: transparent; width: 100%; font-size: .95rem; }
.search-box i { color: #94a3b8; }

/* No Data */
.no-data-img { text-align: center; padding: 3rem; color: #94a3b8; }
.no-data-img i { font-size: 3rem; margin-bottom: 1rem; display: block; }

/* Footer */
.footer {
    background: var(--dark); color: rgba(255,255,255,0.7); padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}
.footer h5 { color: #fff; font-weight: 700; margin-bottom: 1rem; }
.footer a  { color: rgba(255,255,255,0.7); text-decoration: none; }
.footer a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 2rem; padding-top: 1rem; font-size: .85rem; }

/* ============================================================
   LAYOUT ADMIN (SB Admin Style)
   ============================================================ */
   .admin-body { background: #f8f9fa; }

   .admin-sidebar {
    width: 250px; min-height: 100vh;
    background: linear-gradient(180deg, #134e4a 0%, #0f766e 100%);
    position: fixed; top: 0; left: 0; z-index: 1040;
    transition: transform .3s; overflow-y: auto;
}
.admin-sidebar .sidebar-brand {
    padding: 1.25rem; color: #fff; font-weight: 800; font-size: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.admin-sidebar .sidebar-brand i { color: var(--accent); }
.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.65); padding: .75rem 1.25rem; font-size: .875rem;
    font-weight: 500; border-left: 3px solid transparent; transition: all .2s;
}
.admin-sidebar .nav-link:hover {
    color: #fff; background: rgba(255,255,255,0.06);
    border-left-color: var(--accent);
}
.admin-sidebar .nav-link.active {
    color: #fff; background: rgba(255,255,255,0.1);
    border-left-color: var(--accent);
}
.admin-sidebar .nav-link i { width: 20px; margin-right: 10px; text-align: center; }

.admin-content { margin-left: 250px; padding: 0; }
.admin-topbar {
    background: #fff; padding: .75rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 1030;
}
.admin-main { padding: 1.5rem; }

.admin-card {
    background: #fff; border-radius: 12px;
    border: 1px solid #e2e8f0; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    margin-bottom: 1.5rem;
}
.admin-card .card-header {
    background: transparent; border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.25rem; font-weight: 700;
}
.admin-card .card-body { padding: 1.25rem; }

.admin-stat {
    background: #fff; border-radius: 12px; padding: 1.25rem;
    border: 1px solid #e2e8f0; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.admin-stat .icon-box {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.admin-stat .value { font-size: 1.5rem; font-weight: 800; color: #0f172a; }
.admin-stat .label { font-size: .8rem; color: #64748b; font-weight: 500; }

.sidebar-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.4);
    z-index: 1035; display: none;
}
.sidebar-overlay.show { display: block; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
   @media (max-width: 991.98px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.show { transform: translateX(0); }
    .admin-content { margin-left: 0; }
    .hero h1 { font-size: 2rem; }
}

@media (max-width: 575.98px) {
    .hero { padding: 3rem 0 2.5rem; }
    .hero h1 { font-size: 1.75rem; }
    .section-title { font-size: 1.35rem; }
    .page-content-area { padding: 1.25rem; }
}

/* ============================================================
   PRINT
   ============================================================ */
   @media print {
    .admin-sidebar, .admin-topbar, .no-print { display: none !important; }
    .admin-content { margin-left: 0 !important; }
    body { background: #fff; }
}