:root {
    --navy: #12355b;
    --blue: #1f6feb;
    --blue-soft: #eaf2ff;
    --teal: #0f8b8d;
    --green: #16794c;
    --green-soft: #e8f7ef;
    --orange: #e67e22;
    --red: #c73532;
    --ink: #183047;
    --muted: #65788a;
    --line: #dce4ec;
    --paper: #ffffff;
    --canvas: #f4f7fb;
    --shadow: 0 14px 35px rgba(21, 49, 79, .09);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    line-height: 1.5;
}
a { color: var(--blue); text-decoration: none; }
button, input, select, textarea { font: inherit; }
code { background: #eef2f6; border-radius: 5px; padding: 2px 5px; }

.topbar {
    background: linear-gradient(105deg, #0e2f53, #174f83);
    color: white;
    box-shadow: 0 7px 24px rgba(9, 39, 70, .2);
    position: sticky;
    top: 0;
    z-index: 30;
}
.topbar-inner { max-width: 1440px; margin: auto; min-height: 70px; padding: 10px 24px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 11px; color: white; margin-right: auto; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: linear-gradient(145deg, #4aa5ff, #28c6b7); color: white; font-weight: 800; letter-spacing: .5px; box-shadow: 0 8px 20px rgba(0, 0, 0, .15); }
.brand strong { display: block; font-size: 17px; letter-spacing: .4px; }
.brand small { display: block; opacity: .73; font-size: 11px; }
.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav a { color: rgba(255,255,255,.82); padding: 8px 11px; border-radius: 8px; font-size: 14px; }
.nav a:hover, .nav a.active { color: white; background: rgba(255,255,255,.13); }

.container { max-width: 1440px; margin: 0 auto; padding: 26px 24px 48px; }
.page-head { display: flex; align-items: flex-end; gap: 18px; justify-content: space-between; margin-bottom: 22px; }
.page-head h1 { margin: 0 0 3px; font-size: clamp(25px, 3vw, 36px); line-height: 1.15; letter-spacing: -.6px; }
.page-head p { margin: 0; color: var(--muted); }
.eyebrow { text-transform: uppercase; font-size: 11px; letter-spacing: 1.4px; font-weight: 800; color: var(--teal); }

.hero { background: linear-gradient(120deg, #12355b, #1b6495); color: white; border-radius: 22px; padding: 34px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; width: 330px; height: 330px; right: -110px; top: -180px; border: 55px solid rgba(255,255,255,.07); border-radius: 50%; }
.hero h1 { font-size: clamp(29px, 5vw, 52px); max-width: 760px; line-height: 1.07; margin: 12px 0 15px; letter-spacing: -1.6px; }
.hero p { max-width: 760px; color: rgba(255,255,255,.78); font-size: 17px; }
.hero .badge { background: rgba(255,255,255,.12); color: white; }
.role-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 22px; }
.role-card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 23px; box-shadow: var(--shadow); color: var(--ink); transition: transform .2s, box-shadow .2s; }
.role-card:hover { transform: translateY(-3px); box-shadow: 0 18px 42px rgba(21, 49, 79, .14); }
.role-icon { width: 50px; height: 50px; border-radius: 15px; background: var(--blue-soft); display: grid; place-items: center; font-size: 23px; margin-bottom: 18px; }
.role-card h2 { margin: 0 0 7px; font-size: 20px; }
.role-card p { margin: 0; color: var(--muted); font-size: 14px; }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 21px; }
.card h2, .card h3 { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-bottom: 16px; }
.card-head h2, .card-head h3 { margin: 0; }
.stat { padding: 19px; }
.stat .value { display: block; font-size: 30px; font-weight: 800; letter-spacing: -.5px; }
.stat .label { color: var(--muted); font-size: 13px; }

.tabs { display: flex; gap: 7px; overflow-x: auto; margin: -4px 0 20px; padding-bottom: 4px; }
.tabs a { white-space: nowrap; color: var(--muted); background: white; border: 1px solid var(--line); border-radius: 10px; padding: 9px 13px; font-size: 14px; }
.tabs a.active { background: var(--navy); color: white; border-color: var(--navy); }

form { margin: 0; }
label { display: block; color: #334b61; font-size: 13px; font-weight: 700; margin-bottom: 13px; }
input, select, textarea {
    width: 100%;
    margin-top: 6px;
    border: 1px solid #cfd9e4;
    background: white;
    color: var(--ink);
    border-radius: 9px;
    padding: 10px 11px;
    outline: none;
}
input:focus, select:focus, textarea:focus { border-color: #6da9ef; box-shadow: 0 0 0 3px rgba(31,111,235,.1); }
input[type=file] { padding: 8px; }
input[type=checkbox], input[type=radio] { width: auto; margin: 0 7px 0 0; }
.check { display: flex; align-items: center; font-weight: 600; }
.form-row { display: grid; grid-template-columns: repeat(12, 1fr); gap: 13px; align-items: end; }
.col-2 { grid-column: span 2; }.col-3 { grid-column: span 3; }.col-4 { grid-column: span 4; }.col-5 { grid-column: span 5; }.col-6 { grid-column: span 6; }.col-8 { grid-column: span 8; }.col-12 { grid-column: span 12; }
.form-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.section-title { font-size: 15px; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin: 20px 0 14px; }

.btn { appearance: none; border: 0; border-radius: 9px; padding: 10px 15px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; cursor: pointer; font-weight: 750; font-size: 13px; }
.btn-primary { color: white; background: var(--blue); }
.btn-secondary { color: var(--navy); background: var(--blue-soft); }
.btn-success { color: white; background: var(--green); }
.btn-danger { color: white; background: var(--red); }
.btn-ghost { color: var(--ink); border: 1px solid var(--line); background: white; }
.btn-sm { padding: 7px 10px; font-size: 12px; }
.btn-block { width: 100%; }
.inline { display: inline; }

.alert { border-radius: 11px; padding: 12px 14px; margin-bottom: 15px; border: 1px solid; font-size: 14px; }
.alert-success { background: var(--green-soft); border-color: #b7e3ca; color: #12613e; }
.alert-error { background: #fff0f0; border-color: #efc4c4; color: #a42b28; }
.alert-info { background: var(--blue-soft); border-color: #bfd8f8; color: #194f8c; }
.muted, .help { color: var(--muted); }
.help { font-size: 12px; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 9px; background: var(--blue-soft); color: #18548f; font-size: 11px; font-weight: 800; }
.badge.active { background: var(--green-soft); color: var(--green); }

.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: white; }
table { border-collapse: collapse; width: 100%; font-size: 12px; }
th { background: #eaf0f6; color: #29445c; text-transform: uppercase; letter-spacing: .35px; font-size: 10px; text-align: center; position: sticky; top: 0; z-index: 1; }
th, td { border-bottom: 1px solid var(--line); border-right: 1px solid #e8edf2; padding: 8px; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8fbfe; }
td.center { text-align: center; vertical-align: middle; }
.lecturers { white-space: pre-line; min-width: 210px; }
.course { min-width: 170px; }
.meet { min-width: 29px; text-align: center; }
.empty { padding: 36px 18px; text-align: center; color: var(--muted); }

.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top right, #d9ecff, transparent 38%), var(--canvas); }
.auth-card { width: min(440px, 100%); background: white; border: 1px solid var(--line); padding: 30px; border-radius: 20px; box-shadow: var(--shadow); }
.install-card { width: min(560px, 100%); }
.auth-card h1 { margin: 16px 0 4px; }
.auth-card .brand-mark { width: 54px; height: 54px; }

.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 20px; }
.phase-list { margin: 0; padding: 0; list-style: none; }
.phase-list li { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; padding: 9px 0; border-bottom: 1px solid #edf1f5; font-size: 13px; }
.phase-list li:last-child { border-bottom: 0; }

@media (max-width: 980px) {
    .role-grid, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
    .topbar-inner { align-items: flex-start; flex-direction: column; }
    .brand { margin-right: 0; }
    .nav { width: 100%; }
    .col-2, .col-3, .col-4, .col-5, .col-6, .col-8 { grid-column: span 6; }
}
@media (max-width: 680px) {
    .container { padding: 18px 14px 35px; }
    .hero { padding: 24px; }
    .role-grid, .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .page-head { align-items: flex-start; flex-direction: column; }
    .form-row { grid-template-columns: 1fr; }
    .col-2, .col-3, .col-4, .col-5, .col-6, .col-8, .col-12 { grid-column: auto; }
}

@media print {
    .topbar, .tabs, .no-print, .footer { display: none !important; }
    body { background: white; }
    .container { max-width: none; padding: 0; }
    .card { box-shadow: none; border: 0; padding: 0; }
}

