:root {
    /* Light Mode (Default) */
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --success-gradient: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --danger-gradient: linear-gradient(135deg, #ef4444 0%, #f43f5e 100%);
    --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);

    /* Light Mode Colors */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.9);
}

.link-animasi {
    color: #564c16;
    text-decoration: none;
    position: relative;
    display: inline-block;
    padding: 8px 16px;
    transition: color 0.3s ease;
}

.link-animasi::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(86, 76, 22, 0.2);
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    animation: none;
}

.link-animasi:hover::before {
    width: 100px;
    height: 100px;
    animation: pulse 1s ease infinite;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.8;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.3;
    }

    100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0.8;
    }
}

.month-btn {
    border: none;
    background: #f1f5f9;
    color: #334155;
    padding: 9px 18px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: .25s;
    white-space: nowrap;
}

.month-btn:hover,
.month-btn.active {
    background: #2563eb;
    color: white;
    box-shadow: 0 6px 15px rgba(37, 99, 235, .20);
}

/* Dark Mode - Optional (bisa diaktifkan dengan menambahkan class .dark-mode pada body) */
.dark-mode {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: rgba(30, 41, 59, 0.95);
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-light: #334155;
    --border-medium: #475569;
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    --glass-bg: rgba(30, 41, 59, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
}

.custom-index {
    min-height: calc(100vh - 120px);
    padding: 0.5rem;
    position: relative;
}

/* Decorative background pattern */
.custom-index::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.premium-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: auto;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), 0 24px 48px rgba(0, 0, 0, 0.15);
    border-color: rgba(99, 102, 241, 0.2);
}

.premium-card-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(10px);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.dark-mode .premium-card-header {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
    border-bottom: 1px solid var(--border-light);
}

.premium-card-header h3 {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
    margin: 0;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.premium-card-header h3 i {
    margin-right: 12px;
    font-size: 1.6rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.premium-card-body {
    padding: 2rem;
    flex: 1;
}

.premium-card-footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-light);
    padding: 1.25rem 2rem;
    flex-shrink: 0;
}

.filter-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.filter-btn {
    padding: 10px 28px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    color: var(--text-secondary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.filter-btn i {
    margin-right: 8px;
    font-size: 1rem;
}

.filter-btn:hover {
    transform: translateY(-2px);
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
    text-decoration: none;
}

.filter-btn.active {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
    box-shadow: var(--shadow-glow);
}

.filter-btn.total.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.filter-btn.aktif.active {
    background: linear-gradient(135deg, #10b981, #34d399);
}

.filter-btn.selesai.active {
    background: linear-gradient(135deg, #ef4444, #f43f5e);
}

.search-box {
    position: relative;
    margin-bottom: 28px;
}

.search-box input {
    width: 100%;
    padding: 14px 24px 14px 52px;
    border: 1px solid var(--border-light);
    border-radius: 48px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: var(--bg-card);
    color: var(--text-primary);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box input:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    background: var(--bg-card);
}

.search-box i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.2rem;
}

.clear-search {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    transition: all 0.2s;
}

.clear-search:hover {
    color: #f43f5e;
}

.btn-premium {
    background: var(--primary-gradient);
    border: none;
    color: white;
    padding: 10px 24px;
    border-radius: 40px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-glow);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
    color: white;
    filter: brightness(1.05);
}

.btn-report {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    border: none;
    color: white;
    padding: 10px 24px;
    border-radius: 40px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-report:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
    color: white;
}

.premium-table {
    width: 100%;
    margin-bottom: 0;
}

.premium-table thead {
    background: var(--primary-gradient);
    border-radius: 16px;
}

.premium-table thead th {
    padding: 1.25rem 1rem;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    vertical-align: middle;
    color: white;
    background: transparent;
}

.premium-table tbody tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
}

.premium-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.04);
    transform: scale(1.01);
}

.premium-table tbody td {
    padding: 1.25rem 1rem;
    vertical-align: middle;
    color: var(--text-primary);
    font-weight: 500;
    border: none;
}

.status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(52, 211, 153, 0.1));
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.dark-mode .status-active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(52, 211, 153, 0.2));
    color: #34d399;
}

.status-inactive {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(244, 63, 94, 0.1));
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.dark-mode .status-inactive {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(244, 63, 94, 0.2));
    color: #f43f5e;
}

.status-pending {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.1));
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.dark-mode .status-pending {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(251, 191, 36, 0.2));
    color: #fbbf24;
}

.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-action {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
}

.btn-action i {
    font-size: 1rem;
}

.btn-view {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

.btn-view:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
    color: white;
}

.btn-edit {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: white;
}

.btn-edit:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
    color: white;
}

.btn-delete {
    background: linear-gradient(135deg, #ef4444, #f43f5e);
    color: white;
}

.btn-delete:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
    color: white;
}

.table-responsive-premium {
    overflow-x: auto;
    margin-bottom: 0;
    border-radius: 16px;
}

.pagination-container {
    margin-top: 2rem;
    padding-top: 1rem;
}

