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

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --bg-body: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.025);
    --card-hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    background-color: var(--bg-body);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

/* Modern Clean Cards */
.card, .glass-card, .info-box-custom {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 16px !important;
    box-shadow: var(--card-shadow) !important;
    transition: all 0.2s ease-in-out;
}

.card:hover, .glass-card:hover, .info-box-custom:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-hover-shadow) !important;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

/* Gradients for text & background - refined */
.text-gradient-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%) !important;
    color: #fff !important;
}

/* Beautiful Status Badges */
.badge-status {
    padding: 0.4em 1em;
    font-weight: 600;
    border-radius: 9999px;
    font-size: 0.75rem;
    display: inline-block;
    text-align: center;
    border: none;
    letter-spacing: 0.025em;
}

.badge-hadir {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
}

.badge-sakit {
    background-color: #dbeafe !important;
    color: #1e40af !important;
}

.badge-izin {
    background-color: #fef3c7 !important;
    color: #92400e !important;
}

.badge-alpha {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
}

.badge-terlambat {
    background-color: #f3e8ff !important;
    color: #6b21a8 !important;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Form Styling */
.form-control, .form-select, .select2-container--bootstrap-5 .select2-selection {
    border-radius: 10px !important;
    border: 1px solid var(--border-color);
    padding: 0.6rem 1rem;
    transition: all 0.2s;
    font-size: 0.9rem;
    background-color: #f8fafc;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    background-color: #ffffff;
}

/* Sidebar Styling - Modern Light */
.app-sidebar, .main-sidebar {
    background: #ffffff !important;
    border-right: 1px solid var(--border-color) !important;
    box-shadow: none !important;
}

.sidebar-brand {
    border-bottom: 1px solid var(--border-color) !important;
}

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

.sidebar-menu .nav-link {
    border-radius: 10px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
    color: var(--text-muted) !important;
    font-weight: 500;
}

.sidebar-menu .nav-link i {
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.sidebar-menu .nav-link:hover:not(.active), .nav-sidebar .nav-link:hover:not(.active) {
    background-color: var(--bg-body);
    color: var(--text-main) !important;
    transform: none;
}

.sidebar-menu .nav-link:hover:not(.active) i {
    color: var(--primary);
}

.sidebar-menu .nav-link.active, .nav-sidebar .nav-link.active {
    background: var(--primary-light) !important;
    color: var(--primary) !important;
    box-shadow: none !important;
}

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

.nav-header {
    color: #94a3b8 !important;
}

/* Header Navbar */
.app-header {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color) !important;
    box-shadow: none !important;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.animated-fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Info Box */
.info-box-custom {
    padding: 1.5rem;
    display: flex;
    align-items: center;
}
.info-box-custom .icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.25rem;
    font-size: 1.25rem;
    background: var(--primary-light);
    color: var(--primary);
}

/* Custom Table Styling */
.table-custom {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.table-custom th {
    background-color: var(--bg-body) !important;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem;
}
.table-custom td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 0.9rem;
}
.table-custom tr:hover td {
    background-color: var(--bg-body);
}

/* Buttons style */
.btn {
    border-radius: 10px;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: all 0.2s ease;
}

.btn-primary-gradient {
    background: var(--primary);
    border: none;
    color: white;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
}
.btn-primary-gradient:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.3);
    transform: translateY(-1px);
    color: white;
}

.btn-success-gradient {
    background: var(--success);
    border: none;
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}
.btn-success-gradient:hover {
    background: #059669;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
    transform: translateY(-1px);
    color: white;
}

/* Premium Upload Area */
.upload-box {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    background: var(--bg-body);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}
.upload-box:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}
.upload-box i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}
.upload-box input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Login/Auth Styling */
.login-bg {
    background: #f8fafc;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    border-radius: 24px;
    color: var(--text-main);
    padding: 2rem;
}
.login-card input {
    background: #f8fafc !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-main) !important;
}
.login-card input:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1) !important;
    background: #ffffff !important;
}

.hover-scale {
    transition: all 0.2s ease;
}
.hover-scale:hover {
    transform: scale(1.02);
}
.gap-2 {
    gap: 0.5rem;
}
.gap-3 {
    gap: 1rem;
}
