/* Portal Penmad - Main Stylesheet */
:root {
    --primary: #1a7f4e;
    --primary-dark: #145f3a;
    --primary-light: #e8f5ee;
    --accent: #c9a227;
    --text: #1f2a26;
    --text-muted: #6b7c74;
    --border: #e4eee8;
    --bg: #f3f7f4;
    --shadow: 0 12px 32px rgba(20, 60, 40, 0.07);
}

* { box-sizing: border-box; }

body.portal-penmad {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--bg);
}
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    line-height: 1.6;
}

.text-primary { color: var(--primary) !important; }
.btn { border-radius: 0.8rem; font-weight: 600; }
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: 0;
    box-shadow: 0 8px 18px rgba(26, 127, 78, 0.18);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #187448, #114f31);
    border: 0;
}
.btn-outline-primary {
    color: var(--primary-dark);
    border-color: #b7d8c6;
}
.btn-outline-primary:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-color: var(--primary);
}
.btn-light { border-radius: 0.8rem; font-weight: 600; }
.bg-light { background-color: #eef4f0 !important; }

/* Top bar */
.top-bar {
    background: linear-gradient(90deg, #0f4a2e, var(--primary-dark));
    color: #fff;
    padding: 0.45rem 0;
    font-size: 0.82rem;
}
.top-bar-text { opacity: 0.92; }
.logo-sm { height: 22px; }
.top-bar .btn-outline-light {
    border-color: rgba(255,255,255,0.35);
    border-radius: 999px;
}
.top-bar .btn-light {
    border-radius: 999px;
    color: var(--primary-dark) !important;
}

/* Navbar */
.portal-navbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(20, 60, 40, 0.04);
}
.portal-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: var(--primary-dark) !important;
}
.portal-brand strong,
.portal-brand small { display: block; line-height: 1.2; }
.portal-brand strong { font-weight: 800; }
.portal-brand small { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; }
.portal-brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 0.9rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 8px 18px rgba(26, 127, 78, 0.22);
}
.portal-navbar .nav-link {
    font-weight: 600;
    color: #3f4a45;
    padding: 0.55rem 0.85rem;
    border-radius: 0.7rem;
}
.portal-navbar .nav-link:hover,
.portal-navbar .nav-link.active {
    color: var(--primary-dark) !important;
    background: var(--primary-light);
}
.portal-navbar .dropdown-menu {
    border: 0;
    border-radius: 0.9rem;
    box-shadow: var(--shadow);
    padding: 0.4rem;
}
.portal-navbar .dropdown-item {
    border-radius: 0.6rem;
    font-weight: 500;
}
.portal-navbar .dropdown-item:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}
.navbar-brand { color: var(--primary) !important; }
.nav-link.active { color: var(--primary) !important; font-weight: 600; }

/* Hero */
.hero-section {
    background:
        radial-gradient(circle at top right, rgba(201, 162, 39, 0.28), transparent 42%),
        linear-gradient(135deg, #145f3a 0%, #1a7f4e 55%, #0f4a2e 100%);
    color: #fff;
    padding: 4.5rem 0 5rem;
}
.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.16);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}
.hero-subtitle {
    font-size: 1.15rem;
    font-weight: 700;
    opacity: 0.92;
    letter-spacing: 0.12em;
    margin-bottom: 1rem;
}
.hero-desc {
    font-size: 1.05rem;
    opacity: 0.88;
    max-width: 560px;
    margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 0.85rem; flex-wrap: wrap; }
.hero-visual {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 1.5rem;
    padding: 3rem 2rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}
.hero-visual i { font-size: 5rem; opacity: 0.9; }
.hero-visual p { margin-top: 1rem; font-weight: 700; }

/* Sections */
.section-padding { padding: 4rem 0; }
.section-label {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0;
    letter-spacing: -0.02em;
    color: var(--primary-dark);
}

/* Service cards */
.service-card {
    background: #fff;
    border-radius: 1.15rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(20, 60, 40, 0.1);
}
.service-card-header h3 { font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.service-card-header p { font-size: 0.9rem; color: var(--text-muted); }
.service-list { list-style: none; padding: 0; margin: 1rem 0; }
.service-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
}
.service-list li i { color: var(--primary); margin-right: 0.5rem; }
.service-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
}
.service-link:hover { color: var(--primary-dark); }

