/* ============================================
   SISTEM IDENTIFIKASI DINI RISIKO K3
   Main Stylesheet
   ============================================ */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #F59E0B;
    --primary-dark: #D97706;
    --primary-light: #FEF3C7;
    --success: #059669;
    --success-light: #D1FAE5;
    --warning: #D97706;
    --warning-light: #FEF3C7;
    --danger: #DC2626;
    --danger-light: #FEE2E2;
    --info: #0891B2;
    --info-light: #CFFAFE;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --transition: all 0.2s ease;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Source Sans 3', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #FFFDF5;
    color: var(--gray-800);
    line-height: 1.65;
    min-height: 100vh;
    animation: pageFadeIn 0.4s ease-out;
}

@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

a { color: #D97706; text-decoration: none; }
a:hover { color: #B45309; }

img { max-width: 100%; height: auto; }

/* ---------- NAVBAR ---------- */
.navbar {
    background: var(--white);
    border-bottom: 1px solid rgba(251,191,36,0.2);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(245,158,11,0.08);
}

.navbar-brand a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #92400E;
}

.navbar-brand i {
    color: var(--warning);
    font-size: 1.4rem;
}

.navbar-menu {
    margin-left: 2rem;
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    color: var(--gray-600);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.nav-link:hover { background: var(--gray-100); color: var(--gray-900); }

.navbar-end {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.user-dropdown { position: relative; }

.user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid var(--gray-200);
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--gray-700);
    transition: var(--transition);
}

.user-btn:hover { background: var(--gray-50); border-color: var(--gray-300); }
.user-btn i.fa-chevron-down { font-size: 0.7rem; color: var(--gray-400); }

.dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    display: none;
    overflow: hidden;
    z-index: 200;
}

.dropdown-menu.show { display: block; }

.dropdown-header {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    flex-direction: column;
}

.dropdown-header strong { font-size: 0.9rem; }
.dropdown-header small { color: var(--gray-500); font-size: 0.8rem; }

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    color: var(--gray-700);
    transition: var(--transition);
}

.dropdown-item:hover { background: var(--gray-50); }
.dropdown-item.text-danger { color: var(--danger); }

/* ---------- AVATAR ---------- */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FBBF24, #F59E0B);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.avatar-sm { width: 32px; height: 32px; font-size: 0.75rem; }
.avatar-img { object-fit: cover; padding: 0; background: none; }
.avatar-lg { width: 120px; height: 120px; font-size: 2.5rem; }

/* ---------- MAIN CONTENT ---------- */
.main-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* ---------- FLASH MESSAGES ---------- */
.flash-message {
    max-width: 1100px;
    margin: 1rem auto 0;
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.flash-success { background: var(--success-light); color: var(--success); border: 1px solid #A7F3D0; }
.flash-error { background: var(--danger-light); color: var(--danger); border: 1px solid #FECACA; }
.flash-close { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: inherit; opacity: 0.7; }
.flash-close:hover { opacity: 1; }

/* ---------- TAB NAVIGATION ---------- */
.tab-nav {
    display: flex;
    gap: 0;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 0.3rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray-200);
}

.tab-link {
    flex: 1;
    text-align: center;
    padding: 0.75rem 1.2rem;
    font-weight: 500;
    color: var(--gray-500);
    border-radius: var(--radius);
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
}

.tab-link:hover { color: var(--gray-700); background: var(--gray-50); }

.tab-link.active {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(245,158,11,0.3);
}

.tab-link .badge {
    background: var(--danger);
    color: var(--white);
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 50px;
}

.tab-link.active .badge { background: rgba(255,255,255,0.3); }

/* ---------- TAB PANELS ---------- */
.tab-panel {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tab-panel-active {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: tabFadeIn 0.35s ease-out;
}

.tab-panel-exit {
    display: block;
    opacity: 0;
    transform: translateY(-10px);
    animation: tabFadeOut 0.2s ease-in forwards;
}

@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes tabFadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-12px); }
}

/* ---------- TAB HEADER ---------- */
.tab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}

.tab-header h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--gray-900);
}

.tab-actions { display: flex; gap: 0.5rem; }

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 1.3rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.92rem;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    text-decoration: none;
    letter-spacing: 0.01em;
}

