:root {
    --navy: #262D3D;
    --blue: #4aa0d9;
    --mint: #00CC83;
    --error: #ba1a1a;
    --bg: #f7f9fc;
    --border: #d8dadd;
    --text: #191c1e;
    --text-muted: #6C706F;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 220px;
    background: var(--navy);
    color: #fff;
    padding: 24px 0;
    flex-shrink: 0;
}
.admin-sidebar .brand {
    font-weight: 700;
    font-size: 18px;
    padding: 0 24px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 16px;
}
.admin-sidebar nav a {
    display: block;
    padding: 12px 24px;
    color: rgba(255,255,255,0.7);
}
.admin-sidebar nav a:hover, .admin-sidebar nav a.active {
    color: #fff;
    background: rgba(255,255,255,0.08);
    text-decoration: none;
}
.admin-main { flex: 1; padding: 32px 40px; max-width: 1100px; }
.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.admin-topbar h1 { font-size: 22px; margin: 0; }

.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.btn {
    display: inline-block;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #3a8cc4; text-decoration: none; }
.btn-success { background: var(--mint); color: #fff; }
.btn-danger { background: var(--error); color: #fff; }
.btn-secondary { background: #eceef1; color: var(--text); }
.btn-sm { padding: 6px 12px; font-size: 13px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
th { color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: 12px; letter-spacing: 0.03em; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.form-group .hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
input[type=text], input[type=number], input[type=password], input[type=file], textarea, select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}
textarea { resize: vertical; min-height: 80px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: auto; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.alert-error { background: #ffdad6; color: var(--error); }
.alert-success { background: #d9f7e8; color: #007a4d; }

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy);
}
.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 380px;
}
.login-card h1 { font-size: 20px; margin: 0 0 24px; }

/* Curriculum repeater */
.module-block {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    background: #fafbfc;
}
.module-block .module-title-row { display: flex; gap: 8px; margin-bottom: 10px; }
.module-block .module-title-row input { flex: 1; }
.lesson-row { display: flex; gap: 8px; margin-bottom: 8px; }
.lesson-row input:first-child { flex: 3; }
.lesson-row input:last-child { flex: 1; }
.lesson-row button, .module-title-row button { flex-shrink: 0; }
