/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', Arial, sans-serif; color: #333; background: #fff; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ===== VARIABLES ===== */
:root {
    --blue:       #2563b0;
    --blue-dark:  #1a3f7c;
    --blue-light: #4a7fd4;
    --gray:       #8a9bbf;
    --gray-light: #f4f6fb;
    --white:      #ffffff;
    --shadow:     0 2px 16px rgba(37,99,176,.13);
}

/* ===== TOPBAR ===== */
.topbar { background: var(--blue); color: #fff; padding: 10px 0; }
.topbar-inner {
    max-width: 1160px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
}
.topbar-left, .topbar-right {
    display: flex; align-items: center; gap: 10px; font-size: 13px;
}
.topbar-left i, .topbar-right i { font-size: 20px; opacity: .85; }
.topbar-label { font-size: 11px; opacity: .8; }
.topbar-center { text-align: center; }
.brand { font-size: 22px; font-weight: 700; color: #fff; }
.brand-normal { font-weight: 400; }
.brand-bold   { font-weight: 900; }

/* ===== NAVBAR ===== */
.navbar { background: #fff; border-bottom: 1px solid #e3eaf5; box-shadow: var(--shadow); position: sticky; top: 0; z-index: 100; }
.navbar-inner {
    max-width: 1160px; margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
}
.nav-links { display: flex; gap: 4px; }
.nav-links a {
    display: block; padding: 16px 18px; font-size: 15px; font-weight: 500;
    color: #444; transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--blue); border-bottom: 3px solid var(--blue); }
.nav-socials { display: flex; gap: 8px; }
.nav-socials a {
    width: 34px; height: 34px; border-radius: 50%; background: var(--blue);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 14px; transition: background .2s;
}
.nav-socials a:hover { background: var(--blue-dark); }

/* ===== HERO ===== */
.hero { position: relative; height: 560px; overflow: hidden; }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(26,63,124,.55) 0%, rgba(37,99,176,.2) 100%);
    display: flex; align-items: center; padding-left: 80px;
}
.hero-text h1 { font-size: 42px; color: #fff; font-weight: 800; line-height: 1.2; max-width: 540px; }
.hero-text p  { font-size: 17px; color: rgba(255,255,255,.88); margin-top: 14px; max-width: 440px; }
.btn-primary {
    display: inline-block; margin-top: 24px; padding: 13px 34px;
    background: var(--blue); color: #fff; border-radius: 6px;
    font-size: 15px; font-weight: 600; transition: background .2s;
}
.btn-primary:hover { background: var(--blue-dark); }

/* ===== SECTION WRAPPER ===== */
.section { padding: 64px 0; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.section-title { font-size: 28px; font-weight: 800; color: var(--blue-dark); margin-bottom: 12px; }
.section-subtitle { color: #666; font-size: 15px; max-width: 560px; line-height: 1.7; }

/* ===== DNA BANNER (blue bg) ===== */
.dna-banner {
    width: 100%; height: 180px; overflow: hidden; position: relative;
    background: linear-gradient(135deg, #0d2e6b 0%, #1a5fa8 60%, #0d2e6b 100%);
}
.dna-banner img { width: 100%; height: 100%; object-fit: cover; opacity: .65; }

/* ===== ABOUT SECTION ===== */
.about-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
}
.about-images { position: relative; }
.img-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border-radius: 8px; overflow: hidden;
}
.img-grid img { width: 100%; height: 200px; object-fit: cover; }
.years-badge {
    position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    background: var(--blue); color: #fff; text-align: center;
    padding: 24px 32px; border-radius: 4px; min-width: 140px;
}
.years-badge i   { font-size: 30px; margin-bottom: 4px; }
.years-badge .num { font-size: 48px; font-weight: 900; line-height: 1; }
.years-badge .lbl { font-size: 13px; opacity: .9; }

/* Stats circles */
.stats-circles { display: flex; flex-wrap: wrap; gap: 0; margin-top: 28px; position: relative; height: 200px; }
.stat-circle {
    position: absolute;
    border-radius: 50%; display: flex; flex-direction: column;
    align-items: center; justify-content: center; color: #fff;
    font-size: 13px; text-align: center;
}
.stat-circle .stat-num { font-size: 26px; font-weight: 800; }
.stat-circle.c1 { width: 140px; height: 140px; background: var(--blue);      top: 0;   left: 0; }
.stat-circle.c2 { width: 140px; height: 140px; background: var(--gray);       top: 0;   left: 140px; }
.stat-circle.c3 { width: 150px; height: 150px; background: var(--blue-dark);  top: 60px; left: 70px; z-index:2; }

/* ===== SERVICES ===== */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 32px; }
.service-card {
    background: var(--gray-light); border-radius: 10px; padding: 28px 24px;
    text-align: center; transition: box-shadow .2s, transform .2s;
}
.service-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.service-card i { font-size: 38px; color: var(--blue); margin-bottom: 14px; }
.service-card h3 { font-size: 17px; font-weight: 700; color: var(--blue-dark); margin-bottom: 8px; }
.service-card p { font-size: 14px; color: #666; line-height: 1.6; }

/* ===== DOCTORS ===== */
.doctors-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; margin-top: 32px; }
.doctor-card { background:#fff; border-radius:10px; box-shadow: var(--shadow); overflow:hidden; text-align:center; }
.doctor-card img { width:100%; height:180px; object-fit:cover; }
.doctor-card .doc-info { padding: 16px; }
.doctor-card h4 { font-size:15px; font-weight:700; color: var(--blue-dark); }
.doctor-card p  { font-size:13px; color:#888; margin-top:4px; }

/* ===== CONTACT ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; margin-top: 16px; }
.contact-info h2 { font-size: 28px; font-weight: 800; color: var(--blue); margin-bottom: 20px; }
.contact-info p { font-size: 15px; color: #444; margin-bottom: 12px; line-height: 1.6; }
.contact-info .contact-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: #444; }
.contact-info .contact-row i { color: var(--blue); width: 20px; }
.contact-socials { display: flex; gap: 10px; margin-top: 16px; }
.contact-socials a {
    width: 40px; height: 40px; border-radius: 50%; background: var(--blue);
    color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.contact-socials a:hover { background: var(--blue-dark); }
.map-wrap { border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.map-wrap iframe { width: 100%; height: 360px; border: none; display: block; }

/* ===== FORM ===== */
.form-section { max-width: 760px; margin: 0 auto; }
.form-section h2 { font-size: 24px; font-weight: 800; color: var(--blue-dark); margin-bottom: 24px; }
.form-table { width: 100%; border-collapse: collapse; }
.form-table td { padding: 8px 12px; vertical-align: middle; font-size: 14px; }
.form-table td:first-child { width: 150px; color: var(--blue); font-weight: 600; }
.form-table input[type="text"],
.form-table input[type="email"],
.form-table input[type="password"],
.form-table input[type="tel"],
.form-table textarea {
    width: 100%; padding: 9px 12px; border: 1px solid #cdd6e8;
    border-radius: 5px; font-size: 14px; outline: none; transition: border .2s;
}
.form-table input:focus, .form-table textarea:focus { border-color: var(--blue); }
.form-table .radio-group { display: flex; gap: 20px; }
.form-table .radio-group label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.btn-save {
    background: #e53935; color: #fff; border: none; padding: 10px 26px;
    border-radius: 5px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .2s;
}
.btn-save:hover { background: #c62828; }
.btn-cancel {
    background: #607d8b; color: #fff; border: none; padding: 10px 22px;
    border-radius: 5px; font-size: 14px; cursor: pointer; margin-left: 8px; transition: background .2s;
}
.btn-cancel:hover { background: #455a64; }

/* ===== LOGIN ===== */
.login-box {
    max-width: 440px; margin: 60px auto; background: #fff;
    border-radius: 12px; box-shadow: var(--shadow); overflow: hidden;
}
.login-header { background: var(--blue); color: #fff; padding: 28px 32px; }
.login-header h2 { font-size: 22px; font-weight: 800; }
.login-header p  { font-size: 13px; opacity: .85; margin-top: 4px; }
.login-body { padding: 32px; }
.login-body label { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 6px; }
.login-body input {
    width: 100%; padding: 10px 14px; border: 1px solid #cdd6e8;
    border-radius: 6px; font-size: 14px; margin-bottom: 18px; outline: none;
}
.login-body input:focus { border-color: var(--blue); }
.login-body .tabs { display: flex; gap: 0; margin-bottom: 24px; border-bottom: 2px solid #e3eaf5; }
.login-body .tab-btn {
    flex: 1; padding: 10px; background: none; border: none;
    font-size: 14px; font-weight: 600; color: #888; cursor: pointer;
    border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.login-body .tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); }
.btn-login {
    width: 100%; padding: 12px; background: var(--blue); color: #fff;
    border: none; border-radius: 6px; font-size: 15px; font-weight: 700;
    cursor: pointer; transition: background .2s;
}
.btn-login:hover { background: var(--blue-dark); }

/* ===== FAQ ===== */
.faq-list { margin-top: 24px; }
.faq-item { border: 1px solid #e3eaf5; border-radius: 8px; margin-bottom: 12px; overflow: hidden; }
.faq-question {
    width: 100%; padding: 16px 20px; background: var(--gray-light);
    border: none; text-align: left; font-size: 15px; font-weight: 600;
    color: var(--blue-dark); cursor: pointer; display: flex;
    justify-content: space-between; align-items: center;
}
.faq-question:hover { background: #e3eaf5; }
.faq-question i { transition: transform .3s; }
.faq-question.open i { transform: rotate(180deg); }
.faq-answer { display: none; padding: 16px 20px; font-size: 14px; color: #555; line-height: 1.7; background: #fff; }
.faq-answer.show { display: block; }

/* ===== ALERT ===== */
.alert {
    padding: 12px 18px; border-radius: 6px; font-size: 14px; margin-bottom: 16px;
}
.alert-success { background: #e8f5e9; color: #2e7d32; border-left: 4px solid #43a047; }
.alert-danger  { background: #fdecea; color: #c62828; border-left: 4px solid #e53935; }

/* ===== ADMIN ===== */
.admin-wrap { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 240px; background: var(--blue-dark); color: #fff;
    padding: 0; flex-shrink: 0;
}
.admin-sidebar .sidebar-logo {
    padding: 22px 20px; font-size: 16px; font-weight: 800;
    border-bottom: 1px solid rgba(255,255,255,.15);
}
.admin-sidebar ul { padding: 12px 0; }
.admin-sidebar ul li a {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 22px; font-size: 14px; color: rgba(255,255,255,.8); transition: background .2s;
}
.admin-sidebar ul li a:hover,
.admin-sidebar ul li a.active { background: rgba(255,255,255,.12); color: #fff; }
.admin-sidebar ul li a i { width: 18px; }
.admin-main { flex: 1; background: #f4f6fb; }
.admin-topbar {
    background: #fff; padding: 16px 28px;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid #e3eaf5; font-size: 14px;
}
.admin-topbar .page-title { font-size: 18px; font-weight: 700; color: var(--blue-dark); }
.admin-content { padding: 28px; }
.admin-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-bottom: 28px; }
.stat-card {
    background: #fff; border-radius: 10px; padding: 24px; box-shadow: var(--shadow);
    display: flex; align-items: center; gap: 18px;
}
.stat-card .icon {
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--blue); display: flex; align-items: center;
    justify-content: center; font-size: 24px; color: #fff; flex-shrink: 0;
}
.stat-card .info h3 { font-size: 26px; font-weight: 800; color: var(--blue-dark); }
.stat-card .info p  { font-size: 13px; color: #888; margin-top: 2px; }
.data-table { width: 100%; background: #fff; border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; }
.data-table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { background: var(--blue); color: #fff; padding: 13px 16px; text-align: left; font-weight: 600; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid #f0f4fb; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f7f9fd; }
.table-header { display:flex; justify-content:space-between; align-items:center; padding:20px; }
.table-header h3 { font-size:16px; font-weight:700; color:var(--blue-dark); }
.badge { display:inline-block; padding:3px 10px; border-radius:12px; font-size:12px; font-weight:600; }
.badge-admin    { background:#e3f0ff; color:var(--blue); }
.badge-pegawai  { background:#fff8e1; color:#f57c00; }
.badge-laki     { background:#e8f5e9; color:#2e7d32; }
.badge-perempuan{ background:#fce4ec; color:#c2185b; }
.btn-action {
    padding: 5px 12px; border: none; border-radius: 4px;
    font-size: 12px; font-weight: 600; cursor: pointer; margin-right: 4px;
}
.btn-edit   { background:#fff8e1; color:#f57c00; }
.btn-delete { background:#fdecea; color:#c62828; }
.btn-add {
    background: var(--blue); color:#fff; border:none; padding:9px 20px;
    border-radius:6px; font-size:14px; font-weight:600; cursor:pointer;
}
.btn-add:hover { background: var(--blue-dark); }
.modal-overlay {
    display:none; position:fixed; inset:0; background:rgba(0,0,0,.4);
    z-index:999; align-items:center; justify-content:center;
}
.modal-overlay.open { display:flex; }
.modal-box { background:#fff; border-radius:12px; padding:32px; width:480px; max-width:96vw; box-shadow:0 8px 40px rgba(0,0,0,.18); }
.modal-box h3 { font-size:18px; font-weight:700; color:var(--blue-dark); margin-bottom:20px; }
.modal-box .form-group { margin-bottom:14px; }
.modal-box label { font-size:13px; font-weight:600; color:#555; display:block; margin-bottom:5px; }
.modal-box input, .modal-box select, .modal-box textarea {
    width:100%; padding:9px 12px; border:1px solid #cdd6e8;
    border-radius:5px; font-size:14px; outline:none;
}
.modal-box input:focus, .modal-box select:focus { border-color:var(--blue); }
.modal-footer { display:flex; gap:10px; margin-top:20px; justify-content:flex-end; }
.btn-secondary { background:#e0e0e0; color:#333; border:none; padding:9px 20px; border-radius:6px; cursor:pointer; }

/* ===== FOOTER ===== */
.footer { background: var(--blue-dark); color: rgba(255,255,255,.7); text-align: center; padding: 18px; font-size: 13px; }
.scroll-top {
    position: fixed; bottom: 24px; right: 24px; width: 40px; height: 40px;
    background: var(--blue); color: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; box-shadow: var(--shadow); opacity: 0; transition: opacity .3s;
    z-index: 200;
}
.scroll-top.visible { opacity: 1; }

/* ===== ICD-10 SEARCH PAGE ===== */
.icd-search-hero {
    background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 100%);
    padding: 48px 0 36px;
    text-align: center;
    color: #fff;
}
.icd-search-hero h1 { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.icd-search-hero p  { font-size: 15px; opacity: .85; margin-bottom: 24px; }
.icd-search-box {
    display: flex; gap: 0; max-width: 680px; margin: 0 auto;
    box-shadow: 0 4px 24px rgba(0,0,0,.18); border-radius: 8px; overflow: hidden;
}
.icd-search-box input {
    flex: 1; padding: 14px 20px; font-size: 15px;
    border: none; outline: none;
}
.icd-search-box select {
    padding: 14px 12px; font-size: 14px; border: none;
    border-left: 1px solid #e0e0e0; outline: none; background: #f9f9f9;
    color: #555; cursor: pointer;
}
.icd-search-box button {
    padding: 14px 24px; background: var(--blue-dark); color: #fff;
    border: none; font-size: 15px; font-weight: 700; cursor: pointer;
    transition: background .2s;
}
.icd-search-box button:hover { background: #0d1f45; }
.icd-search-tags { margin-top: 14px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.icd-tag {
    background: rgba(255,255,255,.18); color: #fff; padding: 5px 14px;
    border-radius: 20px; font-size: 12px; cursor: pointer; transition: background .2s;
    border: 1px solid rgba(255,255,255,.3);
}
.icd-tag:hover { background: rgba(255,255,255,.3); }

/* Filter chapter pills */
.chapter-filter { padding: 20px 0 0; }
.chapter-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chapter-pill {
    padding: 6px 16px; border-radius: 20px; font-size: 13px;
    background: #f0f4fb; color: #555; cursor: pointer;
    border: 1px solid #d0d9ec; transition: all .2s; font-weight: 500;
}
.chapter-pill:hover, .chapter-pill.active {
    background: var(--blue); color: #fff; border-color: var(--blue);
}

/* Result count */
.result-info {
    display: flex; align-items: center; justify-content: space-between;
    margin: 20px 0 12px; font-size: 14px; color: #666;
}
.result-info strong { color: var(--blue-dark); }

/* ICD Card – tampilan seperti buku saku */
.icd-card {
    background: #fff; border-radius: 10px;
    box-shadow: 0 2px 14px rgba(37,99,176,.09);
    margin-bottom: 20px; overflow: hidden;
    border: 1px solid #e8eef8;
    transition: box-shadow .2s, transform .2s;
}
.icd-card:hover { box-shadow: 0 6px 24px rgba(37,99,176,.16); transform: translateY(-2px); }

.icd-card-header {
    background: linear-gradient(90deg, #f0f5ff 0%, #e8f0fe 100%);
    padding: 16px 20px 12px;
    border-bottom: 2px solid var(--blue);
    display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.icd-card-header-left { flex: 1; }
.icd-card-title {
    font-size: 18px; font-weight: 800; color: var(--blue-dark);
    margin-bottom: 4px;
}
.icd-card-chapter {
    font-size: 12px; color: var(--blue); font-weight: 600;
    display: flex; align-items: center; gap: 6px;
}
.icd-card-chapter span {
    background: var(--blue); color: #fff;
    padding: 2px 8px; border-radius: 4px; font-size: 11px;
}
.icd-severity {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 700;
    flex-shrink: 0; white-space: nowrap;
}
.severity-1 { background: #e8f5e9; color: #2e7d32; }
.severity-2 { background: #fff8e1; color: #e65100; }
.severity-3 { background: #fdecea; color: #b71c1c; }

.icd-card-body { padding: 16px 20px; }
.icd-row {
    display: grid; grid-template-columns: 140px 1fr;
    gap: 4px 16px; margin-bottom: 10px; font-size: 14px;
}
.icd-row:last-child { margin-bottom: 0; }
.icd-label { font-weight: 700; color: var(--blue); font-size: 13px; padding-top: 1px; }
.icd-value { color: #333; line-height: 1.6; }
.icd-code-badge {
    display: inline-block; background: var(--blue); color: #fff;
    padding: 2px 10px; border-radius: 4px; font-size: 13px;
    font-weight: 700; font-family: monospace; letter-spacing: .5px;
    margin-right: 4px; margin-bottom: 3px;
}
.icd-code-extra {
    display: inline-block; background: #e8eef8; color: var(--blue-dark);
    padding: 2px 10px; border-radius: 4px; font-size: 12px;
    font-weight: 600; font-family: monospace; margin-right: 4px; margin-bottom: 3px;
}

/* Accordion detail */
.icd-detail-toggle {
    width: 100%; background: #f7f9fd; border: none; border-top: 1px solid #e8eef8;
    padding: 10px 20px; text-align: left; font-size: 13px; font-weight: 600;
    color: var(--blue); cursor: pointer; display: flex;
    justify-content: space-between; align-items: center;
    transition: background .2s;
}
.icd-detail-toggle:hover { background: #edf2ff; }
.icd-detail-toggle i { transition: transform .3s; }
.icd-detail-toggle.open i { transform: rotate(180deg); }
.icd-detail-body {
    display: none; padding: 16px 20px; background: #fafbff;
    border-top: 1px solid #e8eef8;
}
.icd-detail-body.show { display: block; }
.icd-detail-section { margin-bottom: 14px; }
.icd-detail-section:last-child { margin-bottom: 0; }
.icd-detail-section h4 {
    font-size: 13px; font-weight: 700; color: var(--blue-dark);
    margin-bottom: 6px; display: flex; align-items: center; gap: 6px;
}
.icd-detail-section h4 i { color: var(--blue); }
.icd-detail-section p, .icd-detail-section pre {
    font-size: 13px; color: #444; line-height: 1.75;
    white-space: pre-line; font-family: inherit; margin: 0;
}

/* Empty state */
.icd-empty {
    text-align: center; padding: 64px 24px; color: #888;
}
.icd-empty i { font-size: 56px; color: #c5d5f0; margin-bottom: 16px; }
.icd-empty h3 { font-size: 18px; color: #999; margin-bottom: 8px; }
.icd-empty p  { font-size: 14px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .about-grid, .contact-grid { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: repeat(2,1fr); }
    .doctors-grid  { grid-template-columns: repeat(2,1fr); }
    .hero-overlay  { padding-left: 30px; }
    .hero-text h1  { font-size: 28px; }
    .admin-cards   { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .topbar-center { display:none; }
    .services-grid, .doctors-grid { grid-template-columns: 1fr; }
    .admin-wrap { flex-direction: column; }
    .admin-sidebar { width: 100%; }
    .admin-cards { grid-template-columns: 1fr; }
}
