* { box-sizing: border-box; }
:root {
    color-scheme: light;
    --navy: #0d2a4b;
    --sidebar: #13385f;
    --blue: #155ba9;
    --ink: #172d44;
    --muted: #536c85;
    --border: #d8e4ef;
    --workspace: #eaf2fa;
    --paper: #fff;
    font: 16px/1.5 "Segoe UI", Arial, sans-serif;
}
body { margin: 0; color: var(--ink); background: var(--workspace); }
a { color: var(--blue); }
img { max-width: 100%; object-fit: contain; }
h1, h2, h3, p, dl { margin: 0; }
h1 { font-size: clamp(1.65rem, 3vw, 2.2rem); line-height: 1.16; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
.muted, .page-heading p { color: var(--muted); }
:focus-visible { outline: 3px solid #008ad3; outline-offset: 3px; }
.skip { position: absolute; left: .8rem; top: -5rem; z-index: 3; background: white; padding: .5rem; }
.skip:focus { top: .8rem; }

.portal form { display: grid; grid-template-columns: 240px minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 100vh; }
.aspNetHidden { display: none; }
.sidebar { grid-row: 1 / 3; display: flex; flex-direction: column; color: white; background: var(--sidebar); }
.brand { display: grid; justify-items: center; gap: .65rem; padding: 1.35rem 1.1rem 1.15rem; background: var(--navy); color: white; text-decoration: none; }
.brand img { width: 137px; height: 56px; padding: .35rem .55rem; background: white; border-radius: 5px; }
.brand span, .country { font-size: .7rem; font-weight: 700; letter-spacing: .3em; }
.sidebar nav { display: grid; gap: .3rem; padding: 1rem .75rem; }
.sidebar nav a { color: #eef7ff; font-weight: 600; padding: .7rem .85rem; border-radius: 5px; text-decoration: none; }
.sidebar nav a:hover, .sidebar nav a[aria-current] { background: var(--blue); }
.sidebar-footer { margin-top: auto; padding: .9rem 1.55rem; color: #d6e7f7; background: var(--navy); font-size: .82rem; }
.topbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .6rem 1rem; padding: .8rem clamp(1rem, 3vw, 2.1rem); color: white; background: var(--navy); font-weight: 600; }
.account { display: flex; align-items: center; gap: .8rem; font-size: .86rem; }
.logout { font: inherit; border: 1px solid #86a7c7; border-radius: 5px; color: white; background: transparent; cursor: pointer; padding: .35rem .65rem; }
.logout:hover { background: var(--sidebar); }
.portal .main { width: 100%; max-width: 1500px; padding: clamp(1rem, 3vw, 2.1rem); }
.demo-banner { display: inline-block; margin-bottom: .85rem; padding: .25rem .65rem; color: #294e72; background: #dcebf9; border-radius: 4px; font-size: .82rem; }
.page-heading { margin-bottom: 1.25rem; }
.page-heading p { margin-top: .3rem; }

.home-hero { display: grid; justify-items: center; gap: .5rem; min-height: 340px; padding: clamp(1.5rem, 5vw, 3rem) 1rem; text-align: center; border: 1px solid #c5d9ec; border-radius: 8px; background: #e3effb; }
.home-hero img { width: 185px; height: 70px; padding: .4rem .8rem; background: white; border-radius: 6px; }
.home-hero .country { color: #315a82; }
.project-course { margin-top: .65rem; color: #315a82; font-weight: 650; }
.home-hero h2 { font-size: clamp(1.35rem, 3.5vw, 2.3rem); line-height: 1.15; color: var(--navy); }
.student { display: flex; flex-wrap: wrap; justify-content: center; gap: .3rem 1rem; margin-top: .5rem; padding: .45rem .85rem; border-radius: 5px; background: #dbeafa; }
.school { color: #315a82; font-size: .88rem; }
.shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin-top: 1rem; }
.shortcuts a { display: grid; gap: .25rem; padding: 1.05rem; border: 1px solid var(--border); border-radius: 8px; background: white; text-decoration: none; }
.shortcuts a:hover { border-color: var(--blue); }
.shortcuts span { color: var(--muted); font-size: .9rem; }

.panel { padding: clamp(.85rem, 2vw, 1.35rem); background: var(--paper); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 1rem; }
.panel h2, .panel h3 { margin-bottom: .7rem; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: .8rem; }
.filters > div { flex: 0 1 230px; min-width: 150px; }
label { display: block; font-weight: 600; margin-bottom: .3rem; }
input[type="text"], input[type="password"], select { display: block; width: 100%; min-height: 42px; padding: .55rem .65rem; border: 1px solid #9db4ca; border-radius: 5px; color: var(--ink); background: white; font: inherit; }
.button { min-height: 42px; padding: .5rem 1rem; border: 1px solid transparent; border-radius: 5px; cursor: pointer; font: inherit; font-weight: 650; white-space: nowrap; }
.primary { background: var(--blue); color: white; }
.primary:hover { background: #104b90; }
.notice { margin: .75rem 0; padding: .65rem .85rem; background: #f4f8fd; border: 1px solid var(--border); border-radius: 5px; }
.error { color: #991d20; background: #fff2f2; border-color: #edd0d0; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.data-table th, .data-table td { padding: .65rem .7rem; border-bottom: 1px solid var(--border); text-align: left; }
.data-table th { background: #dfedfa; color: #1a436b; white-space: nowrap; }
.data-table tr:nth-child(odd) td { background: #f5f9fe; }
.data-table tr:last-child td { border-bottom: 0; }
.table-link { white-space: nowrap; font-weight: 600; }
.detail-heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: .75rem; }
.back { display: inline-block; margin-bottom: .45rem; }
.sheet-header { text-align: center; padding: .45rem 0 1.1rem; border-bottom: 1px solid var(--border); }
.sheet-header span { font-size: .78rem; letter-spacing: .14em; color: var(--blue); font-weight: 700; }
.sheet-header h2 { font-size: 1.6rem; margin: .2rem 0; }
.sheet-header p, .profile-header p { color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem 1rem; margin: .8rem 0 1.1rem; }
.facts > .fact { min-width: 0; padding: .42rem 0; border-bottom: 1px solid #e8eff6; overflow-wrap: anywhere; }
.fact-label { display: block; font-size: .82rem; color: var(--muted); }
.fact-value { display: block; font-weight: 600; }
.net { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem; padding: .65rem .8rem; margin: 0 0 1rem; background: #dfeefa; color: var(--navy); border-radius: 5px; }
.net strong { font-size: 1.2rem; }
.profile-header { display: flex; align-items: center; gap: .8rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.profile-header h2 { margin-bottom: .1rem; }
.profile-mark { display: grid; place-items: center; background: #dcebf9; color: var(--blue); border-radius: 50%; width: 54px; height: 54px; font-weight: 700; }

.guest .main { display: grid; place-items: center; min-height: 100vh; padding: 1rem; }
.login-layout { display: grid; grid-template-columns: 1fr 1.15fr; width: min(860px, 100%); border: 1px solid #cadbea; border-radius: 10px; overflow: hidden; background: white; }
.login-brand { display: grid; align-content: center; justify-items: start; gap: .55rem; padding: clamp(1.3rem, 5vw, 3.3rem); color: #deecf9; background: #0f2742; }
.login-brand img { width: 138px; height: 61px; background: white; padding: .4rem .6rem; border-radius: 6px; }
.login-brand p { margin-top: .6rem; color: white; font-size: clamp(1.35rem, 3vw, 2rem); font-weight: 650; line-height: 1.2; }
.login-card { padding: clamp(1.3rem, 5vw, 3.3rem); }
.login-card > p { margin-top: .45rem; }
.login-fields { margin-top: 1.35rem; }
.login-fields input[type="text"], .login-fields input[type="password"] { margin-bottom: .8rem; }
.login-fields .button { width: 100%; margin-top: .4rem; }
.demo-hint { margin-top: .85rem; font-size: .88rem; color: var(--muted); }
.demo-hint summary { cursor: pointer; }
.demo-hint p { margin-top: .4rem; }

@media (max-width: 820px) {
    .portal form { grid-template-columns: 190px minmax(0, 1fr); }
    .shortcuts { grid-template-columns: 1fr; }
    .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
    .portal form { display: block; }
    .brand { display: flex; justify-content: center; align-items: center; padding: .6rem; }
    .brand img { width: 110px; height: 40px; }
    .sidebar nav { grid-template-columns: repeat(2, 1fr); padding: .5rem; }
    .sidebar nav a { font-size: .87rem; padding: .55rem; }
    .sidebar-footer { display: none; }
    .topbar { font-size: .88rem; }
    .login-layout { grid-template-columns: 1fr; max-width: 460px; }
    .login-brand p { margin-top: .1rem; }
}
@media (max-width: 365px) {
    .facts { grid-template-columns: 1fr; }
}
@media print {
    .portal form { display: block; }
    body, .panel { background: white; }
    .sidebar, .topbar, .detail-heading, .demo-banner, .skip { display: none; }
    .portal .main { max-width: none; padding: 0; }
    .sheet { margin: 0; border: 0; }
    .data-table tr { break-inside: avoid; }
}
.login-brand {
    background-image: url('WinFormsLoginBackground.png');
    background-color: #dceefa;
    color: #0f2742;
}
