@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

body { font-family: 'Inter', sans-serif; scroll-behavior: smooth; overflow-x: hidden !important; width: 100%; max-width: 100%; position: relative; }
html { overflow-x: hidden !important; width: 100%; max-width: 100%; }
#app-container, #public-views, #admin-layout { overflow-x: hidden !important; width: 100%; max-width: 100%; }
.view-section { display: none; opacity: 0; transition: opacity 0.4s ease-in-out; width: 100%; max-width: 100%; }
.view-section.active { display: block; opacity: 1; }
.hero-overlay { background: linear-gradient(to bottom, rgba(30, 58, 138, 0.75), rgba(0, 0, 0, 0.6)); }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #1E3A8A; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #3B82F6; }

.avatar-hover { transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); cursor: zoom-in; }
.avatar-hover:hover { transform: scale(1.15) rotate(2deg); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }
.card-live { transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease; }
.card-live:hover { transform: translateY(-10px) scale(1.02); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); z-index: 10; }
.glass-card { background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, 0.4); }
.dark .glass-card { background: rgba(30, 41, 59, 0.7); border: 1px solid rgba(255, 255, 255, 0.1); }

.bookshelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 2rem; padding-bottom: 2rem; border-bottom: 15px solid #8B4513; position: relative; margin-bottom: 3rem; }
.bookshelf::after { content: ''; position: absolute; bottom: -15px; left: -10px; right: -10px; height: 15px; background: linear-gradient(to bottom, #A0522D, #5C4033); border-radius: 3px; box-shadow: 0 5px 15px rgba(0,0,0,0.3); z-index: -1; }
.book-item { transition: all 0.3s ease; box-shadow: -5px 0 10px rgba(0,0,0,0.2), 5px 5px 15px rgba(0,0,0,0.3); cursor: pointer; position: relative; }
.book-item:hover { transform: translateY(-10px) rotate(-2deg); box-shadow: -5px 10px 15px rgba(0,0,0,0.3), 5px 15px 25px rgba(0,0,0,0.4); }

/* ═══════════════════════════════════════════════════
   STRUKTUR ORGANISASI — PREMIUM REDESIGN
   ═══════════════════════════════════════════════════ */

/* Wrapper utama */
.org-tree {
    display: inline-flex;
    min-width: max-content;
    justify-content: center;
    width: 100%;
    padding-bottom: 32px;
    padding-top: 12px;
}

/* UL = baris anak-anak */
.org-tree ul {
    padding-top: 0;
    position: relative;
    display: flex;
    justify-content: center;
    gap: 0;
    padding-left: 0;
    margin-top: 0;
}

/* Garis vertikal dari induk ke baris anak (::before pada ul ul) */
.org-tree ul ul {
    position: relative;
    padding-top: 36px;
}
.org-tree ul ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 36px;
    background: linear-gradient(to bottom, #3B82F6, #6366F1);
    border-radius: 2px;
}
.dark .org-tree ul ul::before {
    background: linear-gradient(to bottom, #60A5FA, #818CF8);
}

/* LI = tiap node */
.org-tree li {
    float: none;
    text-align: center;
    list-style-type: none;
    position: relative;
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Garis horizontal di atas baris saudara */
.org-tree li::before,
.org-tree li::after {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    border-top: 2px solid;
    border-image: linear-gradient(to right, transparent, #6366F1) 1;
    width: 50%;
    height: 0;
}
.org-tree li::after {
    right: auto;
    left: 50%;
    border-image: linear-gradient(to right, #6366F1, transparent) 1;
}

/* Node tunggal: tidak perlu garis horizontal */
.org-tree li:only-child::before,
.org-tree li:only-child::after { display: none; }
.org-tree li:only-child > .org-node-wrap { margin-top: 0; }

/* Ujung kiri dan kanan tidak perlu setengah garis */
.org-tree li:first-child::before { display: none; }
.org-tree li:last-child::after  { display: none; }

/* Titik connector dari garis ke kartu */
.org-node-connector {
    width: 2px;
    height: 24px;
    background: linear-gradient(to bottom, #6366F1, #3B82F6);
    border-radius: 2px;
    margin: 0 auto;
    flex-shrink: 0;
}
.dark .org-node-connector {
    background: linear-gradient(to bottom, #818CF8, #60A5FA);
}

/* Wrapper kartu (connector + card) */
.org-node-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ─── KARTU ORG ─────────────────────────────────── */
.org-card {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
    min-width: 120px;
    max-width: 160px;
    text-decoration: none;
    outline: none;
}

/* Kartu LEVEL 0 (akar / pucuk pimpinan) — paling besar */
.org-card.org-level-0 {
    min-width: 180px;
    max-width: 220px;
}
.org-card.org-level-0 .org-photo {
    width: 110px;
    height: 110px;
    border-width: 4px;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.25), 0 12px 28px rgba(99, 102, 241, 0.35);
}
.org-card.org-level-0 .org-name { font-size: 0.9rem; }
.org-card.org-level-0 .org-role { font-size: 0.72rem; }

/* Kartu LEVEL 1 (direktur/kabid) — sedang */
.org-card.org-level-1 {
    min-width: 140px;
    max-width: 175px;
}
.org-card.org-level-1 .org-photo {
    width: 82px;
    height: 82px;
    border-width: 3px;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2), 0 8px 20px rgba(59, 130, 246, 0.3);
}

/* Kartu LEVEL 2+ — default kecil */
.org-card .org-photo {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18), 0 6px 14px rgba(0,0,0,0.18);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    background: #e2e8f0;
}
.dark .org-card .org-photo {
    border-color: #1e293b;
}

/* Inner card box */
.org-card-box {
    background: white;
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 16px;
    padding: 14px 12px 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
    transition: box-shadow 0.35s ease, border-color 0.35s ease, background 0.35s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: -34px; /* foto overlap ke atas box */
    padding-top: 40px;
    position: relative;
}
.dark .org-card-box {
    background: #1E293B;
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

/* Level-0 box lebih besar padding */
.org-card.org-level-0 .org-card-box {
    margin-top: -42px;
    padding-top: 50px;
    border-radius: 20px;
    background: linear-gradient(135deg, #EEF2FF 0%, #FFFFFF 100%);
    border-color: rgba(99, 102, 241, 0.3);
}
.dark .org-card.org-level-0 .org-card-box {
    background: linear-gradient(135deg, #1e1b4b 0%, #1E293B 100%);
}

/* Badge level */
.org-level-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 10px;
    border-radius: 99px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.org-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: #1E3A8A;
    text-align: center;
    line-height: 1.3;
    margin-top: 2px;
}
.dark .org-name { color: #93C5FD; }

.org-role {
    font-size: 0.65rem;
    color: #6B7280;
    text-align: center;
    margin-top: 4px;
    line-height: 1.3;
    font-weight: 500;
}
.dark .org-role { color: #94A3B8; }

/* Hover: kartu naik dan bersinar */
.org-card:hover {
    transform: translateY(-8px) scale(1.04);
}
.org-card:hover .org-card-box {
    box-shadow: 0 16px 36px rgba(99, 102, 241, 0.3), 0 4px 8px rgba(0,0,0,0.1);
    border-color: #6366F1;
}
.org-card:hover .org-photo {
    transform: scale(1.08);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.4), 0 10px 24px rgba(99, 102, 241, 0.4);
}

/* Ripple background on hover */
.org-card-box::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    transition: opacity 0.35s ease;
    pointer-events: none;
}
.org-card:hover .org-card-box::after { opacity: 1; }

/* Foto wrapper (untuk posisikan foto di atas box) */
.org-photo-wrap {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Akar / root wrapper khusus */
.org-root-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0;
}

/* Animasi masuk */
@keyframes orgFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.org-card { animation: orgFadeUp 0.5s ease both; }



.pro-modal-backdrop { backdrop-filter: blur(8px); background-color: rgba(15, 23, 42, 0.6); }
.pro-input { width: 100%; padding: 0.75rem 1rem; border: 1px solid #d1d5db; border-radius: 0.5rem; background-color: #f9fafb; transition: all 0.2s; font-size: 0.875rem; }
.dark .pro-input { background-color: #1e293b; border-color: #4b5563; color: white; }
.pro-input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); background-color: #ffffff; }
.dark .pro-input:focus { background-color: #0f172a; }
.pro-label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.25rem; color: #374151; }
.dark .pro-label { color: #d1d5db; }

.marquee-container { overflow: hidden; white-space: nowrap; width: 100%; position: relative; }
.marquee-content { display: inline-block; animation: marquee 25s linear infinite; }
.marquee-container:hover .marquee-content { animation-play-state: paused; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.admin-grp-content { transition: max-height 0.3s ease-in-out; overflow: hidden; max-height: 1000px; }
.admin-grp-content.collapsed { max-height: 0; }

/* SKELETON LOADING (TIER 2) CSS */
.placeholder-glow .placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
.dark .placeholder-glow .placeholder {
    background: linear-gradient(90deg, #334155 25%, #1e293b 50%, #334155 75%);
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* PERBAIKAN IFRAME CUSTOM PAGE */
#custom-page-content iframe {
    width: 100%;
    min-height: 75vh;
    border: none;
    border-radius: 0.75rem;
    background: transparent;
}

/* TINYMCE RICH TEXT EDITOR MODAL FIX */
.tox-tinymce-aux, .tox-dialog-wrap {
    z-index: 99999 !important;
}
.tox-tinymce {
    border-radius: 0.75rem !important;
    overflow: hidden;
    border-color: #e2e8f0 !important;
}

/* RESPONSIVE MOBILE FIXES UNTUK CMS ADMIN & TABEL */
@media (max-width: 768px) {
    #admin-crud table th, #admin-crud table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
    #admin-crud table td button {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }
    #pro-form-box {
        max-height: 95vh !important;
        margin: 0.5rem;
        border-radius: 1.5rem;
    }
    #pro-form-box .p-8 {
        padding: 1.25rem;
    }
}

/* Tom Select Styling Fixes */
.ts-control {
    border-radius: 0.75rem !important;
    padding: 0.6rem 1rem !important;
    border: 1px solid #D1D5DB !important;
    font-size: 0.875rem !important;
    background-color: #FFFFFF !important;
}
.dark .ts-control, .dark .ts-dropdown {
    background-color: #1E293B !important;
    border-color: #475569 !important;
    color: #F8FAFC !important;
}
.dark .ts-control input {
    color: #F8FAFC !important;
}
.ts-control .item {
    background: #1E3A8A !important;
    color: white !important;
    border-radius: 0.5rem !important;
    padding: 0.2rem 0.6rem !important;
    font-weight: 600 !important;
}

/* FLUID RESPONSIVE FIXES UNTUK LANDSCAPE & BERBAGAI UKURAN LAPTOP */
html, body {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: clip !important;
    position: relative;
}
#app-container, #public-views, footer, main {
    width: 100% !important;
    max-width: 100vw !important;
}
@media screen and (max-width: 1024px) and (orientation: landscape) {
    #public-navbar .h-20 {
        height: 4.5rem !important;
    }
    #hero-slider {
        min-height: 480px !important;
        height: auto !important;
        padding-top: 5rem !important;
        padding-bottom: 6rem !important;
    }
    #hero-slider .bottom-20 {
        bottom: 1.5rem !important;
    }
    .view-section {
        padding-top: 1rem !important;
    }
}
.overflow-x-auto {
    max-width: 100vw;
    -webkit-overflow-scrolling: touch;
}
table {
    width: 100% !important;
}