.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.85rem; }
.btn-block { width: 100%; justify-content: center; }

.btn-primary { background: linear-gradient(135deg, #F59E0B, #D97706); color: var(--white); }
.btn-primary:hover { background: linear-gradient(135deg, #D97706, #B45309); color: var(--white); box-shadow: 0 2px 8px rgba(217,119,6,0.3); }

.btn-secondary { background: var(--gray-200); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-300); }

.btn-outline { background: transparent; color: var(--gray-600); border: 1px solid var(--gray-300); }
.btn-outline:hover { background: var(--gray-50); border-color: var(--gray-400); color: var(--gray-700); }

.btn-success { background: var(--success); color: var(--white); }
.btn-success:hover { background: #047857; color: var(--white); }

.btn-link {
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius);
    transition: var(--transition);
    font-family: inherit;
}

.btn-link:hover { background: #FEF3C7; color: #D97706; }

/* ---------- FORMS ---------- */
.form-group { margin-bottom: 1.15rem; }
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    color: var(--gray-700);
    letter-spacing: 0.01em;
}

.form-group label i { color: #D97706; margin-right: 0.35rem; }

.form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
    color: var(--gray-800);
    letter-spacing: 0.01em;
}

.form-control:focus {
    outline: none;
    border-color: #FBBF24;
    box-shadow: 0 0 0 3px rgba(251,191,36,0.15);
}

textarea.form-control { resize: vertical; min-height: 90px; }

/* ---------- ALERTS ---------- */
.alert {
    padding: 0.75rem 1.1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.92rem;
}

.alert-danger { background: var(--danger-light); color: var(--danger); border: 1px solid #FECACA; }
.alert-success { background: var(--success-light); color: var(--success); border: 1px solid #A7F3D0; }

/* ---------- BADGES ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-admin { background: #FEF3C7; color: #92400E; }
.badge-anggota { background: #FEF3C7; color: #92400E; }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-lg { padding: 0.4rem 1rem; font-size: 0.85rem; }

/* ---------- MODAL ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.show { opacity: 1; pointer-events: auto; }

.modal {
    background: var(--white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.92) translateY(15px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--gray-100);
}

.modal-header h3 {
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-400);
    line-height: 1;
    padding: 0.2rem;
}

.modal-close:hover { color: var(--gray-700); }

.modal-body { padding: 1.2rem; }
.modal-footer {
    padding: 0.8rem 1.2rem;
    border-top: 1px solid var(--gray-100);
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.modal-gambar { max-width: 90vw; background: transparent; box-shadow: none; text-align: center; }
.modal-gambar img { max-height: 85vh; border-radius: var(--radius-lg); }
.modal-gambar .modal-close { position: absolute; top: -30px; right: 0; color: var(--white); font-size: 2rem; }

/* ---------- EMPTY STATE ---------- */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray-400);
}

.empty-state i { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.1rem; color: var(--gray-600); margin-bottom: 0.3rem; }
.empty-state p { font-size: 0.9rem; }

/* ---------- AUTH PAGES ---------- */
.auth-body {
    background: linear-gradient(135deg, #FFF8E1 0%, #FFFDE7 30%, #FFFFFF 70%, #FFF9C4 100%);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1rem;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}
.auth-body::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -120px;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(251,191,36,0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.auth-body::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(245,158,11,0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.auth-container { width: 100%; max-width: 440px; position: relative; z-index: 1; margin: auto 0; }

.auth-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 2rem 2.2rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
    border: 1px solid rgba(251,191,36,0.2);
    animation: authCardIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}
.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #F59E0B, #FBBF24, #F59E0B);
}

@keyframes authCardIn {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.auth-header { text-align: center; margin-bottom: 1.4rem; }

.auth-logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #FBBF24, #F59E0B);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.8rem;
    box-shadow: 0 4px 12px rgba(245,158,11,0.3);
    transition: transform 0.3s;
}
.auth-logo:hover { transform: rotate(-5deg) scale(1.05); }

.auth-logo i { font-size: 1.6rem; color: var(--white); }
.auth-header h1 { font-size: 1.3rem; color: var(--gray-900); font-weight: 700; letter-spacing: -0.01em; }
.auth-header p { font-size: 0.85rem; color: var(--gray-500); margin-top: 0.2rem; }

.auth-form { margin-bottom: 1rem; }
.auth-form .form-group { margin-bottom: 0.9rem; }
.auth-form .form-group label { color: var(--gray-700); font-size: 0.85rem; }
.auth-form .form-group label i { color: #D97706; }
.auth-form .form-control {
    padding: 0.6rem 0.85rem;
    font-size: 0.9rem;
}
.auth-form .form-control:focus {
    border-color: #FBBF24;
    box-shadow: 0 0 0 3px rgba(251,191,36,0.15);
}
.auth-form .btn { margin-top: 0.5rem; padding: 0.65rem; font-size: 0.92rem; }
.auth-form .btn-primary {
    background: linear-gradient(135deg, #F59E0B, #D97706);
    border: none;
    color: var(--white);
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s;
}
.auth-form .btn-primary:hover {
    background: linear-gradient(135deg, #D97706, #B45309);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(217,119,6,0.3);
}

.auth-footer { text-align: center; font-size: 0.85rem; color: var(--gray-500); }
.auth-footer a { font-weight: 600; color: #D97706; }
.auth-footer a:hover { color: #B45309; }

.password-wrapper {
    position: relative;
}
.password-wrapper .form-control {
    padding-right: 3rem;
}
.btn-toggle-password {
    position: absolute;
    right: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    font-size: 1rem;
    padding: 0.3rem;
    transition: color 0.2s;
    line-height: 1;
}
.btn-toggle-password:hover {
    color: #D97706;
}

/* ---------- KELAS GRID ---------- */
.kelas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.kelas-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    animation: cardFadeUp 0.4s ease-out both;
}

@keyframes cardFadeUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.kelas-grid .kelas-card:nth-child(1) { animation-delay: 0.05s; }
.kelas-grid .kelas-card:nth-child(2) { animation-delay: 0.1s; }
.kelas-grid .kelas-card:nth-child(3) { animation-delay: 0.15s; }
.kelas-grid .kelas-card:nth-child(4) { animation-delay: 0.2s; }
.kelas-grid .kelas-card:nth-child(5) { animation-delay: 0.25s; }
.kelas-grid .kelas-card:nth-child(6) { animation-delay: 0.3s; }

.kelas-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: inherit;
}

.kelas-card-header {
    padding: 1.2rem;
    color: var(--white);
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.kelas-card-header h3 { font-size: 1.1rem; margin-bottom: 0.2rem; }
.kelas-card-header p { font-size: 0.8rem; opacity: 0.9; line-height: 1.3; }

.kelas-card-body { padding: 1rem 1.2rem; flex: 1; }

.kelas-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.82rem;
    color: var(--gray-500);
}

.kelas-info i { width: 18px; color: var(--gray-400); }

.kode-kelas {
    margin-top: 0.6rem;
    padding: 0.4rem 0.6rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    font-size: 0.82rem;
    color: var(--gray-600);
}

.kode-kelas strong { color: #D97706; letter-spacing: 1px; }

.kelas-card-footer {
    padding: 0.8rem 1.2rem;
    border-top: 1px solid var(--gray-100);
}

/* ---------- KELAS DETAIL ---------- */
.kelas-detail-header {
    border-radius: var(--radius-lg);
    padding: 2rem;
    color: var(--white);
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    animation: headerSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes headerSlideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.kelas-detail-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.3) 100%);
}

.kelas-detail-info { position: relative; z-index: 1; }
.kelas-detail-info h1 { font-size: 1.6rem; margin-bottom: 0.3rem; }
.kelas-detail-info > p { opacity: 0.9; font-size: 0.9rem; }

.kelas-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.8rem;
    font-size: 0.85rem;
    opacity: 0.9;
}

.kelas-detail-meta i { margin-right: 0.3rem; }

.kode-invite {
    cursor: pointer;
    background: rgba(255,255,255,0.2);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.kode-invite:hover { background: rgba(255,255,255,0.3); }

/* ---------- SUB-TAB NAV ---------- */
.sub-tab-nav {
    display: flex;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.sub-tab-link {
    flex: 1;
    text-align: center;
    padding: 0.8rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--gray-500);
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.sub-tab-link:hover { color: var(--gray-700); background: var(--gray-50); }

.sub-tab-link.active {
    color: #D97706;
    border-bottom-color: #F59E0B;
    background: #FEF3C7;
}

/* ---------- POSTINGAN / POSTS ---------- */
.post-form-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.post-form-header { display: flex; gap: 0.8rem; }
.post-form-header textarea {
    flex: 1;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 0.6rem;
    font-size: 0.9rem;
    resize: none;
    font-family: inherit;
    transition: var(--transition);
}

.post-form-header textarea:focus { outline: none; border-color: #FBBF24; box-shadow: 0 0 0 3px rgba(251,191,36,0.15); }

.post-form-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.6rem;
    padding-left: 48px;
}

.upload-label { cursor: pointer; }
.file-preview-name { font-size: 0.8rem; color: var(--gray-500); flex: 1; }

.image-preview {
    margin-top: 0.6rem;
    padding-left: 48px;
    position: relative;
    display: inline-block;
}

.image-preview img { max-height: 200px; border-radius: var(--radius); border: 1px solid var(--gray-200); }

.btn-remove-img {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0,0,0,0.6);
    color: var(--white);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.post-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    margin-bottom: 0.8rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    animation: cardFadeUp 0.35s ease-out both;
    transition: box-shadow 0.25s ease;
}

.post-card:hover { box-shadow: var(--shadow-md); }

.post-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
}

.post-author strong { font-size: 0.9rem; display: block; }
.post-author small { color: var(--gray-400); font-size: 0.78rem; }

.post-body { padding: 0 1rem 0.8rem; }
.post-body p { font-size: 0.9rem; line-height: 1.6; white-space: pre-wrap; word-wrap: break-word; }

.post-image { margin-top: 0.8rem; }
.post-image img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.post-image img:hover { opacity: 0.95; }

.post-footer {
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--gray-100);
}

/* ---------- KOMENTAR ---------- */
.komentar-area {
    border-top: 1px solid var(--gray-100);
    padding: 0.8rem 1rem;
    background: var(--gray-50);
    animation: expandDown 0.3s ease-out;
    overflow: hidden;
}

@keyframes expandDown {
    from { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; }
    to { opacity: 1; max-height: 600px; }
}

.komentar-list { max-height: 300px; overflow-y: auto; margin-bottom: 0.6rem; }

.komentar-item {
    display: flex;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
    padding: 0.5rem;
    border-radius: var(--radius);
}

.komentar-bubble {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius) var(--radius-lg) var(--radius-lg) var(--radius-lg);
    padding: 0.5rem 0.8rem;
    flex: 1;
}

.komentar-bubble strong { font-size: 0.82rem; display: block; color: var(--gray-800); }
.komentar-bubble p { font-size: 0.85rem; margin-top: 0.15rem; color: var(--gray-700); }
.komentar-bubble small { font-size: 0.72rem; color: var(--gray-400); }

.komentar-form { display: flex; gap: 0.4rem; }
.komentar-form .form-control { font-size: 0.85rem; padding: 0.5rem 0.7rem; }

.loading-spinner { text-align: center; padding: 1rem; color: var(--gray-400); font-size: 0.85rem; }

/* ---------- FILE MANAGEMENT ---------- */
.file-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1rem;
    padding: 0.8rem 1rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.breadcrumb-nav a { font-weight: 500; }
.breadcrumb-sep { color: var(--gray-400); }
.file-actions { display: flex; gap: 0.5rem; }

.file-grid {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    text-decoration: none;
    color: inherit;
    animation: cardFadeUp 0.3s ease-out both;
}

.file-item:hover { background: var(--gray-50); border-color: var(--gray-300); color: inherit; transform: translateX(3px); }

.file-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.file-folder .file-icon { background: #FEF3C7; color: #D97706; }
.file-icon-doc { background: #FEF3C7; color: #D97706; }

.file-info { flex: 1; min-width: 0; }
.file-info strong { font-size: 0.88rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-info small { color: var(--gray-400); font-size: 0.78rem; }

/* ---------- TUGAS LIST ---------- */
.tugas-list { display: flex; flex-direction: column; gap: 0.5rem; }

.tugas-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    text-decoration: none;
    color: inherit;
    animation: cardFadeUp 0.35s ease-out both;
}

.tugas-list .tugas-item:nth-child(1) { animation-delay: 0.05s; }
.tugas-list .tugas-item:nth-child(2) { animation-delay: 0.1s; }
.tugas-list .tugas-item:nth-child(3) { animation-delay: 0.15s; }
.tugas-list .tugas-item:nth-child(4) { animation-delay: 0.2s; }
.tugas-list .tugas-item:nth-child(5) { animation-delay: 0.25s; }

.tugas-item:hover { box-shadow: var(--shadow-sm); border-color: var(--gray-300); color: inherit; transform: translateX(4px); }

.tugas-selesai { opacity: 0.7; }
.tugas-terlambat { border-left: 3px solid var(--danger); }

.tugas-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.tugas-info { flex: 1; min-width: 0; }
.tugas-info h4 { font-size: 0.95rem; margin-bottom: 0.1rem; }
.tugas-info small, .tugas-kelas { font-size: 0.8rem; color: var(--gray-500); }

.tugas-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.3rem;
    flex-shrink: 0;
}

.tugas-deadline { font-size: 0.8rem; color: var(--gray-500); }

/* ---------- TUGAS DETAIL ---------- */
.tugas-detail-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.tugas-detail-header {
    padding: 1.2rem;
    border-bottom: 1px solid var(--gray-100);
}

.tugas-detail-header h2 { margin: 0.8rem 0 0.4rem; font-size: 1.2rem; }
.tugas-detail-meta { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.82rem; color: var(--gray-500); }
.tugas-detail-body { padding: 1.2rem; }
.tugas-detail-body p { font-size: 0.9rem; line-height: 1.7; white-space: pre-wrap; }

/* ---------- PENGUMPULAN ---------- */
.pengumpulan-section {
    padding: 1.2rem;
    border-top: 1px solid var(--gray-100);
}

.pengumpulan-section h3 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    color: var(--gray-700);
}

.pengumpulan-item {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 0.6rem;
}

.pengumpulan-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.pengumpulan-header div { flex: 1; }
.pengumpulan-header strong { font-size: 0.88rem; display: block; }
.pengumpulan-header small { color: var(--gray-400); font-size: 0.78rem; }

.pengumpulan-catatan {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.pengumpulan-status {
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.pengumpulan-status p { margin-top: 0.5rem; font-size: 0.88rem; }

/* ---------- FEEDBACK ---------- */
.feedback-section { margin-top: 0.6rem; }

.feedback-existing {
    padding: 0.5rem 0.8rem;
    background: var(--info-light);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.feedback-existing strong { font-size: 0.8rem; color: var(--info); }
.feedback-existing p { margin-top: 0.2rem; color: var(--gray-700); }

.feedback-form { margin-top: 0.4rem; }
.feedback-input-group {
    display: flex;
    gap: 0.4rem;
}

.feedback-input-group .form-control { flex: 1; font-size: 0.85rem; padding: 0.4rem 0.7rem; }

/* ---------- ANGGOTA ---------- */
.anggota-list { display: flex; flex-direction: column; gap: 0.4rem; }

.anggota-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    transition: background 0.2s ease;
    animation: cardFadeUp 0.3s ease-out both;
}

.anggota-info { flex: 1; }
.anggota-info strong { display: block; font-size: 0.9rem; }
.anggota-info small { color: var(--gray-400); font-size: 0.8rem; }
.anggota-item:hover { background: var(--gray-50); }

/* ---------- PAGE TRANSITION ---------- */
.page-exit {
    animation: pageFadeOut 0.25s ease-in forwards;
}

@keyframes pageFadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-8px); }
}

/* ---------- PROFILE PAGE ---------- */
.profil-page {
    animation: pageFadeIn 0.4s ease-out;
}
.profil-container {
    max-width: 720px;
    margin: 0 auto;
}
.profil-title {
    font-size: 1.55rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--gray-800);
}
.profil-title i {
    color: var(--primary);
    margin-right: 0.4rem;
}
.profil-alert {
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}
.profil-alert i { margin-top: 0.2rem; }
.profil-alert ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.profil-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--danger);
}
.profil-section {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.8rem;
    margin-bottom: 1.3rem;
    animation: cardFadeUp 0.5s ease-out both;
}
.profil-section:nth-child(3) { animation-delay: 0.05s; }
.profil-section:nth-child(4) { animation-delay: 0.1s; }
.profil-section:nth-child(5) { animation-delay: 0.15s; }
.profil-section h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.3rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-700);
}
.profil-section h2 i {
    color: var(--primary);
    margin-right: 0.4rem;
    width: 20px;
    text-align: center;
}
.profil-foto-area {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}
.profil-foto-preview {
    flex-shrink: 0;
}
.profil-foto-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--gray-200);
    transition: border-color 0.3s;
}
.profil-foto-img:hover {
    border-color: var(--primary);
}
.profil-foto-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
}
.profil-foto-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
}
.profil-foto-form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.btn-upload {
    cursor: pointer;
}
.btn-danger-outline {
    background: none;
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}
.btn-danger-outline:hover {
    background: var(--danger);
    color: var(--white);
}
.profil-foto-hint {
    font-size: 0.78rem;
    color: var(--gray-400);
    margin: 0;
}
.profil-info-meta {
    margin: 0.5rem 0 1rem;
    color: var(--gray-400);
}
.profil-info-meta i {
    margin-right: 0.3rem;
}
.form-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.8rem;
}
.tugas-detail-top-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
}
.tugas-detail-top-right {
    display: flex;
    gap: 0.5rem;
}
.tugas-status-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0.6rem 0;
    flex-wrap: wrap;
}
.tugas-status-banner i {
    font-size: 0.9rem;
}
.tugas-toggle-btn {
    margin-left: auto;
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-warning {
    background: #f59e0b;
    color: #fff;
}
.btn-warning:hover {
    background: #d97706;
    color: #fff;
}
.btn-success {
    background: var(--success);
    color: #fff;
}
.btn-success:hover {
    background: #16a34a;
    color: #fff;
}
.tugas-ditutup {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--danger);
}
.tugas-dibuka {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: var(--success);
}
.tugas-closed-notice {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--gray-500);
}
.tugas-closed-notice i {
    font-size: 2.5rem;
    color: var(--gray-300);
    margin-bottom: 0.8rem;
    display: block;
}
.tugas-closed-notice h4 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
    color: var(--gray-600);
}
.tugas-closed-notice p {
    font-size: 0.85rem;
}
.tugas-item-ditutup {
    opacity: 0.7;
}
.tugas-deadline-info {
    background: var(--gray-50);
    padding: 0.8rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.88rem;
}
.tugas-deadline-info p {
    margin: 0.2rem 0;
}
.btn-danger {
    background: var(--danger);
    color: var(--white);
    border: none;
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}
.btn-danger:hover {
    background: #c0392b;
    color: var(--white);
}
.tugas-hapus-btn {
    flex-shrink: 0;
    margin-left: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s;
}
.tugas-item:hover .tugas-hapus-btn {
    opacity: 1;
}
.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.btn-icon-danger {
    color: var(--gray-400);
}
.btn-icon-danger:hover {
    color: var(--danger);
    background: #fef2f2;
}
.post-hapus-btn {
    margin-left: auto;
    opacity: 0;
    transition: opacity 0.2s;
}
.post-card:hover .post-hapus-btn {
    opacity: 1;
}
.anggota-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