/* Quick links */
.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}
.quick-link-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 1rem;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow);
    transition: all 0.2s;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
}
.quick-link-item i { font-size: 1.5rem; color: var(--primary); }
.quick-link-item:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    transform: translateY(-2px);
}

/* News */
.news-badge, .news-badge-sm {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}
.news-featured {
    background: #fff;
    border-radius: 1.15rem;
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    height: 100%;
}
.news-featured h3 { font-size: 1.25rem; font-weight: 700; }
.news-featured h3 a { color: var(--text); text-decoration: none; }
.news-featured h3 a:hover { color: var(--primary); }
.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.read-more { color: var(--primary); font-weight: 600; text-decoration: none; }
.news-list { display: flex; flex-direction: column; gap: 1rem; }
.news-item {
    background: #fff;
    border-radius: 0.9rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}
.news-item h4 { font-size: 0.95rem; font-weight: 600; margin: 0.25rem 0; }
.news-item h4 a { color: var(--text); text-decoration: none; }
.news-item h4 a:hover { color: var(--primary); }
.news-date { font-size: 0.8rem; color: var(--text-muted); }
.news-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 1.1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    height: 100%;
}
.news-card h2 a { color: var(--text); text-decoration: none; }
.news-card h2 a:hover { color: var(--primary); }

/* Page header */
.page-header {
    background:
        radial-gradient(circle at top right, rgba(201, 162, 39, 0.12), transparent 40%),
        linear-gradient(180deg, #e8f5ee 0%, #f3f7f4 100%);
    padding: 2.75rem 0 2.5rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}
.page-header h1 { font-weight: 700; color: var(--primary-dark); margin-bottom: 0.5rem; }
.page-header p,
.page-header .text-muted {
    color: #3f4a45 !important;
}
.page-header .breadcrumb-item,
.page-header .breadcrumb-item.active {
    color: #3f4a45;
}

/* Article */
.article-content { font-size: 1.05rem; line-height: 1.8; }
.article-content h2, .article-content h3 { margin-top: 1.5rem; color: var(--primary-dark); }
.article-meta { display: flex; gap: 1.5rem; flex-wrap: wrap; font-size: 0.9rem; color: var(--text-muted); margin-top: 0.5rem; }

/* Layanan page */
.layanan-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    height: 100%;
}
.layanan-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.layanan-icon i { font-size: 1.25rem; color: var(--primary); }
.layanan-item h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; }
.layanan-item p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; }

/* Stats */
.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 1.1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.18s;
}
a:hover .stat-card {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(26, 127, 78, 0.12);
}
.stat-icon { font-size: 2rem; color: var(--primary); }
.stat-count { font-size: 2rem; font-weight: 700; color: var(--primary); margin: 0.5rem 0 0; }
.stat-label { color: var(--text-muted); margin: 0; }

/* Madrasah pages */
.madrasah-level-icon {
    width: 64px;
    height: 64px;
    background: var(--primary);
    color: #fff;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
}
.madrasah-tabs .nav-link {
    color: var(--text);
    font-weight: 600;
    padding: 0.5rem 1.25rem;
}
.madrasah-tabs .nav-link.active {
    background-color: var(--primary);
}
.madrasah-content-card,
.madrasah-sidebar-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 1.1rem;
    box-shadow: var(--shadow);
    padding: 1.5rem;
}
.madrasah-content-card h2 { font-size: 1.35rem; font-weight: 700; color: var(--primary-dark); }
.madrasah-list { list-style: none; padding: 0; }
.madrasah-list li {
    padding: 0.4rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.95rem;
}
.madrasah-list li i { color: var(--primary); margin-right: 0.5rem; font-size: 0.85rem; }
.madrasah-sidebar-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 1rem; }
.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}
.stat-row .stat-value { font-weight: 700; color: var(--primary); }

