/* ========== GLOBAL ========== */
body {
    font-family: 'Inter', sans-serif;
    background: #f0f2f5;
}
.panel, .card, .modal-content {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.panel:hover, .card:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.panel-heading, .modal-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    border-radius: 12px 12px 0 0;
    padding: 15px 20px;
}
.panel-body, .modal-body {
    padding: 20px;
}
.table {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}
.table-hover > tbody > tr:hover {
    background-color: #f1f8ff;
    transform: scale(1.01);
    transition: 0.2s;
}

/* ========== SIDEBAR (desktop & tablet) ========== */
.sidebar {
    background: linear-gradient(180deg, #1e2a38 0%, #2c3e50 100%);
    color: #ecf0f1;
    padding: 0;
    min-height: 100vh;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    overflow-y: auto;
    position: relative; /* untuk grid */
    left: auto;
    top: auto;
    width: auto;
    z-index: 1;
}
.sidebar .user-header {
    padding: 25px 15px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar .user-header img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.3);
    object-fit: cover;
}
.sidebar .user-header h5 {
    margin-top: 10px;
    color: #fff;
    font-weight: 600;
}
.sidebar .user-header small {
    color: #bdc3c7;
}
.sidebar a {
    color: #bdc3c7;
    display: flex;
    align-items: center;
    padding: 14px 20px;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    text-decoration: none;
}
.sidebar a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}
.sidebar a:hover, .sidebar a.active {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-left: 3px solid #3498db;
}

/* ========== MAIN CONTENT ========== */
#main-content {
    padding: 20px;
    min-height: 100vh;
    background: #f0f2f5;
}

/* Tablet adjustment agar margin kiri tidak ada */
@media (min-width: 768px) and (max-width: 991px) {
    #main-content {
        /* margin-left: 25% sudah diatur oleh col-sm-9 */
    }
}

/* ========== TILT EFFECT ========== */
.akt-tilt {
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* ========== ANIMASI ========== */
.fadeInUp {
    animation: fadeInUp 0.4s ease forwards;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== BUTTONS ========== */
.btn {
    border-radius: 20px;
    padding: 8px 20px;
    font-weight: 600;
    transition: all 0.2s;
}
.btn-primary { background: #3498db; border-color: #3498db; }
.btn-primary:hover { background: #2980b9; }
.btn-success { background: #2ecc71; border-color: #2ecc71; }
.btn-success:hover { background: #27ae60; }
.btn-warning { background: #f1c40f; border-color: #f1c40f; color: #333; }
.btn-warning:hover { background: #f39c12; }

/* ========== TABEL ========== */
.table>thead:first-child>tr:first-child>th {
    border-top: 0;
    background: gainsboro;
    text-align: center;
    vertical-align: middle;
}
.th {
    background: gainsboro;
    text-align: center;
    vertical-align: middle;
}

/* ========== MOBILE SIDEBAR (OFF-CANVAS) ========== */
.burger-menu {
    display: none;
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1001;
    background: #2c3e50;
    color: #fff;
    border: none;
    font-size: 24px;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}

/* Hanya tampil di smartphone (<768px) */
@media (max-width: 767px) {
    .burger-menu {
        display: block;
        left: 10px;
    }

    .sidebar {
        position: fixed;
        left: -270px;
        top: 0;
        width: 250px;
        height: 100%;
        z-index: 999;
        transition: left 0.3s ease;
        padding-top: 50px;
        min-height: 100%;
    }

    .sidebar.open {
        left: 0;
    }

    #main-content {
        margin-left: 0 !important;
        padding-top: 50px;
    }
}


/* ========== TOMBOL AKSI DI TABEL ========== */
.table td .btn-group,
.table td .btn-group-sm {
    display: inline-flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 0;               /* rapatkan tombol */
    border-radius: 4px;
    overflow: hidden;     /* agar border tombol ikut radius */
}

.table td .btn-group .btn {
    margin: 0;
    border-radius: 0;
    font-size: 12px;
    padding: 4px 10px;
    white-space: nowrap;
}

/* border-radius khusus untuk tombol pertama & terakhir agar tidak tumpang tindih */
.table td .btn-group .btn:first-child {
    border-radius: 4px 0 0 4px;
}

.table td .btn-group .btn:last-child {
    border-radius: 0 4px 4px 0;
}