/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.2/font/bootstrap-icons.css');

/* Import modular CSS files */
@import url('./components/header.css');
@import url('./components/forms.css');
@import url('./components/tables.css');
@import url('./components/cards.css');
@import url('./components/buttons.css');
@import url('./components/modals.css');
@import url('./pages/dashboard.css');
@import url('./pages/backup.css');
@import url('./pages/laporan.css');
@import url('./responsive.css');

/* Reset dan Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #ffffff;
    color: #ffffff00;
    line-height: 1.2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Layout */
.container {
    max-width: 80vw !important;
    margin: 0 auto;
    padding: 0 20px;
}

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Header Minimalis */
.top-header {
    background: var(--header-bg, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100% !important;
    margin: 0;
    padding: 0 20px;
    width: 100%;
    gap: 20px; /* Menambahkan gap untuk spacing yang lebih baik */
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-width: 200px;
    flex: 0 0 auto; /* Memastikan logo tidak menyusut */
}

.header-logo img {
    height: 35px;
    width: auto;
}

.header-title {
    font-size: 1.2rem !important;
    font-weight: 500 !important;
    margin: 0;
    white-space: nowrap;
}

.header-title.hidden {
    display: none;
}

.header-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    margin: 0; /* Menghilangkan margin yang tidak perlu */
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 15px;
    margin: 0;
    padding: 0;
    justify-content: center;
    align-items: center;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-size: 14px;
}

.nav-menu a:hover,
.nav-menu a.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,0.3); /* Menambahkan border untuk visibilitas */
}

.user-avatar:hover {
    background: rgba(255,255,255,0.3);
}

.user-dropdown {
    position: relative;
    flex-shrink: 0;
    min-width: 60px; /* Memperbesar min-width */
    display: flex;
    justify-content: flex-end; /* Memastikan user dropdown di pojok kanan */
    flex: 0 0 auto; /* Memastikan user dropdown tidak menyusut */
}

.dropdown-menu {
    position: fixed;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    min-width: 200px;
    padding: 10px 0;
    margin-top: 10px;
    display: none;
    z-index: 1001;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: #374151 !important;
    text-decoration: none;
    gap: 10px;
    transition: background 0.3s ease;
    font-size: 14px;
}

.dropdown-menu a:hover {
    background: #f3f4f6;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 0;
}

.content-wrapper {
    max-width: 80vw !important;
    width: 80vw;
    margin: 0 auto;
    padding: 10px 20px;
}

/* Khusus untuk dashboard, buat lebih luas */
.dashboard-content {
    max-width: 80vw !important;
    width: 80vw;
    margin: 0 auto;
    padding: 20px;
}

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.card-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.card-body {
    padding: 30px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #374151;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.file-upload {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.file-upload input[type=file] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: #f3f4f6;
    border: 2px dashed #d1d5db;
    border-radius: 6px;
    color: #6b7280;
    transition: all 0.3s ease;
    gap: 8px;
}

.file-upload:hover .file-upload-btn {
    border-color: #667eea;
    background: #f0f4ff;
    color: #667eea;
}

.color-picker-group {
    display: flex;
    gap: 15px;
    align-items: center;
}

