.page-heading {
    background: linear-gradient(135deg, #203484 0%, #1a2a6b 50%, #0f1a3f 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.page-heading::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="white" opacity="0.1"><path d="M0,0 C150,100 350,0 500,50 C650,100 850,0 1000,50 L1000,100 L0,100 Z"/></svg>');
    background-size: cover;
}

.page-heading h3 {
    font-size: 3rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 15px;
}

.breadcrumb {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: white;
}

.main-container {
    padding: 40px 20px;
}

.sidebar {
    background: linear-gradient(135deg, #203484 0%, #1a2a6b 50%, #0f1a3f 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(32, 52, 132, 0.2);
    position: sticky;
    top: 20px;
    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    margin-bottom: 30px;
    scroll-behavior: smooth;
}

.sidebar-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
}

.sidebar-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 18px 24px;
    border-radius: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    margin-bottom: 12px;
    text-decoration: none;
}

.sidebar-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(8px);
    box-shadow: 0 10px 30px rgba(32, 52, 132, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
}

.sidebar-btn.active {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.3),
        rgba(255, 255, 255, 0.1)
    );
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateX(8px);
    box-shadow: 0 15px 35px rgba(32, 52, 132, 0.4);
}

.sidebar-icon {
    font-size: 1.3rem;
    opacity: 0.9;
}

