/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Arial, sans-serif; font-size: 14px; background: #f4f6f8; color: #333; height: 100vh; display: flex; flex-direction: column; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; }

/* ── Top bar ── */
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    background: #fff; border-bottom: 1px solid #dde2e8;
    padding: 0 20px; height: 52px; flex-shrink: 0;
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.topbar-logo { height: 36px; }
.topbar-title { font-size: 15px; font-weight: 600; color: #1a3a5c; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-help {
    display: flex; align-items: center; gap: 5px;
    background: #c0392b; color: #fff; border: none;
    padding: 5px 12px; border-radius: 4px; font-size: 13px;
}
.topbar-help svg { width: 14px; height: 14px; }
.lang-select {
    border: 1px solid #ccc; border-radius: 4px;
    padding: 4px 8px; font-size: 13px; background: #fff;
}
.user-icon {
    width: 34px; height: 34px; border-radius: 50%;
    background: #1a3a5c; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
}
.topbar-username { font-size: 13px; font-weight: 500; }
.topbar-logout-btn {
    border: none; background: none; font-size: 18px;
    color: #888; display: flex; align-items: center;
}
.topbar-logout-btn:hover { color: #c0392b; }

/* ── Layout ── */
.layout { display: flex; flex: 1; overflow: hidden; }

/* ── Sidebar ── */
.sidebar {
    width: 200px; background: #1a3a5c; flex-shrink: 0;
    display: flex; flex-direction: column; overflow-y: auto;
}
.sidebar-section { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar-section-title {
    font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.45);
    padding: 6px 16px 4px; text-transform: uppercase; letter-spacing: .5px;
}
.sidebar-item {
    display: flex; align-items: center; gap: 9px;
    padding: 9px 16px; color: rgba(255,255,255,0.78);
    font-size: 13px; transition: background .15s;
}
.sidebar-item:hover { background: rgba(255,255,255,0.08); }
.sidebar-item.active { background: rgba(255,255,255,0.15); color: #fff; font-weight: 600; }
.sidebar-item svg { width: 16px; height: 16px; opacity: .75; flex-shrink: 0; }

/* ── Main content ── */
.main { flex: 1; overflow-y: auto; padding: 28px 32px; }
.breadcrumb { font-size: 12px; color: #888; margin-bottom: 18px; }
.breadcrumb span { color: #1a3a5c; font-weight: 600; }
.page-title { font-size: 22px; font-weight: 700; color: #1a3a5c; margin-bottom: 20px; }
.info-box {
    background: #eaf0fb; border: 1px solid #c5d6f0;
    border-radius: 6px; padding: 10px 16px;
    font-size: 13px; color: #2c5282; margin-bottom: 20px;
}
.semester-select {
    width: 100%; padding: 8px 12px; border: 1px solid #ccd4df;
    border-radius: 5px; font-size: 13px; background: #fff;
    margin-bottom: 20px; color: #333;
}

/* ── Table ── */
.table-wrap { border: 1px solid #dde2e8; border-radius: 6px; overflow: hidden; }
table { width: 100%; border-collapse: collapse; background: #fff; }
thead tr { background: #f0f4f8; }
th { padding: 10px 14px; text-align: left; font-size: 12px; font-weight: 700; color: #4a6076; border-bottom: 1px solid #dde2e8; }
td { padding: 11px 14px; font-size: 13px; border-bottom: 1px solid #edf0f3; color: #333; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #f8fafc; }
.badge {
    display: inline-block; padding: 2px 8px; border-radius: 10px;
    font-size: 11px; font-weight: 600;
}
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-green { background: #dcfce7; color: #15803d; }

/* ── Login page ── */
.login-page {
    min-height: 100vh; display: flex; align-items: center;
    justify-content: center; background: #f0f4f8;
}
.login-card {
    background: #fff; border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    padding: 44px 40px; width: 380px;
}
.login-logo { text-align: center; margin-bottom: 24px; }
.login-logo-circle {
    width: 64px; height: 64px; border-radius: 50%;
    background: #1a3a5c; color: #fff; font-size: 24px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 10px;
}
.login-card h2 { font-size: 20px; font-weight: 700; color: #1a3a5c; margin-bottom: 6px; text-align: center; }
.login-card p { font-size: 13px; color: #777; text-align: center; margin-bottom: 28px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: #4a6076; margin-bottom: 6px; }
.form-group input {
    width: 100%; padding: 10px 12px; border: 1px solid #ccd4df;
    border-radius: 6px; font-size: 14px; outline: none; transition: border .2s;
}
.form-group input:focus { border-color: #1a3a5c; }
.login-btn {
    width: 100%; padding: 11px; background: #1a3a5c; color: #fff;
    border: none; border-radius: 6px; font-size: 15px; font-weight: 600;
    margin-top: 6px; transition: background .2s;
}
.login-btn:hover { background: #14304d; }
.login-error {
    background: #fee2e2; border: 1px solid #fca5a5;
    color: #b91c1c; border-radius: 6px; padding: 9px 12px;
    font-size: 13px; margin-bottom: 14px; display: none;
}
.login-error.show { display: block; }

/* ── Alerts ── */
.alert { padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 16px; }
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
