/* ============================================
   SISKO - Custom Styles
   Glassmorphism, Gradients, Animations
   ============================================ */

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

/* === Hide content-header (title + breadcrumbs) === */
.content-header {
    display: none !important;
}

/* === Root Variables === */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --dark: #1e293b;
    --darker: #0f172a;
    --light: #f1f5f9;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.12);
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
    --gradient-2: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    --gradient-3: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    --gradient-4: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --gradient-5: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 14px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Global === */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    background: #f0f2f5;
    -webkit-font-smoothing: antialiased;
}

/* === Scrollbar === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
    background: var(--darker) !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.login-page::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, transparent 70%);
    top: -200px;
    right: -150px;
    border-radius: 50%;
    animation: pulse-glow 4s ease-in-out infinite;
}
.login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.2) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    border-radius: 50%;
    animation: pulse-glow 5s ease-in-out infinite reverse;
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.15); opacity: 1; }
}

.login-box {
    width: 420px !important;
    z-index: 10;
}

.login-card-body {
    background: rgba(30, 41, 59, 0.85) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius) !important;
    padding: 2.5rem !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
}

.login-card-body .login-box-msg {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.login-card-body .login-logo a {
    color: #fff !important;
    font-weight: 800;
    font-size: 1.8rem;
    letter-spacing: -0.5px;
}

.login-card-body .login-logo .logo-gradient {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-card-body .input-group {
    margin-bottom: 1.2rem;
}

.login-card-body .form-control {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
    height: auto;
    transition: var(--transition);
}

.login-card-body .form-control:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}

.login-card-body .form-control::placeholder {
    color: #64748b;
}

.login-card-body .input-group-text {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-left: none !important;
    color: #94a3b8 !important;
    border-radius: 0 12px 12px 0 !important;
}

.btn-login {
    background: var(--gradient-1) !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 0.75rem !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    letter-spacing: 0.3px;
    transition: var(--transition) !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5) !important;
}

/* ============================================
   SIDEBAR
   ============================================ */
.main-sidebar {
    background: var(--darker) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    overflow-x: hidden;
}

.main-sidebar .brand-link {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 1rem 0.8rem;
}