/* Madrasah statistics */
.madrasah-stat-card {
    background: #f0f7f3;
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
}
.madrasah-stat-num {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.2;
}
.madrasah-stat-label {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}
.madrasah-stats-table {
    font-size: 0.875rem;
    margin-bottom: 0;
}
.madrasah-stats-table td:last-child,
.madrasah-stats-table th:last-child {
    width: 120px;
}
.page-header .breadcrumb { margin-bottom: 0; }
.page-header .breadcrumb a { color: var(--primary-dark); text-decoration: none; font-weight: 600; }

.madrasah-hero {
    background:
        radial-gradient(circle at top right, rgba(201, 162, 39, 0.22), transparent 42%),
        linear-gradient(135deg, #145f3a 0%, #1a7f4e 55%, #0f4a2e 100%);
    padding: 1.75rem 0 2.25rem;
    color: #fff;
}
.madrasah-hero-breadcrumb {
    margin-bottom: 0;
}
.madrasah-hero-breadcrumb a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 600;
}
.madrasah-hero-breadcrumb .breadcrumb-item,
.madrasah-hero-breadcrumb .breadcrumb-item.active,
.madrasah-hero-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.78);
}
.madrasah-hero-card {
    background: #fff;
    color: var(--text);
    border-radius: 1rem;
    box-shadow: 0 16px 40px rgba(10, 40, 24, 0.22);
    overflow: hidden;
}
.madrasah-hero-main {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem 1.5rem 1.25rem;
}
.madrasah-hero-logo {
    width: 92px;
    height: 92px;
    max-width: 92px;
    max-height: 92px;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #f8faf9;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.madrasah-hero-logo img {
    width: 100%;
    height: 100%;
    max-width: 92px;
    max-height: 92px;
    object-fit: contain;
}
.madrasah-hero-logo-empty {
    background: var(--primary-light);
    color: var(--primary);
    font-size: 2rem;
}
.madrasah-hero-kicker {
    font-size: 0.9rem;
    font-weight: 600;
    color: #3f4a45;
    margin: 0;
}
.madrasah-hero-title {
    font-size: clamp(1.35rem, 2.6vw, 1.85rem);
    font-weight: 800;
    color: var(--primary-dark);
    margin: 0;
    line-height: 1.25;
}
.madrasah-hero-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid #e6eee9;
    background: #f8faf9;
}
.madrasah-hero-fact {
    padding: 0.9rem 1.25rem;
    min-width: 0;
}
.madrasah-hero-fact + .madrasah-hero-fact {
    border-left: 1px solid #e6eee9;
}
.madrasah-hero-fact span {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7c74;
    margin-bottom: 0.2rem;
}
.madrasah-hero-fact strong {
    display: block;
    font-size: 0.95rem;
    color: var(--primary-dark);
    word-break: break-word;
}
@media (max-width: 991.98px) {
    .madrasah-hero-facts {
        grid-template-columns: 1fr 1fr;
    }
    .madrasah-hero-fact:nth-child(odd) {
        border-left: 0;
    }
    .madrasah-hero-fact:nth-child(n + 3) {
        border-top: 1px solid #e6eee9;
    }
}
@media (max-width: 575.98px) {
    .madrasah-hero-main {
        align-items: flex-start;
        padding: 1.15rem;
    }
    .madrasah-hero-logo {
        width: 72px;
        height: 72px;
        max-width: 72px;
        max-height: 72px;
    }
    .madrasah-hero-facts {
        grid-template-columns: 1fr;
    }
    .madrasah-hero-fact + .madrasah-hero-fact,
    .madrasah-hero-fact:nth-child(n + 3) {
        border-left: 0;
        border-top: 1px solid #e6eee9;
    }
}

