:root {
    --bg: #f3f6fb;
    --card: #ffffff;
    --line: #dbe4f0;
    --text: #10203a;
    --muted: #5b6b84;
    --primary: #2451cc;
    --primary-strong: #173ba0;
    --danger: #d64545;
    --success-bg: #e8f7ee;
    --warning-bg: #fff5e7;
    --danger-bg: #fdeaea;
    --radius: 18px;
    --shadow: 0 16px 40px rgba(20, 35, 90, 0.08);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
    color: var(--text);
}
.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 28px;
}
.hero {
    background: linear-gradient(135deg, #214bbd 0%, #4c7dff 100%);
    color: #fff;
    border-radius: 24px;
    padding: 28px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}
.hero h1 { margin: 8px 0 10px; font-size: 34px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; opacity: .82; }
.subtext { max-width: 720px; line-height: 1.6; margin: 0; }
.hero-badge {
    min-width: 170px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 18px;
    padding: 16px 18px;
    text-align: center;
    backdrop-filter: blur(8px);
}
.hero-badge span { display: block; font-size: 13px; opacity: .85; margin-bottom: 6px; }
.hero-badge strong { font-size: 30px; }
.card {
    background: var(--card);
    border: 1px solid #edf2f7;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    margin-bottom: 24px;
}
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: 18px;
}
.field label {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
}
.field input, .field select, .lesson-info {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 15px;
    background: #fff;
}
.lesson-info { display: flex; align-items: center; color: var(--muted); }
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}
.section-head h2 { margin: 0; font-size: 24px; }
.actions-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-strong); }
.btn.ghost { background: #edf3ff; color: var(--primary); }
.btn.danger { background: #ffe3e3; color: #a11a1a; }
.table-wrap { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 980px;
}
thead th {
    background: #f4f7fc;
    padding: 14px;
    text-align: left;
    font-size: 13px;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
}
tbody td {
    padding: 14px;
    border-bottom: 1px solid #eef3f8;
    vertical-align: top;
}
.status-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.chip-radio {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid transparent;
    cursor: pointer;
    user-select: none;
}
.chip-radio input { position: absolute; opacity: 0; pointer-events: none; }
.chip-radio.present { background: var(--success-bg); color: #0b7a3d; }
.chip-radio.late { background: var(--warning-bg); color: #a15d00; }
.chip-radio.absent { background: var(--danger-bg); color: #b02a2a; }
.chip-radio input:checked + span { text-decoration: underline; }
.tag {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.tag.present { background: var(--success-bg); color: #0b7a3d; }
.tag.late { background: var(--warning-bg); color: #a15d00; }
.tag.absent { background: var(--danger-bg); color: #b02a2a; }
.empty-state {
    text-align: center;
    color: var(--muted);
    padding: 24px;
}
@media (max-width: 980px) {
    .container { padding: 16px; }
    .hero { flex-direction: column; align-items: flex-start; }
    .settings-grid { grid-template-columns: 1fr; }
    .section-head { flex-direction: column; align-items: flex-start; }
}