.main-sidebar .brand-text {
    font-weight: 700 !important;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-dark-primary .nav-sidebar > .nav-item > .nav-link.active,
.sidebar-dark-primary .nav-sidebar > .nav-item.menu-open > .nav-link {
    background: var(--gradient-2) !important;
    border-radius: 10px;
    margin: 2px 8px;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.nav-sidebar .nav-link {
    border-radius: 10px !important;
    margin: 2px 8px;
    width: auto !important;
    padding: 0.6rem 1rem !important;
    transition: var(--transition);
    color: #94a3b8 !important;
    font-size: 0.88rem;
}

.nav-sidebar .nav-link:hover {
    background: rgba(99, 102, 241, 0.1) !important;
    color: #e2e8f0 !important;
}

.nav-sidebar .nav-link .nav-icon {
    margin-right: 0.6rem;
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.nav-sidebar .nav-link.active {
    color: #fff !important;
    font-weight: 600;
}

.user-panel {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 1rem 0.8rem !important;
}

.user-panel .info a {
    color: #e2e8f0 !important;
    font-weight: 600;
    font-size: 0.9rem;
}

.nav-header {
    color: #475569 !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    padding: 1.2rem 1.2rem 0.5rem !important;
}

/* Treeview / Dropdown */
.nav-sidebar .nav-item.has-treeview > .nav-link > p > .right {
    transition: transform 0.3s ease;
}

.nav-sidebar .nav-item.has-treeview.menu-open > .nav-link > p > .right {
    transform: rotate(-90deg);
}

.nav-sidebar .nav-treeview .nav-item {
    padding-left: 0.5rem;
}

.nav-sidebar .nav-treeview .nav-link {
    padding: 0.4rem 1rem !important;
    font-size: 0.84rem;
}

.nav-sidebar .nav-treeview .nav-link .nav-icon {
    font-size: 0.9rem;
    margin-right: 0.6rem;
    width: 20px;
    text-align: center;
    color: #64748b;
}

.nav-sidebar .nav-treeview .nav-link.active .nav-icon {
    color: #0ea5e9;
}

.nav-sidebar .nav-treeview .nav-link.active {
    background: rgba(14, 165, 233, 0.12) !important;
    color: #0ea5e9 !important;
    font-weight: 600;
}

.nav-sidebar .nav-treeview .nav-link:hover {
    background: rgba(14, 165, 233, 0.08) !important;
}

/* ============================================
   NAVBAR
   ============================================ */
.main-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.main-header .nav-link {
    color: var(--dark) !important;
}

/* ============================================
   CONTENT WRAPPER
   ============================================ */
.content-wrapper {
    background: #f0f2f5 !important;
}

.content-header h1 {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--dark);
}

.breadcrumb {
    background: transparent;
    margin: 0;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--primary);
}

/* ============================================
   STAT CARDS (Dashboard)
   ============================================ */
.stat-card {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    color: #fff;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    border-radius: var(--border-radius);
    z-index: 0;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-card .card-body {
    position: relative;
    z-index: 1;
    padding: 1.5rem;
}

.stat-card .stat-icon {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 3rem;
    opacity: 0.2;
    z-index: 1;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-1 { background: var(--gradient-1); }
.stat-card-2 { background: var(--gradient-2); }
.stat-card-3 { background: var(--gradient-3); }
.stat-card-4 { background: var(--gradient-4); }

/* ============================================
   CARD GLOBAL
   ============================================ */
.card {
    border: none !important;
    border-radius: var(--border-radius) !important;
    box-shadow: var(--shadow-sm) !important;
    transition: var(--transition);
    overflow: hidden;
}

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

.card-header {
    background: transparent !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 1.2rem 1.5rem !important;
}

.card-header .card-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--dark);
}

.card-body {
    padding: 1.5rem !important;
}

/* Card with colored top border */
.card-primary-custom {
    border-top: 3px solid var(--primary) !important;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    padding: 0.5rem 1.2rem !important;
    transition: var(--transition) !important;
    border: none !important;
    letter-spacing: 0.2px;
}

.btn-primary {
    background: var(--gradient-1) !important;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4) !important;
}

.btn-success {
    background: var(--gradient-4) !important;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background: var(--gradient-5) !important;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.3);
}

.btn-warning {
    background: var(--gradient-3) !important;
    color: #fff !important;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

.btn-info {
    background: var(--gradient-2) !important;
    color: #fff !important;
    box-shadow: 0 2px 10px rgba(14, 165, 233, 0.3);
}

.btn-secondary {
    background: #64748b !important;
}

.btn-sm {
    padding: 0.35rem 0.8rem !important;
    font-size: 0.78rem !important;
    border-radius: 8px !important;
}

/* ============================================
   TABLES
   ============================================ */
.table {
    margin-bottom: 0;
}

.table thead th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 2px solid #e2e8f0 !important;
    color: var(--dark);
    font-weight: 700;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.9rem 1rem !important;
    white-space: nowrap;
}

.table td {
    padding: 0.8rem 1rem !important;
    vertical-align: middle !important;
    border-color: #f1f5f9 !important;
    font-size: 0.88rem;
    color: #475569;
}

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

.table tbody tr:hover {
    background: rgba(99, 102, 241, 0.04) !important;
}

.table .badge-status {
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.75rem;
}

/* DataTables override */
.dataTables_wrapper .dataTables_filter input {
    border-radius: 10px !important;
    border: 1px solid #e2e8f0 !important;
    padding: 0.4rem 0.8rem !important;
    transition: var(--transition);
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    outline: none;
}

.dataTables_wrapper .dataTables_length select {
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    padding: 0.3rem 0.5rem !important;
}

.page-item.active .page-link {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    border-radius: 8px;
}

.page-link {
    border-radius: 8px !important;
    margin: 0 2px;
    color: var(--primary);
    border: 1px solid #e2e8f0;
}

/* ============================================
   FORM CONTROLS
   ============================================ */
