/* Jurnal Mengajar Guru - Material Dashboard Style */
:root {
    --primary: #4CAF50;
    --primary-dark: #388E3C;
    --primary-light: #C8E6C9;
    --secondary: #757575;
    --bg-light: #f5f5f5;
    --bg-card: #ffffff;
    --text-primary: #212121;
    --text-secondary: #757575;
    --sidebar-width: 260px;
    --topbar-height: 64px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --radius: 12px;
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --bg-light: #121212;
    --bg-card: #1e1e1e;
    --text-primary: #e0e0e0;
    --text-secondary: #9e9e9e;
    --shadow: 0 2px 12px rgba(0,0,0,0.3);
}

* { box-sizing: border-box; }
body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
    margin: 0;
    overflow-x: hidden;
}

/* Loading Screen */
.loading-screen {
    position: fixed; inset: 0; background: var(--bg-card);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    z-index: 9999; transition: opacity 0.5s;
}
.loading-screen.hidden { opacity: 0; pointer-events: none; }

/* Layout */
.app-wrapper { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
    width: var(--sidebar-width); background: var(--bg-card);
    box-shadow: var(--shadow); position: fixed; top: 0; left: 0; bottom: 0;
    z-index: 1000; transition: var(--transition); overflow-y: auto;
}
.sidebar-header {
    padding: 1.5rem; text-align: center; border-bottom: 1px solid var(--primary-light);
}
.sidebar-logo { max-height: 48px; margin-bottom: 0.5rem; }
.sidebar-title { font-size: 0.85rem; color: var(--text-secondary); margin: 0; }
.sidebar-nav { padding: 1rem 0; }
.nav-section {
    padding: 0.5rem 1.5rem; font-size: 0.7rem; text-transform: uppercase;
    color: var(--text-secondary); letter-spacing: 1px; margin-top: 0.5rem;
}
.nav-item {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.5rem;
    color: var(--text-primary); text-decoration: none; transition: var(--transition);
    border-left: 3px solid transparent;
}
.nav-item:hover { background: var(--primary-light); color: var(--primary-dark); }
.nav-item.active {
    background: var(--primary-light); color: var(--primary-dark);
    border-left-color: var(--primary); font-weight: 600;
}
.nav-item i { width: 20px; text-align: center; }

/* Main Content */
.main-content {
    flex: 1; margin-left: var(--sidebar-width);
    display: flex; flex-direction: column; min-height: 100vh;
    transition: var(--transition);
}
.topbar {
    height: var(--topbar-height); background: var(--bg-card);
    box-shadow: var(--shadow); display: flex; align-items: center;
    padding: 0 1.5rem; position: sticky; top: 0; z-index: 100;
}
.topbar-title { flex: 1; margin-left: 1rem; }
.topbar-actions { display: flex; align-items: center; gap: 0.5rem; }
.digital-clock {
    font-family: 'Courier New', monospace; font-size: 0.9rem;
    color: var(--primary); font-weight: bold; padding: 0.25rem 0.75rem;
    background: var(--primary-light); border-radius: 8px;
}
.content-area { flex: 1; padding: 1.5rem; }
.app-footer {
    padding: 1rem 1.5rem; text-align: center;
    color: var(--text-secondary); border-top: 1px solid #e0e0e0;
}

/* Cards */
.stat-card {
    background: var(--bg-card); border-radius: var(--radius);
    padding: 1.5rem; box-shadow: var(--shadow);
    transition: var(--transition); border: none; position: relative; overflow: hidden;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.stat-card .stat-icon {
    width: 56px; height: 56px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; color: white;
}
.stat-card .stat-value { font-size: 2rem; font-weight: 700; line-height: 1; }
.stat-card .stat-label { color: var(--text-secondary); font-size: 0.85rem; }
.stat-card::after {
    content: ''; position: absolute; top: -20px; right: -20px;
    width: 80px; height: 80px; border-radius: 50%; opacity: 0.1;
}

.card-modern {
    background: var(--bg-card); border-radius: var(--radius);
    box-shadow: var(--shadow); border: none; margin-bottom: 1.5rem;
}
.card-modern .card-header {
    background: transparent; border-bottom: 1px solid #e0e0e0;
    padding: 1rem 1.5rem; font-weight: 600;
}

/* Avatar */
.avatar-sm { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.avatar-md { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }

/* Notification */
.notification-badge {
    position: absolute; top: 0; right: 0; font-size: 0.65rem;
    padding: 2px 5px;
}
.notification-dropdown { width: 320px; max-height: 400px; overflow-y: auto; }

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #e0e0e0 25%, #f5f5f5 50%, #e0e0e0 75%);
    background-size: 200% 100%; animation: shimmer 1.5s infinite;
    border-radius: 4px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Buttons */
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }

/* Tables */
.table-modern thead th {
    background: var(--primary-light); color: var(--primary-dark);
    font-weight: 600; border: none; font-size: 0.85rem;
}
.table-modern tbody tr { transition: var(--transition); }
.table-modern tbody tr:hover { background: rgba(76, 175, 80, 0.05); }

/* Forms */
.form-control:focus, .form-select:focus {
    border-color: var(--primary); box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
}
.form-label { font-weight: 500; font-size: 0.9rem; }

/* Calendar Widget */
.calendar-widget .calendar-day {
    width: 36px; height: 36px; display: flex; align-items: center;
    justify-content: center; border-radius: 50%; font-size: 0.85rem; cursor: default;
}
.calendar-widget .calendar-day.today { background: var(--primary); color: white; font-weight: bold; }
.calendar-widget .calendar-day.has-event { position: relative; }
.calendar-widget .calendar-day.has-event::after {
    content: ''; position: absolute; bottom: 2px; width: 4px; height: 4px;
    background: var(--primary); border-radius: 50%;
}

/* Guru Active List */
.guru-active-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.75rem 0; border-bottom: 1px solid #f0f0f0;
}
.guru-active-item:last-child { border-bottom: none; }

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .sidebar-overlay {
        position: fixed; inset: 0; background: rgba(0,0,0,0.5);
        z-index: 999; display: none;
    }
    .sidebar-overlay.show { display: block; }
}

@media (max-width: 575.98px) {
    .content-area { padding: 1rem; }
    .stat-card .stat-value { font-size: 1.5rem; }
    .digital-clock { display: none; }
}

/* Print */
@media print {
    .sidebar, .topbar, .app-footer { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .content-area { padding: 0 !important; }
}

/* Animations */
.fade-in { animation: fadeIn 0.5s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Daftar hadir */
#daftarHadirContainer .btn-group-sm .btn { font-size: 0.7rem; padding: 0.2rem 0.4rem; }
#daftarHadirContainer .sticky-top { position: sticky; top: 0; z-index: 1; }

/* Badge status */
.badge-draft { background: #FFC107; color: #333; }
.badge-published { background: #4CAF50; }
.badge-verified { background: #2196F3; }

/* Login Page */
.login-page {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 50%, #1B5E20 100%);
}
.login-card {
    width: 100%; max-width: 420px; border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3); overflow: hidden;
}
.login-card .login-header {
    background: white; padding: 2.5rem 2rem 1.5rem; text-align: center;
}
.login-card .login-body { padding: 2rem; background: white; }
.login-card .login-footer {
    background: #f5f5f5; padding: 1rem; text-align: center; font-size: 0.85rem;
}