/* Shared authenticated workspace. Public registration/login pages keep their own layout. */
body.portal-route-workbench {
  --portal-space: 24px;
  --portal-control-height: 40px;
  --radius: 10px;
  --radius-sm: 8px;
  background: #fff;
  color: #344d5b;
}
body.portal-route-workbench .main { width: min(1120px, calc(100% - 64px)); padding: 28px 0 48px; }
body.portal-route-workbench .workbench { gap: var(--portal-space); }
body.portal-route-workbench .topbar { grid-template-columns: auto minmax(0, 1fr) auto; box-shadow: none; gap: 16px; padding: 12px 24px; }
body.portal-route-workbench .portal-menu-panel, body.portal-route-workbench .topbar .nav { min-width: 0; }
body.portal-route-workbench .topbar .nav { justify-content: flex-end; }
body.portal-route-workbench .brand-logo { height: 28px; }
body.portal-route-workbench .nav { gap: 4px; }
body.portal-route-workbench .nav-link {
  min-height: var(--portal-control-height); padding: 8px 10px; border: 0;
  border-radius: 6px; background: transparent; font-size: 14px; font-weight: 600;
  color: var(--text); box-shadow: none; transform: none;
}
body.portal-route-workbench .nav-link:hover { background: var(--surface-soft); }
body.portal-route-workbench .nav-link.active { background: var(--surface-brand); color: var(--heading); }
body.portal-route-workbench .nav-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.portal-context { display: flex; align-items: center; color: var(--muted); font-size: 13px; }
.portal-context .field { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 12px; font-weight: 500; }
.portal-context select { width: auto; max-width: 100%; min-height: 36px; padding: 5px 30px 5px 10px; font-size: 13px; }
body.portal-route-workbench .workbench > .portal-section,
body.portal-route-workbench .workbench > .workbench-hero {
  padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
body.portal-route-workbench .portal-section { gap: var(--portal-space); }
body.portal-route-workbench .portal-section > .eyebrow,
body.portal-route-workbench .section-heading .eyebrow { display: none; }
body.portal-route-workbench h1 { font-size: clamp(26px, 3vw, 34px); line-height: 1.2; }
body.portal-route-workbench h2 { font-size: 28px; line-height: 1.25; }
body.portal-route-workbench .portal-section h1,
body.portal-route-workbench .mobile-content-audience-page > h2,
body.portal-route-workbench #mobileContentDetailHeading h2 { font-size: 28px; }
body.portal-route-workbench .content-upload-history h2 { font-size: 18px; }
body.portal-route-workbench h3 { font-size: 18px; line-height: 1.35; }
body.portal-route-workbench h1, body.portal-route-workbench h2, body.portal-route-workbench h3 { margin: 0; }
body.portal-route-workbench p { line-height: 1.55; }
body.portal-route-workbench .section-heading p { margin: 6px 0 0; max-width: 72ch; font-size: 14px; color: var(--muted); }
body.portal-route-workbench .toolbar { gap: 12px; align-items: center; }
body.portal-route-workbench .primary, body.portal-route-workbench .ghost {
  width: fit-content; min-height: var(--portal-control-height); padding: 8px 14px;
  border-radius: 8px; font-size: 14px; font-weight: 600; box-shadow: none; transform: none;
}
body.portal-route-workbench .primary { background: var(--primary-dark); border: 1px solid var(--primary-dark); color: white; }
body.portal-route-workbench .primary:hover { background: var(--heading); border-color: var(--heading); }
body.portal-route-workbench .ghost { background: white; border: 1px solid var(--line); color: var(--heading); }
body.portal-route-workbench .ghost:hover { background: var(--surface-soft); }
body.portal-route-workbench .primary:focus-visible, body.portal-route-workbench .ghost:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 3px;
}
body.portal-route-workbench .field { gap: 6px; font-size: 14px; font-weight: 600; }
body.portal-route-workbench .field input:not([type="checkbox"]):not([type="radio"]),
body.portal-route-workbench .field select, body.portal-route-workbench .field textarea {
  min-height: var(--portal-control-height); padding: 9px 11px; border-radius: 8px; font-size: 16px;
}
body.portal-route-workbench .form { gap: 16px; }
body.portal-route-workbench .form p { margin: 0; }
body.portal-route-workbench .badge { border-radius: 5px; padding: 4px 7px; font-size: 12px; font-weight: 600; }
body.portal-route-workbench .list { gap: 0; }
body.portal-route-workbench .workbench .row,
body.portal-route-workbench .workbench .content-collection-list li {
  padding: 14px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
  background: transparent; box-shadow: none; gap: 10px;
}
body.portal-route-workbench .workbench .row p { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
body.portal-route-workbench .workbench .language-list { padding: 0; border: 0; background: transparent; }
body.portal-route-workbench .workbench .card { box-shadow: none; }
body.portal-route-workbench .portal-section .card { padding: 14px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
body.portal-route-workbench .mobile-content-card {
  min-height: 64px; padding: 14px 0; border: 0; border-bottom: 1px solid var(--line);
  border-radius: 0; background: transparent;
}
body.portal-route-workbench .mobile-content-card strong { font-size: 16px; }
body.portal-route-workbench .mobile-content-card small { font-size: 13px; }
body.portal-route-workbench .mobile-content-list { gap: 0; }
body.portal-route-workbench .portal-access-list { gap: 0; }
body.portal-route-workbench .portal-access-list li { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
body.portal-route-workbench .portal-access-list button { padding: 14px 0; border-radius: 0; background: transparent; }
body.portal-route-workbench .portal-access-list button:hover { background: var(--surface-soft); }
body.portal-route-workbench .portal-section .qr-card { padding: 0; border: 0; background: transparent; }
body.portal-route-workbench .portal-section .pin-box { padding: 0; border: 0; background: transparent; }
body.portal-route-workbench .portal-section .access-row { padding: 0 0 24px; }
body.portal-route-workbench .portal-section .qr-image { width: 144px; height: 144px; border: 0; box-shadow: none; }
body.portal-route-workbench .staff-submission-history { padding: 0; border: 0; border-radius: 0; }
body.portal-route-workbench .staff-submission-history > summary { padding: 10px 0; font-weight: 600; }
body.portal-route-workbench .content-collection-actions button,
body.portal-route-workbench .material-row .ghost,
body.portal-route-workbench .qr-download,
body.portal-route-workbench .staff-submission-text-action,
body.portal-route-workbench .staff-submission-details > summary,
.portal-text-action {
  width: auto; min-height: 0; padding: 4px 0; border: 0; border-radius: 0;
  background: transparent; color: var(--primary-dark); font-size: 13px; font-weight: 500;
  line-height: 1.5; text-decoration: underline; text-underline-offset: 3px; box-shadow: none;
}
.portal-text-action:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.portal-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; }
.portal-table th { padding: 8px 10px; color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; }
.portal-table td { padding: 12px 10px; border-top: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.portal-table strong { color: var(--heading); font-weight: 700; }
.portal-table small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.portal-team-table th:first-child { width: 45%; }
.portal-team-table th:nth-child(2) { width: 18%; }
body.portal-route-workbench #openTeamInvite { display: block; justify-self: end; }
body.portal-route-workbench #teamInviteView { display: none; }
body.portal-route-workbench.mobile-team-invite #portal-team > :not(#teamInviteView) { display: none !important; }
body.portal-route-workbench.mobile-team-invite #teamInviteView { display: grid; gap: 20px; max-width: 640px; }
body.portal-route-workbench #teamInviteView > .mobile-team-back,
body.portal-route-workbench #teamInviteView > h2 { display: block; }
body.portal-route-workbench #teamInviteView #scopedTeamForm > h3 { display: none; }
body.portal-route-workbench #teamInviteFeedback:not(:empty) { display: block; }
.portal-editor-dialog { width: min(640px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 24px; border: 0; border-radius: 12px; overflow: auto; color: var(--text); }
.portal-editor-dialog::backdrop { background: rgba(15, 51, 72, .35); }
.portal-dialog-heading { display: flex; justify-content: space-between; gap: 16px; align-items: start; margin-bottom: 24px; }
.portal-dialog-heading h2 { min-width: 0; overflow-wrap: anywhere; }
.portal-member-form form > div { margin-bottom: 16px; }
.portal-home { display: grid; gap: 32px !important; max-width: 960px; }
.portal-home-heading { display: grid; gap: 10px; }
.portal-home-heading .eyebrow { font-size: 11px; }
.portal-home-heading > p { margin: 0; color: var(--muted); }
body.portal-route-workbench .portal-home h2 { font-size: 20px; }
.portal-home-tasks, .portal-home-tools { display: grid; gap: 16px; }
.portal-home-task-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.portal-home-task-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 112px; padding: 18px; border-radius: 10px; background: var(--surface-soft); text-decoration: none; }
.portal-home-task-list a:hover { background: var(--surface-brand); }
.portal-home-task-list a > span:first-child, .portal-home-review > span:first-child { display: grid; gap: 6px; }
.portal-home-task-list strong, .portal-home-review strong { font-size: 17px; }
.portal-home small { color: var(--muted); font-size: 14px; line-height: 1.5; font-weight: 400; }
.portal-home-task-list a > span:last-child, .portal-home-review > span:last-child { font-size: 22px; }
.portal-home-review { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; gap: 16px; border-left: 3px solid var(--primary); background: var(--surface-brand); text-decoration: none; }
.portal-home-tools > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; }
.portal-home-tools a { display: grid; gap: 4px; text-decoration: none; }
.portal-home-tools a:hover strong { text-decoration: underline; }
.portal-home a:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }
body.portal-route-workbench #portal-contact { overflow: visible; }
body.portal-route-workbench .contact-aside, body.portal-route-workbench .contact-form { padding: 0; border: 0; background: transparent; }
body.portal-route-workbench .contact-promises { display: none; }
body.portal-route-workbench .site-footer { padding: 20px 24px; border-top: 0; font-size: 12px; }
@media (min-width: 761px) and (max-width: 1200px) {
  body.portal-route-workbench .topbar { grid-template-columns: minmax(0, 1fr) auto; }
  body.portal-route-workbench .portal-menu-panel { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
  body.portal-route-workbench .topbar .nav { justify-content: flex-start; }
  body.portal-route-workbench .portal-header-actions { grid-column: 2; grid-row: 1; justify-self: end; }
}
@media (max-width: 760px) {
  body.portal-route-workbench .topbar { grid-template-columns: minmax(0, 1fr) auto; }
  body.portal-route-workbench .main { width: calc(100% - 32px); padding: 20px 0 32px; }
  body.portal-route-workbench .topbar { padding: 10px 16px; }
  body.portal-route-workbench .portal-section { gap: 20px; }
  body.portal-route-workbench #portal-content-upload { padding: 0; }
  body.portal-route-workbench .nav { gap: 4px; }
  body.portal-route-workbench .nav-link { width: 100%; text-align: left; padding: 10px 12px; }
  .portal-context .field { display: grid; width: 100%; }
  .portal-context select { width: 100%; }
  .portal-home { gap: 24px !important; }
  .portal-home-task-list { grid-template-columns: 1fr; gap: 8px; }
  .portal-home-task-list a { min-height: 80px; padding: 14px; }
  .portal-home-tools > div { grid-template-columns: 1fr; gap: 16px; }
  body.portal-route-workbench #openTeamInvite { width: fit-content; }
  .portal-team-table, .portal-team-table tbody { display: block; }
  .portal-team-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .portal-team-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
  .portal-team-table td { padding: 0; border: 0; }
  .portal-team-table td:last-child { grid-column: 1 / -1; }
  .portal-editor-dialog { padding: 18px; }
}
