/* ============================================================
   DESA PEDAWANG - Government Modern Theme
   Tema: Pemerintahan Indonesia Modern & Kekinian
   Warna: Navy Blue, Merah Indonesia, Putih, Gold
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&family=Inter:wght@400;500;600&display=swap');

:root {
    /* Palet Warna Utama - Pemerintahan Modern */
    --primary:       #1a3a5c;   /* Navy biru gelap - warna utama */
    --primary-light: #2563a8;   /* Navy biru sedang */
    --primary-dark:  #0f2240;   /* Navy sangat gelap */
    --accent:        #c0392b;   /* Merah Indonesia */
    --accent-light:  #e74c3c;   /* Merah terang */
    --gold:          #d4a017;   /* Emas - aksen prestisius */
    --gold-light:    #f1c40f;   /* Emas terang */
    --white:         #ffffff;
    --off-white:     #f8fafc;
    --gray-50:       #f1f5f9;
    --gray-100:      #e2e8f0;
    --gray-400:      #94a3b8;
    --gray-600:      #475569;
    --gray-700:      #334155;
    --gray-900:      #0f172a;
    --text:          #1e293b;

    /* Tipografi */
    --font-heading: 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-body:    'Inter', system-ui, sans-serif;

    /* Radius & Shadow */
    --radius-sm:   8px;
    --radius:      12px;
    --radius-lg:   16px;
    --radius-xl:   24px;
    --shadow-sm:   0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --shadow:      0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-md:   0 8px 24px rgba(0,0,0,0.10), 0 3px 8px rgba(0,0,0,0.07);
    --shadow-lg:   0 16px 40px rgba(0,0,0,0.12), 0 6px 16px rgba(0,0,0,0.08);
    --shadow-glow: 0 0 30px rgba(26, 58, 92, 0.25);

    /* Backward compat */
    --ag-primary:        var(--primary);
    --ag-secondary:      #10b981;
    --ag-dark:           var(--gray-900);
    --ag-light:          var(--off-white);
    --ag-glass-bg:       rgba(255,255,255,0.85);
    --ag-glass-border:   rgba(255,255,255,0.4);
    --ag-font-family:    var(--font-body);
    --ag-border-radius:  var(--radius);
    --ag-shadow:         var(--shadow);
    --ag-shadow-hover:   var(--shadow-md);
}

/* ===================== RESET ===================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--off-white);
    color: var(--text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }

/* ===================== LAYOUT ===================== */
.ag-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.ag-section { padding: 5rem 0; }
.ag-grid { display: grid; gap: 1.5rem; }
.ag-grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.ag-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.ag-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.ag-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .ag-grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .ag-grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .ag-grid-cols-2, .ag-grid-cols-3, .ag-grid-cols-4 { grid-template-columns: 1fr; }
    .ag-container { padding: 0 1rem; }
}

/* ===================== TOP BAR PEMERINTAHAN ===================== */
.gov-topbar {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: rgba(255,255,255,0.85);
    font-size: 0.78rem;
    font-family: var(--font-heading);
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 0.45rem 0;
    border-bottom: 2px solid var(--gold);
}
.gov-topbar .ag-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.gov-topbar-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.gov-topbar-left span { display: flex; align-items: center; gap: 0.35rem; }
.gov-topbar-right { display: flex; align-items: center; gap: 1rem; }
.gov-topbar-right a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.2s;
}
.gov-topbar-right a:hover { color: var(--gold-light); }

/* ===================== NAVBAR ===================== */
.ag-navbar {
    background: var(--white);
    border-bottom: 3px solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 16px rgba(26,58,92,0.12);
    padding: 0;
}
.ag-nav-content {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    min-height: 68px;
}
.ag-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    text-decoration: none;
    padding: 0.75rem 0;
}
.ag-brand-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(26,58,92,0.25);
}
.ag-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.ag-brand-name {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.02em;
}
.ag-brand-sub {
    font-size: 0.68rem;
    color: var(--gray-400);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ag-nav-links {
    display: flex;
    list-style: none;
    align-items: stretch;
    gap: 0;
}
.ag-nav-links li { display: flex; }
.ag-nav-links a {
    display: flex;
    align-items: center;
    padding: 0 1rem;
    text-decoration: none;
    color: var(--gray-600);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}
.ag-nav-links a:hover {
    color: var(--primary);
    background: rgba(26,58,92,0.04);
    border-bottom-color: var(--primary);
}
.ag-nav-links a.active {
    color: var(--primary);
    border-bottom-color: var(--accent);
    background: rgba(192,57,43,0.04);
}
.nav-cta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-left: 1rem;
    margin-left: 0.5rem;
    border-left: 1px solid var(--gray-100);
}

