:root {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --accent-primary: #0d9488;
    --accent-secondary: #d97706;
    --accent-tertiary: #2563eb;
    --accent-danger: #dc2626;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --glow-primary: rgba(13, 148, 136, 0.2);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Background Effects */
.bg-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-gradient-1 {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(13, 148, 136, 0.08) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

.bg-gradient-2 {
    position: absolute;
    bottom: -10%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.06) 0%, transparent 70%);
    animation: float 25s ease-in-out infinite reverse;
}

.bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
    background-size: 60px 60px;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, -30px) scale(1.1);
    }
}

/* Header */
.main-header {
    position: relative;
    z-index: 10;
    background: var(--bg-secondary);
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Logo Wrapper - Modified for Image */
.logo-wrapper {
    width: 56px;
    height: 56px;
    background: transparent;
    /* Background dihapus agar logo asli terlihat */
    border-radius: 50%;
    /* Membuat wrapper berbentuk lingkaran */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    /* Memastikan gambar tidak keluar dari lingkaran */
    flex-shrink: 0;
}

.logo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Mengatur gambar agar pas di dalam kotak */
}

.header-title h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.header-title p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Header Button (Login) */
.btn-header {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    background: linear-gradient(135deg, var(--accent-primary) 0%, #0f766e 100%);
    color: #ffffff;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--glow-primary);
    color: #ffffff;
}

.btn-header:active {
    transform: translateY(0);
}

.btn-header svg {
    width: 18px;
    height: 18px;
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 10;
    padding: 2rem 0;
    flex: 1;
}

/* Search Section */
.search-section {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-tertiary), var(--accent-secondary));
}

.search-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
}

.search-title svg {
    color: var(--accent-primary);
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.form-floating {
    flex: 1;
    min-width: 200px;
}

.form-floating .form-control {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 12px;
    height: 56px;
    padding: 1rem 1rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.form-floating .form-control:focus {
    background: var(--bg-secondary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
    color: var(--text-primary);
}

.form-floating label {
    color: var(--text-secondary);
    padding: 1rem;
}

.btn-search {
    background: linear-gradient(135deg, var(--accent-primary) 0%, #0f766e 100%);
    border: none;
    border-radius: 12px;
    padding: 0 2rem;
    height: 56px;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    min-width: 140px;
    justify-content: center;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--glow-primary);
    color: #ffffff;
}

.btn-search:active {
    transform: translateY(0);
}

.btn-search:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-search:disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-reset {
    background: #64748b;
    min-width: 100px;
}

.btn-reset:hover {
    background: #475569;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(100, 116, 139, 0.3);
    color: #ffffff;
}

/* Search Results Section */
.search-results-section {
    background: var(--bg-card);
    border-radius: 20px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    display: none;
}

.search-results-section.show {
    display: block;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-results-header {
    background: linear-gradient(135deg, var(--accent-primary) 0%, #0f766e 100%);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.search-results-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-results-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #ffffff;
}

.search-results-body {
    padding: 0;
}

.result-table {
    width: 100%;
    margin-bottom: 0;
}

.result-table thead th {
    background: #f1f5f9;
    border: none;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1.25rem;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
    border-bottom: 2px solid var(--border-color);
}

.result-table tbody tr {
    transition: all 0.2s ease;
    border: none;
}

.result-table tbody tr:hover {
    background: rgba(13, 148, 136, 0.04);
}

.result-table tbody td {
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    vertical-align: middle;
    color: var(--text-primary);
    border: none;
    border-bottom: 1px solid var(--border-color);
}

.result-table tbody tr:last-child td {
    border-bottom: none;
}

.result-name {
    font-weight: 600;
    color: var(--text-primary);
}

.result-status {
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.status-aktif {
    background: rgba(13, 148, 136, 0.1);
    color: var(--accent-primary);
}

.status-cmb {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-tertiary);
}

.status-pb {
    background: rgba(217, 119, 6, 0.1);
    color: var(--accent-secondary);
}

.status-bebas {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

/* Tombol Aksi Kunjungi (Link) */
.btn-kunjungi {
    background: linear-gradient(135deg, var(--accent-primary) 0%, #0f766e 100%);
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    /* Agar link terlihat seperti tombol */
}

.btn-kunjungi:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--glow-primary);
    color: #ffffff;
}

.btn-kunjungi svg {
    width: 14px;
    height: 14px;
}

.no-results {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-secondary);
}

.no-results svg {
    width: 48px;
    height: 48px;
    color: var(--border-color);
    margin-bottom: 1rem;
}

.no-results h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.no-results p {
    font-size: 0.9rem;
    margin: 0;
}

/* Stats Row */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    border-color: var(--text-secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 18px;
    height: 18px;
}

.stat-card.hearing .stat-icon {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-tertiary);
}

.stat-card.release .stat-icon {
    background: rgba(13, 148, 136, 0.1);
    color: var(--accent-primary);
}

.stat-card.program .stat-icon {
    background: rgba(217, 119, 6, 0.1);
    color: var(--accent-secondary);
}

.stat-card.transfer .stat-icon {
    background: rgba(220, 38, 38, 0.1);
    color: var(--accent-danger);
}

.stat-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stat-number {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.15rem;
}

.stat-card.hearing .stat-number {
    color: var(--accent-tertiary);
}

.stat-card.release .stat-number {
    color: var(--accent-primary);
}

.stat-card.program .stat-number {
    color: var(--accent-secondary);
}

.stat-card.transfer .stat-number {
    color: var(--accent-danger);
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tab Navigation */
.data-tabs-section {
    margin-bottom: 1.5rem;
}

.tabs-wrapper {
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.tabs-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: #fafbfc;
    overflow-x: auto;
    scrollbar-width: none;
}

.tabs-header::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    flex: 1;
    min-width: fit-content;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.02);
}

.tab-btn.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent-primary);
    background: #ffffff;
}

