:root {
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.2);
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --secondary: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f97316;
    --text-primary: #1f2937;
    --text-secondary: #4b5563; /* Dipergelap sedikit agar lebih kontras di latar terang */
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
}

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

/* ===== NAVIGATION ===== */
nav.bg-blue-600 {
    background-color: var(--primary) !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

/* Label inside blue buttons sometimes inherits gray text from base styles */
.btn-primary .text-secondary,
.btn-primary .label.text-secondary,
.btn-primary label.text-secondary,
.btn-primary .badge.text-secondary,
.btn-primary .tag.text-secondary {
    color: #ffffff !important;
}


/* ===== CARDS & CONTAINERS ===== */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
}

.card-container {
    background-color: var(--bg-primary);
    border-radius: 1.25rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* ===== TABLE STYLING ===== */
.handsontable {
    font-size: 13px !important;
    border: none !important;
    background-color: var(--bg-primary) !important;
}

.handsontable .htCore {
    background-color: var(--bg-primary) !important;
}

.handsontable th,
.handsontable .ht_clone_top th,
.handsontable .ht_clone_left th {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-secondary) !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 11px !important;
    border: 1px solid var(--border-light) !important;
    padding: 10px !important;
}

.handsontable th.activeHeader {
    background-color: #eff6ff !important;
    color: var(--primary) !important;
}

.handsontable td {
    border: 1px solid var(--border-light) !important;
    padding: 8px !important;
    color: var(--text-primary) !important;
    background-color: var(--bg-primary) !important;
}

.handsontable td:focus {
    outline: none !important;
}

.handsontable .wtBorder,
.handsontable .wtBorder.current {
    background-color: var(--primary) !important;
    width: 2px !important;
}

.handsontable .area {
    background-color: rgba(37, 99, 235, 0.1) !important;
}

@keyframes flash-green {
    0% { background-color: #d1fae5; }
    100% { background-color: white; }
}

.highlight-success {
    animation: flash-green 1.5s ease-out;
}

/* ===== BUTTONS ===== */
.btn-primary {
    background-color: var(--primary);
    color: white;
    border-radius: 0.75rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--text-primary);
    border-radius: 0.75rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #d97706;
}

/* ===== FORM CONTROLS ===== */
.custom-input {
    @apply w-full px-4 py-3 rounded-xl border border-slate-200 focus:border-blue-500 focus:ring-2 focus:ring-blue-200 transition-all outline-none bg-white/50;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea,
select {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 0.75rem;
    padding: 0.75rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

/* ===== TEXT STYLES ===== */
.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
}

p, span, li {
    color: var(--text-secondary);
}

/* Memastikan teks di dalam tombol/link mewarisi warna elemen induknya */
button span, a span {
    color: inherit;
}

/* Label/Badge di dalam tombol: pastikan warnanya kontras & jelas */
.btn-primary .label,
.btn-primary label,
.btn-primary .badge,
.btn-primary .tag,
.btn-secondary .label,
.btn-secondary label,
.btn-secondary .badge,
.btn-secondary .tag {
    color: #ffffff !important;
    opacity: 1 !important;
}


/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* ===== ANIMATIONS ===== */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.float-animation {
    animation: float 4s ease-in-out infinite;
}

/* ===== GRID CONTAINER ===== */
.grid-container {
    @apply rounded-2xl border border-slate-100 bg-white p-2 shadow-sm;
}

/* Utility to hide scrollbar but keep functionality */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
