body { 
    font-family: 'Inter', sans-serif; 
    background-color: #f3f4f6; 
}

.day-circle { 
    width: 45px; 
    height: 45px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 50%; 
    transition: 0.3s; 
    cursor: pointer; 
}

.day-active { 
    background-color: #3b82f6; 
    color: white; 
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.5); 
}

.card { 
    background: white; 
    border-radius: 20px; 
    padding: 20px; 
    transition: 0.3s; 
}

.nav-active { 
    color: #3b82f6 !important; 
}

.hidden-section { 
    display: none; 
}

/* Badge Colors */
.badge-merah { background-color: #fee2e2; color: #dc2626; }
.badge-kuning { background-color: #fef3c7; color: #d97706; }
.badge-hijau { background-color: #dcfce7; color: #16a34a; }
.badge-biru { background-color: #dbeafe; color: #2563eb; }
.badge-kelabu { background-color: #f3f4f6; color: #9ca3af; }

/* Sync popup */
.sync-popup {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}
.sync-popup .card {
    width: 80%;
    max-width: 300px;
    text-align: center;
}
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    width: 30px; height: 30px;
    animation: spin 1s linear infinite;
    margin: 10px auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Pull-to-refresh indicator */
.pull-indicator {
    text-align: center;
    padding: 8px;
    color: #3b82f6;
    font-size: 13px;
    font-weight: bold;
    display: none;
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
}

.pull-indicator.show {
    display: block;
    height: 40px;
}

.arrow-down {
    display: inline-block;
    margin-right: 4px;
    animation: bounce 1s infinite;
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* Remember me checkbox style */
.remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #6b7280;
    margin-top: 10px;
}
.remember-me input {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
}

/* Offline bar */
#offlineBar {
    transition: opacity 0.3s;
}

/* Tab transition animation */
.section-fade {
    transition: opacity 0.3s ease-in-out;
    opacity: 0;
    display: none;
}

.section-fade.active {
    display: block;
    opacity: 1;
}

/* Dark mode styles */
body.dark {
    background-color: #1a1a2e !important;
    color: #e0e0e0;
}

body.dark .card {
    background-color: #16213e !important;
    color: #e0e0e0;
}

body.dark .bg-white {
    background-color: #16213e !important;
}

body.dark .text-gray-800 {
    color: #e0e0e0 !important;
}

body.dark .text-gray-700 {
    color: #c0c0c0 !important;
}

body.dark .text-gray-500 {
    color: #a0a0a0 !important;
}

body.dark .text-gray-400 {
    color: #a0a0a0 !important;
}

body.dark .border-gray-50 {
    border-color: #2a2a4a !important;
}

body.dark .border-blue-500 {
    border-color: #4a80f0 !important;
}

body.dark nav {
    background-color: rgba(22, 33, 62, 0.8) !important;
    backdrop-filter: blur(8px);
}

body.dark .bg-gray-50 {
    background-color: #1a1a2e !important;
}

body.dark .badge-kuning {
    background-color: #4a3f00;
    color: #ffc107;
}

body.dark .badge-hijau {
    background-color: #003d1f;
    color: #4caf50;
}

body.dark .badge-merah {
    background-color: #4a0000;
    color: #f44336;
}

body.dark .badge-biru {
    background-color: #001a4a;
    color: #2196f3;
}

body.dark .badge-kelabu {
    background-color: #2a2a2a;
    color: #9e9e9e;
}

body.dark input {
    background-color: #16213e;
    color: #e0e0e0;
    border-color: #2a2a4a;
}

body.dark input::placeholder {
    color: #6a6a6a;
}

/* Togol Dark Mode */
.dark-mode-toggle {
    transition: all 0.3s ease;
}
/* Sasarkan teks "Assignment" dalam header */
body.dark h1 span.text-gray-900 {
    color: #ffffff !important;
}

/* Untuk memastikan teks "UPSI" (biru) juga kelihatan baik dalam dark mode - pilihan */
body.dark h1 .text-blue-600 {
    color: #60a5fa !important; /* biru lebih cerah */
}

/* Onboarding screen */
.onboarding-overlay {
    position: fixed;
    inset: 0;
    background: white;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}
.onboarding-overlay h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}
.onboarding-overlay p {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 2rem;
    max-width: 280px;
}
/* Butang Outline Merah (untuk Log Keluar & Dark Mode) */
.btn-outline-red {
    background-color: #fee2e2;   /* Merah pucat (sama dengan badge-merah) */
    color: #dc2626;              /* Merah teks */
    border: 1.5px solid #dc2626; /* Garis tepi merah */
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
    width: 100%;
    cursor: pointer;
}

.btn-outline-red:hover {
    background-color: #fecaca;   /* Merah sedikit gelap semasa hover */
    color: #b91c1c;              /* Teks lebih gelap */
}
/* Butang Outline Kelabu (untuk Dark Mode/Light Mode) */
.btn-outline-gray {
    background-color: #f3f4f6;   /* Kelabu pucat */
    color: #4b5563;              /* Kelabu teks */
    border: 1.5px solid #9ca3af; /* Garis tepi kelabu */
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.2s ease;
    width: 100%;
    cursor: pointer;
}

.btn-outline-gray:hover {
    background-color: #e5e7eb;   /* Kelabu sedikit gelap semasa hover */
    color: #374151;              /* Teks lebih gelap */
}

/* Snackbar notification (sync selesai - tanpa ganggu user) */
.snackbar {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1e293b;
    color: white;
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 200;
    opacity: 0;
    transition: all 0.3s ease;
    white-space: nowrap;
    pointer-events: none;
}
.snackbar.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
/* Sticky header */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.85) !important;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}
body.dark .sticky-header {
    background: rgba(22, 33, 62, 0.9) !important;
}
/* Offset main content untuk sticky header */
main.pt-header {
    padding-top: 8px;
}

body.dark .snackbar {
    background: #16213e;
    color: #e0e0e0;
    border: 1px solid #2a2a4a;
}