.pagination {
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.pagination .page-item .page-link {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    border-radius: 12px;
    padding: 8px 14px;
    transition: all 0.3s;
}

.pagination .page-item.active .page-link {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
}

.pagination .page-item .page-link:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.page-size-selector {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
}

.page-size-selector select {
    padding: 6px 12px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
}

.info-stats {
    background: var(--bg-primary);
    padding: 14px 20px;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
}

.empty-state {
    text-align: center;
    padding: 4rem;
}

.empty-state i {
    font-size: 5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.empty-state p {
    color: var(--text-muted);
    margin-top: 1rem;
}

.sort-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-primary);
    border-radius: 20px;
    align-items: center;
    border: 1px solid var(--border-light);
}

.sort-button {
    padding: 8px 18px;
    border: 1px solid var(--border-light);
    background: var(--bg-card);
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 13px;
    text-decoration: none;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sort-button:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.sort-button.active {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
}

.sort-button i {
    font-size: 12px;
}

/* Scrollbar styling Light Mode */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #cbd5e1, #94a3b8);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #94a3b8, #64748b);
}

.dark-mode ::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

.dark-mode ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #475569, #334155);
}

.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #64748b, #475569);
}

/* Theme Toggle Button Style */
.theme-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    z-index: 1000;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
    .custom-index {
        padding: 1rem;
    }

    .premium-table thead th {
        font-size: 0.7rem;
        padding: 0.75rem;
    }

    .premium-table tbody td {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    .filter-buttons {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 20px;
        font-size: 0.8rem;
    }

    .info-stats {
        flex-direction: column;
        align-items: stretch;
    }

    .premium-card-body {
        padding: 1.25rem;
    }

    .premium-card-header {
        padding: 1rem 1.25rem;
    }

    .sort-buttons {
        padding: 12px;
    }

    .theme-toggle {
        bottom: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

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

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

@keyframes glowPulse {
    0% {
        box-shadow: 0 0 5px rgba(99, 102, 241, 0.1);
    }

    100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease forwards;
}

/* Container untuk tombol aksi */
.action-buttons-form {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light, #e2e8f0);
}

/* Tombol Simpan - Premium */
.btn-save {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    border: none;
    color: white;
    padding: 12px 32px;
    border-radius: 40px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-save i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
    color: white;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
    filter: brightness(1.05);
    color: white;
}

.btn-save:hover i {
    transform: scale(1.1);
    color: white;
}

.btn-save:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    color: white;
}

/* Efek ripple untuk tombol simpan */
.btn-save::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    color: white;
}

.btn-save:active::before {
    width: 300px;
    height: 300px;
    color: white;
}

/* Tombol Batal - Premium */
.btn-cancel {
    background: transparent;
    border: 1.5px solid var(--border-medium, #cbd5e1);
    color: var(--text-secondary, #475569);
    padding: 12px 32px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card, #ffffff);
}

.btn-cancel i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.btn-cancel:hover {
    background: #fef2f2;
    border-color: #ef4444;
    color: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.btn-cancel:hover i {
    transform: rotate(90deg);
}

.btn-cancel:active {
    transform: translateY(0);
}

/* Variasi ukuran tombol */
.btn-save-sm,
.btn-cancel-sm {
    padding: 8px 24px;
    font-size: 0.85rem;
}

.btn-save-lg,
.btn-cancel-lg {
    padding: 14px 40px;
    font-size: 1rem;
}

/* Variasi full width */
.btn-save-full,
.btn-cancel-full {
    width: 100%;
    justify-content: center;
}

/* Tombol simpan dengan icon loading */
.btn-save.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-save.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Disabled state */
.btn-save:disabled,
.btn-cancel:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-save:disabled:hover,
.btn-cancel:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Dark mode support (opsional) */
.dark-mode .btn-save {
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.dark-mode .btn-cancel {
    background: var(--bg-card, #1e293b);
    border-color: var(--border-medium, #475569);
    color: var(--text-secondary, #cbd5e1);
}

.dark-mode .btn-cancel:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #f87171;
}

/* Responsive */
@media (max-width: 768px) {
    .action-buttons-form {
        gap: 12px;
        margin-top: 20px;
        padding-top: 16px;
    }

    .btn-save,
    .btn-cancel {
        padding: 10px 24px;
        font-size: 0.9rem;
    }

    .btn-save-sm,
    .btn-cancel-sm {
        padding: 6px 20px;
        font-size: 0.8rem;
    }

    .btn-save-lg,
    .btn-cancel-lg {
        padding: 12px 32px;
        font-size: 0.95rem;
    }
}

/* Contoh penggunaan dengan form group */
.form-group-buttons {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    align-items: center;
}

/* Tombol simpan dengan efek success */
.btn-save.success {
    background: linear-gradient(135deg, #10b981, #34d399);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-save.success:hover {
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

/* Tombol batal dengan efek danger */
.btn-cancel.danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
}

/* Stagger animation untuk container */
.action-buttons-form {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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