/* Editorial platform: a shared horizontal shell with quiet, unboxed content. */
.app-shell { --platform-width: 1234px; font-size: 16px; font-weight: 400; }
.app-shell .app-header, .app-shell.is-learning .app-header {
  position: sticky; top: 0; z-index: 20; display: grid;
  grid-template-columns: minmax(150px,1fr) auto minmax(280px,1fr);
  align-items: center; gap: 24px; min-height: 80px; padding: 14px 64px;
  background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: none;
}
.app-shell .brand-home-button { text-decoration: none; font-size: 17px; font-weight: 500; width: fit-content; padding: 0; }
.app-shell .brand-mark { width: 40px; height: 40px; flex-shrink: 0; }
.platform-nav { display: flex; align-self: stretch; align-items: stretch; gap: 28px; white-space: nowrap; }
.platform-nav-link { display: flex; align-items: center; position: relative; text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 500; }
.platform-nav-link.active { color: var(--text); }
.platform-nav-link.active::after { content: ''; position: absolute; height: 2px; background: var(--accent); left: 0; right: 0; bottom: -14px; }
.platform-nav-link:hover { color: var(--text); }
.platform-nav-link.mobile-profile-link { display: none; }
.app-shell .header-actions, .app-shell.is-learning .header-actions { gap: 8px; margin: 0; min-width: 0; justify-self: end; }
.app-shell .header-actions .btn, .app-shell .notification-bell { width: 38px; height: 38px; min-width: 38px; min-height: 38px; padding: 8px; border-color: transparent; border-radius: 8px; background: transparent; }
.app-shell .header-actions .btn:hover, .app-shell .notification-bell:hover { background: var(--surface-soft); }
.app-shell .header-help { display: inline-flex; }
.app-shell .profile-control { border: 0; padding: 0 4px; gap: 8px; background: transparent; }
.app-shell .profile-control .avatar-upload { width: 32px; height: 32px; min-width: 32px; border-radius: 50%; background: var(--surface-soft); font-size: 11px; }
.app-shell .compact-user, .app-shell.is-learning .compact-user { padding: 0; max-width: 190px; min-width: 0; border: 0; border-radius: 0; background: transparent; text-decoration: none; }
.app-shell .compact-user strong { font-size: 13px; font-weight: 550; white-space: normal; overflow-wrap: anywhere; }
.app-shell .compact-user > span { font-size: 11px; font-weight: 400; }
.app-shell .main { width: 100%; max-width: var(--platform-width); margin: 0 auto; padding: 56px 32px 80px; }
.app-shell.is-learning .main { max-width: none; padding: 28px 32px 64px; }
.app-shell.is-learning .learning-sidebar { left: 64px; }
.app-shell [data-nav-region][hidden] { display: none; }
.app-shell .btn { gap: 10px; min-height: 42px; padding: 11px 17px; border-radius: 8px; font-size: 14px; font-weight: 600; line-height: 1.45; text-decoration: none; }
.app-shell .btn.primary { background: var(--text); color: var(--bg); border-color: transparent; }
.app-shell .btn.secondary, .app-shell .btn.ghost { background: transparent; }
.app-shell .btn.ghost { border-color: transparent; }
.app-shell .btn.compact { min-height: 34px; padding: 7px 12px; font-size: 13px; }
.app-shell .icon-only { padding: 8px; }
.app-shell .pill { font-size: 11px; font-weight: 500; padding: 3px 8px; }
.platform-page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 36px; }
.platform-page-heading h1 { font-size: clamp(30px,3vw,44px); font-weight: 650; line-height: 1.2; letter-spacing: -.025em; margin: 0; }
.platform-page-heading p { color: var(--muted); font-weight: 400; line-height: 1.6; margin: 12px 0 0; font-size: 15px; }
.platform-page-heading > .text-link { padding-top: 12px; }
.text-link { color: var(--accent); text-decoration: none; display: inline-flex; gap: 12px; align-items: center; font-size: 14px; font-weight: 500; line-height: 1.6; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.platform-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.platform-section-heading h2 { margin: 0; font-size: 30px; font-weight: 600; letter-spacing: -.02em; }
.editorial-continuation { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; padding: 0 0 44px; border-bottom: 1px solid var(--line); margin-bottom: 36px; }
.continuation-copy { min-width: 0; }
.continuation-label { display: block; color: var(--muted); font-size: 14px; font-weight: 400; line-height: 1.5; margin: 0 0 8px; }
.continuation-copy h2 { font-size: clamp(25px,2.4vw,32px); font-weight: 600; letter-spacing: -.02em; line-height: 1.2; margin: 0 0 18px; overflow-wrap: anywhere; }
.continuation-lesson { color: var(--muted); font-size: 16px; font-weight: 400; line-height: 1.6; margin: 0 0 20px; }
.continuation-cover { aspect-ratio: 2.05; overflow: hidden; border-radius: 10px; background: var(--surface-soft); }
.continuation-cover:has(img) { background: #fff; }
.continuation-cover img { display: block; width: 100%; height: 100%; object-fit: contain; }
.continuation-copy .platform-progress { max-width: 420px; margin-bottom: 22px; }
.continuation-copy .btn.primary { min-height: 48px; min-width: 248px; justify-content: center; padding: 13px 24px; font-size: 16px; }
.platform-progress { display: grid; gap: 8px; }
.platform-progress .progress-track { height: 5px; background: var(--surface-soft); border-radius: 999px; overflow: hidden; }
.platform-progress .progress-track i { height: 100%; display: block; border-radius: inherit; background: var(--accent); }
.platform-progress > span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.editorial-course-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 28px; align-items: start; }
.app-shell .editorial-course-card { display: grid; gap: 14px; min-width: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--text); text-decoration: none; transition: none; }
.app-shell .editorial-course-card:hover { transform: none; }
.editorial-course-card:hover h3 { color: var(--accent); }
.course-cover { aspect-ratio: 2.05; overflow: hidden; border-radius: 10px; background: var(--surface-soft); }
.course-cover:has(img) { background: #fff; }
.course-cover img { width: 100%; height: 100%; object-fit: contain; display: block; transition: opacity 160ms; }
.editorial-course-card:hover .course-cover img { opacity: .9; }
.course-cover-missing { height: 100%; display: grid; place-items: center; color: var(--muted); }
.course-cover-missing svg { width: 36px; height: 36px; stroke-width: 1.3; }
.course-card-copy { display: grid; gap: 8px; }
.app-shell .course-card-copy h3 { font-size: 20px; font-weight: 550; line-height: 1.4; margin: 0; overflow-wrap: anywhere; }
.course-card-copy p { font-size: 13px; font-weight: 400; color: var(--muted); line-height: 1.5; margin: 0; }
.platform-status { font-size: 13px; line-height: 1.5; color: var(--muted); }
.platform-status.success { color: var(--success); }
.platform-status.warning { color: var(--amber); }
.platform-status.started { color: var(--accent); }
.platform-status.danger, .course-due { color: var(--danger); }
.course-due { font-size: 12px; line-height: 1.5; }
.home-catalog { margin-bottom: 36px; }
.home-test-line { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 24px 0; border-top: 1px solid var(--line); }
.home-test-line h2 { margin: 4px 0; font-size: 17px; font-weight: 550; line-height: 1.5; }
.home-test-line p { margin: 0; font-size: 13px; color: var(--muted); }
.home-deadline-line { display: flex; justify-content: space-between; align-items: baseline; gap: 28px; border-top: 1px solid var(--line); padding-top: 24px; }
.home-deadline-line > div { color: var(--muted); font-size: 13px; line-height: 1.6; display: flex; flex-wrap: wrap; gap: 6px 12px; }
.home-deadline-line p { margin: 0; }
.deadline-inline { color: var(--text); text-decoration: none; }
.deadline-inline small { color: var(--muted); margin-left: 8px; }
.quiet-empty { font-size: 15px; color: var(--muted); line-height: 1.6; }
.no-current { grid-template-columns: 1fr; min-height: 180px; }
.no-current h2 { font-size: 24px; font-weight: 550; }
.no-current p { color: var(--muted); }
.platform-library-toolbar { display: flex; align-items: end; gap: 24px; margin-bottom: 36px; }
.platform-library-toolbar .library-search { display: flex; align-items: center; gap: 12px; flex: 1; margin: 0; min-width: 0; border-radius: 8px; padding: 12px 16px; min-height: 46px; background: transparent; }
.platform-library-toolbar .library-search input { font-weight: 400; font-size: 15px; min-width: 0; width: 100%; padding: 0; border: 0; background: transparent; height: 22px; }
.platform-library-toolbar .library-search input::placeholder { font-weight: 400; }
.library-group-filter { display: grid; gap: 8px; min-width: 220px; }
.library-group-filter label { color: var(--muted); font-size: 12px; }
.library-group-filter select { background: var(--bg); color: var(--text); padding: 11px 36px 11px 12px; border: 1px solid var(--line); border-radius: 8px; min-height: 46px; max-width: 100%; font-size: 14px; }
.library-results-summary { display: flex; align-items: baseline; gap: 12px; margin-bottom: 24px; font-weight: 550; font-size: 18px; }
.library-results-summary span { color: var(--muted); font-weight: 400; font-size: 13px; }
.platform-library .editorial-course-grid { row-gap: 36px; }
.editorial-test-row { display: grid; grid-template-columns: 24px minmax(0,1fr) auto; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--line); align-items: start; }
.editorial-test-row:first-child { padding-top: 4px; }
.test-row-icon { color: var(--muted); padding-top: 6px; }
.test-row-copy h2 { font-size: 20px; font-weight: 550; line-height: 1.45; margin: 0 0 8px; }
.test-title-link { color: var(--text); text-decoration: none; }
.test-title-link:hover { color: var(--accent); }
.test-row-copy p { color: var(--muted); margin: 5px 0; font-size: 13px; line-height: 1.6; }
.test-row-result { display: grid; gap: 8px; justify-items: end; padding-left: 16px; }
.test-row-result small { font-size: 12px; color: var(--muted); }
.test-resume { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.test-resume > span { font-size: 13px; color: var(--accent); margin-right: 8px; }
.calendar-empty { max-width: 500px; text-align: center; padding: 80px 0; margin: 0 auto; }
.calendar-empty > span svg { width: 36px; height: 36px; color: var(--muted); }
.calendar-empty h2 { font-size: 24px; font-weight: 550; margin: 24px 0 12px; }
.calendar-empty p { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 0 0 24px; }
.calendar-agenda { margin-bottom: 40px; }
.calendar-agenda h2 { font-size: 20px; font-weight: 550; margin: 0 0 12px; }
.calendar-agenda h2 > span { font-size: 13px; color: var(--muted); margin-left: 12px; }
.agenda-row { display: grid; grid-template-columns: 180px minmax(0,1fr) 24px; gap: 24px; align-items: baseline; padding: 22px 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.agenda-row:hover h3 { color: var(--accent); }
.agenda-row time { color: var(--muted); font-size: 14px; line-height: 1.6; }
.agenda-row.overdue time { color: var(--danger); }
.agenda-row h3 { margin: 0 0 6px; font-size: 18px; font-weight: 500; }
.agenda-row p { margin: 0; font-size: 13px; color: var(--muted); }
/* Management and profile use the same page surface; dense data keeps row dividers. */
.app-shell .admin-workbench { display: block; max-width: none; }
.app-shell .admin-side-nav { position: static; width: auto; min-width: 0; padding: 0; border: 0; background: transparent; box-shadow: none; margin-bottom: 32px; }
.admin-side-nav > h1 { font-size: 36px; font-weight: 650; letter-spacing: -.025em; margin: 0 0 28px; }
.app-shell .admin-side-nav nav { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.admin-side-nav nav a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 0; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 400; }
.admin-side-nav nav a.active { color: var(--text); box-shadow: 0 2px var(--accent); }
.app-shell .admin-side-nav nav small { background: transparent; color: var(--muted); font-weight: 400; min-width: 0; width: auto; padding: 0; font-size: 12px; }
.app-shell .admin-workspace { min-width: 0; border: 0; background: transparent; }
.management-page .panel, .management-page .admin-workspace-head { padding: 0; border: 0; background: transparent; box-shadow: none; }
.management-page .admin-card { border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.management-page .admin-card-head { padding: 0 0 20px; border: 0; }
.management-page .admin-card-head h3 { font-size: 24px; font-weight: 600; }
.management-page .admin-list { padding: 0; }
.management-page .admin-filters { border: 0; }
.management-page .row-main > span { font-size: 12px; font-weight: 400; line-height: 1.7; }
.management-page .panel-header, .management-page .panel-head { padding: 0 0 20px; margin-bottom: 8px; }
.management-page .panel-header h3, .management-page .panel-head h3, .management-page .admin-workspace-head h3 { font-size: 24px; font-weight: 600; }
.management-page .admin-list { gap: 0; }
.management-page .admin-list-row { border: 0; border-bottom: 1px solid var(--line); padding: 20px 0; border-radius: 0; background: transparent; }
.management-page .admin-list-row strong { font-size: 16px; font-weight: 550; line-height: 1.5; }
.management-page .admin-list-row small { font-size: 12px; font-weight: 400; line-height: 1.7; }
.management-page .admin-list-row .btn { font-size: 13px; min-height: 36px; padding: 8px 12px; }
.management-page .admin-filters { margin: 0 0 20px; padding: 0; gap: 16px; }
.management-page :is(input,select,textarea) { background: var(--bg); font-size: 14px; font-weight: 400; }
.management-page .field > label { font-size: 14px; font-weight: 550; }
.management-page .field { margin-bottom: 20px; }
.management-page .admin-block, .management-page .question-item { box-shadow: none; }
.management-page table { font-size: 13px; }
.management-page th { font-size: 12px; font-weight: 500; background: transparent; }
.management-page :is(th,td) { padding: 14px 12px; }
.management-page .report-table-wrap { border-radius: 8px; box-shadow: none; }
.management-page .course-form-panel, .management-page .test-form-panel { padding-bottom: 32px; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.management-page.editor-mode { max-width: 100%; }
.management-page .course-settings-actions { margin-top: 32px; }
.profile-page .profile-hero { padding: 0 0 32px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; gap: 32px; }
.profile-hero h1 { font-size: clamp(28px,3vw,38px); line-height: 1.25; font-weight: 600; margin: 0 0 12px; }
.profile-hero p { margin: 0; color: var(--muted); font-weight: 400; font-size: 14px; }
.profile-page .profile-summary-grid { gap: 28px; }
.profile-page .profile-summary-grid > div { border: 0; padding: 0; min-width: 0; background: transparent; }
.profile-page .profile-summary-grid strong { font-size: 26px; font-weight: 550; }
.profile-page .profile-summary-grid span { font-size: 12px; font-weight: 400; text-transform: none; }
.profile-page .profile-tabs { gap: 28px; border-bottom: 1px solid var(--line); margin: 28px 0 32px; }
.profile-page .profile-tabs button { border: 0; border-radius: 0; background: transparent; padding: 12px 0; font-size: 14px; font-weight: 500; color: var(--muted); }
.profile-page .profile-tabs button.active { color: var(--text); box-shadow: 0 2px var(--accent); }
.profile-page .profile-grid { gap: 32px; }
.profile-page .panel { min-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.profile-page .panel-header h3 { font-size: 20px; font-weight: 550; }
.profile-page .profile-section-list article { border: 0; border-bottom: 1px solid var(--line); padding: 16px 0; border-radius: 0; background: transparent; }
.profile-page .profile-progress-card { padding: 20px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; border-radius: 0; gap: 16px; }
.profile-page .profile-progress-card > div > span, .profile-page .profile-section-list span { font-weight: 400; }
.profile-page .profile-progress-card strong { font-weight: 550; }
.app-shell .empty { background: transparent; border: 0; color: var(--muted); font-weight: 400; line-height: 1.6; padding: 40px 20px; }
.app-shell .empty h3, .app-shell .empty strong { font-weight: 550; color: var(--text); }
.app-shell .modal { border-radius: 14px; }
.app-shell .modal-backdrop { padding: 24px; z-index: 80; }
.app-shell .confirm-backdrop { z-index: 100; }
.app-shell .modal-head h3 { font-size: 24px; font-weight: 600; }
.app-shell .field label { line-height: 1.6; }
.app-shell .help-content h4 { font-weight: 550; }
@media (max-width: 1200px) {
  .app-shell .app-header, .app-shell.is-learning .app-header { grid-template-columns: auto 1fr auto; gap: 20px; padding-inline: 24px; }
  .platform-nav { justify-content: center; gap: 22px; }
  .app-shell.is-learning .learning-sidebar { left: 24px; }
  .app-shell .compact-user, .app-shell.is-learning .compact-user { max-width: 130px; }
}
@media (max-width: 1020px) {
  .app-shell .compact-user, .app-shell.is-learning .compact-user { display: none; }
  .app-shell .profile-control { padding: 0; }
  .app-shell .profile-control .compact-user { display: none; }
  .platform-nav-link.mobile-profile-link { display: flex; }
  .app-shell .profile-control .compact-user::before, .app-shell .profile-control .compact-user > * { display: none; }
  .app-shell .profile-control .avatar-upload { width: 36px; height: 36px; }
  .app-shell .main { padding-top: 40px; }
  .editorial-continuation { gap: 36px; }
  .editorial-course-grid { gap: 22px; }
}
@media (max-width: 900px) {
  .app-shell .app-header, .app-shell.is-learning .app-header { position: sticky; grid-template-columns: 1fr auto; gap: 0 16px; padding: 12px 20px 0; min-height: 0; }
  .app-shell .brand-home-button > span:last-child { display: inline; font-size: 15px; }
  .app-shell .brand-mark { width: 32px; height: 32px; }
  .app-shell .header-actions { grid-row: 1; grid-column: 2; }
  .app-shell .header-actions .btn, .app-shell .notification-bell { min-width: 32px; width: 32px; height: 32px; min-height: 32px; padding: 6px; }
  .platform-nav { grid-row: 2; grid-column: 1 / -1; justify-content: flex-start; gap: 26px; overflow-x: auto; margin-top: 12px; min-width: 0; scrollbar-width: none; }
  .platform-nav-link { min-height: 44px; font-size: 13px; }
  .platform-nav-link.active::after { bottom: 0; }
  .app-shell .main { padding: 32px 20px 56px; }
  .app-shell .modal-backdrop { padding: 16px 14px; }
  .app-shell.is-learning .main { padding: 24px 20px 56px; }
  .app-shell.is-learning .learning-sidebar { left: 20px; }
  .platform-page-heading { gap: 20px; margin-bottom: 32px; }
  .platform-page-heading > .text-link { padding-top: 8px; }
  .platform-page-heading > .btn { font-size: 12px; padding: 8px 10px; }
  .editorial-continuation { grid-template-columns: minmax(0,1fr); gap: 28px; padding-bottom: 32px; margin-bottom: 28px; }
  .continuation-cover { grid-row: 2; max-height: 230px; }
  .continuation-copy h2 { font-size: 27px; }
  .continuation-lesson { font-size: 15px; }
  .platform-section-heading h2 { font-size: 24px; }
  .editorial-course-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px 20px; }
  .app-shell .course-card-copy h3 { font-size: 16px; }
  .home-test-line, .home-deadline-line { align-items: flex-start; flex-direction: column; gap: 12px; }
  .platform-library-toolbar { align-items: stretch; flex-direction: column; gap: 16px; margin-bottom: 28px; }
  .library-group-filter { grid-template-columns: auto minmax(0,1fr); gap: 16px; align-items: center; min-width: 0; }
  .editorial-test-row { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .test-row-icon { display: none; }
  .test-row-copy h2 { font-size: 18px; }
  .test-row-result { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding-left: 0; }
  .test-row-result > .text-link { margin-left: auto; }
  .agenda-row { grid-template-columns: minmax(0,1fr) 20px; gap: 10px; }
  .agenda-row time { grid-column: 1 / -1; }
  .calendar-empty { padding: 48px 0; }
  .profile-page .profile-hero { display: block; }
  .profile-page .profile-summary-grid { margin-top: 24px; gap: 16px; }
  .profile-page .profile-grid { grid-template-columns: minmax(0,1fr); }
  .profile-page .profile-tabs { gap: 22px; overflow-x: auto; white-space: nowrap; }
  .app-shell .admin-side-nav nav { flex-wrap: nowrap; overflow-x: auto; gap: 24px; white-space: nowrap; }
  .admin-side-nav > h1 { font-size: 30px; }
  .management-page .admin-list-row { gap: 12px; }
  .management-page .row-actions { flex-wrap: wrap; }
}
@media (max-width: 440px) {
  .editorial-course-grid { grid-template-columns: minmax(0,1fr); }
  .platform-page-heading h1 { font-size: 30px; }
  .platform-page-heading > .text-link { font-size: 12px; gap: 6px; white-space: nowrap; }
  .app-shell .header-actions { gap: 4px; }
}
@media (max-width: 360px) {
  .app-shell .brand-home-button > span:last-child { display: none; }
}