/* Madrasah table */
.madrasah-table-section { margin-top: 0.5rem; }
.madrasah-table-tools input,
.madrasah-table-tools select { min-width: 160px; }
.madrasah-table {
    font-size: 0.875rem;
    margin-bottom: 0;
}
.madrasah-table thead th {
    background: #f0f7f3;
    color: var(--primary-dark);
    font-weight: 600;
    border-bottom: 2px solid var(--primary);
    white-space: nowrap;
}
.madrasah-table tbody tr:hover { background: #f8faf9; }
.madrasah-table .npsn-code {
    font-size: 0.8rem;
    color: #555;
    background: #f5f5f5;
    padding: 0.15rem 0.35rem;
    border-radius: 0.25rem;
}
.madrasah-name-link {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 600;
}
.madrasah-name-link:hover { text-decoration: underline; color: var(--primary); }
.madrasah-profile-logo {
    width: 80px;
    height: 80px;
    max-width: 80px;
    max-height: 80px;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 2px solid var(--border);
    flex-shrink: 0;
    background: #fff;
}
.madrasah-profile-logo img {
    width: 100%;
    height: 100%;
    max-width: 80px;
    max-height: 80px;
    object-fit: contain;
}
.kamad-frame {
    width: 160px !important;
    height: 200px !important;
    max-width: 160px !important;
    max-height: 200px !important;
    box-sizing: border-box !important;
    padding: 8px;
    overflow: hidden !important;
    background: linear-gradient(145deg, #f3e2a0 0%, #c9a227 38%, #f8edc4 52%, #a67c00 100%);
    border: 2px solid #145f3a;
    border-radius: 4px;
    box-shadow: 0 2px 0 #145f3a, 0 8px 18px rgba(20, 95, 58, 0.16);
    flex-shrink: 0 !important;
}
.kamad-frame-inner {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
    background: #e8f5ee;
    border: 1px solid #145f3a;
}
.kamad-frame img,
.page-header .kamad-frame img,
.madrasah-sidebar-card .kamad-frame img {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    object-position: center top !important;
    display: block !important;
}
.kamad-frame--empty .kamad-frame-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a7f4e;
    font-size: 2.75rem;
}
.madrasah-map-embed {
    width: 100%;
    height: 280px;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #e8f5ee;
}
.madrasah-map-embed .leaflet-container {
    width: 100%;
    height: 100%;
}
.madrasah-doc-item {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: #f8faf9;
    height: 100%;
}
.madrasah-doc-icon {
    width: 44px;
    height: 44px;
    border-radius: 0.5rem;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}
.madrasah-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
}
.madrasah-badge.badge-negeri { background: #dbeafe; color: #1d4ed8; }
.madrasah-badge.badge-swasta { background: #fef3c7; color: #b45309; }
.akred-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.85rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.8rem;
    line-height: 1.3;
    color: #fff !important;
    white-space: nowrap;
}
.akred-badge.akred-a { background: #15803d; }
.akred-badge.akred-b { background: #1d4ed8; }
.akred-badge.akred-c { background: #c2410c; }

/* Data Pendidikan page */
.data-page-header {
    background:
        radial-gradient(circle at top right, rgba(201, 162, 39, 0.12), transparent 40%),
        linear-gradient(180deg, #e8f5ee 0%, #f3f7f4 100%);
    padding: 2.5rem 0 2rem;
    border-bottom: 1px solid var(--border);
}
.data-breadcrumb { font-size: 0.85rem; margin-bottom: 1rem; }
.data-breadcrumb a { color: var(--primary); text-decoration: none; }
.data-page-header h1 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}
.data-page-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 720px;
    margin: 0;
}
.data-page-body { background: transparent; }

.data-summary-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    height: 100%;
    transition: box-shadow 0.2s, transform 0.2s;
}
.data-summary-card:hover {
    box-shadow: 0 8px 24px rgba(26, 127, 78, 0.1);
    transform: translateY(-2px);
}
.data-summary-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}
.data-summary-value {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.2;
}
.data-summary-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.data-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.5rem;
}
.data-panel-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
}
.data-panel-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.data-composition {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}
.data-composition-center {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--primary-light);
    border: 4px solid var(--primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.data-composition-total {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1;
}
.data-composition-total-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.data-composition-list { flex: 1; min-width: 0; }
.data-jenjang-item {
    display: block;
    text-decoration: none;
    color: inherit;
    margin-bottom: 1rem;
    padding: 0.25rem;
    border-radius: 0.375rem;
    transition: background 0.15s;
}
.data-jenjang-item:hover { background: var(--primary-light); }
.data-jenjang-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.5rem;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}
.data-jenjang-code { font-weight: 700; color: var(--primary); }
.data-jenjang-name { color: var(--text-muted); }
.data-jenjang-count { margin-left: auto; font-weight: 600; font-size: 0.85rem; }
.data-jenjang-bar {
    height: 8px;
    background: #eef2f0;
    border-radius: 4px;
    overflow: hidden;
}
.data-jenjang-bar-fill {
    height: 100%;
    border-radius: 4px;
    min-width: 2px;
    transition: width 0.5s ease;
}

