/*!
* Version: 1.2.0
* Template: Example Project
* Author: iqonic.design
* Design and Developed by: iqonic.design
* NOTE: This file contains the styling for Template.
*
*/

/* Background gelap transparan */
.bg-dark-transparent {
    background-color: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(5px); /* Efek blur untuk modern look */
}

/* Border bottom untuk kontras */
.bg-dark-transparent.border-bottom {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* Penyesuaian teks dan tombol */
.bg-dark-transparent .text-light {
    color: rgba(255, 255, 255, 0.7) !important;
}

.bg-dark-transparent .btn-outline-light {
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.5);
}

.bg-dark-transparent .btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Avatar border */
.bg-dark-transparent .avatar-wrapper-sm {
    border: 2px solid rgba(0, 0, 0, 0.3);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* Dropdown menu */
.bg-dark-transparent .dropdown-menu {
    background-color: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bg-dark-transparent .dropdown-item {
    color: rgba(255, 255, 255, 0.7);
}

.bg-dark-transparent .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.bg-dark-transparent .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.1);
}

/* sidebar css */
/* Mobile Styles */
/* Mobile Styles */
@media (max-width: 767.98px) {
    .sidebar:not(.show) {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
        position: fixed;
        height: 100vh;
        z-index: 1045;
    }
}


.sidebar {
    background: linear-gradient(135deg, #434343 0%, #000000 100%) !important;
    color: #ecf0f1 !important;
    width: 25vw; /* 20% dari viewport width */
    transition: transform 0.3s ease, width 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}
.sidebar, .main-content {
    transition: all 0.3s ease-in-out;
}
.sidebar .logo {
    padding: 15px;
    text-align: center;
}
.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 20px;
    transition: all 0.2s;
}
.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link i {
    width: 24px;
    text-align: center;
    margin-right: 10px;
}

.sidebar .nav-flex-column {
    padding-left: 20px;
}

.sidebar .nav-flex-column .nav-link {
    padding: 8px 20px 8px 40px;
    font-size: 0.9em;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.nav-link:not(.collapsed) .toggle-icon {
    transform: rotate(180deg);
}

.main-header {
    position: sticky;
    top: 0;
    z-index: 1020;
}
/* Main Content Styles */
.main-content {
    overflow-x: hidden;
}

.col-md-9.col-lg-10.ms-sm-auto {
    margin-left: 0;
    width: 100%;
}


@media (min-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
    }
    
    .sidebar.collapsed {
        transform: translateX(-100%);
        width: 0;
    }
    
    .col-md-9.col-lg-10.ms-sm-auto {
        margin-left: 25%;
    }
    
    .sidebar.collapsed + .col-md-9.col-lg-10.ms-sm-auto {
        margin-left: 0;
        width: 100%;
    }
}

