@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-font: 'Inter', sans-serif;
    /* Color Palette - Enterprise Navy & White */
    --primary-color: #0F172A;
    /* Deep Navy */
    --primary-light: #1E293B;
    --primary-dark: #020617;
    --secondary-color: #F8FAFC;
    --accent-color: #3B82F6;
    /* Bright Blue Accent */
    --accent-hover: #2563EB;

    --text-main: #334155;
    --text-muted: #64748B;
    --text-light: #F8FAFC;

    --bg-main: #F1F5F9;
    --bg-card: #FFFFFF;

    --border-color: #E2E8F0;

    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #0EA5E9;

    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --topbar-height: 70px;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    --radius-md: 0.5rem;
    --radius-lg: 1rem;

    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: #CBD5E1 transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-size: 15px;
    line-height: 1.5;
    overflow-x: hidden;
    font-family: var(--primary-font);
}

html {
    overflow-x: hidden;
    width: 100%;
    scroll-behavior: smooth;
}

/* Custom Webkit Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 10px;
    border: 2px solid var(--bg-main);
}

::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: var(--transition);
}

a:hover {
    color: var(--accent-hover);
}

/* Utilities */
.text-primary {
    color: var(--primary-color) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-success {
    color: var(--success) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.fw-semibold {
    font-weight: 600 !important;
}

.d-flex {
    display: flex !important;
}

.align-items-center {
    align-items: center !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.justify-content-center {
    justify-content: center !important;
}

.w-100 {
    width: 100% !important;
}

.mt-1 {
    margin-top: 0.25rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.ms-2 {
    margin-left: 0.5rem !important;
}

.me-2 {
    margin-right: 0.5rem !important;
}


/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--accent-color);
    color: rgb(255, 255, 255);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #DC2626;
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-success:hover {
    background-color: #059669;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background-color: var(--bg-main);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 13px;
}

/* Forms */
.form-group {
    margin-bottom: 1.2rem;

}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
}

.form-control,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    font-size: 15px;
    color: var(--text-main);
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Auth Layout */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #020617;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.auth-card {
    background: rgba(255, 255, 255, 0.50);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    width: 100%;
    max-width: 400px;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    padding: 2.5rem;
    animation: fadeIn 0.5s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-card .form-label {
    color: #ffffff !important;
    font-weight: 600;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header img {
    height: 50px;
    margin-bottom: 1rem;
}

.auth-header h1 {
    font-size: 18px;
    color: var(--primary-color);
    font-weight: 750;
    line-height: 1.4;
    letter-spacing: 1px;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 14px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Dashboard Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--primary-color);
    color: white;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    height: 70px !important;
    /* Standard professional height */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 1.5rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    transition: all 0.3s ease !important;
    background: transparent !important;
    position: relative !important;
    overflow: hidden !important;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    transition: all 0.3s ease;
}

.sidebar-logo {
    max-width: 140px;
    max-height: 40px;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.sidebar-logo:hover {
    transform: scale(1.02);
}

/* Sidebar Collapsed State */
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-header {
    padding: 0 !important;
    height: 70px;
}

.sidebar.collapsed .sidebar-logo {
    max-width: 45px !important;
    max-height: 45px !important;
    width: auto !important;
    height: auto !important;
    padding: 0;
    object-fit: cover;
    object-position: left center;
}

.sidebar.collapsed .menu-label {
    opacity: 0;
    height: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

.sidebar.collapsed .menu-item {
    gap: 0;
    justify-content: center;
    padding: 0.75rem 0;
    margin: 6px 12px;
    border-radius: 10px;
}

.sidebar.collapsed .menu-item span {
    display: none;
}

.sidebar.collapsed .menu-item i {
    margin: 0;
    font-size: 20px;
}

.sidebar-header h2 span {
    transition: var(--transition);
    white-space: nowrap;
}

.sidebar-menu {
    flex: 1;
    padding: 1.5rem 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sidebar-menu::-webkit-scrollbar {
    width: 5px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    border: none;
}

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

.menu-label {
    padding: 0 1.5rem;
    font-size: 10px;
    text-transform: uppercase;
    color: #64748B;
    letter-spacing: 1.5px;
    margin-top: 1rem;
    margin-bottom: 0.6rem;
    font-weight: 700;
    white-space: nowrap;
    transition: var(--transition);
    opacity: 0.6;
}

.section-label {
    margin-top: 1.5rem;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: #94A3B8;
    gap: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 13.5px;
    margin: 6px 14px;
    border-radius: 10px;
    font-weight: 500;
    text-decoration: none;
}

.menu-item i,
.menu-item svg {
    width: 20px;
    height: 20px;
    min-width: 20px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.menu-item span {
    transition: opacity 0.3s ease;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
    color: white;
    transform: translateX(3px);
}

.menu-item:hover i,
.menu-item:hover svg {
    opacity: 1;
    color: var(--accent-color);
}

.menu-item.active {
    background: linear-gradient(135deg, var(--accent-color) 0%, #1D4ED8 100%) !important;
    color: white !important;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
    font-weight: 600;
}

.menu-item.active i,
.menu-item.active svg {
    opacity: 1;
    color: white;
}

.sidebar.collapsed .menu-item {
    margin: 6px 12px;
    padding: 12px 0;
    justify-content: center;
    gap: 0;
}

.logout-item:hover {
    background-color: rgba(239, 68, 68, 0.1) !important;
    color: var(--danger) !important;
}

.sidebar-footer {
    padding: 1.2rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background-color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.user-details {
    transition: var(--transition);
    white-space: nowrap;
}

.user-details h4 {
    font-size: 14px;
    margin: 0;
}

.user-details span {
    font-size: 12px;
    color: #94A3B8;
}

/* Main Content */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: var(--transition);
    max-width: calc(100% - var(--sidebar-width));
    overflow-x: hidden;
}

.main-wrapper.collapsed {
    margin-left: var(--sidebar-collapsed-width) !important;
    max-width: calc(100% - var(--sidebar-collapsed-width)) !important;
}

/* Topbar */
.topbar {
    height: var(--topbar-height);
    background-color: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 90;
    width: 100%;
}

.status-badge.selesai {
    background: #ECFDF5;
    color: #10B981;
    border: 1px solid #D1FAE5;
}

.status-badge.batal {
    background: #FEF2F2;
    color: #EF4444;
    border: 1px solid #FEE2E2;
}

.status-badge.retur {
    background: #FFF7ED;
    color: #EA580C;
    border: 1px solid #FFEDD5;
}

.toggle-sidebar {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
    display: block;
    /* Show everywhere */
    padding: 0.5rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.toggle-sidebar:hover {
    background-color: var(--bg-main);
    color: var(--accent-color);
}

/* Content Area */
.content {
    padding: 1.5rem;
    flex: 1;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* Stats Widgets */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
    margin-bottom: 2.5rem;
    align-items: stretch;
}

.stat-card {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    background: var(--bg-card);
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.8rem;
    flex-shrink: 0;
    font-size: 18px;
}

.stat-icon.blue {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
}

.stat-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.stat-icon.info {
    background: rgba(14, 165, 233, 0.1);
    color: var(--info);
}

.stat-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stat-icon.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.stat-icon.orange {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
}

.stat-details {
    flex: 1;
}

.stat-details h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
    margin: 4px 0 0 0;
}

.stat-details p {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0;
}


/* Tables */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 0.9rem 0.6rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: var(--bg-main);
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background-color: #F8FAFC;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.35rem 0.8rem;
    font-size: 12px;
    font-weight: 600;
    border-radius: 9999px;
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: #B45309;
}

.badge-info {
    background-color: rgba(14, 165, 233, 0.15);
    color: #0369A1;
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.15);
    color: #047857;
}

.badge-secondary {
    background-color: rgba(100, 116, 139, 0.15);
    color: #334155;
}

/* Pagination */
.pagination-wrapper {
    background: #fff;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.pagination {
    display: flex;
    list-style: none;
    gap: 6px;
    padding: 0;
    margin: 0;
    align-items: center;
}

.page-item .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.page-item .page-link:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
    transform: translateY(-1px);
}

.page-item.active .page-link {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.page-item.disabled .page-link {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.6;
}

.page-item.disabled .page-link i {
    opacity: 0.5;
}

.page-item .page-link i {
    transition: transform 0.2s;
}

.page-item:not(.disabled) .page-link:hover i {
    transform: scale(1.1);
}

/* Actions Menu */
.actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    background: var(--bg-main);
    border: 1px solid transparent;
    transition: var(--transition);
}

.btn-icon:hover {
    background: white;
    border-color: var(--border-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.btn-icon.delete:hover {
    border-color: var(--danger);
    color: var(--danger);
}

.btn-icon.edit:hover {
    border-color: var(--info);
    color: var(--info);
}

#togglePassword:hover {
    color: var(--accent-color) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-left: 0;
    }

    .toggle-sidebar {
        display: block;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Custom Paket Table - Fixed Layout */
.table-custom.paket-table {
    table-layout: auto;
    width: 100%;
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.table-custom.paket-table th,
.table-custom.paket-table td {
    padding: 0.3rem 0.2rem;
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0;
    white-space: normal;
    font-size: 11px;
}

.table-custom.paket-table thead th {
    background: #00a2e8;
    color: white !important;
    font-family: var(--primary-font);
    font-weight: 800;
    font-size: 12.5px;
    padding: 1rem 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border: none;
    text-align: center;
    vertical-align: middle;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    white-space: nowrap !important;
}

.table-custom.paket-table tbody td {
    padding: 0.8rem 0.6rem;
    font-size: 12.5px;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    text-align: center;
    font-family: var(--primary-font);
}

.table-custom.paket-table tbody tr {
    transition: background-color 0.2s ease;
    background: white;
}

.table-custom.paket-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

.table-custom.paket-table tbody tr:hover {
    background: #eff6ff !important;
}

/* Column-specific widths and alignment */
.table-custom.paket-table .col-checkbox {
    width: 25px;
}

.table-custom.paket-table .col-no {
    min-width: 80px;
    text-align: center;
}

.table-custom.paket-table tbody td.col-no {
    color: #666;
}

.table-custom.paket-table .col-nopesanan {
    width: 100px;
    text-align: center;
}

.table-custom.paket-table .col-nama {
    width: 110px;
    text-align: center;
    font-weight: 700;
}

.table-custom.paket-table tbody td.col-nama {
    color: #1e293b;
}

.table-custom.paket-table .col-tanggal {
    min-width: 130px;
    text-align: center;
}

.table-custom.paket-table tbody td.col-tanggal {
    color: #3b82f6;
}

.table-custom.paket-table .col-kode {
    width: 70px;
    text-align: center;
    font-weight: 600;
}

.table-custom.paket-table tbody td.col-kode {
    color: #3b82f6;
}

.table-custom.paket-table .col-sesi {
    min-width: 100px;
    text-align: center;
    font-weight: 500;
}

.table-custom.paket-table .col-status {
    width: 75px;
    text-align: center;
}

.table-custom.paket-table .col-petugas {
    width: 90px;
    text-align: center;
}

.table-custom.paket-table .col-aksi {
    width: 140px;
    text-align: center;
    white-space: nowrap !important;
}

/* Action buttons optimization */
.table-custom.paket-table .col-aksi .btn-action-sm {
    padding: 0.2rem 0.4rem;
    font-size: 10px;
    border-radius: 4px;
    min-width: 40px;
    display: inline-block;
    vertical-align: middle;
    font-weight: 600;
}

.table-custom.paket-table .col-aksi form {
    display: inline-block;
    margin: 0 1px !important;
}

/* Checkbox column improvements */
.table-custom.paket-table .col-checkbox {
    background: #f8fafc !important;
    border-right: 1px solid #e2e8f0 !important;
}

.table-custom.paket-table .col-checkbox input[type="checkbox"] {
    transform: scale(1.2);
    cursor: pointer;
    margin: 0;
}

/* Status badge consistency */
.table-custom.paket-table .status-badge {
    padding: 0.25rem 0.75rem;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    border: 1px solid currentColor;
}

/* Petugas avatar optimization */
.table-custom.paket-table .col-petugas .d-flex {
    gap: 0.1rem;
    white-space: nowrap;
}

/* Responsive handling */
@media (max-width: 1200px) {

    .table-custom.paket-table .col-nama,
    .table-custom.paket-table .col-kode {
        width: 140px !important;
    }

    .table-custom.paket-table .col-aksi {
        width: 120px !important;
    }
}

@media (max-width: 992px) {
    .table-responsive {
        overflow-x: auto;
    }

    .table-custom.paket-table .col-nama,
    .table-custom.paket-table .col-kode {
        width: 110px !important;
    }
}





/* Action Buttons */
.btn-action-sm {
    display: inline-block;
    padding: 0.22rem 0.5rem;
    border-radius: 4px;
    color: white !important;
    font-size: 11px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s;
}

.btn-action-sm:hover:not(:disabled) {
    opacity: 0.8;
}

.btn-action-sm:disabled {
    background-color: #e2e8f0 !important;
    color: #94a3b8 !important;
    cursor: not-allowed;
    opacity: 1;
    border: 1px solid #cbd5e1;
}

.btn-action-ambil {
    background-color: #10B981;
}

.btn-action-batal {
    background-color: #EF4444;
}

.btn-action-retur {
    background-color: #F59E0B;
}

.btn-action-reset {
    background-color: #64748b;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 10px;
}

.btn-action-delete {
    background-color: #DC2626;
}

.separator {
    color: #CBD5E1;
    margin: 0 0.2rem;
}

/* Modal Setup */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-dialog {
    background: var(--bg-card);
    border-radius: 24px;
    width: 100%;
    max-width: 650px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    margin: 1.5rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.modal-overlay.show .modal-dialog {
    transform: translateY(0);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #F8FAFC;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
}

.modal-close {
    background: #f1f5f9;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #fee2e2;
    color: #ef4444;
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    border-top: 1px solid #f1f5f9;
    background: #f8fafc;
}

/* ==========================================================================
   SAAS DASHBOARD OVERHAUL STYLES
   ========================================================================== */

/* Topbar Improvements */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.topbar-search {
    position: relative;
    display: flex;
    align-items: center;
    background: #f1f5f9;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    width: 300px;
    transition: var(--transition);
}

.topbar-search:focus-within {
    background: white;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.topbar-search i {
    color: var(--text-muted);
    font-size: 14px;
    margin-right: 10px;
}

.topbar-search input {
    background: transparent;
    border: none;
    outline: none;
    font-size: 0.85rem;
    width: 100%;
}

.action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    padding: 0.5rem;
    border-radius: 8px;
    transition: var(--transition);
}

.action-btn:hover {
    background: #f1f5f9;
    color: var(--primary-color);
}

.badge-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border: 2px solid white;
    border-radius: 50%;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
    cursor: pointer;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0.6rem;
    border-radius: 12px;
    transition: var(--transition);
}

.dropdown-trigger:hover {
    background: #f1f5f9;
}

.welcome-text {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-main);
}

.avatar-small {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 180px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    display: none;
    border: 1px solid var(--border-color);
    z-index: 1000;
}

.user-dropdown.active .dropdown-menu {
    display: block;
    animation: slideInUp 0.2s ease;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    color: var(--text-main);
    border-radius: 8px;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: #f1f5f9;
    color: var(--primary-color);
}

.dropdown-item.logout:hover {
    color: var(--danger);
}

/* Sidebar Update */
.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 10px;
}

.logo-icon {
    color: #3b82f6;
    width: 24px;
}

.logo-text {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
    color: white;
    transition: var(--transition);
}

.sidebar-menu {
    padding: 1rem 0.75rem;
}

.sidebar .menu-item {
    padding: 0.75rem 0.85rem;
    margin-bottom: 0.4rem;
    border-radius: 12px;
    font-size: 0.8rem;
    border: 1px solid transparent;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar .menu-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.sidebar .menu-item.active {
    background: var(--accent-color);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}

.user-info-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    background: #3b82f6;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    color: white;
}

.user-role {
    font-size: 0.75rem;
    opacity: 0.7;
    margin: 0;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chart-header h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

/* Responsive Table List */
.data-card {
    background: white;
    border-radius: 24px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

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

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

/* Mobile Handle */
.mobile-only {
    display: none;
}

@media (max-width: 1300px) {
    .stats-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.5rem;
    }
}

@media (max-width: 1100px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        width: 250px;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-left: 0 !important;
        max-width: 100% !important;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }

    .topbar-search {
        display: none;
    }

    .mobile-only {
        display: block;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .page-header .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Sidebar Collapse Logic - Consolidated in main sidebar section */


/* ========================================
   SELECT MODE TOGGLE STYLES
   ======================================= */

/* Checkbox column - hidden by default */
.select-checkbox-col {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    background: #f8fafc !important;
    border-right: 1px solid #e2e8f0 !important;
    width: 50px !important;
}

/* Smooth show transition */
.select-checkbox-col {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    width: 50px !important;
    background: #f8fafc;
    border-right: 1px solid #e2e8f0;
    display: table-cell !important;
    /* Always reserve space */
    visibility: hidden;
    /* Hide content but keep space */
}

.select-checkbox-col.show {
    opacity: 1 !important;
    visibility: visible !important;
}

#checkboxHeader.show {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%) !important;
    position: sticky;
    top: 0;
    z-index: 5;
    box-shadow: inset 0 -1px 0 #d1d5db;
}

/* Header checkbox styling */
#checkboxHeader {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
    position: sticky;
    top: 0;
    z-index: 5;
    border-bottom: 2px solid #e2e8f0 !important;
}

/* Select mode container */
.select-mode-container {
    display: flex !important;
    gap: 0.5rem;
    align-items: center;
}

/* Toggle button improvements */
#selectModeToggle {
    transition: all 0.2s ease !important;
    border-color: #cbd5e1 !important;
    position: relative;
}

#selectModeToggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Table layout stability */
.table-custom th,
.table-custom td {
    transition: padding-left 0.3s ease;
}

.table-custom {
    table-layout: auto;
    width: 100%;
}

/* First column reserves space for checkbox */


.table-custom thead th {
    position: relative;
}

/* Bulk delete button */
#bulkDeleteBtn[style*="display: inline-block"] {
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

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

/* SweetAlert Z-Index Correction */
.swal2-container {
    z-index: 9999 !important;
}