.data-status-label { font-weight: 600; font-size: 0.95rem; }
.data-status-label i { color: var(--primary); margin-right: 0.35rem; }
.data-status-value { font-size: 0.85rem; color: var(--text-muted); }
.data-status-bar {
    height: 10px;
    background: #eef2f0;
    border-radius: 5px;
    overflow: hidden;
}
.data-status-bar-negeri {
    height: 100%;
    background: var(--primary);
    border-radius: 5px;
    min-width: 0;
    transition: width 0.5s ease;
}
.data-status-bar-swasta {
    height: 100%;
    background: var(--accent);
    border-radius: 5px;
    min-width: 0;
    transition: width 0.5s ease;
}

.data-ratio-panel { text-align: center; }
.data-ratio-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0.5rem 0;
}
.data-ratio-desc { font-size: 0.9rem; color: var(--text-muted); }

.data-table { margin-bottom: 0; }
.data-table thead th {
    background: var(--primary-light);
    color: var(--primary-dark);
    font-weight: 600;
    border-bottom: 2px solid var(--primary);
    font-size: 0.9rem;
}
.data-table tfoot th {
    background: #f0f7f3;
    font-weight: 700;
    color: var(--primary-dark);
}
.data-table tbody td { vertical-align: middle; }
.data-table-jenjang {
    text-decoration: none;
    color: inherit;
}
.data-table-jenjang:hover strong { color: var(--primary); }

.data-help-panel {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-radius: 0.75rem;
    padding: 2rem;
}
.data-help-panel h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; }
.data-help-panel p { opacity: 0.9; font-size: 0.95rem; }
.data-help-panel .btn-primary {
    background: #fff;
    color: var(--primary);
    border-color: #fff;
}
.data-help-panel .btn-primary:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}
.data-help-panel .btn-outline-primary {
    color: #fff;
    border-color: rgba(255,255,255,0.6);
}
.data-help-panel .btn-outline-primary:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

/* Arsip Digital page */
.arsip-page-header {
    background:
        radial-gradient(circle at top right, rgba(201, 162, 39, 0.12), transparent 40%),
        linear-gradient(180deg, #e8f5ee 0%, #f3f7f4 100%);
    padding: 2.5rem 0 2rem;
    border-bottom: 1px solid var(--border);
}
.arsip-page-header h1 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}
.arsip-page-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 720px;
    margin: 0;
}
.arsip-page-body { background: transparent; }

.arsip-filter-bar {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}
.arsip-select {
    border-color: var(--border);
    font-size: 0.95rem;
}
.arsip-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(26, 127, 78, 0.15);
}

.arsip-results-info {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: #fff;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.arsip-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 1.1rem;
    box-shadow: var(--shadow);
    padding: 1.25rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.arsip-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(26, 127, 78, 0.1);
    transform: translateY(-2px);
}
.arsip-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}
.arsip-file-icon {
    width: 44px;
    height: 44px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}
.arsip-category-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}
.arsip-card-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    color: var(--text);
}
.arsip-card-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    flex-grow: 1;
}
.arsip-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0f0;
}
.arsip-card-meta i { color: var(--primary); margin-right: 0.2rem; }
.arsip-download-btn { width: 100%; }

.arsip-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: #fff;
    border: 1px dashed var(--border);
    border-radius: 0.75rem;
}
.arsip-empty-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}
.arsip-empty-state h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}
.arsip-empty-state p {
    color: var(--text-muted);
    max-width: 420px;
    margin: 0 auto 1.25rem;
}

/* Contact */
.contact-info h3 { color: var(--primary-dark); }
.footer-contact { list-style: none; padding: 0; }
.footer-contact li { padding: 0.4rem 0; }
.footer-contact i { color: var(--primary); margin-right: 0.5rem; }