/* ---------- UTILITIES ---------- */
.text-danger { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }
.text-muted { color: var(--gray-400) !important; }
.text-center { text-align: center; }
.mt-2 { margin-top: 0.8rem; }

/* ---------- RESPONSIVE ---------- */

/* -- Hamburger Toggle Button -- */
.navbar-toggle {
    display: none;
    background: none;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 0.4rem 0.6rem;
    font-size: 1.1rem;
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
    margin-left: auto;
    margin-right: 0.5rem;
}
.navbar-toggle:hover {
    background: var(--gray-50);
    color: var(--gray-800);
}

/* ===== TABLET (max 1024px) ===== */
@media (max-width: 1024px) {
    .main-content { max-width: 100%; padding: 1.2rem; }
    .kelas-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
    .profil-container { max-width: 100%; }
    .kelas-detail-header { padding: 1.5rem; }
    .modal { max-width: 95vw; }
}

/* ===== MOBILE / TABLET SMALL (max 768px) ===== */
@media (max-width: 768px) {
    /* Navbar */
    .navbar {
        padding: 0 0.8rem;
        height: 56px;
        flex-wrap: wrap;
        position: sticky;
        top: 0;
    }
    .navbar-toggle { display: flex; align-items: center; }
    .navbar-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        padding: 0.5rem 0;
        border-top: 1px solid var(--gray-100);
        order: 10;
    }
    .navbar-menu.show { display: flex; }
    .navbar-menu .nav-link {
        padding: 0.7rem 0.8rem;
        border-radius: 0;
        font-size: 0.9rem;
    }
    .navbar-end { margin-left: 0; }
    .user-btn span { display: none; }
    .user-btn { padding: 0.35rem 0.5rem; }
    .user-btn i.fa-chevron-down { display: none; }

    /* Content */
    .main-content { padding: 1rem 0.8rem; }

    /* Grid */
    .kelas-grid { grid-template-columns: 1fr; gap: 0.8rem; }

    /* Tab */
    .tab-nav { border-radius: var(--radius); }
    .tab-link { padding: 0.6rem 0.5rem; font-size: 0.82rem; }
    .tab-link i { display: none; }
    .tab-header { flex-direction: column; gap: 0.8rem; align-items: stretch; }
    .tab-actions { justify-content: center; }

    /* Sub-tab */
    .sub-tab-link { font-size: 0.78rem; padding: 0.6rem 0.3rem; }
    .sub-tab-link i { display: none; }

    /* Kelas Detail */
    .kelas-detail-header { padding: 1.2rem; border-radius: var(--radius); }
    .kelas-detail-info h1 { font-size: 1.2rem; }
    .kelas-detail-info > p { font-size: 0.82rem; }
    .kelas-detail-meta { flex-direction: column; gap: 0.3rem; font-size: 0.8rem; }

    /* Tugas */
    .tugas-item { flex-direction: column; align-items: stretch; gap: 0.6rem; padding: 0.8rem; }
    .tugas-meta { flex-direction: row; align-items: center; justify-content: space-between; }
    .tugas-icon { width: 38px; height: 38px; font-size: 1rem; }
    .tugas-detail-header h2 { font-size: 1.05rem; }
    .tugas-detail-meta { gap: 0.5rem; font-size: 0.78rem; }
    .tugas-hapus-btn { opacity: 1; }

    /* Postingan */
    .post-form-footer { padding-left: 0; }
    .image-preview { padding-left: 0; }
    .post-header { padding: 0.8rem; }
    .post-body { padding: 0 0.8rem 0.6rem; }
    .post-footer { padding: 0.4rem 0.8rem; }
    .post-hapus-btn { opacity: 1; }

    /* File */
    .file-toolbar { flex-direction: column; align-items: stretch; padding: 0.6rem; }
    .file-actions { justify-content: center; }
    .file-item { padding: 0.6rem 0.8rem; }
    .file-icon { width: 36px; height: 36px; font-size: 1rem; }

    /* Pengumpulan */
    .pengumpulan-header { flex-wrap: wrap; }
    .pengumpulan-section { padding: 0.8rem; }
    .feedback-input-group { flex-wrap: wrap; }
    .feedback-input-group .btn { width: 100%; justify-content: center; }

    /* Anggota */
    .anggota-item { padding: 0.6rem 0.8rem; }
    .anggota-actions { gap: 0.3rem; }

    /* Profil */
    .profil-section { padding: 1.2rem; }
    .profil-foto-area { flex-direction: column; align-items: center; text-align: center; }
    .profil-foto-actions { align-items: center; }

    /* Tugas Status */
    .tugas-status-banner { font-size: 0.8rem; padding: 0.5rem 0.8rem; }
    .tugas-toggle-btn { margin-left: 0; margin-top: 0.3rem; width: 100%; justify-content: center; }

    /* Modal */
    .modal { max-width: 95vw; border-radius: var(--radius-lg); }
    .modal-header { padding: 0.8rem 1rem; }
    .modal-body { padding: 1rem; }

    /* Komentar */
    .komentar-area { padding: 0.6rem 0.8rem; }
    .komentar-form { flex-direction: column; }
    .komentar-form .btn { width: 100%; justify-content: center; }
}