/* ===================== BUTTONS ===================== */
.ag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    letter-spacing: 0.01em;
}
.ag-btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(26,58,92,0.3);
}
.ag-btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    box-shadow: 0 6px 20px rgba(26,58,92,0.4);
    transform: translateY(-2px);
    color: var(--white);
}
.ag-btn-outline {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}
.ag-btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}
.ag-btn-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(192,57,43,0.3);
}
.ag-btn-accent:hover {
    box-shadow: 0 6px 20px rgba(192,57,43,0.4);
    transform: translateY(-2px);
}
.ag-btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    color: #7a5800;
    font-weight: 700;
}
.ag-btn-gold:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(212,160,23,0.4); }

/* ===================== HERO ===================== */
.ag-hero {
    position: relative;
    padding: 7rem 0 6rem;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, var(--primary-light) 100%);
    color: white;
    text-align: center;
    overflow: hidden;
}
.ag-hero::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(212,160,23,0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(192,57,43,0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(255,255,255,0.05) 0%, transparent 40%);
    pointer-events: none;
}
.ag-hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 80px;
    background: linear-gradient(to bottom right, var(--off-white) 50%, transparent 50%);
}
.ag-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(212,160,23,0.2);
    border: 1px solid rgba(212,160,23,0.5);
    color: var(--gold-light);
    padding: 0.4rem 1rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}
.ag-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    letter-spacing: -0.03em;
}
.ag-hero h1 .highlight {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.ag-hero p {
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
    max-width: 580px;
    margin-inline: auto;
    opacity: 0.85;
    line-height: 1.7;
}
.ag-hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===================== SECTION TITLES ===================== */
.ag-section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    font-weight: 800;
    color: var(--primary);
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}
.ag-section-subtitle {
    text-align: center;
    color: var(--gray-600);
    max-width: 560px;
    margin: 0 auto 3rem;
    font-size: 1.05rem;
    line-height: 1.7;
}
.ag-section-line {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--gold));
    border-radius: 999px;
    margin: 0.75rem auto 0.75rem;
}

/* ===================== CARDS ===================== */
.ag-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(26,58,92,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.ag-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Stat Cards */
.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid rgba(26,58,92,0.06);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}
.stat-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 4px;
}
.stat-card:nth-child(1)::before { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }
.stat-card:nth-child(2)::before { background: linear-gradient(90deg, var(--accent), var(--accent-light)); }
.stat-card:nth-child(3)::before { background: linear-gradient(90deg, var(--gold), var(--gold-light)); }
.stat-card:nth-child(4)::before { background: linear-gradient(90deg, #10b981, #34d399); }
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.stat-icon { font-size: 2.25rem; margin-bottom: 0.75rem; }
.stat-value {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 0.4rem;
}
.stat-label { font-size: 0.875rem; color: var(--gray-600); font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; }

/* ===================== PROGRESS BARS ===================== */
.ag-progress-container {
    width: 100%;
    background: var(--gray-100);
    border-radius: 999px;
    margin: 0.5rem 0 1.5rem;
    overflow: hidden;
    height: 10px;
}
.ag-progress-bar {
    height: 100%;
    border-radius: 999px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================== PERSON CARD (Lembaga) ===================== */
.person-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid rgba(26,58,92,0.06);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}
.person-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--gold));
    transform: scaleX(0);
    transition: transform 0.3s;
}
.person-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.person-card:hover::after { transform: scaleX(1); }
.person-photo {
    width: 90px; height: 90px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1.25rem;
    border: 3px solid var(--gray-100);
    box-shadow: 0 4px 12px rgba(26,58,92,0.15);
}
.person-photo-placeholder {
    width: 90px; height: 90px;
    border-radius: 50%;
    margin: 0 auto 1.25rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: white;
    box-shadow: 0 4px 12px rgba(26,58,92,0.2);
}
.person-name {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.35rem;
}
.person-jabatan {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.person-badge {
    display: inline-block;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    color: var(--gray-600);
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
}

/* ===================== FOOTER ===================== */
.ag-footer {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    padding: 4rem 0 0;
    margin-top: 0;
}
.ag-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.ag-footer h4 {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold-light);
    margin-bottom: 1.25rem;
}
.ag-footer p, .ag-footer li { color: rgba(255,255,255,0.7); font-size: 0.9rem; line-height: 1.8; }
.ag-footer ul { list-style: none; }
.ag-footer ul li a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.ag-footer ul li a:hover { color: var(--gold-light); }
.ag-footer-bottom {
    padding: 1.25rem 0;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 0.82rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.ag-footer-gold-line {
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), var(--accent), var(--gold), transparent);
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .ag-footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .ag-footer-bottom { flex-direction: column; text-align: center; }
    .gov-topbar-left { flex-direction: column; gap: 0.25rem; font-size: 0.7rem; }
    .ag-nav-links { display: none; }
}