/* Footer */
.site-footer {
    background: linear-gradient(180deg, #145f3a 0%, #0f4a2e 100%);
    color: rgba(255,255,255,0.82);
    padding: 3.25rem 0 1.5rem;
    margin-top: 0;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1rem;
}
.footer-brand h5 { color: #fff; margin: 0; font-weight: 800; }
.footer-brand p { margin: 0; color: rgba(255,255,255,0.7); font-size: 0.85rem; }
.footer-brand .portal-brand-icon { box-shadow: none; }
.footer-desc { font-size: 0.9rem; line-height: 1.7; }
.footer-heading { color: #fff; font-weight: 700; margin-bottom: 1rem; }
.footer-links { list-style: none; padding: 0; }
.footer-links a { color: rgba(255,255,255,0.75); text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { color: #fff; }
.footer-contact li { font-size: 0.9rem; margin-bottom: 0.5rem; color: rgba(255,255,255,0.8); }
.footer-contact i { color: #f3e2a0; margin-right: 0.5rem; }
.footer-divider { border-color: rgba(255,255,255,0.12); margin: 2rem 0 1rem; }
.footer-copy { font-size: 0.85rem; color: rgba(255,255,255,0.55); }

/* Daftar Madrasah publik */
.daftar-madrasah-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 1.1rem;
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow);
}
.daftar-madrasah-summary strong {
    display: block;
    font-size: 1.5rem;
    color: var(--primary-dark);
    line-height: 1.1;
}
.daftar-madrasah-summary span {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.daftar-madrasah-filters .form-control {
    min-width: 220px;
    border-radius: 0.75rem;
}
.daftar-madrasah-block {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 1.1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.daftar-madrasah-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(180deg, #f7fbf8, #eef6f1);
    border-bottom: 1px solid var(--border);
}
.daftar-madrasah-head h2 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin: 0;
}
.daftar-madrasah-head p {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.daftar-madrasah-table thead th {
    background: #f0f7f3;
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.85rem;
    border-bottom: 2px solid var(--primary);
    white-space: nowrap;
}
.daftar-madrasah-table tbody tr:hover { background: #f8faf9; }
.daftar-madrasah-empty {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

/* Form publik ubah NSM/NPSN */
.identitas-public-card,
.identitas-public-side {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 1.15rem;
    box-shadow: var(--shadow);
}
.identitas-public-card { padding: 1.5rem 1.5rem 1.75rem; }
.identitas-public-head {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}
.identitas-public-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.9rem;
    background: var(--primary-light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}
.identitas-public-head h2 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin: 0 0 0.25rem;
}
.identitas-public-head p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
}
.identitas-public-section {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--primary-dark);
    margin: 0.5rem 0 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid #eef3f0;
}
.identitas-public-side {
    padding: 1.35rem 1.4rem;
    height: 100%;
}
.identitas-public-side h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
}
.identitas-public-side ul {
    padding-left: 1.1rem;
    margin-bottom: 1.25rem;
    color: var(--text-muted);
}
.identitas-public-side li { margin-bottom: 0.45rem; }

.identitas-madrasah-detail {
    background: #f4faf6;
    border: 1px solid #cfe6d8;
    border-radius: 0.95rem;
    padding: 1rem 1.1rem;
}
.identitas-madrasah-detail-title {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7c74;
    margin-bottom: 0.65rem;
}
.identitas-madrasah-detail span {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7c74;
}
.identitas-madrasah-detail strong {
    display: block;
    color: #145f3a;
    font-size: 0.98rem;
    word-break: break-word;
}
.identitas-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.05rem !important;
}
.identitas-nsm-lama {
    color: #9a3412 !important;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 0.5rem;
    padding: 0.35rem 0.55rem;
    margin-top: 0.15rem;
}

@media (max-width: 768px) {
    .hero-section { padding: 2.5rem 0 3rem; }
    .section-padding { padding: 2.5rem 0; }
    .quick-links-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
    .data-composition { flex-direction: column; align-items: center; }
    .data-composition-list { width: 100%; }
    .data-jenjang-count { margin-left: 0; width: 100%; }
    .data-help-panel .btn { display: block; width: 100%; margin: 0.25rem 0 !important; }
    .arsip-card-meta { flex-direction: column; gap: 0.35rem; }
}