.tab-btn[data-tab="hearing"].active {
    border-bottom-color: var(--accent-tertiary);
    color: var(--accent-tertiary);
}

.tab-btn[data-tab="release"].active {
    border-bottom-color: var(--accent-primary);
    color: var(--accent-primary);
}

.tab-btn[data-tab="program"].active {
    border-bottom-color: var(--accent-secondary);
    color: var(--accent-secondary);
}

.tab-btn[data-tab="transfer"].active {
    border-bottom-color: var(--accent-danger);
    color: var(--accent-danger);
}

.tab-content-wrapper {
    padding: 0;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-pane.active {
    display: block;
}

/* Custom Table */
.custom-table {
    width: 100%;
    margin-bottom: 0;
    color: var(--text-primary);
    border-collapse: collapse;
}

.custom-table thead th {
    background: #f8fafc;
    border: none;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1.5rem;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.custom-table tbody tr {
    transition: background 0.2s ease;
    border: none;
}

.custom-table tbody tr:hover {
    background: rgba(241, 245, 249, 0.8);
}

.custom-table tbody td {
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
    vertical-align: middle;
    color: var(--text-primary);
    border: none;
}

.empty-row td {
    text-align: center;
    padding: 2rem !important;
    color: var(--text-secondary);
    font-style: italic;
}

.custom-table .badge {
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-hearing {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent-tertiary);
}

.badge-release {
    background: rgba(13, 148, 136, 0.1);
    color: var(--accent-primary);
}

.badge-program {
    background: rgba(217, 119, 6, 0.1);
    color: var(--accent-secondary);
}

.badge-transfer {
    background: rgba(220, 38, 38, 0.1);
    color: var(--accent-danger);
}

.table-responsive {
    overflow-x: auto;
}

/* Carousel */
.carousel-section {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    height: 450px;
}

.carousel-track-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    background-size: cover;
    background-position: center;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.4) 40%, rgba(15, 23, 42, 0.2) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 3rem;
}

.carousel-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    color: #fff;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.6s ease 0.3s;
}

.carousel-slide.active .carousel-content {
    transform: translateY(0);
    opacity: 1;
}

.carousel-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-secondary);
}

.carousel-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.carousel-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    max-width: 500px;
}

.carousel-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.carousel-meta span {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Carousel Nav - Positioned Right Bottom */
.carousel-nav {
    position: absolute;
    bottom: 1.5rem;
    top: auto;
    z-index: 10;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #fff;
    opacity: 0;
    transform: translateY(10px);
}

/* Prev button on the left side of the group */
.carousel-nav.prev {
    right: 5.25rem;
    /* 1.5rem + 44px + gap */
    left: auto;
}

/* Next button on the far right */
.carousel-nav.next {
    right: 1.5rem;
    left: auto;
}

.carousel-section:hover .carousel-nav {
    opacity: 1;
    transform: translateY(0);
}

.carousel-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Carousel Dots - Centered Bottom */
.carousel-dots {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    /* Centering trick */
    right: auto;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: #fff;
    width: 24px;
    border-radius: 4px;
}

/* Footer */
.main-footer {
    position: relative;
    z-index: 10;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    padding: 1.25rem 0;
    text-align: center;
}

.footer-copyright {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.footer-copyright strong {
    color: var(--text-primary);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .btn-header span {
        display: none;
    }

    .btn-header {
        padding: 0.6rem;
    }

    .search-form {
        flex-direction: column;
    }

    .form-floating {
        width: 100%;
    }

    .btn-search {
        width: 100%;
    }

    .tab-btn {
        padding: 0.8rem 1rem;
        font-size: 0.8rem;
    }

    .carousel-section {
        height: 350px;
    }

    .carousel-overlay {
        padding: 1.5rem;
    }

    .carousel-title {
        font-size: 1.5rem;
    }

    .carousel-desc {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    /* Adjust Carousel Nav for Mobile */
    .carousel-nav {
        opacity: 1;
        transform: none;
        width: 36px;
        height: 36px;
        bottom: 1rem;
    }

    .carousel-nav.prev {
        right: 4.25rem;
        /* Adjusted gap for smaller buttons */
        left: auto;
    }

    .carousel-nav.next {
        right: 1rem;
        left: auto;
    }

    /* Adjust Carousel Dots for Mobile */
    .carousel-dots {
        bottom: 1rem;
        left: 50%;
        transform: translateX(-50%);
    }

    .result-table thead th,
    .result-table tbody td {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .main-header {
        padding: 1rem 0;
    }

    .logo-wrapper {
        width: 44px;
        height: 44px;
    }

    .logo-wrapper svg {
        width: 24px;
        height: 24px;
    }

    .header-title h1 {
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}