.content-area {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 10px;
    box-shadow: 0 20px 40px rgba(32, 52, 132, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

.content-card {
    margin-bottom: 30px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(32, 52, 132, 0.1);
    border: 1px solid rgba(32, 52, 132, 0.1);
}

.card-header {
    background: linear-gradient(135deg, #203484 0%, #2940a0 50%, #1a2a6b 100%);
    padding: 25px 30px;
    border-radius: 0;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

.card-header::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1));
    transform: skewX(-15deg);
}

.card-header h4 {
    color: white;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.card-body {
    padding: 35px;
    background: white;
}

.content-section {
    padding: 30px;
    border-radius: 18px;
    margin-bottom: 25px;
    background: white;
    box-shadow: 0 8px 25px rgba(32, 52, 132, 0.08);
    border: 1px solid rgba(32, 52, 132, 0.1);
    animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#map {
    height: 550px;
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.form-select {
    border: 2px solid rgba(32, 52, 132, 0.2);
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 4px 10px rgba(32, 52, 132, 0.05);
}

.form-select:focus {
    border-color: #203484;
    box-shadow: 0 0 0 4px rgba(32, 52, 132, 0.1);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: #203484;
    margin-bottom: 10px;
    font-size: 1rem;
}

.table {
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(32, 52, 132, 0.1);
    border: 1px solid rgba(32, 52, 132, 0.1);
}

.table th {
    background: linear-gradient(135deg, #203484, #2940a0);
    color: white;
    font-weight: 600;
    padding: 18px 20px;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.table td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(32, 52, 132, 0.1);
    vertical-align: middle;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: rgba(32, 52, 132, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(32, 52, 132, 0.1);
}

.dataTables_wrapper {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(32, 52, 132, 0.1);
    border: 1px solid rgba(32, 52, 132, 0.1);
}

.chart-container {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(32, 52, 132, 0.1);
    border: 1px solid rgba(32, 52, 132, 0.1);
    margin-top: 20px;
    position: relative;
}

.chart-canvas {
    max-height: 400px;
    width: 100%;
}

.chart-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 10px;
    color: #203484;
    font-weight: 500;
}

.chart-loading::before {
    content: "";
    width: 20px;
    height: 20px;
    border: 2px solid #203484;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Sidebar Button Animation */
.sidebar-btn {
    position: relative;
    overflow: hidden;
}

.sidebar-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.6s;
}

.sidebar-btn:hover::after {
    left: 100%;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .sidebar {
        position: relative;
        top: 0;
        margin-bottom: 30px;
        max-height: none; /* Hapus max-height pada tablet dan mobile */
        overflow-y: visible; /* Hapus scroll pada tablet dan mobile */
    }

    .page-heading h3 {
        font-size: 2.5rem;
    }

    .main-container {
        padding: 30px 15px;
    }
}

@media (max-width: 992px) {
    .sidebar {
        position: static;
        margin-bottom: 30px;
        max-height: none;
        overflow-y: visible;
    }

    .content-area {
        padding: 15px;
    }

    .card-body {
        padding: 25px;
    }

    .content-section {
        padding: 25px;
    }

    .page-heading h3 {
        font-size: 2.2rem;
    }

    #map {
        height: 450px;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 20px 10px !important;
    }

    .sidebar {
        margin-bottom: 20px;
        padding: 20px;
        position: static;
        max-height: none;
        overflow-y: visible;
    }

    .sidebar-title {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    .sidebar-btn {
        padding: 16px 20px;
        font-size: 0.95rem;
        gap: 12px;
    }

    .sidebar-btn:hover {
        transform: none;
    }

    .sidebar-icon {
        font-size: 1.2rem;
    }

    .content-area {
        padding: 10px;
    }

    .content-section {
        padding: 20px;
        margin-bottom: 20px;
    }

    .card-body {
        padding: 20px;
    }

    .card-header {
        padding: 20px;
    }

    .card-header h4 {
        font-size: 1.2rem;
    }

    .page-heading {
        padding: 60px 0;
    }

    .page-heading h3 {
        font-size: 2rem;
    }

    #map {
        height: 350px;
    }

    .chart-container {
        padding: 20px;
    }

    .chart-canvas {
        max-height: 300px;
    }

    .table th,
    .table td {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    .form-select {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    .page-heading {
        padding: 50px 0;
    }

    .page-heading h3 {
        font-size: 1.8rem;
    }

    .main-container {
        padding: 15px 8px !important;
    }

    .sidebar {
        padding: 15px;
        border-radius: 15px;
    }

    .sidebar-title {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .sidebar-btn {
        padding: 14px 16px;
        font-size: 0.9rem;
        gap: 10px;
        margin-bottom: 10px;
        border-radius: 12px;
    }

    .sidebar-icon {
        font-size: 1.1rem;
    }

    .content-area {
        padding: 8px;
        border-radius: 15px;
    }

    .card-header {
        padding: 15px;
    }

    .card-header h4 {
        font-size: 1.1rem;
    }

    .card-body {
        padding: 15px;
    }

    .content-section {
        padding: 15px;
        margin-bottom: 15px;
        border-radius: 15px;
    }

    .content-card {
        margin-bottom: 20px;
        border-radius: 15px;
    }

    #map {
        height: 300px;
    }

    .chart-container {
        padding: 15px;
    }

    .chart-canvas {
        max-height: 250px;
    }

    .table th,
    .table td {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .form-select {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .form-label {
        font-size: 0.9rem;
    }

    .dataTables_wrapper {
        padding: 15px;
    }
}

@media (max-width: 400px) {
    .page-heading h3 {
        font-size: 1.6rem;
    }

    .main-container {
        padding: 10px 5px !important;
    }

    .sidebar {
        padding: 12px;
    }

    .sidebar-btn {
        padding: 12px 14px;
        font-size: 0.85rem;
    }

    .content-area {
        padding: 5px;
    }

    .card-header {
        padding: 12px;
    }

    .card-body {
        padding: 12px;
    }

    .content-section {
        padding: 12px;
    }

    #map {
        height: 250px;
    }

    .chart-container {
        padding: 12px;
    }

    .chart-canvas {
        max-height: 200px;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .page-heading {
        padding: 40px 0;
    }

    .page-heading h3 {
        font-size: 1.8rem;
    }

    #map {
        height: 300px;
    }

    @media (max-width: 768px) and (orientation: landscape) {
        .sidebar {
            position: static;
            max-height: none;
            overflow-y: visible;
        }
    }
}

/* Utility classes for responsive behavior */
.mobile-hide {
    display: block;
}

.mobile-show {
    display: none;
}

@media (max-width: 768px) {
    .mobile-hide {
        display: none;
    }

    .mobile-show {
        display: block;
    }
}

/* Scrollbar styling for sidebar */
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin: 10px 0; /* Memberi margin atas dan bawah */
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Improved table responsiveness */
.table-responsive {
    border-radius: 12px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.9rem;
    }

    .table-responsive table {
        min-width: 100%;
    }

    .table th:first-child,
    .table td:first-child {
        position: sticky;
        left: 0;
        background: white;
        z-index: 1;
    }

    .table th:first-child {
        background: linear-gradient(135deg, #203484, #2940a0);
    }
}

/* Enhanced form controls for mobile */
@media (max-width: 576px) {
    .form-group {
        margin-bottom: 15px;
    }

    .form-select {
        border-radius: 10px;
    }
}