/* ===================== UTILITY ===================== */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-gold { color: var(--gold); }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}
.badge-primary { background: rgba(26,58,92,0.1); color: var(--primary); }
.badge-accent  { background: rgba(192,57,43,0.1); color: var(--accent); }
.badge-gold    { background: rgba(212,160,23,0.15); color: var(--gold); }
.badge-green   { background: rgba(16,185,129,0.1); color: #059669; }

/* Section accent stripe */
.section-stripe {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.stripe-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent);
}
.stripe-line {
    width: 40px; height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--gold));
    border-radius: 999px;
}

/* Feature icon boxes */
.icon-box {
    width: 56px; height: 56px;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-bottom: 1rem;
}
.icon-box-primary { background: rgba(26,58,92,0.1); }
.icon-box-accent  { background: rgba(192,57,43,0.1); }
.icon-box-gold    { background: rgba(212,160,23,0.12); }
.icon-box-green   { background: rgba(16,185,129,0.1); }

/* ===================== PAGE HERO (sub-pages) ===================== */
.page-hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
    color: white;
    padding: 4.5rem 0 3.5rem;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 80% 50%, rgba(212,160,23,0.12) 0%, transparent 60%);
    pointer-events: none;
}
.page-hero::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0; right: 0;
    height: 50px;
    background: linear-gradient(to bottom right, var(--white) 50%, transparent 50%);
}
.page-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.9);
    padding: 0.3rem 0.9rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.page-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}
.page-hero p { font-size: 1.05rem; opacity: 0.85; max-width: 560px; }

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.65);
    margin-bottom: 1.25rem;
}
.breadcrumb a { color: rgba(255,255,255,0.65); text-decoration: none; }
.breadcrumb a:hover { color: var(--gold-light); }
.breadcrumb span { color: var(--gold-light); font-weight: 600; }

/* ===================== TABLE ===================== */
.ag-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.ag-table th, .ag-table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-50);
    font-size: 0.9rem;
}
.ag-table th {
    background: var(--primary);
    color: white;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.ag-table tr:hover td { background: rgba(26,58,92,0.02); }
.ag-table tr:last-child td { border-bottom: none; }
.table-responsive { overflow-x: auto; border-radius: var(--radius-lg); }

/* Organizational Chart */
.ag-org-chart {
    display: flex;
    justify-content: center;
    overflow-x: auto;
    padding-bottom: 2rem;
}
.ag-org-chart ul {
    padding-top: 20px; 
    position: relative;
    display: flex;
    justify-content: center;
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}
.ag-org-chart li {
    text-align: center;
    list-style-type: none;
    position: relative;
    padding: 20px 5px 0 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.ag-org-chart li::before, .ag-org-chart li::after{
    content: '';
    position: absolute; top: 0; right: 50%;
    border-top: 2px solid #7f1d1d;
    width: 50%; height: 20px;
}
.ag-org-chart li::after{
    right: auto; left: 50%;
    border-left: 2px solid #7f1d1d;
}
.ag-org-chart li:only-child::after, .ag-org-chart li:only-child::before {
    display: none;
}
.ag-org-chart li:only-child{ padding-top: 0;}
.ag-org-chart li:first-child::before, .ag-org-chart li:last-child::after{
    border: 0 none;
}
.ag-org-chart li:last-child::before{
    border-right: 2px solid #7f1d1d;
}
.ag-org-chart ul ul::before{
    content: '';
    position: absolute; top: 0; left: 50%;
    border-left: 2px solid #7f1d1d;
    width: 0; height: 20px;
    transform: translateX(-50%);
}

.ag-org-node {
    border: 2px solid #7f1d1d;
    padding: 0.5rem;
    color: var(--text);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    border-radius: 8px;
    background: white;
    width: 130px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    margin: 0 auto;
}
.ag-org-node:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}
.ag-org-node img, .ag-org-node .org-photo-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.5rem;
    border: 2px solid #7f1d1d;
}
.ag-org-node .org-photo-placeholder {
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: #7f1d1d;
}
.ag-org-node .org-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    color: var(--dark);
    line-height: 1.2;
}
.ag-org-node .org-title {
    font-size: 0.65rem;
    background: #7f1d1d;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    width: 100%;
    box-sizing: border-box;
    line-height: 1.2;
}