.form-control, .custom-select {
    border-radius: 10px !important;
    border: 1.5px solid #e2e8f0 !important;
    padding: 0.6rem 1rem !important;
    font-size: 0.9rem;
    transition: var(--transition);
    color: var(--dark);
}

.form-control:focus, .custom-select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
}

label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #475569;
    margin-bottom: 0.4rem;
}

/* ============================================
   TABS
   ============================================ */
.nav-tabs {
    border-bottom: 2px solid #e2e8f0;
    gap: 0;
}

.nav-tabs .nav-link {
    border: none !important;
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.8rem 1.2rem;
    transition: var(--transition);
    position: relative;
    background: transparent !important;
}

.nav-tabs .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.nav-tabs .nav-link:hover {
    color: var(--primary);
}

.nav-tabs .nav-link.active {
    color: var(--primary) !important;
}

.nav-tabs .nav-link.active::after {
    transform: scaleX(1);
}

.tab-content {
    padding: 0;
}

/* ============================================
   MODAL
   ============================================ */
#globalModal .modal-lg {
    max-width: 650px !important;
}

.modal-content {
    border: none !important;
    border-radius: var(--border-radius) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.modal-header {
    background: var(--gradient-1);
    color: #fff;
    border: none !important;
    padding: 1.2rem 1.5rem;
}

.modal-header .modal-title {
    font-weight: 700;
    font-size: 1.05rem;
}

.modal-header .close {
    color: #fff;
    opacity: 0.8;
    text-shadow: none;
}

.modal-body {
    padding: 1.5rem !important;
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    border-top: 1px solid #e2e8f0 !important;
    padding: 1rem 1.5rem !important;
}

/* ============================================
   BADGE
   ============================================ */
.badge {
    font-weight: 600;
    padding: 0.35rem 0.7rem;
    border-radius: 8px;
    font-size: 0.75rem;
}

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

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

.badge-laki {
    background: rgba(14, 165, 233, 0.1);
    color: var(--secondary);
}

.badge-perempuan {
    background: rgba(236, 72, 153, 0.1);
    color: #ec4899;
}

/* ============================================
   CHART CONTAINER
   ============================================ */
.chart-container {
    position: relative;
    padding: 1rem 0;
}

/* ============================================
   COUNTER ANIMATION
   ============================================ */
.counter-value {
    display: inline-block;
}

/* ============================================
   FOOTER
   ============================================ */
.main-footer {
    border-top: 1px solid #e2e8f0 !important;
    background: #fff !important;
    font-size: 0.85rem;
    color: #94a3b8;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards;
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .stat-card .stat-value {
        font-size: 1.5rem;
    }
    .login-box {
        width: 95% !important;
        margin: 1rem;
    }
    .card-body {
        padding: 1rem !important;
    }
}

/* ============================================
   SWAL2 Custom
   ============================================ */
.swal2-popup {
    border-radius: var(--border-radius) !important;
    font-family: 'Inter', sans-serif !important;
}

.swal2-styled.swal2-confirm {
    background: var(--gradient-1) !important;
    border-radius: 10px !important;
    padding: 0.6rem 2rem !important;
    font-weight: 600 !important;
}

.swal2-styled.swal2-cancel {
    border-radius: 10px !important;
    padding: 0.6rem 2rem !important;
    font-weight: 600 !important;
}

/* ============================================
   AVATAR
   ============================================ */
.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}

.avatar-lg {
    width: 80px;
    height: 80px;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #94a3b8;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.empty-state h5 {
    font-weight: 600;
    color: #64748b;
}

/* ============================================
   ACTION BUTTONS GROUP
   ============================================ */
.action-btns .btn {
    margin: 0 2px;
    padding: 0.3rem 0.6rem !important;
}

/* ============================================
   INFO BOX OVERRIDE
   ============================================ */
.info-box {
    border-radius: var(--border-radius) !important;
    box-shadow: var(--shadow-sm);
    min-height: 90px;
    transition: var(--transition);
}

.info-box:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.info-box .info-box-icon {
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    width: 80px;
}