/* ===== SMALL PHONE (max 480px) ===== */
@media (max-width: 480px) {
    html { font-size: 15px; }

    /* Auth */
    .auth-body { padding: 1rem 0.6rem; }
    .auth-card { padding: 1.5rem 1.2rem; }
    .auth-header h1 { font-size: 1.15rem; }
    .auth-logo { width: 52px; height: 52px; }
    .auth-logo i { font-size: 1.4rem; }

    /* Navbar */
    .navbar { height: 50px; padding: 0 0.6rem; }
    .navbar-brand a { font-size: 1rem; gap: 0.4rem; }
    .navbar-brand i { font-size: 1.15rem; }

    /* Cards */
    .kelas-card-header { min-height: 80px; padding: 1rem; }
    .kelas-card-header h3 { font-size: 1rem; }
    .kelas-card-body { padding: 0.8rem; }

    /* Detail */
    .kelas-detail-header { padding: 1rem; }
    .kelas-detail-info h1 { font-size: 1.1rem; }

    /* Tugas */
    .tugas-info h4 { font-size: 0.88rem; }
    .tugas-deadline-info { font-size: 0.82rem; padding: 0.6rem 0.8rem; }

    /* Post */
    .post-form-header textarea { font-size: 0.85rem; }
    .post-body p { font-size: 0.85rem; }
    .post-image img { max-height: 250px; }

    /* Avatar */
    .avatar { width: 34px; height: 34px; font-size: 0.78rem; }
    .avatar-sm { width: 28px; height: 28px; font-size: 0.68rem; }

    /* Profil */
    .profil-title { font-size: 1.3rem; }
    .profil-section { padding: 1rem; }
    .profil-foto-img,
    .profil-foto-placeholder { width: 100px; height: 100px; }
    .profil-foto-placeholder { font-size: 2rem; }

    /* Buttons */
    .btn { padding: 0.55rem 1rem; font-size: 0.85rem; }
    .btn-sm { padding: 0.35rem 0.7rem; font-size: 0.8rem; }

    /* Empty state */
    .empty-state { padding: 2rem 0.8rem; }
    .empty-state i { font-size: 2.5rem; }
    .empty-state h3 { font-size: 1rem; }

    /* Dropdown */
    .dropdown-menu { min-width: 180px; right: -0.5rem; }
}