/* Org Chart Tabs */
.ag-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.ag-tab-btn {
    padding: 0.5rem 1.5rem;
    background: white;
    border: 2px solid #7f1d1d;
    color: #7f1d1d;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}
.ag-tab-btn:hover, .ag-tab-btn.active {
    background: #7f1d1d;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(127, 29, 29, 0.3);
}
.org-chart-container {
    animation: fadeIn 0.5s;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   ADMIN SLIDE-IN SIDEBAR (RESPONSIF HP & LAPTOP)
   ============================================================ */

/* LAPTOP / DESKTOP (Layar > 768px) - Tampilan Samping Normal */
@media (min-width: 769px) {
    .mobile-nav-toggle {
        display: none !important;
    }
}

/* HP / MOBILE (Layar <= 768px) - Slide-In Menu */
@media (max-width: 768px) {
    body, html {
        overflow-x: hidden;
    }

    /* 1. Sembunyikan Sidebar ke Luar Layar Kiri */
    .sidebar, 
    aside,
    [class*="sidebar"] {
        position: fixed !important;
        top: 0 !important;
        left: -300px !important;
        width: 270px !important;
        height: 100vh !important;
        z-index: 99999 !important;
        transition: left 0.3s ease-in-out !important;
        box-shadow: 4px 0 25px rgba(0, 0, 0, 0.3) !important;
        overflow-y: auto !important;
    }

    /* 2. Tampilkan Sidebar saat Tombol Garis Tiga Ditekan */
    .sidebar.active, 
    aside.active,
    [class*="sidebar"].active {
        left: 0 !important;
    }

    /* 3. Maksimalkan Konten Utama 100% Lebar Layar */
    .main-content,
    .admin-container,
    .content,
    main,
    div[class*="content"] {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        padding-top: 60px !important;
        box-sizing: border-box !important;
    }

    /* 4. Tombol Garis Tiga (Muncul di Pojok Kiri Atas HP) */
    .mobile-nav-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 12px;
        left: 12px;
        z-index: 100000;
        width: 44px;
        height: 44px;
        background: #1a3a5c;
        color: #ffffff;
        border: none;
        border-radius: 8px;
        font-size: 22px;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    }

    /* Tabel Otomatis Menyesuaikan Layar HP */
    table, .ag-table {
        display: block !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        width: 100% !important;
    }
}

/* ============================================================
   RESPONSIVE SOTK SUPER PAKSA (KHUSUS HP)
   ============================================================ */
@media screen and (max-width: 768px) {
    /* Container utama */
    .ag-org-chart {
        width: 100% !important;
        overflow-x: hidden !important;
        padding: 0 !important;
    }

    /* Paksa semua UL dan LI berderet lurus ke bawah */
    .ag-org-chart ul,
    .ag-org-chart li {
        display: block !important;
        width: 100% !important;
        float: none !important;
        clear: both !important;
        padding: 0 !important;
        margin: 0 auto !important;
        position: relative !important;
        text-align: center !important;
    }

    /* Hilangkan semua garis cabang horizontal & vertikal lama */
    .ag-org-chart ul::before,
    .ag-org-chart ul::after,
    .ag-org-chart li::before,
    .ag-org-chart li::after {
        display: none !important;
        content: none !important;
    }

    /* Rapikan kotak pejabat */
    .ag-org-node {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        width: 85% !important;
        max-width: 260px !important;
        margin: 0.6rem auto !important;
        box-sizing: border-box !important;
        float: none !important;
    }

    /* Garis penghubung vertikal sederhana ke bawah */
    .ag-org-node::after {
        content: '' !important;
        display: block !important;
        position: absolute !important;
        bottom: -10px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 2px !important;
        height: 10px !important;
        background: #7f1d1d !important;
    }
}