.color-input {
    width: 60px;
    height: 40px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.table th {
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
}

.table tbody tr:hover {
    background: #f8fafc;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge i {
    font-size: 0.7rem;
}

.badge-primary {
    background: #1e40af;
    color: #ffffff;
    font-weight: 600;
}

.badge-success {
    background: #166534;
    color: #ffffff;
    font-weight: 600;
}

.badge-warning {
    background: #fbbf24;
    color: #92400e;
    font-weight: 600;
}

.badge-danger {
    background: #991b1b;
    color: #ffffff;
    font-weight: 600;
}

.badge-info {
    background: #0891b2;
    color: #ffffff;
    font-weight: 600;
}

.badge-secondary {
    background: #6b7280;
    color: #ffffff;
    font-weight: 600;
}

/* Hover effects untuk badge */
.badge-primary:hover {
    background: #1d4ed8;
}

.badge-success:hover {
    background: #15803d;
}

.badge-info:hover {
    background: #0e7490;
}

.badge-warning:hover {
    background: #f59e0b;
    color: #78350f;
}

.badge-danger:hover {
    background: #b91c1c;
}

.badge-secondary:hover {
    background: #4b5563;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fed7aa;
}

/* Footer styling for scroll reveal */
.footer {
    background: var(--footer-bg, #1e293b);
    color: #f8fafc;
    padding: 20px 0;
    margin-top: auto;
    display: none; /* Hidden by default */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-content p {
    margin: 0;
    font-size: 14px;
    color: #cbd5e1;
}

/* Login Page Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 20px;
    background: var(--login-bg, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    width: 100%;
    max-width: 400px;
    margin-right: 10%;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    max-width: 120px;
    height: auto;
    margin-bottom: 20px;
}

.login-header h1 {
    color: #1e293b;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.login-header p {
    color: #64748b;
}

/* Burger Menu */
.burger-menu {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    gap: 3px;
}

.burger-menu span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Media Queries untuk Header Responsif */
@media (max-width: 1200px) {
    .nav-menu {
        gap: 10px;
    }
    
    .nav-menu a {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .header-logo {
        min-width: 150px;
    }
}

@media (max-width: 992px) {
    .nav-menu a span {
        display: none;
    }
    
    .nav-menu a {
        padding: 8px;
        gap: 0;
    }
    
    .header-nav {
        margin: 0 10px;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 0 15px;
        max-width: 100% !important;
    }
    
    .header-nav {
        display: none;
    }
    
    .burger-menu {
        display: flex;
    }
    
    .header-logo {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0 10px;
        max-width: 100% !important;
    }
    
    .header-logo img {
        height: 30px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .header-title {
        font-size: 1rem !important;
    }
    
    .login-container {
        justify-content: center;
    }
    
    .login-card {
        margin-right: 0;
        max-width: 350px;
    }
    
    .content-wrapper {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .user-info {
        gap: 10px;
    }
    
    .header-logo {
        gap: 5px;
    }
    
    .header-title {
        font-size: 1rem;
    }
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-3 { margin-top: 1.5rem; }
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.gap-2 { gap: 0.5rem; }
.hidden { display: none !important; }

/* Table Responsive */
.table-responsive {
    overflow-x: auto;
    margin: -1px;
}

.table-responsive .table {
    margin-bottom: 0;
    min-width: 800px;
}

/* Avatar in table */
.table .user-avatar {
    margin: 0;
}

/* Action buttons */
.btn-group {
    display: flex;
    gap: 5px;
}

/* Profile page specific */
.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #e5e7eb;
}

.profile-info {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}


/* Tab System Styles */
.tab-container {
    margin-bottom: 30px;
}

.tab-nav {
    display: flex;
    background: #f8fafc;
    border-radius: 12px 12px 0 0;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    overflow: hidden;
}

.tab-nav button {
    flex: 1;
    padding: 15px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #64748b;
    transition: all 0.3s ease;
    position: relative;
}

.tab-nav button:hover {
    background: #e2e8f0;
    color: #475569;
}

.tab-nav button.active {
    background: white;
    color: #3b82f6;
    border-bottom: 3px solid #3b82f6;
}

.tab-nav button i {
    margin-right: 8px;
}

.tab-content {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 12px 12px;
    min-height: 400px;
}

.tab-pane {
    display: none;
    padding: 30px;
}

.tab-pane.active {
    display: block;
}

.tab-pane .card {
    margin-bottom: 25px;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tab-pane .card:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .tab-nav {
        flex-direction: column;
    }
    
    .tab-nav button {
        text-align: left;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .tab-nav button:last-child {
        border-bottom: none;
    }
}

/* Admin Dropdown Styles */
.nav-menu .dropdown {
    position: relative;
}

.nav-menu .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    min-width: 220px;
    padding: 10px 0;
    margin-top: 10px;
    display: none;
    z-index: 1001;
    list-style: none;
}

.nav-menu .dropdown-menu.show {
    display: block;
}

.nav-menu .dropdown-menu li {
    margin: 0;
}

.nav-menu .dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #374151 !important;
    text-decoration: none;
    gap: 10px;
    transition: background 0.3s ease;
    background: transparent !important;
    border-radius: 0;
}

.nav-menu .dropdown-menu a:hover {
    background: #f3f4f6 !important;
    color: #1f2937 !important;
}

.nav-menu .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-menu .dropdown-toggle .fa-chevron-down {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.nav-menu .dropdown.show .fa-chevron-down {
    transform: rotate(180deg);
}

/* Pastikan dropdown admin terlihat dengan benar */
.nav-menu .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    min-width: 220px;
    padding: 10px 0;
    margin-top: 10px;
    display: none !important; /* Force hide by default */
    z-index: 1001;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.nav-menu .dropdown-menu.show {
    display: block !important; /* Force show when active */
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Submenu Dropdown Styles */
.nav-menu .dropdown-submenu {
    position: relative;
}

.nav-menu .dropdown-submenu-menu {
    position: absolute;
    top: 0;
    left: 100%;
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    min-width: 200px;
    padding: 10px 0;
    margin-left: 10px;
    display: none;
    z-index: 1001;
    list-style: none;
}

.nav-menu .dropdown-submenu:hover .dropdown-submenu-menu {
    display: block;
}

.nav-menu .dropdown-submenu > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.nav-menu .dropdown-submenu > a .fas.fa-chevron-right {
    font-size: 0.8rem;
    margin-left: 10px;
}

.nav-menu .dropdown-submenu-menu li {
    margin: 0;
}

.nav-menu .dropdown-submenu-menu li a {
    padding: 8px 20px;
    color: #374151;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.nav-menu .dropdown-submenu-menu li a:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.nav-menu .dropdown-submenu-menu li a i {
    margin-right: 10px;
    width: 16px;
    text-align: center;
    color: #6b7280;
}

/* JavaScript-controlled dropdown visibility */
.nav-menu .dropdown-submenu-menu.show {
    display: block !important;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1051;
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #1e293b;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.close {
    color: #64748b;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #1e293b;
}



/* Alert Styles */
.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-info {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Page Header */
.page-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 5px 0;
}

.page-description {
    color: #64748b;
    margin: 0;
}

/* Mobile Burger Menu */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.burger-menu span {
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Sidebar - Fullscreen Mode */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100vw; /* Fullscreen width */
    height: 100vh;
    background: linear-gradient(180deg, #1e293b 0%, #334155 100%);
    z-index: 1002;
    transition: left 0.3s ease;
    overflow-y: auto;
    color: white;
    /* Hide scrollbar */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
    display: none; /* Hide by default on desktop */
}

/* Hide scrollbar for WebKit browsers */
.mobile-sidebar::-webkit-scrollbar {
    display: none;
}

.mobile-sidebar.active {
    left: 0;
}

/* Remove overlay since we're using fullscreen */
.mobile-sidebar-overlay {
    display: none;
}

.mobile-sidebar-header {
    padding: 30px 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2); /* Slightly darker header */
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-user-avatar {
    width: 60px; /* Larger avatar */
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 24px; /* Larger font */
}

.mobile-user-details {
    flex: 1;
}

.mobile-user-name {
    font-weight: 600;
    font-size: 18px; /* Larger name */
    margin-bottom: 4px;
}

.mobile-user-role {
    font-size: 14px; /* Larger role text */
    color: rgba(255, 255, 255, 0.7);
}

.mobile-sidebar-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 24px; /* Larger close button */
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-sidebar-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-sidebar-content {
    padding: 30px 0; /* More padding */
}

.mobile-menu-section {
    margin-bottom: 40px; /* More spacing */
}

.mobile-menu-section h3 {
    padding: 0 20px 15px;
    font-size: 14px; /* Larger section titles */
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-list li {
    margin: 0;
}

.mobile-menu-list a {
    display: flex;
    align-items: center;
    padding: 20px 20px; /* More padding for easier touch */
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    gap: 20px; /* More gap */
    transition: all 0.3s ease;
    border-left: 4px solid transparent; /* Thicker border */
    font-size: 16px; /* Larger text */
}

.mobile-menu-list a:hover,
.mobile-menu-list a.active {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: #3b82f6;
    color: white;
}

.mobile-menu-list a.logout-link {
    color: #ef4444;
}

.mobile-menu-list a.logout-link:hover {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: #ef4444;
}

.mobile-menu-list a i {
    width: 24px; /* Larger icons */
    text-align: center;
    font-size: 20px;
}

/* Mobile Bottom Navigation - Dark Theme */
.mobile-bottom-nav {
    display: none; /* Hidden by default on desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1f2937; /* Dark background */
    border-top: 1px solid #374151;
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
    z-index: 1000;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.3);
    justify-content: space-around;
    align-items: center;
    transition: transform 0.3s ease;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    text-decoration: none;
    color: #d1d5db; /* Light gray text */
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
    min-width: 60px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.bottom-nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
    color: #d1d5db; /* Light gray icons */
}

.bottom-nav-item.active {
    color: #60a5fa; /* Light blue for active */
    background: rgba(96, 165, 250, 0.15);
}

.bottom-nav-item.active i {
    color: #60a5fa;
}

.bottom-nav-item:hover {
    color: #f3f4f6; /* Bright white on hover */
    background: rgba(255, 255, 255, 0.1);
}

.bottom-nav-item:hover i {
    color: #f3f4f6;
}

.bottom-nav-item.menu-trigger {
    color: #a78bfa; /* Purple for menu */
}

.bottom-nav-item.menu-trigger i {
    color: #a78bfa;
}

.bottom-nav-item.menu-trigger:hover {
    color: #c4b5fd;
    background: rgba(167, 139, 250, 0.15);
}

.bottom-nav-item.menu-trigger:hover i {
    color: #c4b5fd;
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Show burger menu and mobile sidebar only on mobile devices */
@media (max-width: 768px) {
    .header-content {
        padding: 0 15px;
        position: relative;
        max-width: 100% !important;
    }
    
    .burger-menu {
        display: flex; /* Show burger menu on mobile */
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .mobile-sidebar {
        display: block; /* Show mobile sidebar on mobile */
        width: 100vw;
    }
    
    .nav-menu {
        display: none; /* Hide desktop navigation on mobile */
    }
    
    .user-dropdown {
        display: flex !important;
        position: absolute;
        right: 60px;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .mobile-bottom-nav {
        display: flex; /* Show bottom nav on mobile */
    }
    
    .header-title {
        font-size: 1.2rem;
    }
    
    .login-container {
        justify-content: center;
    }
    
    .login-card {
        margin-right: 0;
        max-width: 350px;
    }
    
    .content-wrapper {
        padding: 0 15px;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding-bottom: 80px; /* Space for bottom nav */
    }
}

/* Mobile Dropdown Styles */
.mobile-dropdown {
    position: relative;
}

.mobile-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin-bottom: 2px;
}

.mobile-dropdown-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.mobile-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
    margin-left: auto;
}

.mobile-dropdown.active .mobile-arrow {
    transform: rotate(180deg);
}

.mobile-dropdown-menu {
    display: none;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin: 5px 0 10px 0;
    padding: 5px 0;
    overflow: hidden;
}

.mobile-dropdown-menu.show {
    display: block;
    animation: slideDown 0.3s ease;
}

.mobile-dropdown-menu li {
    list-style: none;
}

.mobile-dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 10px 25px;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.mobile-dropdown-menu a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    padding-left: 30px;
}

.mobile-dropdown-menu i {
    margin-right: 10px;
    width: 16px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9); /* Icon lebih terang */
}

.mobile-dropdown-menu a:hover i {
    color: white; /* Icon pure white saat hover */
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 300px;
    }
}

/* Mobile Sidebar Dropdown Menu - Only for Mobile */
@media (max-width: 768px) {
    .mobile-sidebar .dropdown-menu {
        display: none !important;
        position: static !important;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 8px;
        margin: 8px 0;
        padding: 8px 0;
        border-left: 4px solid transparent;
        box-shadow: none;
        min-width: auto;
        top: auto;
        right: auto;
        z-index: auto;
    }

    .mobile-sidebar .dropdown-menu.show {
        display: block !important;
    }

    .mobile-sidebar .dropdown-menu li {
        margin: 0;
    }

    .mobile-sidebar .dropdown-menu a {
        padding: 12px 40px;
        font-size: 14px;
        color: rgba(255, 255, 255, 0.95); /* Lebih terang dari 0.8 ke 0.95 */
        border-left: none;
    }

    .mobile-sidebar .dropdown-menu a:hover {
        background: rgba(255, 255, 255, 0.15); /* Background hover lebih terang */
        color: white; /* Pure white saat hover */
    }
    
    .mobile-sidebar .dropdown-menu i {
        color: rgba(255, 255, 255, 0.9); /* Icon lebih terang */
    }
    
    .mobile-sidebar .dropdown-menu a:hover i {
        color: white; /* Icon pure white saat hover */
    }

    .mobile-sidebar .dropdown-toggle .fas.fa-arrow-down {
        transition: transform 0.3s ease;
        margin-left: auto;
    }

    .mobile-sidebar .dropdown.show .fas.fa-arrow-down {
        transform: rotate(180deg);
    }
}

/* Ensure desktop navigation is visible on larger screens */
@media (min-width: 769px) {
    .burger-menu {
        display: none !important; /* Force hide burger menu on desktop */
    }
    
    .mobile-sidebar {
        display: none !important; /* Force hide mobile sidebar on desktop */
    }
    
    .nav-menu {
        display: flex; /* Show desktop navigation */
    }
    
    .mobile-bottom-nav {
        display: none !important; /* Hide bottom nav on desktop */
    }
    
    .header-content {
        max-width: 100% !important;
        padding: 0 20px;
    }
}

@media (max-width: 768px) {
    .mobile-sidebar {
        width: 100vw; /* Ensure fullscreen on all mobile devices */
    }
}

@media (max-width: 480px) {
    .mobile-sidebar-header {
        padding: 25px 20px 20px;
    }
    
    .mobile-user-avatar {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .mobile-user-name {
        font-size: 16px;
    }
    
    .mobile-user-role {
        font-size: 12px;
    }
    
    .mobile-menu-list a {
        padding: 18px 20px;
        font-size: 15px;
    }
    
    .mobile-menu-list a i {
        width: 22px;
        font-size: 18px;
    }
    
    .header-logo {
        gap: 5px;
    }
    
    .header-title {
        font-size: 1rem;
    }
    
    .bottom-nav-item {
        padding: 6px 8px;
        min-width: 50px;
    }
    
    .bottom-nav-item i {
        font-size: 18px;
    }
    
    .bottom-nav-item span {
        font-size: 11px;
    }
    
    .burger-menu {
        right: 15px;
    }
    
    .header-content {
        padding: 0 10px;
    }
}

/* Untuk layar yang sangat kecil */
@media (max-width: 360px) {
    .burger-menu {
        right: 12px;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    .mobile-sidebar {
        width: 100vw;
    }
    
    .mobile-sidebar-header {
        padding: 20px;
    }
    
    .mobile-user-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .mobile-menu-list a {
        padding: 12px 20px;
    }
}

/* Safe area support for devices with notch */
@supports (padding: max(0px)) {
    .mobile-bottom-nav {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }
}

/* Backup Page Styles */
.backup-icon {
    padding: 20px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.backup-icon:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.backup-icon i {
    transition: all 0.3s ease;
}

.backup-icon:hover i {
    transform: scale(1.1);
}

/* Responsive adjustments for backup cards */
@media (max-width: 768px) {
    .backup-icon {
        padding: 15px;
        margin-top: 15px;
    }
    
    .backup-icon i {
        font-size: 2.5rem !important;
    }
}

/* Compact Backup Cards */
.backup-icon-compact {
    display: inline-block;
    width: 60px;
    height: 60px;
    line-height: 60px;
    border-radius: 50%;
    background: rgba(0,0,0,0.05);
    margin-bottom: 10px;
}

.backup-icon-compact i {
    vertical-align: middle;
}

/* Hover effects for backup cards */
.card.border-primary:hover {
    box-shadow: 0 4px 15px rgba(0,123,255,0.2);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

.card.border-success:hover {
    box-shadow: 0 4px 15px rgba(40,167,69,0.2);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

.card.border-info:hover {
    box-shadow: 0 4px 15px rgba(23,162,184,0.2);
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .backup-icon-compact {
        width: 50px;
        height: 50px;
        line-height: 50px;
    }
    
    .backup-icon-compact i {
        font-size: 1.5rem;
    }
}

/* Bootstrap Modal Override */
.modal.fade {
    z-index: 1055 !important;
}

.modal-backdrop {
    z-index: 1054 !important;
}

/* Pastikan form input bisa diakses */
.modal-body input,
.modal-body select,
.modal-body textarea {
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

/* Modal styling untuk audit detail */
.modal-dialog {
    max-width: 90%;
    margin: 1.75rem auto;
}

.modal-content {
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}

.modal-body {
    padding: 20px;
    max-height: 70vh;
    overflow-y: auto;
}

.audit-detail-table {
    margin-bottom: 0;
}

.audit-detail-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    width: 150px;
}

.table-warning {
    background-color: #fff3cd !important;
}

@media (max-width: 768px) {
    .modal-dialog {
        max-width: 95%;
        margin: 0.5rem;
    }
    
    .modal-body {
        padding: 15px;
        max-height: 60vh;
    }
}

#auditDetailModal .audit-detail {
    font-size: 14px;
}

#auditDetailModal .audit-detail h6 {
    color: #374151;
    font-weight: 600;
    margin-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 8px;
}

#auditDetailModal .audit-detail .table-sm td {
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
}

#auditDetailModal .audit-detail .bg-light {
    background-color: #f8fafc !important;
    border: 1px solid #e5e7eb;
}

#auditDetailModal .audit-detail pre {
    font-size: 12px;
    max-height: 200px;
    overflow-y: auto;
}

/* Update content wrapper width to 80% */
body .content-wrapper,
body .container,
body .header-content {
    max-width: 80vw !important;
    margin: 0 auto;
}

body .content-wrapper {
    width: 80vw;
}

body .container {
    width: 80vw;
}

body .header-content {
    max-width: 100% !important;
}

/* Specific page adjustments */
.backup-page .content-wrapper,
.users-page .content-wrapper,
.branches-page .content-wrapper,
.jenis-identitas-page .content-wrapper,
.alasan-permintaan-page .content-wrapper {
    max-width: 80vw !important;
    width: 80vw;
    margin: 0 auto;
    padding: 0 20px;
}

/* Users Page Specific Styles */
.users-page .content-wrapper {
    max-width: 80vw !important;
    width: 80vw;
    margin: 0 auto;
    padding: 0 20px;
}

/* User Detail View Styles */
.info-group {
    margin-bottom: 20px;
}

.info-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
    display: block;
    font-size: 14px;
}

.info-value {
    color: #1f2937;
    margin: 0;
    font-size: 15px;
}

.badge-lg {
    font-size: 14px;
    padding: 8px 16px;
}

/* User Avatar Styles */
.user-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border-radius: 50%;
}

/* Form Enhancements */
.users-page .form-group {
    margin-bottom: 20px;
}

.users-page .card {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: none;
    border-radius: 8px;
}

/* Table Responsive */
.users-page .table-responsive {
    overflow-x: auto;
    margin: 0 -15px;
}

.users-page .table {
    min-width: 800px;
    margin-bottom: 0;
}

/* Settings page specific styling */
.settings-page .content-wrapper {
    max-width: 80vw;
    width: 80vw;
}

.settings-page .tab-container {
    max-width: 100%;
}

/* Dashboard Widget Styles - Compact Version */
.dashboard-widget {
    padding: 15px !important;
    border-radius: 10px;
    text-align: center;
    color: white;
}

.dashboard-widget .widget-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
    display: block;
}

.dashboard-widget .widget-number {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.dashboard-widget .widget-label {
    margin: 5px 0 0 0;
    opacity: 0.9;
    font-size: 0.8rem;
    line-height: 1.2;
}

.dashboard-section-title {
    margin-bottom: 20px;
    color: #374151;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Responsive adjustments for dashboard widgets */
@media (max-width: 768px) {
    .dashboard-widget {
        padding: 12px !important;
    }
    
    .dashboard-widget .widget-number {
        font-size: 1.3rem;
    }
    
    .dashboard-widget .widget-label {
        font-size: 0.75rem;
    }
    
    .dashboard-section-title {
        font-size: 1rem;
    }
}

/* Table optimizations for 80% width pages */
.backup-page .table-responsive,
.users-page .table-responsive,
.branches-page .table-responsive,
.jenis-identitas-page .table-responsive,
.alasan-permintaan-page .table-responsive {
    overflow-x: auto;
    margin: 0 -15px;
}

.backup-page .table,
.users-page .table,
.branches-page .table,
.jenis-identitas-page .table,
.alasan-permintaan-page .table {
    min-width: 800px;
    margin-bottom: 0;
}

/* Card adjustments */
.backup-page .card,
.users-page .card,
.branches-page .card,
.jenis-identitas-page .card,
.alasan-permintaan-page .card {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: none;
    border-radius: 8px;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    body .content-wrapper,
    body .container {
        max-width: 90vw !important;
    }
    
    .content-wrapper,
    .dashboard-content,
    .settings-page .content-wrapper {
        max-width: 90vw !important;
        width: 90vw;
    }
    
    .users-page .content-wrapper {
        max-width: 90vw !important;
        width: 90vw;
    }
}

@media (max-width: 768px) {
    body .content-wrapper,
    body .container {
        max-width: 95vw !important;
        padding: 0 10px;
    }
    
    .content-wrapper,
    .dashboard-content,
    .settings-page .content-wrapper {
        max-width: 95vw !important;
        width: 95vw;
        padding: 0 15px;
    }
    
    .users-page .content-wrapper {
        max-width: 95vw !important;
        width: 95vw;
        padding: 0 15px;
    }
    
    .users-page .page-header .d-flex {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .users-page .card-header .d-flex {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}