/* ===== VERY SMALL (max 360px) ===== */
@media (max-width: 360px) {
    html { font-size: 14px; }
    .auth-card { padding: 1.2rem 1rem; }
    .auth-header { margin-bottom: 1rem; }
    .kelas-detail-header { padding: 0.8rem; }
    .kelas-detail-info h1 { font-size: 1rem; }
    .profil-section { padding: 0.8rem; }
    .tugas-item { padding: 0.6rem; }
    .file-item { padding: 0.5rem 0.6rem; gap: 0.6rem; }
    .post-header { padding: 0.6rem; gap: 0.5rem; }
    .navbar-brand a span { display: none; }
}

/* ===== TOUCH DEVICE HELPERS ===== */
@media (hover: none) and (pointer: coarse) {
    /* Always show action buttons on touch devices */
    .tugas-hapus-btn { opacity: 1; }
    .post-hapus-btn { opacity: 1; }

    /* Larger tap targets */
    .btn { min-height: 44px; }
    .btn-sm { min-height: 38px; }
    .nav-link { min-height: 44px; display: flex; align-items: center; }
    .dropdown-item { min-height: 44px; }
    .sub-tab-link { min-height: 44px; }
    .tab-link { min-height: 44px; }
    .btn-toggle-password { min-width: 44px; min-height: 44px; }
    .btn-icon { width: 40px; height: 40px; }
    .komentar-form .form-control { min-height: 44px; }

    /* Disable hover-only effects */
    .kelas-card:hover { transform: none; }
    .tugas-item:hover { transform: none; }
    .file-item:hover { transform: none; }
}

/* ===== LANDSCAPE PHONE ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .auth-body { padding: 0.8rem; }
    .auth-card { padding: 1.2rem 1.5rem; }
    .auth-header { margin-bottom: 0.8rem; }
    .auth-logo { width: 44px; height: 44px; margin-bottom: 0.5rem; }
    .auth-logo i { font-size: 1.2rem; }
    .auth-header h1 { font-size: 1.1rem; }
    .auth-form .form-group { margin-bottom: 0.6rem; }
}