/* Untuk tampilan mobile (<768px) */
@media (max-width: 767.98px) {
    .sidebar:not(.show) {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    .user-profile-header .admin-info-sm {
        display: none !important;
    }
    
    .btn-toolbar .btn-outline-secondary {
        padding: 0.25rem 0.5rem;
    }
    
    .dropdown-toggle-split {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}


/* Border modification */
.border-bottom {
    border-bottom: 1px solid #e9ecef !important;
}
.logo {
    padding: 15px;
    display: flex;
    align-items: center;
    white-space: nowrap;
}
.badge-orange {
    background-color: #FF6B00;
    color: white;
}
/* Container Utama */
.user-profile {
    padding: 10px;
    border-bottom: 0.5px solid #dee2e6;
}

.nav.flex-column {
    padding: 0 15px;
}

/* Container Utama yang Lebih Compact */
.admin-profile-compact {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
  max-width: 240px;
  margin: 0 auto 20px;
}

.avatar-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto;
}

/* Avatar Wrapper */
.avatar-wrapper {
    width: 60px; /* Diperkecil agar lebih proporsional */
    height: 60px;
    border-radius: 50%;
    border: 2px solid #4f46e5;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2);
    background: white;
    overflow: hidden;
    flex-shrink: 0; /* Pastikan tidak menyusut */
}

.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Logo Text */
.logo-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.logo-text h4 {
    font-size: 1rem;
    font-weight: 500;
    color: #e8eaef;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo-text h6 {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 400;
    line-height: 1.2;
}

/* Avatar Kecil */
.avatar-wrapper-sm {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid #4f46e5;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.15);
  flex-shrink: 0;
}

.avatar-img-sm {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Info Admin yang Ringkas */
.admin-info-sm {
  line-height: 1.3;
  overflow: hidden;
}

.admin-name-sm {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #2d3748;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-role-sm {
  font-size: 12px;
  color: #718096;
  display: block;
}

/* Fallback jika gambar tidak ada */
.avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #10b981);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
}



/* Gambar Avatar - PERBAIKAN */

.avatar-img:hover {
    transform: scale(1.05);
}

/* Detail User */
.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.user-role {
    font-size: 0.85rem;
    color: #6c757d;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 12px;
    display: inline-block;
    margin-top: 5px;
}
/* User Profile di Header */
.user-profile-header {
    display: flex;
    align-items: center;
    margin-right: 1rem;
}

/* Adjust ukuran untuk header */
.user-profile-header .admin-profile-compact {
    padding: 0.25rem 0.5rem;
    border-radius: 50px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.user-profile-header .admin-name-sm {
    font-size: 0.8rem;
    white-space: nowrap;
}

.user-profile-header .admin-role-sm {
    font-size: 0.7rem;
}

/* Hover effect */
.user-profile-header .admin-profile-compact:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Penyesuaian untuk header */
.main-header .d-flex {
    width: 100%;
}
.header-right-section {
    margin-left: auto; /* Ini yang akan mendorong ke kanan */
    gap: 1rem; /* Jarak antara elemen */
}

/* User profile di header */
.user-profile-header {
    border-right: 1px solid #dee2e6;
    padding-right: 1rem;
    margin-right: 1rem;
}

.user-profile-header .avatar-wrapper-sm {
    width: 32px;
    height: 32px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #dee2e6;
}

.user-profile-header .admin-name-sm {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0;
}

.user-profile-header .admin-role-sm {
    font-size: 0.75rem;
    color: #6c757d;
}

/* Hover effect */
.user-profile-header .admin-profile-compact:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.btn-toolbar .btn-group {
    display: flex;
    align-items: center;
}


/* pagination */
.pagination-container {
        display: flex;
        justify-content: center;
        margin-top: 20px;
    }
    
    .pagination {
        display: flex;
        list-style: none;
        padding: 0;
        border-radius: 5px;
        overflow: hidden;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    
    .page-item {
        margin: 0;
    }
    
    .page-link {
        position: relative;
        display: block;
        padding: 8px 16px;
        margin-left: -1px;
        line-height: 1.5;
        color: #3490dc;
        background-color: #fff;
        border: 1px solid #dee2e6;
        transition: all 0.3s ease;
    }
    
    .page-item:first-child .page-link {
        border-top-left-radius: 5px;
        border-bottom-left-radius: 5px;
    }
    
    .page-item:last-child .page-link {
        border-top-right-radius: 5px;
        border-bottom-right-radius: 5px;
    }
    
    .page-item.active .page-link {
        z-index: 1;
        color: #fff;
        background-color: #3490dc;
        border-color: #3490dc;
    }
    
    .page-item.disabled .page-link {
        color: #6c757d;
        pointer-events: none;
        background-color: #fff;
        border-color: #dee2e6;
    }
    
    .page-link:hover {
        z-index: 2;
        color: #1d68a7;
        background-color: #e9ecef;
        border-color: #dee2e6;
    }
    
    .page-link:focus {
        z-index: 2;
        outline: 0;
        box-shadow: 0 0 0 0.2rem rgba(52, 144, 220, 0.25);
    }

    /* card collapse */
/* Tambahkan ini di CSS Anda */
.collapse {
  transition: height 0.35s ease;
}

.card {
  overflow: hidden; /* Ini membantu animasi collapse */
}

.card-header {
  padding: 0.75rem 1.25rem;
  margin-bottom: 0;
  background-color: rgba(0, 0, 0, 0.03);
  border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}
/* Pastikan body tidak memiliki padding/margin yang mengganggu */
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Container utama */
.container-fluid.g-0 {
    position: relative;
}
.card-body {
  padding: 1.25rem;
}

#loadingModal {
    z-index: 99999;
}

/* Style untuk tombol upload */
#uploadButton {
    position: relative;
}

#uploadSpinner {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* Pastikan modal tidak tertutup saat klik diluar */
.modal {
    pointer-events: none;
}

.modal-dialog {
    pointer-events: all;
}

