:root {
  --navy: #17324d;
  --navy-deep: #10263a;
  --blue: #1769aa;
  --blue-soft: #e9f3fb;
  --cyan: #218f91;
  --red: #c83f38;
  --green: #16815f;
  --green-soft: #e9f7f1;
  --amber: #a86414;
  --amber-soft: #fff7e7;
  --ink: #182431;
  --muted: #647383;
  --line: #dbe3e9;
  --canvas: #f4f7f8;
  --surface: #fff;
  --sidebar-width: 238px;
  --topbar-height: 62px;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, "Segoe UI", Arial, sans-serif; font-size: 14px; letter-spacing: 0; }
a { color: var(--blue); }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); grid-template-rows: var(--topbar-height) minmax(0, 1fr); }
.app-shell.no-context { grid-template-columns: 1fr; }
.app-shell.no-context .main-content { grid-column: 1; }
.topbar { grid-column: 1 / -1; position: sticky; top: 0; z-index: 1030; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: var(--topbar-height); color: #fff; background: var(--navy-deep); border-bottom: 1px solid rgba(255,255,255,.12); }
.brand { display: flex; align-items: center; gap: 8px; padding: 0 12px; color: #fff; text-decoration: none; border-right: 1px solid rgba(255,255,255,.12); }
.brand:hover { color: #fff; }
.brand-mark { width: 50px; height: 38px; display: grid; place-items: center; overflow: hidden; background: transparent; border: 0; border-radius: 6px; }
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: center; }
.brand strong { display: block; font-size: 16px; letter-spacing: 0; white-space: nowrap; }
.brand small { display: block; margin-top: 2px; color: #b9c9d6; font-size: 10px; }
.topbar-main { min-width: 0; display: flex; align-items: center; gap: 16px; padding: 0 22px; }
.topbar-context strong { display: block; font-size: 13px; }
.topbar-context span { display: block; margin-top: 2px; color: #b9c9d6; font-size: 10px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.portal-links { align-items: stretch; gap: 28px; height: var(--topbar-height); margin-left: 10px; }
.portal-links a { display: flex; align-items: center; position: relative; color: #dbe7ef; font-size: 14px; font-weight: 700; text-decoration: none; }
.portal-links a:hover { color: #fff; }
.portal-links a.active { color: #fff; }
.portal-links a.active::after { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: #5ac4c2; }
.icon-button { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0; color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.18); border-radius: 6px; }
.icon-button:hover { color: #fff; background: rgba(255,255,255,.08); }
.icon-button svg { width: 17px; height: 17px; }
.topbar-admin-link { height: 36px; align-items: center; gap: 7px; padding: 0 10px; color: #e8f3f5; border: 1px solid rgba(255,255,255,.18); border-radius: 6px; font-size: 13px; font-weight: 750; text-decoration: none; }
.topbar-admin-link:hover, .topbar-admin-link.active { color: #fff; background: rgba(90,196,194,.16); border-color: rgba(90,196,194,.42); }
.topbar-admin-link svg { width: 16px; height: 16px; }
.profile-button { height: 38px; display: flex; align-items: center; gap: 8px; padding: 4px 9px 4px 5px; color: #fff; background: transparent; border: 1px solid rgba(255,255,255,.18); border-radius: 6px; }
.profile-button svg { width: 14px; height: 14px; }
.avatar { width: 28px; height: 28px; display: grid; place-items: center; color: var(--navy-deep); background: #d8edf0; border-radius: 50%; font-size: 10px; font-weight: 800; }
.dropdown-item svg { width: 16px; height: 16px; }
.sidebar, .mobile-sidebar { color: #dbe7ef; background: var(--navy); }
.sidebar { position: sticky; top: var(--topbar-height); height: calc(100vh - var(--topbar-height)); overflow-y: auto; }
.sidebar-inner { min-height: 100%; display: flex; flex-direction: column; padding: 16px 12px; }
.nav-section + .nav-section { margin-top: 20px; }
.nav-label { padding: 0 10px 7px; color: #91a9bb; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.sidebar .nav-link, .mobile-sidebar .nav-link { min-height: 38px; display: flex; align-items: center; gap: 10px; padding: 9px 10px; color: #dbe7ef; border-radius: 6px; font-size: 13px; font-weight: 650; }
.sidebar .nav-link:hover, .mobile-sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.07); }
.sidebar .nav-link.active, .mobile-sidebar .nav-link.active { color: #fff; background: #235577; box-shadow: inset 3px 0 0 var(--cyan); }
.nav-link svg { width: 17px; height: 17px; flex: 0 0 auto; }
.sidebar-footer { margin-top: auto; padding: 14px 10px 2px; color: #91a9bb; border-top: 1px solid rgba(255,255,255,.1); font-size: 10px; line-height: 1.6; }
.sidebar-footer a { color: #c9d9e4; text-decoration: none; }
.context-heading { padding: 4px 10px 14px; border-bottom: 1px solid rgba(255,255,255,.1); }
.context-heading span, .context-heading strong, .context-heading small { display: block; }
.context-heading span { color: #91a9bb; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.context-heading strong { margin-top: 5px; color: #fff; font-size: 15px; }
.context-heading small { margin-top: 4px; color: #b9c9d6; line-height: 1.4; }
.sidebar-empty { padding: 10px; color: #91a9bb; font-size: 11px; }
.nav-link-child { min-height: 32px !important; padding-left: 37px !important; font-size: 12px !important; }
.sidebar-submenu { border-radius: 6px; }
.sidebar-submenu-trigger { width: 100%; border: 0; background: transparent; text-align: left; cursor: default; }
.sidebar-submenu-trigger:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.sidebar-submenu-trigger .submenu-chevron { margin-left: auto; width: 15px; height: 15px; opacity: .72; transition: transform .2s ease; }
.sidebar-submenu-panel { max-height: 0; overflow: hidden; opacity: 0; transform: translateY(-3px); transition: max-height .28s ease, opacity .2s ease, transform .22s ease; }
.sidebar-submenu:hover .sidebar-submenu-panel,
.sidebar-submenu:focus-within .sidebar-submenu-panel,
.sidebar-submenu.active .sidebar-submenu-panel { max-height: 90px; opacity: 1; transform: translateY(0); margin: 2px 0 4px; padding: 4px 0; background: rgba(5, 22, 36, .34); border-radius: 6px; }
.sidebar-submenu:hover .submenu-chevron,
.sidebar-submenu:focus-within .submenu-chevron,
.sidebar-submenu.active .submenu-chevron { transform: rotate(180deg); }
.light-context .sidebar, .light-context .mobile-sidebar { color: var(--ink); background: #fff; border-right: 1px solid var(--line); }
.light-context .sidebar .nav-link, .light-context .mobile-sidebar .nav-link { color: #405466; }
.light-context .sidebar .nav-link:hover, .light-context .mobile-sidebar .nav-link:hover { color: var(--navy-deep); background: #eef4f6; }
.light-context .sidebar .nav-link.active, .light-context .mobile-sidebar .nav-link.active { color: var(--navy-deep); background: #e5f0f3; box-shadow: inset 3px 0 0 var(--cyan); }
.light-context .sidebar-submenu:hover .sidebar-submenu-panel,
.light-context .sidebar-submenu:focus-within .sidebar-submenu-panel,
.light-context .sidebar-submenu.active .sidebar-submenu-panel { background: #f1f5f7; }
.light-context .context-heading { border-bottom-color: var(--line); }
.light-context .context-heading span, .light-context .sidebar-empty { color: var(--muted); }
.navigator-heading { margin-top: 20px; padding-bottom: 10px; }
.light-context .mobile-sidebar .offcanvas-header { color: var(--navy-deep); border-bottom-color: var(--line); }
.light-context .mobile-sidebar .btn-close { filter: none; }
.system-dot { width: 7px; height: 7px; display: inline-block; margin-right: 6px; background: #4bd19b; border-radius: 50%; }
.mobile-sidebar { --bs-offcanvas-width: min(300px, 88vw); width: var(--bs-offcanvas-width); }
.mobile-sidebar.show:not(.hiding) { transform: none !important; }
.mobile-sidebar .offcanvas-header { border-bottom: 1px solid rgba(255,255,255,.12); }
.main-content { min-width: 0; padding: 22px 24px 44px; }
.content-wrap { width: min(1500px, 100%); margin: 0 auto; }
.no-context .content-wrap { width: min(1120px, 100%); }
.guest-shell.no-context { display: block; }
.guest-shell .topbar { display: flex; justify-content: space-between; }
.guest-shell .brand { min-width: var(--sidebar-width); }
.guest-shell .topbar-main { flex: 1; }
.guest-shell .main-content { min-height: calc(100vh - var(--topbar-height)); }
h1, .h1 { color: var(--navy-deep); font-size: 24px; line-height: 1.25; letter-spacing: 0; font-weight: 750; }
h2, .h2, .h3, .h4, .h5 { color: var(--navy-deep); letter-spacing: 0; }
.text-secondary { color: var(--muted) !important; }
.card { border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 1px 2px rgba(17,38,58,.04); }
.card-header { border-bottom-color: var(--line); }
.table { --bs-table-bg: transparent; }
.table > :not(caption) > * > * { padding: .72rem .8rem; border-bottom-color: #e7edf1; }
.table th { color: #536372; background: #f7fafb; font-size: 10px; font-weight: 800; text-transform: uppercase; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: #f5f9fb; }
.metric { border-left: 3px solid var(--blue); }
.metric .fs-4 { color: var(--navy-deep); }
.form-label { color: #526171; font-size: 11px; font-weight: 750; }
.form-control, .form-select { min-height: 38px; border-color: #cfd9e1; border-radius: 5px; font-size: 13px; }
textarea.form-control { min-height: auto; }
.form-control:focus, .form-select:focus { border-color: var(--blue); box-shadow: 0 0 0 .18rem rgba(23,105,170,.12); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; border-radius: 5px; font-size: 13px; font-weight: 700; }
.btn svg { width: 15px; height: 15px; }
.input-group-text { color: var(--muted); background: #f7fafb; border-color: #cfd9e1; }
.input-group-text svg { width: 15px; height: 15px; }
.btn-primary { --bs-btn-bg: var(--blue); --bs-btn-border-color: var(--blue); --bs-btn-hover-bg: #12598f; --bs-btn-hover-border-color: #12598f; }
.btn-danger { --bs-btn-bg: var(--red); --bs-btn-border-color: var(--red); }
.btn-outline-primary { --bs-btn-color: var(--blue); --bs-btn-border-color: #91b7d4; }
.badge { border-radius: 12px; font-size: 10px; font-weight: 750; }
.text-bg-success { color: var(--green) !important; background: var(--green-soft) !important; }
.text-bg-warning { color: var(--amber) !important; background: var(--amber-soft) !important; }
.text-bg-danger { color: #a8302b !important; background: #fff0ee !important; }
.text-bg-primary { color: var(--blue) !important; background: var(--blue-soft) !important; }
.alert { border-radius: 6px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.page-heading p { margin: 5px 0 0; color: var(--muted); }
.section-title { margin-bottom: 10px; font-size: 15px; font-weight: 750; }
.empty-state { padding: 44px 20px; color: var(--muted); text-align: center; }
.empty-state svg { width: 28px; height: 28px; margin: 0 auto 10px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.kpi-icon { width: 32px; height: 32px; display: grid; place-items: center; margin-bottom: 12px; color: var(--blue); background: var(--blue-soft); border-radius: 5px; }
.kpi-icon svg { width: 17px; height: 17px; }
.kpi-value { color: var(--navy-deep); font-size: 24px; font-weight: 800; }
.kpi-label { margin-top: 2px; color: var(--muted); font-size: 11px; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-avatar { width: 64px; height: 64px; flex: 0 0 auto; object-fit: cover; border: 1px solid var(--line); border-radius: 50%; }
.profile-avatar-placeholder { display: grid; place-items: center; color: var(--navy-deep); background: #d8edf0; font-size: 18px; font-weight: 800; }
.profile-resource-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.profile-resource-links a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; }
.profile-resource-links svg { width: 17px; color: var(--blue); }
.resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.resource-item { min-width: 0; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.resource-item h2 { margin: 6px 0 8px; font-size: 16px; }
.resource-item h2 a { color: var(--navy-deep); text-decoration: none; }
.resource-item p { margin: 0 0 12px; color: var(--muted); }
.resource-icon { width: 34px; height: 34px; display: grid; place-items: center; margin-bottom: 12px; color: var(--blue); background: var(--blue-soft); border-radius: 5px; }
.resource-icon svg { width: 18px; height: 18px; }
.resource-stats { display: flex; gap: 12px; color: var(--muted); font-size: 11px; }
.library-content { max-width: 900px; font-size: 15px; line-height: 1.7; }
.library-content table { width: 100%; margin: 1rem 0; border-collapse: collapse; }
.library-content th, .library-content td { padding: 8px; border: 1px solid var(--line); }
.material-list { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.material-row { padding: 18px 20px; background: #fff; border-bottom: 1px solid var(--line); }
.material-row:last-child { border-bottom: 0; }
.material-row h2 { margin: 7px 0; font-size: 17px; }
.material-row p { max-width: 920px; margin: 0 0 12px; color: var(--muted); }
.material-meta { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.material-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.editor-shell { border: 1px solid #cfd9e1; border-radius: 5px; overflow: hidden; }
.editor-toolbar { display: flex; gap: 3px; padding: 6px; background: #f3f7f9; border-bottom: 1px solid var(--line); }
.editor-toolbar button { width: 32px; height: 30px; display: grid; place-items: center; padding: 0; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.editor-toolbar svg { width: 15px; }
.editor-shell textarea { min-height: 340px; border: 0; border-radius: 0; box-shadow: none !important; }
.editor-preview { min-height: 180px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 5px; }
.kit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.portal-intro { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); align-items: center; gap: 48px; min-height: 390px; padding: 42px 0; }
.portal-intro h1 { margin: 8px 0 14px; font-size: 42px; }
.portal-intro p { max-width: 720px; color: var(--muted); font-size: 17px; line-height: 1.6; }
.portal-kicker { color: var(--cyan); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.home-code { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--cyan); border-radius: 6px; }
.home-code strong, .home-code span { display: block; }
.home-code span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.home-code form { display: flex; gap: 8px; width: min(440px, 100%); }
.home-intro { padding: 38px 0 10px; }
.home-intro h1 { margin: 7px 0 10px; font-size: 36px; }
.home-intro p { max-width: 760px; color: var(--muted); font-size: 16px; }
.news-list { border-block: 1px solid var(--line); }
.news-list article { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.news-list article:last-child { border-bottom: 0; }
.news-list time { color: var(--muted); font-size: 11px; }
.news-list h3 { margin: 0 0 5px; font-size: 15px; }
.news-list h3 a { color: var(--navy-deep); text-decoration: none; }
.news-list p { margin: 0; color: var(--muted); }
.portal-process { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 28px; background: #eef5f6; border: 1px solid #d4e5e7; border-radius: 6px; }
.portal-process > div { display: grid; place-items: center; gap: 8px; color: var(--navy-deep); font-size: 11px; font-weight: 750; }
.portal-process > div svg { width: 38px; height: 38px; padding: 9px; color: var(--blue); background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.portal-process > svg { width: 16px; color: #8aa1ae; }
.portal-metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); }
.portal-metrics > div { padding: 20px; border-right: 1px solid var(--line); }
.portal-metrics > div:last-child { border-right: 0; }
.portal-metrics strong, .portal-metrics span { display: block; }
.portal-metrics strong { color: var(--navy-deep); font-size: 24px; }
.portal-metrics span { color: var(--muted); font-size: 11px; }
.portal-section { margin-top: 34px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.section-heading h2 { margin: 0; font-size: 18px; }
.section-heading p { margin: 4px 0 0; color: var(--muted); }
.portal-entry-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.portal-entry-grid a { min-width: 0; padding: 20px; color: var(--ink); background: #fff; border-right: 1px solid var(--line); text-decoration: none; }
.portal-entry-grid a:last-child { border-right: 0; }
.portal-entry-grid svg, .education-band svg { width: 22px; margin-bottom: 14px; color: var(--blue); }
.portal-entry-grid strong, .portal-entry-grid span { display: block; }
.portal-entry-grid span { margin-top: 6px; color: var(--muted); font-size: 11px; }
.access-strip { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 34px; padding: 18px 20px; color: #fff; background: var(--navy); border-radius: 6px; }
.access-strip strong, .access-strip span { display: block; }
.access-strip span { color: #b9c9d6; font-size: 11px; }
.access-strip form { display: flex; gap: 8px; width: min(420px, 100%); }
.education-band { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.education-band > div { padding: 18px; background: #fff; border-right: 1px solid var(--line); }
.education-band > div:last-child { border-right: 0; }
.education-band strong, .education-band span, .education-band a { display: block; }
.education-band span { min-height: 44px; margin: 6px 0 10px; color: var(--muted); font-size: 11px; }
.compact-list { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.compact-list > a { display: grid; grid-template-columns: 130px 1fr 180px; gap: 16px; padding: 12px 14px; color: var(--ink); background: #fff; border-bottom: 1px solid var(--line); text-decoration: none; }
.compact-list > a:last-child { border-bottom: 0; }
.compact-list small { color: var(--muted); }
.assignment-compact-list > a { grid-template-columns: 72px 120px minmax(0, 1fr) 180px; align-items: center; }
.assignment-compact-preview { width: 64px; height: 48px; display: grid; place-items: center; overflow: hidden; padding: 5px; color: var(--blue); background: #f8fafb; border: 1px solid #cfdee7; border-radius: 6px; }
.assignment-compact-preview img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: center; }
.preview-image { width: 100%; height: 100%; display: block; background-repeat: no-repeat; background-position: center; background-size: contain; background-color: #f8fafb; }
.assignment-compact-preview > span { color: var(--navy-deep); font-size: 14px; font-weight: 800; text-transform: uppercase; }
.download-list { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.download-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 14px; background: #fff; border-bottom: 1px solid var(--line); }
.download-row:last-child { border-bottom: 0; }
.file-preview { width: 54px; height: 64px; display: grid; place-items: end center; padding-bottom: 8px; color: var(--blue); background: #edf4f8; border: 1px solid #cfdee7; border-radius: 4px; font-size: 10px; font-weight: 800; }
.download-main h2 { margin: 0 0 5px; font-size: 15px; }
.download-main h2 a { color: var(--navy-deep); text-decoration: none; }
.download-main p { margin: 0 0 6px; color: var(--muted); }
.assignment-list, .technical-list { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.assignment-row, .technical-row { display: grid; grid-template-columns: 128px minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 14px; background: #fff; border-bottom: 1px solid var(--line); }
.assignment-row:last-child, .technical-row:last-child { border-bottom: 0; }
.assignment-preview, .technical-preview { width: 112px; height: 84px; display: grid; place-items: center; overflow: hidden; padding: 6px; color: var(--blue); background: #f8fafb; border: 1px solid #cfdee7; border-radius: 6px; text-decoration: none; }
.assignment-preview img, .technical-preview img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: center; }
.assignment-preview span { color: var(--navy-deep); font-size: 18px; font-weight: 800; text-transform: uppercase; }
.technical-preview svg { width: 26px; height: 26px; }
.assignment-main h2, .technical-main h2 { margin: 3px 0 5px; font-size: 17px; }
.assignment-main h2 a, .technical-main h2 a { color: var(--navy-deep); text-decoration: none; }
.assignment-meta { color: var(--muted); font-size: 11px; font-weight: 750; text-transform: uppercase; }
.assignment-side { display: flex; align-items: center; gap: 8px; }
.technical-main { padding-left: 4px; }
.technical-main p { margin: 0; color: var(--muted); }
.technical-detail-preview { width: 100%; min-height: 210px; display: grid; place-items: center; overflow: hidden; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.technical-detail-preview img { width: 100%; height: 280px; display: block; object-fit: contain; object-position: center; }
.technical-detail-preview .preview-image { height: 280px; }
.technical-detail-preview > div { min-height: 190px; display: grid; place-items: center; gap: 8px; color: var(--muted); }
.technical-detail-preview svg { width: 42px; height: 42px; color: var(--blue); }
.assignment-detail-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: 16px; align-items: stretch; }
.assignment-cover-large { width: min(760px, 100%); justify-self: center; height: clamp(220px, 30vw, 360px); display: grid; place-items: center; overflow: hidden; background: #edf4f8; border: 1px solid var(--line); border-radius: 6px; }
.assignment-cover-large img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: center; background: #f8fafb; }
.assignment-cover-large > div { width: 100%; height: 100%; display: grid; place-items: center; gap: 8px; color: var(--muted); }
.assignment-cover-large svg { width: 38px; height: 38px; }
.assignment-links-panel { display: grid; gap: 12px; }
.assignment-links-panel section { padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.assignment-links-panel h2 { margin: 0 0 10px; font-size: 15px; }
.linked-list { display: grid; gap: 8px; }
.linked-list a { display: block; padding: 8px 10px; color: var(--ink); background: #f8fafb; border: 1px solid #e4ebf0; border-radius: 5px; text-decoration: none; }
.linked-list small { display: block; margin-top: 2px; color: var(--muted); }
.linked-list .linked-technical-item { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: center; gap: 10px; }
.linked-technical-preview { width: 54px; height: 41px; display: grid; place-items: center; overflow: hidden; padding: 4px; color: var(--blue); background: #f8fafb; border: 1px solid #cfdee7; border-radius: 5px; }
.linked-technical-preview img { width: 100%; height: 100%; display: block; object-fit: contain; object-position: center; }
.linked-technical-preview svg { width: 20px; height: 20px; }
.linked-download { display: grid; grid-template-columns: minmax(0, 1fr) 36px; gap: 7px; }
.linked-download .linked-download-main { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 8px; padding-top: 5px; padding-bottom: 5px; }
.linked-download-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 750; }
.file-type-badge { width: 30px; height: 30px; display: grid; place-items: center; align-content: center; gap: 0; color: #1b5673; background: #e8f3f7; border: 1px solid #c5dce7; border-radius: 5px; }
.file-type-badge svg { width: 13px; height: 13px; }
.file-type-badge strong { font-size: 8px; line-height: 1; font-weight: 850; letter-spacing: 0; }
.file-type-pdf { color: #a33131; background: #fff0f0; border-color: #efc4c4; }
.file-type-xls, .file-type-xlsx, .file-type-csv { color: #1d7445; background: #ecf8f0; border-color: #bfdfcb; }
.file-type-zip, .file-type-rar, .file-type-7z { color: #7a5421; background: #fff5e5; border-color: #e6cfaa; }
.file-type-dwg, .file-type-stp, .file-type-step, .file-type-ipt, .file-type-iam, .file-type-idw, .file-type-sldprt, .file-type-sldasm, .file-type-cdw, .file-type-m3d { color: #274d91; background: #edf3ff; border-color: #c8d7f2; }
.file-type-doc, .file-type-docx, .file-type-txt { color: #365783; background: #eef4fb; border-color: #c8d8e8; }
.linked-download .linked-download-action { display: flex; align-items: center; justify-content: center; padding: 0; color: var(--blue); }
.linked-download .linked-download-action svg { width: 16px; height: 16px; }
.assignment-description { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.assignment-description summary { cursor: pointer; color: var(--blue); font-weight: 750; }
.object-table > :not(caption) > * > * { padding: .48rem .7rem; vertical-align: top; }
.object-intervals summary { display: inline-flex; align-items: center; cursor: pointer; color: var(--navy-deep); font-weight: 750; }
.object-intervals-body { max-height: 0; overflow: hidden; opacity: 0; margin-top: 0; transition: max-height .24s ease, opacity .2s ease, margin-top .2s ease; }
.object-intervals[open] .object-intervals-body { max-height: 340px; opacity: 1; margin-top: 8px; padding: 8px; background: #f8fafb; border: 1px solid #e4ebf0; border-radius: 5px; overflow: auto; }
.object-intervals-title { margin-bottom: 6px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.object-intervals-table { font-size: 12px; }
.object-intervals-table > :not(caption) > * > * { padding: .34rem .55rem; }
.object-interval-status-muted { color: var(--muted); font-size: 11px; }
.btn-group form { display: inline-flex; margin: 0; }
.analysis-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.analysis-action { min-width: 0; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 10px; padding: 12px; color: var(--ink); background: #f8fafb; border: 1px solid #e4ebf0; border-radius: 6px; text-decoration: none; }
.analysis-action:hover { color: var(--ink); background: #eef5f7; }
.analysis-action svg { width: 20px; height: 20px; color: var(--blue); }
.analysis-action strong, .analysis-action small { display: block; }
.analysis-action small { margin-top: 2px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.protocol-log { margin-top: 12px; }
.serial-analysis { display: grid; gap: 10px; }
.serial-result { background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; box-shadow: 0 1px 2px rgba(17,38,58,.04); }
.serial-result-summary { display: grid; grid-template-columns: minmax(230px, 1fr) minmax(410px, 1.35fr) 82px; align-items: stretch; gap: 14px; padding: 12px 14px; color: var(--ink); background: linear-gradient(90deg, #f7fafb 0%, #fff 100%); border-left: 4px solid var(--blue); cursor: pointer; font-size: 12px; font-weight: 750; list-style: none; }
.serial-result-summary::-webkit-details-marker { display: none; }
.serial-result-summary::after { content: "Раскрыть"; align-self: center; justify-self: end; padding: 5px 8px; color: var(--blue); background: #eef6fb; border: 1px solid #cfe3f0; border-radius: 999px; font-size: 11px; font-weight: 800; }
.serial-result[open] .serial-result-summary::after { content: "Скрыть"; }
.serial-result-title { min-width: 0; display: grid; align-content: center; gap: 4px; }
.serial-result-object { color: var(--navy-deep); font-size: 14px; font-weight: 800; }
.serial-result-file { min-width: 0; display: inline-flex; align-items: center; gap: 5px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.serial-result-file svg { width: 13px; height: 13px; color: var(--blue); flex: 0 0 auto; }
.serial-result-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.serial-result-kpi { min-width: 0; display: grid; align-content: center; gap: 2px; min-height: 48px; padding: 7px 10px; background: #fff; border: 1px solid #dfe8ee; border-radius: 6px; }
.serial-result-kpi span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.serial-result-kpi strong { color: var(--navy-deep); font-size: 15px; font-weight: 850; font-variant-numeric: tabular-nums; white-space: nowrap; }
.serial-result-kpi strong b { font: inherit; }
.serial-result-kpi strong em { margin-left: 8px; color: var(--muted); font-size: 12px; font-style: normal; font-weight: 800; }
.serial-result-kpi-accent { background: #f7fbff; border-color: #cfe3f0; }
.serial-result-kpi-warning { background: #fff7e7; border-color: #f2d7a8; }
.serial-result-body { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .28s ease, opacity .22s ease; }
.serial-result[open] .serial-result-body { max-height: 1200px; opacity: 1; overflow: auto; }
.serial-result-meta { display: flex; flex-wrap: wrap; gap: 10px 16px; padding: 10px 14px; color: var(--muted); background: #fff; border-top: 1px solid var(--line); font-size: 11px; }
.check-result-table { min-width: 980px; }
.check-result-table > :not(caption) > * > * { padding: .42rem .7rem; }
.check-number { font-variant-numeric: tabular-nums; white-space: nowrap; }
.check-bounds { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; min-width: 190px; }
.check-bound-box { min-height: 34px; display: grid; place-items: center; padding: 4px 10px; background: #eef2f7; border: 1px solid #cbd5e1; border-radius: 6px; }
.check-bound-box:last-child { background: #edf7f1; border-color: #bfd8ca; }
.check-bound-box span { color: #0f172a; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.check-deviation-cell { width: 360px; min-width: 330px; }
.check-range-indicator { display: grid; grid-template-columns: 22% 56% 22%; position: relative; min-width: 310px; height: 14px; overflow: visible; }
.check-range-indicator::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: 999px; background: linear-gradient(90deg, transparent calc(10% - 1px), #fff calc(10% - 1px), #fff calc(10% + 1px), transparent calc(10% + 1px)), linear-gradient(90deg, transparent calc(20% - 1px), #fff calc(20% - 1px), #fff calc(20% + 1px), transparent calc(20% + 1px)), linear-gradient(90deg, transparent calc(30% - 1px), #fff calc(30% - 1px), #fff calc(30% + 1px), transparent calc(30% + 1px)), linear-gradient(90deg, transparent calc(40% - 1px), #fff calc(40% - 1px), #fff calc(40% + 1px), transparent calc(40% + 1px)), linear-gradient(90deg, transparent calc(50% - 1px), #fff calc(50% - 1px), #fff calc(50% + 1px), transparent calc(50% + 1px)), linear-gradient(90deg, transparent calc(60% - 1px), #fff calc(60% - 1px), #fff calc(60% + 1px), transparent calc(60% + 1px)), linear-gradient(90deg, transparent calc(70% - 1px), #fff calc(70% - 1px), #fff calc(70% + 1px), transparent calc(70% + 1px)), linear-gradient(90deg, transparent calc(80% - 1px), #fff calc(80% - 1px), #fff calc(80% + 1px), transparent calc(80% + 1px)), linear-gradient(90deg, transparent calc(90% - 1px), #fff calc(90% - 1px), #fff calc(90% + 1px), transparent calc(90% + 1px)); }
.check-range-zone { position: relative; height: 100%; }
.check-range-zone-out { background: #9ca3af; }
.check-range-zone-left { border-radius: 999px 0 0 999px; }
.check-range-zone-right { border-radius: 0 999px 999px 0; }
.check-range-zone-in { background: #16a34a; }
.check-range-target { position: absolute; left: 50%; top: -5px; z-index: 2; width: 5px; height: 24px; transform: translateX(-50%); background: #facc15; border-radius: 999px; box-shadow: 0 0 0 2px #fff; }
.check-result-marker { position: absolute; top: 50%; z-index: 3; width: 13px; height: 13px; transform: translate(-50%, -50%); background: #111827; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 2px 6px rgba(15, 23, 42, .26); }
.check-range-note { margin-top: 4px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.check-status-cell { width: 86px; text-align: center; }
.check-status-icon { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; color: #fff; border-radius: 50%; font-size: 20px; font-weight: 800; line-height: 1; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .14), 0 2px 7px rgba(15, 23, 42, .18); }
.check-status-ok { background: #166534; }
.check-status-fail { background: #dc2626; }
.check-status-warning { background: #a86414; }
.htmx-indicator { display: none; }
.htmx-request .submit-label { display: none; }
.htmx-request .htmx-indicator { display: inline-block; }
@media (max-width: 1199px) { .dashboard-grid { grid-template-columns: repeat(2, 1fr); } .resource-grid { grid-template-columns: repeat(2, 1fr); } .portal-entry-grid { grid-template-columns: repeat(2, 1fr); } .portal-entry-grid a:nth-child(2) { border-right: 0; } .portal-entry-grid a:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 991.98px) {
  .app-shell { display: block; padding-top: var(--topbar-height); }
  .topbar { position: fixed; inset: 0 0 auto 0; display: flex; }
  .brand { min-width: 190px; border-right: 0; }
  .topbar-main { flex: 1; padding: 0 14px; }
  .main-content { padding: 18px 14px 36px; }
  .portal-intro { grid-template-columns: 1fr; gap: 20px; min-height: 0; }
  .portal-process { justify-content: flex-start; }
  .kit-grid, .education-band { grid-template-columns: 1fr; }
  .education-band > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .compact-list > a { grid-template-columns: 110px 1fr; }
  .compact-list small { grid-column: 2; }
  .assignment-compact-list > a { grid-template-columns: 72px minmax(0, 1fr); }
  .assignment-compact-list .font-monospace, .assignment-compact-list small { grid-column: 2; }
}
@media (max-width: 575.98px) {
  .brand { min-width: auto; padding: 0 12px; }
  .brand small { display: none; }
  .topbar-main { gap: 8px; }
  .page-heading { display: block; }
  .page-heading > :last-child { margin-top: 12px; }
  .dashboard-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .analysis-actions { grid-template-columns: 1fr; }
  .kpi { padding: 12px; }
  .kpi-value { font-size: 20px; }
  .card { overflow: hidden; }
  .profile-resource-links { grid-template-columns: 1fr; }
  .resource-grid, .portal-entry-grid { grid-template-columns: 1fr; }
  .resource-item { padding: 14px; }
  .portal-intro { padding: 24px 0; }
  .portal-intro h1 { font-size: 30px; }
  .portal-process { gap: 6px; padding: 18px 10px; }
  .portal-metrics { grid-template-columns: 1fr 1fr; }
  .portal-metrics > div:nth-child(2) { border-right: 0; }
  .portal-metrics > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .portal-entry-grid a { border-right: 0; border-bottom: 1px solid var(--line); }
  .access-strip { display: block; }
  .access-strip form { margin-top: 12px; }
  .home-code { display: block; }
  .home-code form, .home-code > a { margin-top: 12px; }
  .home-intro h1 { font-size: 29px; }
  .news-list article { grid-template-columns: 1fr; gap: 5px; }
  .download-row { grid-template-columns: 46px minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
  .file-preview { width: 42px; height: 52px; }
  .assignment-row, .technical-row { grid-template-columns: 72px minmax(0, 1fr); gap: 14px; }
  .assignment-preview, .technical-preview { width: 72px; height: 54px; }
  .assignment-side, .technical-row > .btn { grid-column: 2; justify-content: flex-start; }
  .assignment-detail-grid { grid-template-columns: 1fr; }
  .serial-result-summary { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
  .serial-result-title, .serial-result-kpis { grid-column: 1 / -1; }
  .serial-result-kpis { grid-template-columns: 1fr 1fr; }
  .serial-result-summary::after { grid-column: 2; grid-row: 1; }
  .serial-result-object { grid-column: 1 !important; grid-row: 1; }
}
