:root {
    color-scheme: light;
    --ink: #172b35;
    --muted: #526773;
    --paper: #fff;
    --background: #f3f6f7;
    --line: #d8e2e5;
    --frame: #152f3a;
    --rail-text: #b8cbd1;
    --brand: #006957;
    --brand-dark: #005649;
    --focus: #b85b00;
    --error-bg: #fdf1ef;
    --error-ink: #8c3029;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: var(--background);
    font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 0; font-size: 16px; line-height: 1.5; }
a { color: var(--brand-dark); }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.75rem, 4vw, 2.48rem); line-height: 1.1; letter-spacing: -.045em; }
h2 { font-size: 1.26rem; line-height: 1.25; letter-spacing: -.02em; }
.brand { display: inline-flex; align-items: center; gap: .7rem; font-size: 1.27rem; font-weight: 720; letter-spacing: -.045em; }
.brand-mark { display: grid; width: 2rem; height: 2rem; place-items: center; background: var(--brand); color: white; border-radius: .33rem; font-size: 1.06rem; line-height: 1; letter-spacing: 0; }
.eyebrow, .side-caption { font-size: .72rem; text-transform: uppercase; font-weight: 720; letter-spacing: .13em; }
.eyebrow { color: var(--brand-dark); margin-bottom: .6rem; }
.login-screen { min-height: 100vh; border-top: 4px solid var(--brand); }
.login-bar { display: flex; align-items: center; justify-content: space-between; min-height: 4.75rem; padding: .85rem clamp(1rem, 4vw, 3rem); background: var(--paper); border-bottom: 1px solid var(--line); gap: 1rem; }
.login-caption { color: var(--muted); font-size: .87rem; }
.sign-in { width: min(100% - 2rem, 28rem); margin: clamp(1.7rem, 11vh, 6.5rem) auto 2rem; padding: clamp(1.3rem, 4vw, 2.3rem); background: var(--paper); border: 1px solid var(--line); border-radius: .7rem; }
.sign-in h1 { font-size: clamp(1.55rem, 4vw, 2rem); }
.sign-in-intro > p:last-child, .sign-in > p { margin-top: .75rem; color: var(--muted); }
.login-form { display: grid; gap: .55rem; margin-top: 1.4rem; }
.login-form label { font-weight: 650; font-size: .91rem; }
.login-form input:not([type="hidden"]) { min-width: 0; display: block; width: 100%; min-height: 2.92rem; border: 1px solid #9fb1ba; border-radius: .42rem; padding: .5rem .7rem; margin-bottom: .5rem; background: var(--paper); color: var(--ink); }
.primary, .secondary { min-height: 2.75rem; padding: .5rem .9rem; border-radius: .42rem; font-weight: 660; }
.primary { color: white; background: var(--brand); border: 1px solid transparent; }
.primary:hover { background: var(--brand-dark); }
.secondary { color: var(--brand-dark); background: var(--paper); border: 1px solid #b4c7cd; }
.secondary:hover { background: #ebf4f2; }
.login-footnote { font-size: .84rem; padding-top: .9rem; border-top: 1px solid var(--line); margin-top: 1.1rem !important; }
.form-links { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; }
.form-links a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.hint { color: var(--muted); font-size: .88rem; }
.settings-form { display: grid; gap: .7rem; padding: .65rem 0 .55rem; }
.settings-form button { justify-self: start; }
.toggle { display: inline-flex; align-items: center; gap: .65rem; min-height: 2.75rem; font-weight: 650; cursor: pointer; }
.toggle input { width: 1.25rem; height: 1.25rem; flex-shrink: 0; accent-color: var(--brand); }
.primary:disabled { cursor: not-allowed; opacity: .65; }
.notice { color: #00574a; background: #dff3ed; border: 1px solid #bbddd0; padding: .65rem .75rem; border-radius: .4rem; }
.sign-in .state-list { margin-top: 1.15rem; overflow-wrap: anywhere; }
.user-cabinet { width: min(100% - 2rem, 37rem); margin-top: clamp(1.1rem, 6vh, 3.5rem); }

.portal-status { margin-bottom: .75rem; }
.moodle-release { display: grid; gap: .4rem; overflow-wrap: anywhere; }
.alert { color: var(--error-ink); background: var(--error-bg); border: 1px solid #f1d8d3; padding: .65rem .75rem; border-radius: .4rem; font-size: .9rem; margin-bottom: .3rem; }
.dashboard { display: grid; grid-template-columns: 14rem minmax(0, 1fr); min-height: 100vh; }
.skip-link { position: fixed; top: -200%; left: 1rem; z-index: 2; padding: .6rem 1rem; background: var(--paper); }
.skip-link:focus { top: .6rem; }
.sidebar { background: var(--frame); color: #fff; padding: 1.6rem 1.1rem; }
.sidebar .brand { margin: 0 .45rem 2.1rem; }
.sidebar .brand-mark { background: #afe3d5; color: #11392f; }
.side-caption { display: block; color: var(--rail-text); padding: 0 .55rem; margin-bottom: .6rem; }
.sidebar nav { display: flex; flex-direction: column; gap: .3rem; }
.sidebar nav a { color: #e1ebee; padding: .62rem .6rem; min-height: 2.75rem; text-decoration: none; border-radius: .43rem; }
.sidebar nav a:hover, .sidebar nav a[aria-current="page"] { background: #284957; color: #fff; }
.sidebar nav a[aria-current="page"] { font-weight: 650; }
.workspace { min-width: 0; }
.top-bar { display: flex; align-items: center; justify-content: space-between; gap: .9rem; min-height: 4.55rem; background: var(--paper); border-bottom: 1px solid var(--line); padding: .65rem clamp(1rem, 4vw, 3rem); }
.breadcrumb, .account { font-size: .88rem; color: var(--muted); }
.breadcrumb span { padding: 0 .28rem; color: #607984; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; min-width: 0; gap: .75rem; }
.account { max-width: 12.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.content { width: min(100%, 67rem); padding: clamp(1.45rem, 4vw, 3rem); margin: 0 auto 1.5rem; }
.intro { color: var(--muted); max-width: 52ch; margin: .8rem 0 1.55rem; }
.section { background: var(--paper); border: 1px solid var(--line); border-radius: .55rem; padding: 1.05rem clamp(.9rem, 2.9vw, 1.5rem) .6rem; margin-bottom: 1rem; }
.section h2 { padding-bottom: .75rem; }
.state-list, .steps { margin: 0; padding: 0; }
.state-list > div, .steps li { display: grid; grid-template-columns: minmax(10rem, 1fr) auto; gap: .45rem .85rem; align-items: center; border-top: 1px solid var(--line); padding: .65rem 0; }
.state-list dt, .steps p { color: var(--muted); font-size: .9rem; }
.state-list dd { margin: 0; font-weight: 630; text-align: right; }
.steps { list-style: none; }
.steps strong { display: block; font-size: .94rem; font-weight: 690; }
.badge { display: inline-block; max-width: 100%; padding: .2rem .48rem; border-radius: .28rem; background: #eef2f4; color: #385266; font-size: .76rem; font-weight: 660; white-space: nowrap; }
.badge.active { color: #00574a; background: #dff3ed; }
.cabinet-rail { position: sticky; top: 1.6rem; }
.cabinet-content { max-width: 54rem; margin-left: 0; }
.cabinet-content > h1 { margin-bottom: 1.4rem; }
.cabinet-section { padding-bottom: 1.05rem; overflow-wrap: anywhere; }
.cabinet-section .alert:not(:last-child) { margin-bottom: .75rem; }
.cabinet-section .state-list > div:first-child { border-top: 0; }
.cabinet-section .login-form { max-width: 31rem; margin-top: .9rem; }
.cabinet-section .login-form button { justify-self: start; }
.cabinet-section .login-form + .login-form { margin-top: 1.15rem; }
.cabinet-section .state-list > div { grid-template-columns: minmax(8rem, .8fr) minmax(0, 1.2fr); }
.cabinet-section .state-list dd { text-align: left; }
.key-rotation { margin-top: .85rem; padding-top: .35rem; border-top: 1px solid var(--line); }
.key-rotation summary { cursor: pointer; padding: .55rem 0; min-height: 2.75rem; font-weight: 650; color: var(--brand-dark); }
.cabinet-guide { display: grid; gap: .45rem; padding-inline-start: 1.4rem; margin: .6rem 0 .75rem; }
.stats-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 2rem; }
.stats-media { width: 100%; margin-top: 1.25rem; border-collapse: collapse; text-align: left; }
.stats-media caption { text-align: left; font-size: 1.26rem; font-weight: 650; padding-bottom: .5rem; }
.stats-media th, .stats-media td { padding: .5rem .4rem; border-bottom: 1px solid var(--line); }
.stats-media :is(th, td):not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.stats-media tfoot { font-weight: 650; }
#statistics > p + p { margin-top: .65rem; }
.clients-content { overflow-wrap: anywhere; }
.clients-content > h1 { margin-bottom: 1.4rem; }
.client-back { margin-bottom: .8rem; }
.clients-list > li:first-child { border-top: 0; }
.limits-table { overflow-x: auto; }
.limits-table table { min-width: 34rem; }
#client-limits > .hint { margin-top: .65rem; }

@media (max-width: 720px) {
    .dashboard { display: block; }
    .sidebar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding: .85rem 1rem; }
    .sidebar .brand { margin: 0; }
    .sidebar nav { flex-direction: row; flex-wrap: wrap; }
    .side-caption { display: none; }
    .top-bar { padding-inline: 1rem; }
    .cabinet-rail { position: static; width: 100%; }
    .cabinet-rail nav { margin-top: .55rem; }
}
@media (max-width: 460px) {
    .login-caption { display: none; }
    .state-list > div, .steps li { grid-template-columns: minmax(0, 1fr); justify-items: start; }
    .cabinet-section .state-list > div { grid-template-columns: minmax(0, 1fr); }
    .state-list dd { text-align: left; }
    .breadcrumb { overflow-wrap: anywhere; }
    .account { max-width: 7rem; }
    .stats-summary { grid-template-columns: 1fr; }
}
