/* Platform polish layer. Loaded after style.css. */
.portal-result-count {
  margin: 18px 0 12px;
  color: var(--platform-muted);
  font-size: 14px;
}

.portal-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 24px 0 8px;
}

.portal-pagination > span {
  color: var(--platform-muted);
}

:root {
  --platform-bg: #f5f7fb;
  --platform-surface: #ffffff;
  --platform-surface-soft: #f8fafc;
  --platform-line: #dfe6ef;
  --platform-line-soft: #edf1f7;
  --platform-text: #172033;
  --platform-muted: #637083;
  --platform-brand: #0f766e;
  --platform-brand-strong: #115e59;
  --platform-accent: #2563eb;
  --platform-warning: #b7791f;
  --platform-danger: #c2410c;
  --platform-success: #15803d;
  --platform-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

body.platform-body {
  color: var(--platform-text);
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.06), rgba(245, 247, 251, 0) 260px),
    var(--platform-bg);
}

.topbar-shell {
  position: sticky;
  top: 0;
  z-index: 120;
  padding: 14px 24px 0;
}

.nav-surface {
  min-height: 64px;
  max-width: var(--content-max-width);
  border: 1px solid rgba(223, 230, 239, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title {
  color: var(--platform-text);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 800;
  white-space: nowrap;
}

.nav-links {
  margin-left: auto;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  border-radius: 8px;
  color: var(--platform-muted);
  font-weight: 650;
}

.nav-link:hover {
  background: rgba(15, 118, 110, 0.08);
  color: var(--platform-brand-strong);
}

.nav-link-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.nav-link-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  background: var(--platform-warning);
  font-size: 11px;
  line-height: 18px;
  text-align: center;
}

.nav-link-primary,
.nav-link-active {
  color: #fff !important;
  background: var(--platform-brand);
}

.nav-link-primary:hover,
.nav-link-active:hover {
  color: #fff !important;
  background: var(--platform-brand-strong);
}

.role-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--platform-brand-strong);
  background: rgba(15, 118, 110, 0.1);
  border: 1px solid rgba(15, 118, 110, 0.14);
  font-size: 12px;
  font-weight: 800;
}

.notification-menu {
  position: relative;
}

.notification-menu summary {
  list-style: none;
}

.notification-menu summary::-webkit-details-marker {
  display: none;
}

.notification-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.notification-count {
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  background: var(--platform-danger);
  font-size: 11px;
  font-weight: 800;
}

.notification-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(380px, calc(100vw - 32px));
  max-height: 440px;
  overflow: auto;
  z-index: 200;
  border: 1px solid var(--platform-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--platform-shadow);
}

.notification-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--platform-line-soft);
}

.notification-head button,
.notification-item button {
  border: 0;
  background: transparent;
  color: var(--platform-brand-strong);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.notification-list {
  display: flex;
  flex-direction: column;
}

.notification-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--platform-line-soft);
  background: #fff;
}

.notification-item.unread {
  background: rgba(37, 99, 235, 0.05);
}

.notification-item a {
  color: var(--platform-text);
  font-weight: 800;
  text-decoration: none;
}

.notification-item p {
  margin: 5px 0;
  color: var(--platform-muted);
  font-size: 12px;
  line-height: 1.5;
}

.notification-item span,
.notification-empty {
  color: var(--platform-muted);
  font-size: 12px;
}

.notification-empty {
  padding: 18px 14px;
  text-align: center;
}

.assessment-dashboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.assessment-stat {
  min-height: 88px;
  padding: 14px;
  border: 1px solid var(--platform-line-soft);
  border-radius: 8px;
  background: var(--platform-surface-soft);
}

.assessment-stat span,
.assessment-bar-row span,
.assessment-rank-row span {
  color: var(--platform-muted);
  font-size: 12px;
  font-weight: 700;
}

.assessment-stat strong {
  display: block;
  margin: 6px 0 4px;
  color: var(--platform-text);
  font-size: 24px;
  line-height: 1.1;
  font-weight: 850;
}

.assessment-stat small {
  display: block;
  color: var(--platform-muted);
  font-size: 12px;
}

.portal-stat-link {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  color: var(--platform-primary);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.portal-stat-link:hover {
  text-decoration: underline;
}

.assessment-visual-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
  margin: 12px 0 16px;
}

.assessment-visual-grid-balanced {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.assessment-visual-block {
  padding: 14px;
  border: 1px solid var(--platform-line-soft);
  border-radius: 8px;
  background: #fff;
}

.assessment-visual-block h4 {
  margin: 0 0 12px;
  color: var(--platform-text);
  font-size: 14px;
}

.assessment-echarts-grid,
.tm-assessment-echarts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}

.assessment-chart-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--platform-line-soft);
  border-radius: 8px;
  background: #fff;
}

.assessment-chart-wide {
  grid-column: span 1;
}

.assessment-chart-card h4 {
  margin: 0 0 10px;
  color: var(--platform-text);
  font-size: 14px;
  letter-spacing: 0;
}

.assessment-echart {
  width: 100%;
  height: 260px;
}

.assessment-echart.small {
  height: 220px;
}

.assessment-help-text {
  margin: -2px 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 8px;
  color: var(--platform-muted);
  background: rgba(15, 118, 110, 0.05);
  font-size: 13px;
  line-height: 1.6;
}

.score-input-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 8px;
  border: 1px solid var(--platform-line);
  border-radius: 8px;
  background: #fff;
}

.score-input-group span {
  color: var(--platform-muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.score-input-group input {
  width: 92px !important;
  min-height: 28px;
  padding: 4px 8px;
}

.star-rating-widget {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 8px;
  background: #f8fafc;
}

.star-rating-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 8px;
  background: #fff;
  color: #cbd5e1;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.star-rating-btn:hover,
.star-rating-btn:focus-visible {
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.45);
  background: #fffbeb;
  outline: none;
  transform: translateY(-1px);
}

.star-rating-btn.active {
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.55);
  background: #fff7ed;
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.12);
}

.star-rating-hint {
  margin-top: 8px;
  color: var(--platform-muted);
  font-size: 13px;
  font-weight: 700;
}

.rating-modal-card {
  width: min(560px, calc(100vw - 32px));
  max-width: 560px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 16px;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
}

.rating-modal-card .modal-header {
  align-items: flex-start;
  padding: 22px 24px 18px;
  background: linear-gradient(135deg, #f0fdfa 0%, #ffffff 72%);
  border-bottom: 1px solid rgba(15, 118, 110, 0.1);
}

.rating-modal-card .modal-header h3 {
  margin: 3px 0 0;
  color: #0f172a;
  font-size: 22px;
}

.rating-modal-card .modal-body {
  display: grid;
  gap: 20px;
  padding: 22px 24px 24px;
}

.rating-modal-kicker {
  margin: 0;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.rating-modal-intro {
  margin: 0;
  padding: 12px 14px;
  border-left: 3px solid #14b8a6;
  border-radius: 0 8px 8px 0;
  background: #f0fdfa;
  color: #475569;
  font-size: 13px;
  line-height: 1.7;
}

.rating-score-field {
  margin: 0;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.rating-score-field .star-rating-widget {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 10px;
  padding: 8px;
}

.rating-score-field .star-rating-btn {
  flex: 0 0 52px;
  width: 52px;
  height: 48px;
  font-size: 28px;
}

.optional-label {
  display: inline-flex;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
}

@media (max-width: 560px) {
  .star-rating-widget {
    gap: 6px;
    padding: 6px;
  }

  .star-rating-btn {
    width: 34px;
    height: 34px;
    font-size: 20px;
  }

  .rating-modal-card .modal-header,
  .rating-modal-card .modal-body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .rating-score-field {
    padding: 14px;
  }

  .rating-score-field .star-rating-btn {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
  }
}

.manager-standalone-panel {
  display: block;
  margin-top: 18px;
}

.manager-standalone-panel .review-panel-header {
  align-items: center;
}

.review-panel-header > div {
  min-width: 0;
}

.review-panel-header .muted-text {
  display: block;
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.5;
}

.review-queue-number {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-right: 7px;
  padding: 3px 8px;
  border: 1px solid rgba(217, 119, 6, 0.22);
  border-radius: 6px;
  color: #b45309;
  background: #fffbeb;
  font-size: 11px;
  font-weight: 850;
  vertical-align: middle;
}

.review-queue-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 4px 0 14px;
    padding: 12px 16px;
    border-left: 4px solid #d97706;
    background: #fff8e8;
    color: #27364a;
}

.review-queue-section-heading.reviewed {
    margin-top: 28px;
    border-left-color: #15857a;
    background: #eef8f6;
}

.review-queue-section-heading span {
    color: #65748a;
    font-size: 14px;
}

.review-queue-empty {
    margin-bottom: 16px;
}

@media (max-width: 760px) {
    .review-queue-section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
}

.manager-standalone-panel .review-panel-body {
  display: grid;
  gap: 14px;
}


/* Notification-expanded review lists should scroll with the page, not inside a nested panel. */
.review-notification-bar + .review-panel .review-panel-body,
.manager-standalone-panel .review-panel-body {
  max-height: none;
  overflow: visible;
}

.assessment-bar-row,
.assessment-rank-row {
  display: grid;
  grid-template-columns: 72px minmax(120px, 1fr) 46px;
  align-items: center;
  gap: 10px;
  min-height: 30px;
}

.assessment-rank-row {
  grid-template-columns: minmax(120px, 160px) minmax(120px, 1fr) 58px;
}

.assessment-bar-row-wide {
  grid-template-columns: 92px minmax(120px, 1fr) 68px;
}

.assessment-bar-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eef5;
}

.assessment-bar-fill {
  height: 100%;
  min-width: 2px;
  border-radius: inherit;
  background: var(--platform-brand);
}

.assessment-bar-fill.strong {
  background: var(--platform-accent);
}

.assessment-bar-fill.activity {
  background: #2563eb;
}

.assessment-bar-fill.effect {
  background: #16a34a;
}

.assessment-bar-fill.ability {
  background: #d97706;
}

.assessment-bar-fill.consultation {
  background: #7c3aed;
}

.assessment-bar-fill.outcome,
.assessment-bar-fill.data-ip {
  background: #0891b2;
}

.assessment-bar-fill.pledge {
  background: #db2777;
}

.assessment-bar-fill.transfer {
  background: #ea580c;
}

.assessment-bar-fill.license {
  background: #059669;
}

.assessment-bar-fill.other {
  background: #64748b;
}

.assessment-bar-row strong,
.assessment-rank-row strong {
  color: var(--platform-text);
  font-size: 12px;
  text-align: right;
}

.assessment-mix-group {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--platform-line-soft);
}

.assessment-score-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.assessment-score-line {
  display: grid;
  grid-template-columns: 48px minmax(52px, 1fr) 52px;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--platform-line-soft);
  border-radius: 8px;
  background: #fbfdff;
}

.assessment-score-line span,
.assessment-score-line strong {
  color: var(--platform-muted);
  font-size: 12px;
  font-weight: 750;
}

.assessment-score-line strong {
  color: var(--platform-text);
  text-align: right;
}

.tm-assessment-visuals {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(240px, 1.2fr);
  gap: 10px;
  margin: 12px 0;
}

.tm-assessment-score-card {
  display: flex;
  min-height: 132px;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--platform-line-soft);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.tm-assessment-score-card span,
.tm-assessment-score-card small {
  color: var(--platform-muted);
  font-size: 12px;
  font-weight: 750;
}

.tm-assessment-score-card strong {
  color: var(--platform-text);
  font-size: 34px;
  line-height: 1;
  font-weight: 900;
}

.page-shell {
  margin-top: 22px;
}

.footer {
  background: transparent;
}

.page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
  padding: 20px 22px;
  border: 1px solid var(--platform-line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: var(--platform-shadow);
}

.page-eyebrow {
  margin-bottom: 8px;
  color: var(--platform-brand);
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-title {
  margin: 0;
  color: var(--platform-text);
  font-size: 24px;
  line-height: 1.2;
  font-weight: 850;
  letter-spacing: 0;
}

.page-subtitle {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--platform-muted);
  font-size: 14px;
  line-height: 1.7;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.summary-card {
  min-height: 92px;
  padding: 16px;
  border: 1px solid var(--platform-line);
  border-radius: 8px;
  background: var(--platform-surface);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.summary-label {
  color: var(--platform-muted);
  font-size: 12px;
  font-weight: 700;
}

.summary-value {
  margin-top: 8px;
  color: var(--platform-text);
  font-size: 28px;
  line-height: 1;
  font-weight: 850;
}

.summary-note {
  margin-top: 7px;
  color: var(--platform-muted);
  font-size: 12px;
}

.list-container,
.detail-hero,
.detail-card,
.match-hero,
.match-result-card,
.auth-card,
.review-panel-header,
.review-panel-body,
.modal-card,
.upload-notes {
  border-color: var(--platform-line);
  border-radius: 8px;
  box-shadow: var(--platform-shadow);
}

.list-container {
  background: var(--platform-surface);
}

.list-header {
  padding: 18px 20px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.list-header h2 {
  color: var(--platform-text);
  font-size: 18px;
}

.list-toolbar,
.reviewer-toolbar {
  background: var(--platform-surface-soft);
}

.search-form {
  gap: 10px;
}

.form-control,
.search-input,
.status-select,
.modal-textarea,
input,
select,
textarea {
  border-radius: 8px !important;
  border-color: var(--platform-line) !important;
}

.form-control:focus,
.search-input:focus,
.status-select:focus,
.modal-textarea:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: rgba(15, 118, 110, 0.55) !important;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1) !important;
}

.btn,
.btn-detail,
.btn-rate,
.btn-confirm,
.btn-approve,
.btn-reject,
.btn-notification {
  border-radius: 8px;
  letter-spacing: 0;
}

.btn-primary,
.btn-detail {
  background: var(--platform-brand);
  border-color: var(--platform-brand);
}

.btn-primary:hover,
.btn-detail:hover {
  background: var(--platform-brand-strong);
}

.btn-outline {
  color: var(--platform-text);
  border-color: var(--platform-line);
}

.btn-success,
.btn-confirm,
.btn-approve {
  background: var(--platform-success);
}

.btn-rate,
.btn-notification {
  background: var(--platform-warning);
}

.btn-reject,
.nav-logout:hover {
  color: var(--platform-danger);
}

.review-tab {
  border-radius: 8px;
}

.review-tab.active {
  background: rgba(15, 118, 110, 0.09);
  border-bottom-color: transparent;
}

.data-table thead {
  background: #f8fafc;
}

.data-table thead th {
  color: #64748b;
}

.data-table tbody tr:hover {
  background: rgba(15, 118, 110, 0.045);
}

.tag,
.status-badge,
.tab-badge,
.classification-cell,
.classification-badge,
.inst-tag,
.expert-badge,
.review-badge {
  border-radius: 999px;
}

.empty-state {
  color: var(--platform-muted);
}

.modal-overlay {
  backdrop-filter: blur(4px);
}

.modal-card {
  overflow: hidden;
}

.auth-container {
  min-height: calc(100vh - 240px);
}

.auth-card {
  max-width: 460px;
}

.upload-dropzone {
  border-radius: 8px;
  background: #fbfdff;
}

@media (max-width: 980px) {
  .page-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .page-actions {
    justify-content: flex-start;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar-shell {
    padding-inline: 14px;
  }
}

@media (max-width: 640px) {
  .nav-surface {
    align-items: flex-start;
    height: auto;
    padding: 12px;
  }

  .brand-title {
    font-size: 16px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .page-title {
    font-size: 21px;
  }
}

/* Enterprise workbench */
.enterprise-workbench {
  display: grid;
  gap: 14px;
}

.enterprise-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: 20px;
  border: 1px solid var(--platform-line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: var(--platform-shadow);
}

.enterprise-kicker {
  margin: 0 0 8px;
  color: var(--platform-brand);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.enterprise-hero h2,
.enterprise-section-head h3,
.enterprise-record h4 {
  margin: 0;
  letter-spacing: 0;
}

.enterprise-hero h2 {
  color: var(--platform-text);
  font-size: 24px;
  line-height: 1.2;
}

.enterprise-hero p,
.enterprise-section-head p,
.enterprise-record p,
.enterprise-description p,
.modal-hint {
  color: var(--platform-muted);
  line-height: 1.7;
}

.enterprise-hero p {
  max-width: 760px;
  margin: 8px 0 0;
}

.enterprise-hero-actions,
.record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.enterprise-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--platform-line);
  border-radius: 8px;
  background: var(--platform-surface);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.metric-card span,
.enterprise-profile-grid span,
.enterprise-description span,
.record-side span {
  display: block;
  color: var(--platform-muted);
  font-size: 12px;
  font-weight: 750;
}

.metric-card strong {
  display: block;
  margin: 8px 0 6px;
  color: var(--platform-text);
  font-size: 26px;
  line-height: 1;
}

.metric-card small,
.record-side small,
.muted-text {
  color: var(--platform-muted);
  font-size: 12px;
}

.enterprise-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--platform-line);
  border-radius: 8px;
  background: var(--platform-surface);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.enterprise-tab {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--platform-muted);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.enterprise-tab span {
  margin-left: 4px;
  color: var(--platform-brand);
}

.enterprise-tab.active {
  color: var(--platform-brand-strong);
  border-color: rgba(15, 118, 110, 0.18);
  background: rgba(15, 118, 110, 0.08);
}

.enterprise-panel {
  padding: 18px;
  border: 1px solid var(--platform-line);
  border-radius: 8px;
  background: var(--platform-surface);
  box-shadow: var(--platform-shadow);
}

.enterprise-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.enterprise-section-head h3 {
  color: var(--platform-text);
  font-size: 18px;
}

.enterprise-section-head p {
  margin: 6px 0 0;
  font-size: 13px;
}

.enterprise-profile-grid,
.enterprise-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.enterprise-profile-grid > div,
.enterprise-description {
  padding: 14px;
  border: 1px solid var(--platform-line-soft);
  border-radius: 8px;
  background: var(--platform-surface-soft);
}

.enterprise-profile-grid strong {
  display: block;
  margin-top: 6px;
  color: var(--platform-text);
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

.enterprise-description {
  margin-top: 12px;
}

.enterprise-description p {
  margin: 6px 0 0;
}

.enterprise-card-list {
  display: grid;
  gap: 10px;
}

.enterprise-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--platform-line-soft);
  border-radius: 8px;
  background: #fff;
}

.record-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.enterprise-record h4 {
  color: var(--platform-text);
  font-size: 16px;
}

.enterprise-record p {
  margin: 8px 0 0;
  font-size: 13px;
}

.record-meta,
.recommended-patents,
.service-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.round-summary {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(15, 118, 110, 0.14);
  border-radius: 8px;
  background: rgba(15, 118, 110, 0.055);
}

.round-summary-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.round-summary-head strong {
  color: var(--platform-brand-strong);
  font-size: 13px;
}

.round-summary-head span {
  color: var(--platform-muted);
  font-size: 12px;
}

.round-summary p {
  margin: 8px 0 0;
  color: var(--platform-text);
}

.round-feedback {
  margin-top: 8px;
  padding: 8px 10px;
  border-left: 3px solid var(--platform-warning);
  border-radius: 6px;
  color: var(--platform-warning);
  background: rgba(183, 121, 31, 0.08);
  font-size: 12px;
  line-height: 1.6;
}

.consultation-thread {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.consultation-thread-review {
  margin-top: 8px;
}

.consultation-message {
  padding: 10px 12px;
  border: 1px solid #dbe7ee;
  border-radius: 8px;
  background: #f8fbfc;
}

.consultation-message-question {
  border-color: #d8e6ff;
  background: #f5f8ff;
}

.consultation-message-follow_up {
  border-color: #ffd58a;
  background: #fff8e8;
}

.consultation-message-reply {
  border-color: #bfe4dc;
  background: #f0fbf8;
}

.consultation-message p {
  margin: 6px 0 0;
  color: #3f5267;
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}

.assessment-filter-panel {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--platform-line-soft);
  border-radius: 8px;
  background: var(--platform-surface-soft);
}

.assessment-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.assessment-filter-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.assessment-filter-grid label span {
  color: var(--platform-muted);
  font-size: 12px;
  font-weight: 800;
}

.assessment-filter-grid .form-control {
  width: 100%;
  min-width: 0;
}

.assessment-filter-actions,
.assessment-action-toolbar,
.assessment-person-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.assessment-filter-actions {
  margin-top: 12px;
}

.assessment-action-toolbar {
  margin-bottom: 12px;
}

.assessment-action-toolbar a,
.assessment-person-actions a {
  text-decoration: none;
}

.assessment-overview-charts .assessment-chart-wide {
  grid-column: 1 / -1;
}

.assessment-overview-charts .assessment-chart-wide .assessment-echart {
  height: 320px;
}

.assessment-person-panel,
.assessment-manager-list {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--platform-line-soft);
}

.assessment-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.assessment-section-head h2 {
  margin: 2px 0 4px;
  color: var(--platform-text);
  font-size: 20px;
  letter-spacing: 0;
}

.assessment-section-head p {
  margin: 0;
  color: var(--platform-muted);
  font-size: 13px;
}

.assessment-person-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.assessment-person-stats > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--platform-line-soft);
  border-radius: 8px;
  background: #fbfdff;
}

.assessment-person-stats span,
.assessment-person-stats small {
  display: block;
  color: var(--platform-muted);
  font-size: 12px;
  font-weight: 700;
}

.assessment-person-stats strong {
  display: block;
  margin: 5px 0 3px;
  color: var(--platform-text);
  font-size: 24px;
  line-height: 1;
}

.assessment-person-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.assessment-type-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.assessment-type-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 10px 12px;
  border-left: 3px solid var(--platform-brand);
  border-radius: 6px;
  background: #f8fafc;
}

.assessment-type-count.consultation { border-left-color: #7c3aed; }
.assessment-type-count.outcome,
.assessment-type-count.data-ip { border-left-color: #0891b2; }
.assessment-type-count.pledge { border-left-color: #db2777; }
.assessment-type-count.transfer { border-left-color: #ea580c; }
.assessment-type-count.license { border-left-color: #059669; }
.assessment-type-count.other { border-left-color: #64748b; }

.assessment-type-count span {
  min-width: 0;
  color: var(--platform-muted);
  font-size: 12px;
  font-weight: 750;
}

.assessment-type-count strong {
  flex: 0 0 auto;
  color: var(--platform-text);
  font-size: 14px;
}

.assessment-detail-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--platform-line-soft);
  border-radius: 8px;
  background: #fff;
}

.assessment-detail-table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

.assessment-detail-table th,
.assessment-detail-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--platform-line-soft);
  color: var(--platform-text);
  font-size: 13px;
  line-height: 1.55;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.assessment-detail-table th {
  color: var(--platform-muted);
  background: var(--platform-surface-soft);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.assessment-detail-table tbody tr:last-child td {
  border-bottom: 0;
}

.assessment-source-row > td {
  padding: 8px 12px 14px;
  background: #f8fbfb;
}

.assessment-source-disclosure {
  width: 100%;
}

.assessment-source-disclosure > summary {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #c8e2df;
  border-radius: 6px;
  color: #0f6f68;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  list-style-position: inside;
}

.assessment-source-note,
.assessment-source-empty {
  margin: 8px 0 0;
  color: var(--platform-muted);
  font-size: 12px;
  line-height: 1.6;
}

.assessment-source-table-scroll {
  width: 100%;
  margin-top: 8px;
  overflow-x: auto;
  border: 1px solid var(--platform-line-soft);
  border-radius: 6px;
  background: #fff;
}

.assessment-source-table {
  width: 100%;
  min-width: 1060px;
  border-collapse: collapse;
}

.assessment-source-table th,
.assessment-source-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--platform-line-soft);
  font-size: 12px;
  line-height: 1.5;
  text-align: left;
  vertical-align: top;
}

.assessment-source-table th {
  color: var(--platform-muted);
  background: var(--platform-surface-soft);
  font-weight: 800;
  white-space: nowrap;
}

.assessment-source-table tbody tr:last-child td {
  border-bottom: 0;
}

.assessment-source-title,
.assessment-source-table td > small {
  display: block;
}

.assessment-source-title {
  max-width: 320px;
  overflow-wrap: anywhere;
}

.assessment-source-table td > small {
  margin-top: 3px;
  color: var(--platform-muted);
  font-size: 11px;
}

.assessment-source-jump {
  display: inline-flex;
  align-items: center;
  margin-top: 5px;
  color: #0f766e;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.assessment-source-jump:hover {
  text-decoration: underline;
}

.assessment-score-source-section {
  margin: 18px 0;
  padding-top: 18px;
  border-top: 1px solid var(--platform-line-soft);
}

.assessment-score-source-heading,
.assessment-source-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.assessment-score-source-heading {
  margin-bottom: 12px;
}

.assessment-score-source-heading h3,
.assessment-source-panel-head h4 {
  margin: 0;
  color: var(--platform-text);
}

.assessment-score-source-heading p,
.assessment-source-panel-head p {
  margin: 4px 0 0;
  color: var(--platform-muted);
  font-size: 12px;
  line-height: 1.6;
}

.assessment-source-panel {
  padding: 14px 0;
  border-top: 1px solid var(--platform-line-soft);
  scroll-margin-top: 110px;
}

.assessment-source-panel-head > span {
  max-width: 430px;
  color: var(--platform-muted);
  font-size: 12px;
  line-height: 1.6;
  text-align: right;
}

@media (max-width: 760px) {
  .assessment-score-source-heading,
  .assessment-source-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .assessment-source-panel-head > span {
    max-width: none;
    text-align: left;
  }
}

.assessment-manager-table td > small {
  display: block;
  margin-top: 3px;
  color: var(--platform-muted);
  font-size: 11px;
}

.assessment-mini-types {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 280px;
}

.assessment-mini-types span {
  padding: 3px 6px;
  border-radius: 6px;
  color: #0f766e;
  background: #ecfdf5;
  font-size: 11px;
  white-space: nowrap;
}

.assessment-person-actions {
  margin-top: 12px;
}

.assessment-empty-action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px dashed var(--platform-line);
  border-radius: 8px;
  background: var(--platform-surface-soft);
}

.assessment-empty-action p {
  flex: 1 1 420px;
  margin: 0;
  color: var(--platform-muted);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 1180px) {
  .assessment-filter-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .assessment-person-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .assessment-type-counts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .assessment-filter-grid,
  .assessment-person-stats,
  .assessment-person-chart-grid,
  .assessment-type-counts {
    grid-template-columns: 1fr;
  }

  .assessment-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .assessment-action-toolbar .btn,
  .assessment-filter-actions .btn {
    flex: 1 1 auto;
  }

  .assessment-overview-charts .assessment-chart-wide .assessment-echart {
    height: 280px;
  }
}

.enterprise-record,
.record-main,
.consultation-thread,
.consultation-message,
.round-summary,
.round-feedback,
.enterprise-description,
.review-item,
.review-item-reason,
.review-item-meta,
.service-files {
  min-width: 0;
  max-width: 100%;
}

.enterprise-record p,
.enterprise-description p,
.round-summary p,
.round-feedback,
.review-item,
.review-item-reason,
.review-item-meta,
.record-title-row h4,
.round-summary-head > *,
.service-files a,
.record-meta span,
.patent-chip,
.data-table th,
.data-table td,
.patent-table th,
.patent-table td {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.service-files a,
.record-meta span,
.patent-chip {
  max-width: 100%;
  white-space: normal;
}

.record-meta span,
.patent-chip,
.service-files a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--platform-muted);
  background: #f8fafc;
  border: 1px solid var(--platform-line-soft);
  font-size: 12px;
  text-decoration: none;
}

.patent-chip,
.service-files a {
  color: var(--platform-brand-strong);
}

.cooperation-followup-status {
  display: grid;
  gap: 5px;
  min-width: 210px;
  max-width: 280px;
  padding: 10px 13px;
  border: 1px solid #cfe7e3;
  border-radius: 10px;
  background: #f2faf8;
  text-align: left;
}

.cooperation-followup-status strong {
  color: var(--platform-brand-strong);
  font-size: 14px;
  line-height: 1.4;
}

.cooperation-followup-status span {
  color: var(--platform-muted);
  font-size: 13px;
  line-height: 1.5;
}

.service-completion-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 300px;
}

.service-cooperation-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.service-cooperation-row > .cooperation-followup-status {
  width: 100%;
  min-width: 0;
  max-width: none;
}

.service-completion-stack .result-registration-status {
  width: 100%;
  min-width: 0;
  max-width: none;
}

.consultation-record-actions,
.service-record-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  width: 280px;
  min-width: 0;
  max-width: 280px;
}

.consultation-record-actions .consultation-status-card,
.service-record-actions .service-status-card {
  width: 100%;
  max-width: 100%;
}

.consultation-record-actions .btn,
.service-record-actions .btn {
  width: 100%;
  justify-content: center;
}

.record-side {
  display: grid;
  align-content: start;
  gap: 6px;
  padding-left: 12px;
  border-left: 1px solid var(--platform-line-soft);
}

.record-side strong {
  color: var(--platform-text);
  font-size: 13px;
}

.manager-resource-card {
  grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
}

.manager-contact-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.manager-contact-card > div,
.manager-privacy-note {
  padding: 10px;
  border: 1px solid var(--platform-line-soft);
  border-radius: 8px;
  background: #f8fafc;
}

.manager-contact-card span,
.manager-privacy-note,
.manager-private-side small {
  color: var(--platform-muted);
  font-size: 12px;
}

.manager-contact-card strong {
  display: block;
  margin-top: 4px;
  color: var(--platform-text);
  font-size: 13px;
  line-height: 1.5;
}

.manager-privacy-note {
  margin-top: 10px;
  color: var(--platform-brand-strong);
  background: rgba(15, 118, 110, 0.055);
}

.manager-private-side {
  min-width: 220px;
}

.record-actions {
  align-content: start;
}

.enterprise-empty {
  padding: 28px;
  border: 1px dashed var(--platform-line);
  border-radius: 8px;
  background: var(--platform-surface-soft);
}

.enterprise-modal {
  max-width: 760px;
}

.enterprise-form-grid .span-2 {
  grid-column: 1 / -1;
}

.enterprise-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--platform-line-soft);
  border-radius: 8px;
  background: var(--platform-surface-soft);
  color: var(--platform-muted);
  font-size: 13px;
}

.enterprise-check input {
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.required,
.danger-text {
  color: var(--platform-danger);
}

.enterprise-patent-table {
  border: 1px solid var(--platform-line-soft);
  border-radius: 8px;
}

.patent-resource-table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-gutter: stable;
  overscroll-behavior-x: contain;
}

.enterprise-resource-patent-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.enterprise-resource-patent-table th:nth-child(1),
.enterprise-resource-patent-table td:nth-child(1) {
  width: 64px;
}

.enterprise-resource-patent-table th:nth-child(2),
.enterprise-resource-patent-table td:nth-child(2) {
  width: 140px;
}

.enterprise-resource-patent-table th:nth-child(3),
.enterprise-resource-patent-table td:nth-child(3) {
  width: 180px;
}

.enterprise-resource-patent-table th:nth-child(5),
.enterprise-resource-patent-table td:nth-child(5) {
  width: 110px;
}

.enterprise-resource-patent-table th:nth-child(6),
.enterprise-resource-patent-table td:nth-child(6) {
  width: 120px;
}

.enterprise-resource-patent-table .title-cell {
  max-width: none;
  white-space: normal;
}

.tech-manager-patent-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.tech-manager-patent-table th,
.tech-manager-patent-table td {
  padding-right: 8px;
  padding-left: 8px;
}

.tech-manager-patent-table th:nth-child(1),
.tech-manager-patent-table td:nth-child(1) { width: 3%; }
.tech-manager-patent-table th:nth-child(2),
.tech-manager-patent-table td:nth-child(2) { width: 4%; }
.tech-manager-patent-table th:nth-child(3),
.tech-manager-patent-table td:nth-child(3) { width: 8%; }
.tech-manager-patent-table th:nth-child(4),
.tech-manager-patent-table td:nth-child(4) { width: 13%; }
.tech-manager-patent-table th:nth-child(5),
.tech-manager-patent-table td:nth-child(5) { width: 25%; }
.tech-manager-patent-table th:nth-child(6),
.tech-manager-patent-table td:nth-child(6) { width: 7%; }
.tech-manager-patent-table th:nth-child(7),
.tech-manager-patent-table td:nth-child(7) { width: 6%; }
.tech-manager-patent-table th:nth-child(8),
.tech-manager-patent-table td:nth-child(8) { width: 10%; }
.tech-manager-patent-table th:nth-child(9),
.tech-manager-patent-table td:nth-child(9) { width: 16%; }
.tech-manager-patent-table th:nth-child(10),
.tech-manager-patent-table td:nth-child(10) { width: 8%; }

.tech-manager-patent-table .title-cell,
.tech-manager-patent-table td:nth-child(9) {
  max-width: none;
  white-space: normal;
}

.tech-manager-patent-table .classification-cell {
  display: inline-block;
  max-width: 100%;
  padding-right: 7px;
  padding-left: 7px;
  white-space: nowrap;
}

@media (max-width: 1280px) {
  .tech-manager-patent-table {
    min-width: 1040px;
  }
}

.patent-resource-table-wrap::-webkit-scrollbar {
  height: 10px;
}

.patent-resource-table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid #fff;
  border-radius: 999px;
  background: #94a3b8;
}

.patent-resource-table-wrap::-webkit-scrollbar-track {
  background: #eef2f7;
}

.workflow-patent-table,
.resource-patent-list-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.workflow-patent-table th,
.workflow-patent-table td,
.resource-patent-list-table th,
.resource-patent-list-table td {
  padding-right: 8px;
  padding-left: 8px;
}

.workflow-patent-table th:nth-child(1),
.workflow-patent-table td:nth-child(1) { width: 4%; }
.workflow-patent-table th:nth-child(2),
.workflow-patent-table td:nth-child(2) { width: 8%; }
.workflow-patent-table th:nth-child(3),
.workflow-patent-table td:nth-child(3) { width: 14%; }
.workflow-patent-table th:nth-child(4),
.workflow-patent-table td:nth-child(4) { width: 27%; }
.workflow-patent-table th:nth-child(5),
.workflow-patent-table td:nth-child(5) { width: 7%; }
.workflow-patent-table th:nth-child(6),
.workflow-patent-table td:nth-child(6) { width: 10%; }
.workflow-patent-table th:nth-child(7),
.workflow-patent-table td:nth-child(7) { width: 14%; }
.workflow-patent-table th:nth-child(8),
.workflow-patent-table td:nth-child(8) { width: 8%; }
.workflow-patent-table th:nth-child(9),
.workflow-patent-table td:nth-child(9) { width: 8%; }

.workflow-patent-table .title-cell,
.workflow-patent-table td:nth-child(7),
.resource-patent-list-table .title-cell,
.resource-patent-list-table td:nth-child(5) {
  max-width: none;
  white-space: normal;
}

.workflow-patent-table .classification-cell,
.resource-patent-list-table .classification-cell {
  display: inline-block;
  max-width: 100%;
  padding-right: 7px;
  padding-left: 7px;
  white-space: nowrap;
}

.resource-patent-list-table th:nth-child(1),
.resource-patent-list-table td:nth-child(1) { width: 6%; }
.resource-patent-list-table th:nth-child(2),
.resource-patent-list-table td:nth-child(2) { width: 10%; }
.resource-patent-list-table th:nth-child(3),
.resource-patent-list-table td:nth-child(3) { width: 18%; }
.resource-patent-list-table th:nth-child(4),
.resource-patent-list-table td:nth-child(4) { width: 34%; }
.resource-patent-list-table th:nth-child(5),
.resource-patent-list-table td:nth-child(5) { width: 17%; }
.resource-patent-list-table th:nth-child(6),
.resource-patent-list-table td:nth-child(6) { width: 8%; }
.resource-patent-list-table th:nth-child(7),
.resource-patent-list-table td:nth-child(7) { width: 7%; }

@media (max-width: 1280px) {
  .workflow-patent-table {
    min-width: 980px;
  }

  .resource-patent-list-table {
    min-width: 880px;
  }
}

@media (max-width: 980px) {
  .enterprise-hero,
  .enterprise-section-head,
  .enterprise-record,
  .manager-resource-card {
    grid-template-columns: 1fr;
  }

  .enterprise-hero-actions,
  .record-actions {
    justify-content: flex-start;
  }

  .service-completion-stack {
    max-width: none;
  }

  .service-cooperation-row {
    justify-content: flex-start;
  }

  .consultation-record-actions,
  .service-record-actions {
    width: 100%;
    max-width: none;
  }

  .enterprise-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .record-side {
    padding-left: 0;
    padding-top: 12px;
    border-left: 0;
    border-top: 1px solid var(--platform-line-soft);
  }

  .manager-contact-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .enterprise-metrics,
  .enterprise-profile-grid,
  .enterprise-form-grid {
    grid-template-columns: 1fr;
  }

  .enterprise-panel,
  .enterprise-hero {
    padding: 14px;
  }
}


/* Role workbench side navigation for enterprise and tech manager pages */
.role-workspace-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.role-workspace-main {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.role-sidebar {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--platform-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--platform-shadow-soft);
}

.role-sidebar-head {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--platform-line-soft);
}

.role-sidebar-head strong {
  color: var(--platform-text);
  font-size: 16px;
}

.role-sidebar-head small {
  color: var(--platform-muted);
  line-height: 1.5;
}

.role-side-nav {
  display: grid;
  gap: 6px;
}

.enterprise-tab.role-side-link,
.tm-tab.role-side-link,
.expert-side-link.role-side-link,
.reviewer-side-link.role-side-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--platform-line-soft);
  border-radius: 8px;
  color: var(--platform-muted);
  background: var(--platform-surface-soft);
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.enterprise-tab.role-side-link:hover,
.tm-tab.role-side-link:hover,
.expert-side-link.role-side-link:hover,
.reviewer-side-link.role-side-link:hover {
  border-color: rgba(15, 118, 110, 0.28);
  color: var(--platform-brand-strong);
  background: rgba(15, 118, 110, 0.08);
}

.enterprise-tab.role-side-link.active,
.tm-tab.role-side-link.active,
.expert-side-link.role-side-link.active,
.reviewer-side-link.role-side-link.active {
  border-color: rgba(15, 118, 110, 0.34);
  color: #fff;
  background: var(--platform-brand);
}

.enterprise-tab.role-side-link span,
.tm-tab.role-side-link span,
.expert-side-link.role-side-link span,
.reviewer-side-link.role-side-link span {
  min-width: 20px;
  margin-left: 0;
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--platform-warning);
  background: rgba(245, 158, 11, 0.14);
  font-size: 12px;
  text-align: center;
}

.enterprise-tab.role-side-link.active span,
.tm-tab.role-side-link.active span,
.expert-side-link.role-side-link.active span,
.reviewer-side-link.role-side-link.active span {
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
}

/* Institution reviewer workbench */
.reviewer-workbench {
  display: grid;
  gap: 14px;
}

.reviewer-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.reviewer-section-intro {
  padding: 16px 18px;
  border: 1px solid var(--platform-line);
  border-radius: 8px;
  background: var(--platform-surface);
}

.reviewer-section-intro h3 {
  margin: 3px 0 5px;
  color: var(--platform-text);
  font-size: 20px;
}

.reviewer-section-intro p {
  margin: 0;
  color: var(--platform-muted);
  line-height: 1.6;
}

.reviewer-message-list {
  display: grid;
  gap: 10px;
}

.reviewer-message-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--platform-line-soft);
  border-radius: 8px;
  background: #fff;
}

.reviewer-message-item.unread {
  border-left: 3px solid var(--platform-brand);
  background: rgba(15, 118, 110, 0.04);
}

.reviewer-message-item h4,
.reviewer-message-item p {
  margin: 0;
}

.reviewer-message-item p {
  margin-top: 7px;
  color: var(--platform-muted);
  line-height: 1.6;
}

.reviewer-message-item small {
  display: block;
  margin-top: 7px;
  color: var(--platform-muted);
}

.reviewer-upload-card {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
}

@media (max-width: 1180px) {
  .reviewer-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .reviewer-metrics {
    grid-template-columns: 1fr;
  }

  .reviewer-message-item {
    grid-template-columns: 1fr;
  }
}

/* Tech manager workbench */
.tm-workbench {
  display: grid;
  gap: 14px;
}

.tm-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: 20px;
  border: 1px solid var(--platform-line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: var(--platform-shadow);
}

.tm-kicker {
  margin: 0 0 8px;
  color: var(--platform-brand);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.tm-hero h2 {
  margin: 0;
  color: var(--platform-text);
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
}

.tm-hero p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--platform-muted);
  line-height: 1.7;
}

.tm-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.tm-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.tm-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--platform-line);
  border-radius: 8px;
  background: var(--platform-surface);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.tm-tab {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--platform-muted);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.tm-tab span {
  margin-left: 4px;
  color: var(--platform-brand);
}

.tm-tab.active {
  color: var(--platform-brand-strong);
  border-color: rgba(15, 118, 110, 0.18);
  background: rgba(15, 118, 110, 0.08);
}

.tm-panel {
  padding: 18px;
  border: 1px solid var(--platform-line);
  border-radius: 8px;
  background: var(--platform-surface);
  box-shadow: var(--platform-shadow);
}

.tm-subsection {
  display: grid;
  gap: 10px;
}

.tm-subsection + .tm-subsection {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--platform-line-soft);
}

.tm-subsection > h4 {
  margin: 0;
  color: var(--platform-text);
  font-size: 16px;
  letter-spacing: 0;
}

.compact-record {
  align-items: start;
}

@media (max-width: 980px) {
  .assessment-dashboard,
  .assessment-visual-grid,
  .assessment-echarts-grid,
  .tm-assessment-echarts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .assessment-score-strip {
    grid-template-columns: 1fr;
  }

  .tm-assessment-visuals {
    grid-template-columns: 1fr;
  }

  .tm-hero,
  .tm-panel .enterprise-section-head,
  .tm-panel .enterprise-record {
    grid-template-columns: 1fr;
  }

  .tm-hero-actions {
    justify-content: flex-start;
  }

  .tm-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .assessment-dashboard,
  .assessment-visual-grid,
  .assessment-echarts-grid,
  .tm-assessment-echarts {
    grid-template-columns: 1fr;
  }

  .assessment-echart,
  .assessment-echart.small {
    height: 240px;
  }

  .assessment-bar-row,
  .assessment-rank-row {
    grid-template-columns: 80px minmax(0, 1fr) 42px;
  }

  .assessment-bar-row-wide {
    grid-template-columns: 86px minmax(0, 1fr) 64px;
  }

  .tm-metrics {
    grid-template-columns: 1fr;
  }

  .tm-panel,
  .tm-hero {
    padding: 14px;
  }
}


/* Manager workspace layout */
.manager-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.manager-main {
  min-width: 0;
}

.manager-sidebar {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--platform-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--platform-shadow-soft);
}

.manager-sidebar-head {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--platform-line-soft);
}

.manager-sidebar-head strong {
  color: var(--platform-text);
  font-size: 16px;
}

.manager-sidebar-head small {
  color: var(--platform-muted);
  line-height: 1.5;
}

.manager-side-nav {
  display: grid;
  gap: 8px;
}

.manager-nav-group {
  margin: 0;
  border: 1px solid var(--platform-line-soft);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.manager-nav-group-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 10px;
  color: var(--platform-text);
  background: var(--platform-surface-soft);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.manager-nav-group-summary::-webkit-details-marker {
  display: none;
}

.manager-nav-group-summary:hover {
  color: var(--platform-brand-strong);
  background: rgba(15, 118, 110, 0.08);
}

.manager-nav-group[open] {
  border-color: rgba(15, 118, 110, 0.3);
}

.manager-nav-group[open] .manager-nav-group-summary {
  color: var(--platform-brand-strong);
  background: rgba(15, 118, 110, 0.1);
}

.manager-nav-group-title {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  gap: 9px;
  min-width: 0;
}

.manager-nav-icon {
  display: inline-grid;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  place-items: center;
  border-radius: 7px;
  color: var(--platform-brand-strong);
  background: rgba(15, 118, 110, 0.1);
  font-size: 12px;
  font-weight: 900;
}

.manager-nav-group-copy {
  display: grid;
  flex: 1 1 auto;
  gap: 1px;
  min-width: 0;
}

.manager-nav-group-copy strong,
.manager-nav-group-copy small {
  overflow-wrap: anywhere;
}

.manager-nav-group-copy strong {
  font-size: 13px;
  line-height: 1.35;
}

.manager-nav-group-copy small {
  overflow: hidden;
  color: var(--platform-muted);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manager-nav-group-pending {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--platform-warning);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
}

.manager-nav-group[open] .manager-nav-group-pending {
  display: none;
}

.manager-nav-group-chevron {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform 160ms ease;
}

.manager-nav-group[open] .manager-nav-group-chevron {
  transform: rotate(225deg) translate(-1px, -1px);
}

.manager-nav-group-links {
  display: grid;
  gap: 5px;
  padding: 0 7px 7px 46px;
  border-top: 1px solid var(--platform-line-soft);
}

.manager-nav-group-links .manager-side-link {
  min-height: 31px;
  margin-top: 6px;
  padding: 5px 8px;
  border-color: transparent;
  background: transparent;
  font-size: 12px;
}

.manager-nav-group-links .manager-side-link + .manager-side-link {
  margin-top: 0;
}

.manager-side-link,
.manager-section-tab,
.manager-header-links a {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--platform-line-soft);
  border-radius: 8px;
  color: var(--platform-muted);
  background: var(--platform-surface-soft);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.manager-side-link:hover,
.manager-section-tab:hover,
.manager-header-links a:hover {
  border-color: rgba(15, 118, 110, 0.28);
  color: var(--platform-brand-strong);
  background: rgba(15, 118, 110, 0.08);
}

.manager-side-link.active,
.manager-section-tab.active {
  border-color: rgba(15, 118, 110, 0.34);
  color: #fff;
  background: var(--platform-brand);
}

.manager-side-link em {
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  color: var(--platform-warning);
  background: rgba(245, 158, 11, 0.14);
  font-size: 12px;
  font-style: normal;
  text-align: center;
}

.manager-side-link.active em {
  color: #fff;
  background: rgba(255, 255, 255, 0.22);
}

.manager-section-tabs,
.manager-header-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px;
}

.manager-header-links {
  margin: 0 0 0 16px;
}

.manager-review-route .review-notification-bar {
  display: none;
}

.manager-review-route .review-panel {
  margin-top: 0;
}

@media (max-width: 980px) {
  .manager-layout {
    grid-template-columns: 1fr;
  }

  .manager-sidebar {
    position: static;
  }

  .manager-side-nav {
    grid-template-columns: 1fr;
  }
}

/* Manager direct review pages should scroll with the whole page, not inside an inner panel. */
.manager-direct-route .review-panel {
  margin: 0;
}

.manager-direct-route .review-panel-header {
  border: 1px solid var(--platform-line);
  border-radius: 8px;
  background: #fff;
}

.manager-direct-route .review-panel-body {
  max-height: none;
  overflow: visible;
  display: grid;
  gap: 14px;
  padding: 14px 0 0;
  border: 0;
  background: transparent;
}

.manager-direct-route .review-item {
  margin: 0;
}

.manager-direct-route .manager-need-filter {
  position: sticky;
  top: 86px;
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  box-shadow: var(--platform-shadow-soft);
}

.manager-direct-route .manager-need-filter-summary {
  margin: 0;
  padding: 0 4px;
}

.manager-direct-route .manager-need-focus {
  border-color: var(--platform-brand);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16), var(--platform-shadow-soft);
}

@media (max-width: 760px) {
  .manager-direct-route .manager-need-filter {
    position: static;
  }
}

/* Public portal */
.portal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
  padding: 28px;
  border: 1px solid var(--platform-line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.94), rgba(14, 116, 144, 0.88)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
  color: #fff;
  box-shadow: var(--platform-shadow-soft);
}

.portal-hero .page-kicker,
.portal-hero p {
  color: rgba(255, 255, 255, 0.82);
}

.portal-hero h1 {
  margin: 10px 0;
  font-size: 34px;
  letter-spacing: 0;
}

.portal-hero p {
  max-width: 680px;
  line-height: 1.8;
}

.portal-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.portal-hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.portal-hero-metrics div {
  display: grid;
  align-content: center;
  min-height: 94px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.portal-hero-metrics strong {
  font-size: 30px;
  line-height: 1;
}

.portal-hero-metrics span {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.portal-card,
.portal-row-card,
.portal-detail,
.portal-form-card {
  border: 1px solid var(--platform-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--platform-shadow-soft);
}

.portal-card {
  display: flex;
  flex-direction: column;
  min-height: 330px;
  padding: 18px;
}

.portal-card-head,
.portal-page-head,
.portal-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.portal-card h2,
.portal-page-head h1,
.portal-detail h1 {
  margin: 6px 0 0;
  color: var(--platform-text);
  letter-spacing: 0;
}

.portal-card p,
.portal-page-head p,
.portal-row-card p,
.portal-detail-section,
.portal-detail-summary,
.portal-hint {
  color: var(--platform-muted);
  line-height: 1.7;
}

.portal-more,
.portal-admin-link {
  color: var(--platform-brand-strong);
  font-weight: 800;
  text-decoration: none;
}

.portal-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.portal-list a,
.portal-list-static {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--platform-line-soft);
  border-radius: 8px;
  background: var(--platform-surface-soft);
  color: var(--platform-text);
  text-decoration: none;
}

.portal-list a:hover,
.portal-row-card:hover {
  border-color: rgba(15, 118, 110, 0.3);
}

.portal-list a.portal-news-brief {
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: center;
}

.portal-news-brief > img {
  width: 74px;
  height: 52px;
  border-radius: 7px;
  object-fit: cover;
}

.portal-news-brief-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.portal-list span,
.portal-meta {
  color: var(--platform-muted);
  font-size: 13px;
}

.portal-admin-link {
  margin-top: auto;
  padding-top: 14px;
}

.portal-page-head {
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid var(--platform-line);
  border-radius: 8px;
  background: #fff;
}

.portal-search {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.portal-search input,
.portal-search select {
  min-width: 0;
}

.portal-search .search-input {
  min-width: min(280px, 100%);
}

.enterprise-search {
  grid-template-columns: minmax(220px, 1.7fr) repeat(3, minmax(140px, 1fr)) auto auto;
}

.enterprise-public-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.enterprise-public-fields span {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--platform-surface-soft);
  color: var(--platform-muted);
}

.portal-import-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .enterprise-search,
  .enterprise-public-fields {
    grid-template-columns: 1fr;
  }
}

.resource-search-form {
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--platform-line-soft);
  border-radius: 10px;
  background: var(--platform-surface-soft);
}

.patent-recommend-filter {
  align-items: center;
  padding: 14px;
  background: linear-gradient(135deg, #f8fafc 0%, #f0fdfa 100%);
}

.patent-recommend-filter .search-input {
  flex: 1 1 260px;
}

.patent-recommend-filter .status-select {
  flex: 0 1 168px;
  min-width: 132px;
}

.patent-filter-summary {
  margin: -7px 0 12px;
  color: var(--platform-muted);
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .patent-recommend-filter .search-input,
  .patent-recommend-filter .status-select,
  .patent-recommend-filter .btn {
    flex: 1 1 100%;
    width: 100%;
  }
}

.query-error {
  margin: -4px 0 14px;
}

.portal-list-page {
  display: grid;
  gap: 12px;
}

.portal-row-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
}

.portal-row-card h2 {
  margin: 0 0 8px;
  color: var(--platform-text);
  font-size: 18px;
  letter-spacing: 0;
}

.portal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.portal-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--platform-surface-soft);
}


.portal-readonly-badge {
  justify-self: start;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--platform-surface-soft);
  color: var(--platform-muted);
  font-size: 13px;
  font-weight: 650;
}

.portal-empty {
  padding: 14px;
  border: 1px dashed var(--platform-line);
  border-radius: 8px;
  color: var(--platform-muted);
  text-align: center;
}

.portal-empty.big {
  padding: 34px;
  background: #fff;
}

.portal-detail {
  padding: 22px;
}

.portal-detail-summary {
  margin: 18px 0;
  padding: 14px;
  border-left: 4px solid var(--platform-brand);
  border-radius: 8px;
  background: rgba(15, 118, 110, 0.06);
}

.portal-detail-section {
  margin-top: 18px;
}

.portal-detail-section h2 {
  margin: 0 0 10px;
  color: var(--platform-text);
  font-size: 18px;
  letter-spacing: 0;
}

.portal-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.portal-detail-grid div {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--platform-line-soft);
  border-radius: 8px;
  background: var(--platform-surface-soft);
}

.portal-detail-grid strong {
  color: var(--platform-muted);
  font-size: 12px;
}

.portal-detail-grid span {
  color: var(--platform-text);
  font-weight: 800;
}

.portal-detail-actions,
.enterprise-honor-tags,
.honor-card-head,
.honor-upload-form,
.honor-edit-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.enterprise-honor-manager { margin-top: 22px; }
.compact-head { margin-bottom: 12px; }
.honor-upload-form { padding: 14px; border: 1px solid var(--border-color, #dce5e8); border-radius: 12px; background: #f8fbfb; }
.honor-upload-form input[type="text"] { flex: 1 1 220px; }
.honor-upload-form input[type="file"] { flex: 2 1 320px; }
.honor-upload-form small { flex-basis: 100%; color: #64748b; }
.enterprise-honor-list { display: grid; gap: 14px; margin-top: 14px; }
.enterprise-honor-card { border: 1px solid #dce5e8; border-radius: 12px; padding: 14px; background: #fff; }
.honor-card-head { justify-content: space-between; align-items: flex-start; }
.honor-edit-form { flex: 1; }
.honor-edit-form input[type="text"] { min-width: 180px; flex: 1; }
.honor-proof-grid, .honor-detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 14px; }
.honor-proof-item, .honor-detail-proof { border: 1px solid #e1e8eb; border-radius: 10px; padding: 10px; background: #f8fafb; min-width: 0; }
.honor-proof-item img { width: 100%; height: 120px; object-fit: cover; border-radius: 7px; }
.honor-detail-proof img, .honor-detail-proof iframe { width: 100%; height: 360px; object-fit: contain; border: 0; border-radius: 8px; background: #fff; }
.honor-proof-item small, .honor-detail-proof small { display: block; margin-top: 8px; overflow-wrap: anywhere; color: #64748b; }
.honor-file-icon, .honor-word-preview { display: flex; min-height: 120px; align-items: center; justify-content: center; border-radius: 7px; background: #eaf3f2; color: #0f766e; font-weight: 700; }
.honor-word-preview { min-height: 320px; flex-direction: column; gap: 12px; padding: 20px; text-align: center; }
.enterprise-honor-tag { display: inline-flex; padding: 7px 12px; border-radius: 999px; background: #e7f4f2; color: #0f766e; text-decoration: none; border: 1px solid #bfddd8; }
.enterprise-honor-tag:hover { background: #d9eeea; }
.muted-honor-tag { color: #64748b; background: #f2f5f6; border-color: #dde4e7; cursor: default; }
.text-action { border: 0; background: none; padding: 5px 0; cursor: pointer; }

@media (max-width: 720px) {
  .honor-detail-grid { grid-template-columns: 1fr; }
  .honor-detail-proof img, .honor-detail-proof iframe { height: 280px; }
}

.portal-hint {
  margin-top: 18px;
  padding: 12px;
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.08);
}

.portal-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.portal-form-card {
  max-width: 860px;
  padding: 20px;
}

.portal-form-card.article-editor-card {
  max-width: none;
}

.article-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  align-items: start;
}

.article-editor-main,
.article-editor-sidebar {
  min-width: 0;
}

.article-editor-sidebar {
  position: sticky;
  top: 86px;
  padding: 16px;
  border: 1px solid var(--platform-line-soft);
  border-radius: 12px;
  background: var(--platform-surface-soft);
}

.portal-form-card .form-group {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
}

.portal-form-card .form-group > label {
  color: var(--platform-text);
  font-size: 13px;
  font-weight: 800;
}

.portal-form-card .form-control,
.portal-form-card input[type="text"],
.portal-form-card input[type="datetime-local"],
.portal-form-card input[type="file"],
.portal-form-card select,
.portal-form-card textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--platform-line);
  background: #fff;
  color: var(--platform-text);
}

.portal-form-card textarea {
  min-height: 92px;
  resize: vertical;
}

.news-editor-shell {
  overflow: hidden;
  border: 1px solid var(--platform-line);
  border-radius: 12px;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.news-editor-shell:focus-within,
.news-editor-shell.is-dragging {
  border-color: rgba(15, 118, 110, 0.58);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.1);
}

.news-editor-shell.is-dragging {
  background: rgba(15, 118, 110, 0.04);
}

.news-editor-toolbar.ql-toolbar.ql-snow {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--platform-line-soft);
  background: var(--platform-surface-soft);
}

.news-image-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--platform-line-soft);
  background: #fff;
}

.news-image-tool-group {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--platform-line);
  border-radius: 8px;
}

.news-image-tool-group button {
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-right: 1px solid var(--platform-line);
  background: #fff;
  color: var(--platform-muted);
  cursor: pointer;
  font-weight: 750;
}

.news-image-tool-group button:last-child {
  border-right: 0;
}

.news-image-tool-group button:hover {
  background: rgba(15, 118, 110, 0.08);
  color: var(--platform-brand-strong);
}

.news-editor-shell .ql-container.ql-snow {
  min-height: 420px;
  border: 0;
  font-family: inherit;
  font-size: 15px;
}

.news-editor-shell .ql-editor {
  min-height: 420px;
  padding: 22px 24px;
  color: var(--platform-text);
  line-height: 1.85;
}

.news-editor-shell .ql-editor.ql-blank::before {
  right: 24px;
  left: 24px;
  color: #94a3b8;
  font-style: normal;
}

.news-editor-shell .ql-tooltip {
  z-index: 4;
}

.news-editor-shell figure.is-selected {
  outline: 3px solid rgba(15, 118, 110, 0.34);
  outline-offset: 4px;
}

.news-editor-shell .form-help,
.news-editor-shell #newsEditorStatus {
  margin: 0;
  padding: 8px 12px;
  background: var(--platform-surface-soft);
}

.article-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 6px 0 10px;
  padding: 10px;
  border: 1px solid var(--platform-line-soft);
  border-radius: 10px;
  background: var(--platform-surface-soft);
}

.article-editor-toolbar button {
  padding: 7px 10px;
  border: 1px solid var(--platform-line);
  border-radius: 7px;
  background: #fff;
  color: var(--platform-brand-strong);
  cursor: pointer;
  font-weight: 750;
}

.article-editor-toolbar span {
  color: var(--platform-muted);
  font-size: 12px;
}

.article-content-editor {
  min-height: 470px;
  line-height: 1.85;
  resize: vertical;
}

.article-editor-tip {
  display: grid;
  gap: 7px;
  margin-top: 16px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--platform-muted);
  font-size: 13px;
}

.article-editor-tip strong {
  color: var(--platform-text);
}

.article-existing-images {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--platform-line-soft);
  border-radius: 12px;
}

.article-existing-images h3,
.article-existing-images p {
  margin: 0 0 8px;
}

.article-image-admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.article-image-admin-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--platform-line-soft);
  border-radius: 10px;
  background: #fff;
}

.article-image-admin-card img,
.article-cover-admin-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  object-fit: cover;
}

.article-image-admin-card code {
  justify-self: start;
  padding: 4px 7px;
  border-radius: 6px;
  background: #e8f2ff;
  color: #1459a8;
  font-weight: 800;
}

.article-image-delete {
  color: #b42318;
  font-size: 13px;
}

.article-cover-admin-preview {
  margin-top: 10px;
  object-fit: contain;
  background: #eef3f8;
}

.news-row-card {
  grid-template-columns: minmax(0, 1fr) auto;
}

.news-row-cover {
  display: block;
  overflow: hidden;
  border-radius: 10px;
}

.news-row-cover img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 180ms ease;
}

.news-row-card:hover .news-row-cover img {
  transform: scale(1.03);
}

.news-article-cover {
  display: block;
  width: min(100%, 760px);
  max-height: 420px;
  margin: 22px auto;
  border-radius: 14px;
  object-fit: contain;
  background: #f4f7fb;
  box-shadow: var(--platform-shadow-soft);
}

.news-article-cover.cover-fit-contain {
  object-fit: contain;
}

.news-article-cover.cover-fit-cover {
  object-fit: cover;
}

.news-article-body {
  width: min(100%, 760px);
  margin-right: auto;
  margin-left: auto;
  color: var(--platform-text);
  font-size: 17px;
  line-height: 1.95;
}

.news-article-body p {
  margin: 18px 0;
  color: var(--platform-text);
  text-align: justify;
  text-indent: 2em;
}

.news-article-body h2 {
  margin: 34px 0 14px;
  padding-left: 12px;
  border-left: 4px solid var(--platform-brand);
  font-size: 23px;
}

.news-article-body blockquote {
  margin: 20px 0;
  padding: 15px 18px;
  border-left: 4px solid #3b82f6;
  border-radius: 8px;
  background: #eff6ff;
  color: #36506d;
}

.news-article-body figure {
  margin: 26px auto;
}

.news-article-body figure img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 480px;
  margin: 0 auto;
  border-radius: 12px;
  object-fit: contain;
  background: #f4f7fb;
}

.news-article-body figcaption {
  margin-top: 9px;
  color: var(--platform-muted);
  font-size: 13px;
  text-align: center;
}

.news-rich-content > :first-child {
  margin-top: 0;
}

.news-rich-content > :last-child {
  margin-bottom: 0;
}

.news-rich-content figure {
  width: 100%;
  margin: 26px auto;
}

.news-rich-content figure.layout-single {
  max-width: 760px;
  margin: 26px auto;
}

.news-rich-content figure.layout-2 {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.news-rich-content figure.layout-3 {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.news-rich-content figure.layout-auto {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.news-rich-content figure.size-full {
  width: 100%;
}

.news-rich-content figure.size-normal {
  width: 100%;
  max-width: 760px;
}

.news-rich-content figure.size-small {
  width: 100%;
  max-width: 420px;
}

.news-rich-content img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 720px;
  margin: 0 auto;
  border-radius: 12px;
  object-fit: contain;
  background: #f4f7fb;
}

.news-rich-content figure.layout-2 img,
.news-rich-content figure.layout-3 img,
.news-rich-content figure.layout-auto img {
  width: 100%;
}

@media (max-width: 720px) {
  .news-rich-content figure.layout-2,
  .news-rich-content figure.layout-3,
  .news-rich-content figure.layout-auto {
    grid-template-columns: 1fr;
  }
}

.article-preview-modal {
  width: min(960px, calc(100vw - 36px));
  max-height: 92vh;
}

.article-preview-modal .modal-body {
  overflow-y: auto;
}

.news-preview-head {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--platform-line-soft);
  text-align: center;
}

.news-preview-head span {
  color: var(--platform-brand-strong);
  font-weight: 800;
}

.news-preview-head h1 {
  margin: 10px 0;
}

.news-preview-head p {
  margin: 0;
  color: var(--platform-muted);
  font-size: 13px;
  text-align: center;
  text-indent: 0;
}

.portal-import-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.portal-import-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--platform-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--platform-shadow-soft);
}

.portal-import-card h2 {
  margin: 0;
  color: var(--platform-text);
  font-size: 18px;
  letter-spacing: 0;
}

.portal-import-card p {
  margin: 0;
  color: var(--platform-muted);
  line-height: 1.7;
}

.portal-import-card form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.portal-import-card input[type="file"] {
  min-width: min(100%, 280px);
  flex: 1;
}

.portal-import-note {
  padding: 10px 12px;
  border-left: 4px solid var(--platform-warning);
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.08);
  color: var(--platform-muted);
  font-size: 13px;
  line-height: 1.6;
}

.field-error {
  margin-top: 4px;
  color: #b91c1c;
  font-size: 13px;
}

.form-error {
  margin-top: 6px;
  color: var(--platform-danger);
  font-size: 13px;
}

.form-help {
  display: block;
  margin-top: 6px;
  color: var(--platform-muted);
  font-size: 12px;
  line-height: 1.5;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.inline-form .form-control {
  min-width: min(100%, 220px);
  flex: 1;
}

@media (max-width: 860px) {
  .portal-hero,
  .portal-grid,
  .portal-detail-grid,
  .portal-import-grid {
    grid-template-columns: 1fr;
  }

  .portal-row-card,
  .portal-page-head,
  .portal-detail-head {
    grid-template-columns: 1fr;
    display: grid;
  }

  .article-editor-layout,
  .article-image-admin-grid,
  .news-row-card {
    grid-template-columns: 1fr;
  }

  .article-editor-sidebar {
    position: static;
  }

  .news-editor-shell .ql-container.ql-snow,
  .news-editor-shell .ql-editor {
    min-height: 320px;
  }
}


@media (max-width: 980px) {
  .role-workspace-layout {
    grid-template-columns: 1fr;
  }

  .role-sidebar {
    position: static;
  }

  .role-side-nav {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}

/* Role-aware registration */
.register-auth-container {
  padding-top: 32px;
  padding-bottom: 48px;
}

.register-card {
  max-width: 900px !important;
}

.register-form {
  gap: 20px;
}

.register-section {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
}

.register-section + .register-section {
  margin-top: 16px;
}

.register-section-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}

.register-section-desc,
.register-note,
.field-help {
  color: #64748b;
  font-size: 13px;
  line-height: 1.7;
}

.register-note {
  margin-top: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  border-left: 3px solid #0f766e;
  border-radius: 6px;
}

.register-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  margin-top: 12px;
}

.register-field-full {
  grid-column: 1 / -1;
}

.register-field textarea {
  resize: vertical;
}

@media (max-width: 760px) {
  .register-grid {
    grid-template-columns: 1fr;
  }

  .register-card {
    max-width: calc(100vw - 28px) !important;
  }
}

/* Workbenches use the document scrollbar so the wheel works over all page content. */
.route-list:is(.role-manager, .role-enterprise, .role-tech-manager, .role-expert, .role-reviewer),
.role-manager:is(
  .route-manager_reviews,
  .route-manager_archive,
  .route-manager_operation_logs,
  .route-manager_assessment,
  .route-manager_accounts,
  .route-manager_portal_imports
) {
  height: auto;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  display: block;
}

.route-list:is(.role-manager, .role-enterprise, .role-tech-manager, .role-expert, .role-reviewer) .topbar-shell,
.role-manager:is(
  .route-manager_reviews,
  .route-manager_archive,
  .route-manager_operation_logs,
  .route-manager_assessment,
  .route-manager_accounts,
  .route-manager_portal_imports
) .topbar-shell,
.route-list:is(.role-manager, .role-enterprise, .role-tech-manager, .role-expert, .role-reviewer) .message-stack {
  flex: 0 0 auto;
}

.route-list:is(.role-manager, .role-enterprise, .role-tech-manager, .role-expert, .role-reviewer) .page-shell,
.role-manager:is(
  .route-manager_reviews,
  .route-manager_archive,
  .route-manager_operation_logs,
  .route-manager_assessment,
  .route-manager_accounts,
  .route-manager_portal_imports
) .page-shell {
  width: 100%;
  min-height: 0;
  margin-top: 14px;
  margin-bottom: 28px;
  overflow: visible;
}

.route-list:is(.role-manager, .role-enterprise, .role-tech-manager, .role-expert, .role-reviewer) .footer,
.role-manager:is(
  .route-manager_reviews,
  .route-manager_archive,
  .route-manager_operation_logs,
  .route-manager_assessment,
  .route-manager_accounts,
  .route-manager_portal_imports
) .footer {
  display: block;
}

.route-list.role-enterprise .enterprise-workbench,
.route-list.role-tech-manager .tm-workbench {
  height: auto;
  min-height: 0;
  grid-template-rows: auto auto auto;
  overflow: visible;
}

.manager-layout,
.role-workspace-layout {
  height: auto;
  min-height: 0;
  align-items: stretch;
  overflow: visible;
}

.manager-sidebar,
.role-sidebar {
  position: sticky;
  top: 86px;
  align-self: start;
  min-height: 0;
  overflow: visible;
}

.manager-main,
.role-workspace-main {
  width: 100%;
  max-width: 100%;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: visible;
  scrollbar-gutter: auto;
  overscroll-behavior: auto;
}

.manager-main > *,
.role-workspace-main > *,
.tm-panel,
.enterprise-panel,
.list-container {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.manager-main .table-wrapper,
.role-workspace-main .table-wrapper,
.list-container .table-wrapper {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: auto;
  overflow-y: visible;
}

.manager-sidebar,
.role-sidebar {
  scrollbar-gutter: auto;
  overscroll-behavior: auto;
}

@media (max-width: 980px) {
  .route-list:is(.role-manager, .role-enterprise, .role-tech-manager, .role-expert, .role-reviewer),
  .role-manager:is(
    .route-manager_reviews,
    .route-manager_archive,
    .route-manager_operation_logs,
    .route-manager_assessment,
    .route-manager_accounts,
    .route-manager_portal_imports
  ) {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
    display: block;
  }

  .route-list:is(.role-manager, .role-enterprise, .role-tech-manager, .role-expert, .role-reviewer) .page-shell,
  .role-manager:is(
    .route-manager_reviews,
    .route-manager_archive,
    .route-manager_operation_logs,
    .route-manager_assessment,
    .route-manager_accounts,
    .route-manager_portal_imports
  ) .page-shell,
  .route-list.role-enterprise .enterprise-workbench,
  .route-list.role-tech-manager .tm-workbench {
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .route-list:is(.role-manager, .role-enterprise, .role-tech-manager, .role-expert, .role-reviewer) .footer,
  .role-manager:is(
    .route-manager_reviews,
    .route-manager_archive,
    .route-manager_operation_logs,
    .route-manager_assessment,
    .route-manager_accounts,
    .route-manager_portal_imports
  ) .footer {
    display: block;
  }

  .manager-layout,
  .role-workspace-layout,
  .manager-sidebar,
  .role-sidebar,
  .manager-main,
  .role-workspace-main {
    height: auto;
    min-height: auto;
    overflow: visible;
  }
}

@media (min-width: 981px) {
  .route-list:is(.role-manager, .role-enterprise, .role-tech-manager, .role-expert, .role-reviewer) .page-shell,
  .role-manager:is(.route-manager_reviews, .route-manager_archive, .route-manager_operation_logs, .route-manager_assessment, .route-manager_accounts, .route-manager_portal_imports) .page-shell {
    height: auto;
  }

  .manager-layout,
  .role-workspace-layout {
    min-height: 0;
  }

  .manager-main,
  .role-workspace-main,
  .manager-sidebar,
  .role-sidebar {
    height: auto;
    max-height: none;
    overflow-y: visible;
  }

  .manager-sidebar,
  .role-sidebar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    align-content: flex-start;
  }

  .manager-side-nav,
  .role-side-nav {
    flex: 0 0 auto;
  }
}

.login-import-hint {
  margin: 12px 0 18px;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-left: 3px solid #0f766e;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  line-height: 1.6;
}

/* Public portal homepage */
.route-home.platform-body {
  --platform-brand: #1268d6;
  --platform-brand-strong: #0754ba;
  --platform-accent: #18a8ff;
  background: #f5f9ff;
}

.route-home .topbar-shell {
  padding: 0;
  background: #fff;
  box-shadow: 0 1px 0 rgba(14, 71, 132, 0.1);
}

.route-home .nav-surface {
  min-height: 74px;
  max-width: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: #fff;
}

.route-home .nav-container {
  padding: 0 clamp(18px, 3.6vw, 52px);
}

.route-home .brand-lockup::before {
  content: "";
  width: 48px;
  height: 48px;
  margin-right: 14px;
  border-radius: 50%;
  border: 3px solid #176bd3;
  background:
    radial-gradient(circle at 52% 36%, #fff 0 16%, transparent 17%),
    linear-gradient(135deg, #0e5fcb 0 45%, #ffb030 46% 57%, #f7fbff 58% 100%);
  box-shadow: inset 0 0 0 5px #fff, 0 3px 10px rgba(19, 89, 176, 0.14);
}

.route-home .brand-title {
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
}

.route-home .nav-links {
  gap: 8px;
}

.route-home .nav-link {
  padding: 9px 10px;
  border-radius: 6px;
  color: #1d2735;
  font-size: 14px;
  font-weight: 700;
}

.route-home .nav-link-active {
  position: relative;
  color: #1268d6 !important;
  background: transparent;
}

.route-home .nav-link-active::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: -13px;
  left: 10px;
  height: 3px;
  border-radius: 999px;
  background: #1268d6;
}

.route-home .nav-link-primary {
  padding-inline: 16px;
  color: #fff !important;
  background: #1268d6;
}

.route-home .page-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.portal-home {
  color: #182235;
}

.home-hero {
  min-height: 600px;
  display: flex;
  align-items: center;
  padding: 90px clamp(24px, 5vw, 72px) 150px;
  background:
    linear-gradient(90deg, rgba(3, 43, 102, 0.94) 0%, rgba(4, 74, 151, 0.76) 34%, transparent 52%),
    url("../img/portal/hero-bridge-right.png") center / cover no-repeat;
}

.home-hero-copy {
  max-width: min(760px, 39%);
  color: #fff;
}

.home-hero h1 {
  margin: 0 0 26px;
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.18;
  font-weight: 900;
}

.home-hero p {
  margin: 0;
  font-size: clamp(18px, 1.7vw, 25px);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 58px;
}

.home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 0 34px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 17px;
  font-weight: 850;
  text-decoration: none !important;
  gap: 20px;
}

.home-btn-primary {
  color: #fff;
  background: #1477ea;
  box-shadow: 0 14px 32px rgba(5, 76, 170, 0.35);
}

.home-btn-outline {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.08);
}

.home-btn-light {
  color: #1268d6;
  background: #fff;
  box-shadow: 0 12px 26px rgba(5, 61, 141, 0.2);
}

.home-stats {
  width: min(1240px, calc(100% - 64px));
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin: -82px auto 0;
  position: relative;
  z-index: 2;
}

.home-stat-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 20px;
  align-items: center;
  min-height: 150px;
  padding: 28px;
  border: 1px solid #dbe7f7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(20, 70, 130, 0.12);
}

.stat-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 34px;
  font-weight: 900;
  background: #eef6ff;
}

.home-stat-card span,
.home-stat-card small {
  color: #4c5b70;
  font-weight: 700;
}

.home-stat-card strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 38px;
  line-height: 1;
  color: #1268d6;
}

.stat-cyan strong,
.stat-cyan .stat-icon { color: #10a6ce; }
.stat-violet strong,
.stat-violet .stat-icon { color: #7467e8; }
.stat-orange strong,
.stat-orange .stat-icon { color: #f08a24; }

.home-section,
.feature-grid,
.info-grid,
.home-cta {
  width: min(1240px, calc(100% - 64px));
  margin-right: auto;
  margin-left: auto;
}

.home-section {
  padding-top: 60px;
}

.home-section-title {
  text-align: center;
}

.home-section-title h2 {
  position: relative;
  display: inline-block;
  margin: 0 0 34px;
  padding-bottom: 16px;
  font-size: 32px;
  font-weight: 900;
}

.home-section-title h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 48px;
  height: 4px;
  border-radius: 999px;
  background: #1268d6;
  transform: translateX(-50%);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
}

.service-card {
  display: grid;
  justify-items: center;
  min-height: 204px;
  padding: 28px 18px;
  border: 1px solid #dce7f5;
  border-radius: 8px;
  background: #fff;
  color: #172033;
  text-align: center;
  text-decoration: none !important;
  box-shadow: 0 10px 24px rgba(20, 70, 130, 0.07);
}

a.service-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(20, 70, 130, 0.12);
}

.service-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
  border: 3px solid #1268d6;
  border-radius: 50%;
  color: #1268d6;
  font-size: 34px;
  line-height: 1;
}

.service-card strong {
  font-size: 18px;
}

.service-card p {
  margin: 12px 0 0;
  color: #58677b;
  line-height: 1.75;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
  margin-top: 48px;
}

.feature-card {
  height: 100%;
  overflow: hidden;
  border: 1px solid #dce7f5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(20, 70, 130, 0.08);
}

.feature-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.feature-card div {
  padding: 24px;
}

.feature-card h3 {
  margin: 0 0 14px;
  font-size: 22px;
}

.feature-card p {
  margin: 0;
  color: #45566d;
  line-height: 1.8;
}

.info-head a {
  font-weight: 850;
  text-decoration: none;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 44px;
}

.info-panel {
  padding: 26px;
  border: 1px solid #dce7f5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(20, 70, 130, 0.07);
}

.info-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
}

.info-head h3 {
  margin: 0;
  font-size: 21px;
}

.info-list {
  display: grid;
  gap: 12px;
}

.info-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  color: #1f2b3d;
  text-decoration: none;
}

.info-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.info-list span::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 12px;
  border-radius: 50%;
  background: #1268d6;
  vertical-align: middle;
}

.info-list em {
  margin-right: 10px;
  padding: 3px 8px;
  border-radius: 4px;
  background: #eaf3ff;
  color: #1268d6;
  font-style: normal;
  font-size: 12px;
  font-weight: 850;
}

.info-list time {
  color: #45566d;
}

.info-empty {
  padding: 18px 0;
  color: #65758a;
  text-align: center;
}

.info-more {
  display: flex;
  justify-content: center;
  margin-top: 22px;
  padding: 12px 18px;
  border: 1px solid #94bdf2;
  border-radius: 8px;
  font-weight: 850;
  text-decoration: none !important;
}

.home-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 34px;
  margin-bottom: 24px;
  padding: 36px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(100deg, #1268d6, #0874e7 55%, #005abd),
    radial-gradient(circle at 78% 50%, rgba(255, 255, 255, 0.3), transparent 34%);
  overflow: hidden;
}

.home-cta h2 {
  margin: 0 0 8px;
  font-size: 30px;
}

.home-cta p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 17px;
}

.footer {
  padding: 0;
  border-top: 0;
  background: #06234a;
  color: rgba(255, 255, 255, 0.76);
  text-align: left;
}

.footer-inner {
  width: min(1240px, calc(100% - 64px));
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 34px;
  margin: 0 auto;
  padding: 42px 0;
}

.footer strong {
  display: block;
  margin-bottom: 14px;
  color: #fff;
  font-size: 17px;
}

.footer p {
  margin: 0;
  line-height: 1.8;
}

.footer-col,
.footer-brand {
  min-width: 0;
}

.footer-col {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer a,
.footer span {
  color: rgba(255, 255, 255, 0.76);
  text-decoration: none;
}

.footer-copy {
  padding: 18px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.62);
  text-align: center;
}

@media (max-width: 1180px) {
  .route-home .nav-surface {
    height: auto;
    padding: 12px 0;
  }

  .route-home .nav-container,
  .route-home .nav-links {
    flex-wrap: wrap;
  }

  .home-stats,
  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1000px) {
  .home-hero {
    background: #032b66 url("../img/portal/hero-bridge-right.png") center bottom 90px / 100% auto no-repeat;
    padding-bottom: calc(110px + 31.25vw);
  }

  .home-hero-copy {
    max-width: 760px;
  }
}

@media (max-width: 760px) {
  .route-home .brand-title {
    white-space: normal;
    font-size: 18px;
  }

  .home-hero {
    min-height: 520px;
    padding: 64px 22px calc(110px + 31.25vw);
  }

  .home-stats,
  .home-section,
  .feature-grid,
  .info-grid,
  .home-cta,
  .footer-inner {
    width: calc(100% - 32px);
  }

  .home-stats,
  .service-grid,
  .feature-grid,
  .info-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .home-stat-card {
    min-height: 126px;
  }

  .home-cta {
    align-items: flex-start;
    flex-direction: column;
  }

  .info-list a {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* Normal-user application for a verified tech-manager profile */
.upgrade-application-page {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.upgrade-application-main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.upgrade-hero {
  margin: 0;
}

.upgrade-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.upgrade-state-notice {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  line-height: 1.7;
}

.upgrade-form-card {
  overflow: hidden;
  border: 1px solid var(--platform-line);
  border-radius: 8px;
  background: var(--platform-surface);
  box-shadow: var(--platform-shadow);
}

.upgrade-form-header {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid var(--platform-line-soft);
}

.upgrade-form-header h2,
.upgrade-section-heading h3 {
  margin: 0;
  color: var(--platform-text);
}

.upgrade-form-header h2 {
  font-size: 22px;
}

.upgrade-form-header p,
.upgrade-section-heading p {
  margin: 6px 0 0;
  color: var(--platform-muted);
  line-height: 1.6;
}

.upgrade-record-time {
  flex: 0 0 auto;
  color: var(--platform-muted);
  font-size: 13px;
}

.upgrade-profile-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.upgrade-profile-form fieldset:disabled {
  opacity: 0.72;
}

.upgrade-form-section {
  padding: 24px 26px;
  border-bottom: 1px solid var(--platform-line-soft);
}

.upgrade-section-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.upgrade-section-heading > span {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border-radius: 6px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--platform-brand-strong);
  font-size: 12px;
  font-weight: 800;
}

.upgrade-section-heading h3 {
  font-size: 17px;
}

.upgrade-section-heading p {
  font-size: 13px;
}

.upgrade-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 22px;
}

.upgrade-field {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.upgrade-field > span {
  color: var(--platform-text);
  font-size: 14px;
  font-weight: 700;
}

.upgrade-field b,
.upgrade-form-header .required {
  color: #dc2626;
}

.upgrade-field input,
.upgrade-field select,
.upgrade-field textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: #fff;
}

.upgrade-field input,
.upgrade-field select {
  min-height: 46px;
}

.upgrade-field textarea {
  resize: vertical;
  line-height: 1.7;
}

.upgrade-field small {
  color: var(--platform-muted);
  font-size: 12px;
  line-height: 1.6;
}

.upgrade-field-wide {
  grid-column: 1 / -1;
}

.upgrade-file-field {
  align-content: start;
  padding: 14px;
  border: 1px solid var(--platform-line-soft);
  border-radius: 8px;
  background: var(--platform-surface-soft);
}

.upgrade-file-field input[type="file"] {
  min-height: auto;
  padding: 9px;
}

.upgrade-uploaded-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  grid-column: 1 / -1;
  align-items: center;
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid var(--platform-line-soft);
  border-radius: 8px;
  background: var(--platform-surface-soft);
}

.upgrade-uploaded-files a {
  padding: 5px 9px;
  border-radius: 6px;
  background: #fff;
  color: var(--platform-brand-strong);
  font-size: 12px;
}

.upgrade-process-note {
  margin: 22px 26px;
}

.upgrade-form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  padding: 18px 26px;
  border-top: 1px solid var(--platform-line-soft);
  background: #fbfcfd;
}

.upgrade-form-actions .btn {
  min-width: 120px;
}

@media (max-width: 760px) {
  .upgrade-form-header,
  .upgrade-hero,
  .upgrade-form-actions {
    align-items: stretch;
  }

  .upgrade-form-header,
  .upgrade-hero {
    flex-direction: column;
  }

  .upgrade-hero-actions,
  .upgrade-form-actions {
    justify-content: stretch;
  }

  .upgrade-hero-actions .btn,
  .upgrade-form-actions .btn {
    flex: 1 1 auto;
  }

  .upgrade-form-grid {
    grid-template-columns: 1fr;
  }

  .upgrade-field-wide {
    grid-column: auto;
  }

  .upgrade-form-header,
  .upgrade-form-section,
  .upgrade-form-actions {
    padding-right: 16px;
    padding-left: 16px;
  }

  .upgrade-process-note {
    margin-right: 16px;
    margin-left: 16px;
  }
}

/* ================================================================
   Authenticated workspace theme
   Mirrors the public homepage's blue visual language without changing
   public portal, authentication, or homepage pages.
   ================================================================ */
.internal-workspace {
  --platform-bg: #f4f8fd;
  --platform-surface: #ffffff;
  --platform-surface-soft: #f7faff;
  --platform-line: #d8e5f4;
  --platform-line-soft: #eaf1f9;
  --platform-text: #15233a;
  --platform-muted: #64748b;
  --platform-brand: #1268d6;
  --platform-brand-strong: #0754ba;
  --platform-accent: #18a8ff;
  --platform-success: #159468;
  --platform-warning: #e89422;
  --platform-danger: #d94b5b;
  --workspace-shadow: 0 12px 30px rgba(18, 72, 136, 0.08);
  --workspace-shadow-soft: 0 6px 18px rgba(18, 72, 136, 0.06);
  color: var(--platform-text);
  background:
    radial-gradient(circle at 8% 7%, rgba(24, 168, 255, 0.06), transparent 27rem),
    linear-gradient(180deg, #f8fbff 0, #f3f7fc 30rem, #f6f9fd 100%);
}

.internal-workspace .topbar-shell {
  position: sticky;
  top: 0;
  z-index: 900;
  padding: 0;
  border-bottom: 1px solid #d9e7f7;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 3px 14px rgba(7, 61, 124, 0.06);
  backdrop-filter: blur(16px);
}

.internal-workspace .nav-surface {
  width: 100%;
  max-width: none;
  min-height: 74px;
  margin: 0;
  padding: 0 clamp(20px, 3.2vw, 58px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.internal-workspace .nav-container {
  gap: clamp(18px, 2.2vw, 34px);
}

.internal-workspace .brand-lockup {
  gap: 12px;
  min-width: 0;
}

.internal-workspace .brand-lockup::before {
  content: "";
  flex: 0 0 43px;
  width: 43px;
  height: 43px;
  border: 2px solid #1268d6;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 48%, #ffffff 0 25%, transparent 26%),
    conic-gradient(from 15deg, #1268d6 0 12%, #18a8ff 12% 20%, #1268d6 20% 33%, #18a8ff 33% 42%, #1268d6 42% 100%);
  box-shadow: inset 0 0 0 4px #ffffff, 0 4px 12px rgba(18, 104, 214, 0.18);
}

.internal-workspace .brand-title {
  color: #10213a;
  font-size: clamp(16px, 1.3vw, 20px);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.internal-workspace .brand-subtitle {
  color: #6b7f99;
}

.internal-workspace .nav-links {
  gap: 4px;
}

.internal-workspace .nav-link {
  position: relative;
  min-height: 42px;
  padding: 10px 13px;
  border: 0;
  border-radius: 6px;
  color: #43536b;
  background: transparent;
  font-weight: 700;
}

.internal-workspace .nav-link:hover {
  color: var(--platform-brand);
  background: #f1f7ff;
}

.internal-workspace .nav-link-active {
  color: var(--platform-brand) !important;
  background: transparent;
  box-shadow: none;
}

.internal-workspace .nav-link-active:hover,
.internal-workspace .nav-link-active:focus-visible {
  color: var(--platform-brand) !important;
  background: #f1f7ff;
}

.internal-workspace .nav-link-active::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 2px;
  left: 12px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--platform-brand), var(--platform-accent));
}

.internal-workspace .role-pill,
.internal-workspace .notification-link,
.internal-workspace .notification-button {
  border-color: #cfe1f6;
  color: #185cae;
  background: #eef6ff;
}

.internal-workspace .user-name,
.internal-workspace .nav-user-name {
  color: #243650;
}

.internal-workspace .page-shell {
  width: min(100%, 1540px);
  margin: 0 auto;
  padding: 24px clamp(18px, 3vw, 48px) 42px;
}

.internal-workspace .page-header,
.internal-workspace .enterprise-hero,
.internal-workspace .tm-hero,
.internal-workspace .reviewer-section-intro,
.internal-workspace .detail-hero,
.internal-workspace .upgrade-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--platform-line);
  border-radius: 9px;
  background:
    linear-gradient(90deg, rgba(18, 104, 214, 0.055), transparent 42%),
    #ffffff;
  box-shadow: var(--workspace-shadow-soft);
}

.internal-workspace .page-header::before,
.internal-workspace .enterprise-hero::before,
.internal-workspace .tm-hero::before,
.internal-workspace .reviewer-section-intro::before,
.internal-workspace .detail-hero::before,
.internal-workspace .upgrade-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--platform-brand), var(--platform-accent));
}

.internal-workspace .page-title,
.internal-workspace .enterprise-hero h1,
.internal-workspace .tm-hero h1,
.internal-workspace .reviewer-section-intro h1,
.internal-workspace .detail-hero h1 {
  color: #10213a;
}

.internal-workspace .enterprise-metrics,
.internal-workspace .tm-metrics,
.internal-workspace .summary-grid,
.internal-workspace .reviewer-metrics,
.internal-workspace .assessment-stats {
  gap: 16px;
}

.internal-workspace .metric-card,
.internal-workspace .summary-card,
.internal-workspace .assessment-stat,
.internal-workspace .reviewer-metric,
.internal-workspace .stat-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--platform-line);
  border-radius: 9px;
  background: #ffffff;
  box-shadow: var(--workspace-shadow-soft);
}

.internal-workspace .metric-card::before,
.internal-workspace .summary-card::before,
.internal-workspace .assessment-stat::before,
.internal-workspace .reviewer-metric::before,
.internal-workspace .stat-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--platform-brand), var(--platform-accent));
}

.internal-workspace .metric-card strong,
.internal-workspace .summary-card strong,
.internal-workspace .assessment-stat strong,
.internal-workspace .reviewer-metric strong,
.internal-workspace .stat-value {
  color: #0b4fa5;
}

.internal-workspace .role-workspace-layout,
.internal-workspace .manager-layout {
  gap: 20px;
  align-items: start;
}

.internal-workspace .role-sidebar,
.internal-workspace .manager-sidebar {
  top: 94px;
  overflow: hidden;
  border: 1px solid var(--platform-line);
  border-radius: 9px;
  background: #ffffff;
  box-shadow: var(--workspace-shadow-soft);
}

.internal-workspace .role-sidebar-head,
.internal-workspace .manager-sidebar-header {
  margin: 0;
  padding: 20px 18px 16px;
  border-bottom: 1px solid var(--platform-line-soft);
  background: linear-gradient(135deg, #f8fbff, #edf6ff);
}

.internal-workspace .role-sidebar-head h2,
.internal-workspace .manager-sidebar-title {
  color: #123158;
}

.internal-workspace .role-side-nav,
.internal-workspace .manager-sidebar-nav {
  padding: 12px;
}

.internal-workspace .role-side-link,
.internal-workspace .manager-side-link {
  border: 1px solid transparent;
  border-radius: 7px;
  color: #52637a;
  background: transparent;
  font-weight: 700;
}

.internal-workspace .role-side-link:hover,
.internal-workspace .manager-side-link:hover {
  border-color: #d7e8fb;
  color: #0b5fc1;
  background: #f1f7ff;
  transform: translateX(2px);
}

.internal-workspace .role-side-link.active,
.internal-workspace .role-side-link.is-active,
.internal-workspace .manager-side-link.active,
.internal-workspace .manager-side-link.is-active {
  border-color: #1268d6;
  color: #ffffff;
  background: linear-gradient(135deg, #1268d6, #0878df);
  box-shadow: 0 7px 16px rgba(18, 104, 214, 0.2);
}

.internal-workspace .role-side-link .count,
.internal-workspace .role-side-link .badge,
.internal-workspace .manager-side-link .count,
.internal-workspace .manager-side-link .badge {
  color: #0b5fc1;
  background: #e5f2ff;
}

.internal-workspace .role-side-link.active .count,
.internal-workspace .role-side-link.active .badge,
.internal-workspace .role-side-link.is-active .count,
.internal-workspace .role-side-link.is-active .badge,
.internal-workspace .manager-side-link.active .count,
.internal-workspace .manager-side-link.is-active .count {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
}

.internal-workspace .manager-nav-group {
  border-color: var(--platform-line-soft);
}

.internal-workspace .manager-nav-group summary:hover,
.internal-workspace .manager-nav-group[open] summary {
  color: var(--platform-brand);
  background: #f1f7ff;
}

.internal-workspace .enterprise-panel,
.internal-workspace .tm-panel,
.internal-workspace .review-panel,
.internal-workspace .manager-standalone-panel,
.internal-workspace .detail-card,
.internal-workspace .list-container,
.internal-workspace .content-card,
.internal-workspace .workspace-panel,
.internal-workspace .upgrade-form-card,
.internal-workspace .assessment-panel {
  border: 1px solid var(--platform-line);
  border-radius: 9px;
  background: #ffffff;
  box-shadow: var(--workspace-shadow-soft);
}

.internal-workspace .enterprise-panel-header,
.internal-workspace .tm-panel-header,
.internal-workspace .review-panel-header,
.internal-workspace .manager-panel-header,
.internal-workspace .detail-card-header,
.internal-workspace .card-header,
.internal-workspace .upgrade-form-header {
  border-bottom-color: var(--platform-line-soft);
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.internal-workspace .enterprise-panel h2,
.internal-workspace .tm-panel h2,
.internal-workspace .review-panel h2,
.internal-workspace .manager-standalone-panel h2,
.internal-workspace .detail-card h2,
.internal-workspace .content-card h2 {
  color: #15365f;
}

.internal-workspace .profile-grid > div,
.internal-workspace .info-grid > div,
.internal-workspace .meta-grid > div,
.internal-workspace .service-meta-grid > div {
  border-color: #e0eaf6;
  background: #f7faff;
}

.internal-workspace .btn,
.internal-workspace button,
.internal-workspace input[type="submit"],
.internal-workspace input[type="button"] {
  border-radius: 7px;
}

.internal-workspace .btn-primary,
.internal-workspace .btn-brand,
.internal-workspace .btn-rate,
.internal-workspace button[type="submit"]:not(.btn-danger):not(.btn-success):not(.btn-warning),
.internal-workspace input[type="submit"] {
  border-color: #1268d6;
  color: #ffffff;
  background: linear-gradient(135deg, #1268d6, #0878df);
  box-shadow: 0 6px 14px rgba(18, 104, 214, 0.17);
}

.internal-workspace .btn-primary:hover,
.internal-workspace .btn-brand:hover,
.internal-workspace .btn-rate:hover,
.internal-workspace button[type="submit"]:not(.btn-danger):not(.btn-success):not(.btn-warning):hover,
.internal-workspace input[type="submit"]:hover {
  border-color: #0754ba;
  background: linear-gradient(135deg, #0754ba, #1268d6);
  box-shadow: 0 8px 18px rgba(18, 104, 214, 0.23);
  transform: translateY(-1px);
}

.internal-workspace .btn-secondary,
.internal-workspace .btn-outline,
.internal-workspace .btn-light,
.internal-workspace button[type="button"]:not(.btn-primary):not(.btn-danger):not(.btn-success):not(.btn-warning) {
  border-color: #cfdded;
  color: #28425f;
  background: #ffffff;
  box-shadow: none;
}

.internal-workspace .btn-secondary:hover,
.internal-workspace .btn-outline:hover,
.internal-workspace .btn-light:hover,
.internal-workspace button[type="button"]:not(.btn-primary):not(.btn-danger):not(.btn-success):not(.btn-warning):hover {
  border-color: #8cb9ec;
  color: #0b5fc1;
  background: #f0f7ff;
}

.internal-workspace .btn-success,
.internal-workspace .btn-confirm,
.internal-workspace .btn-approve {
  border-color: #159468;
  color: #ffffff;
  background: #159468;
}

.internal-workspace .btn-warning {
  border-color: #e89422;
  color: #ffffff;
  background: #e89422;
}

.internal-workspace .btn-danger,
.internal-workspace .btn-reject {
  border-color: #d94b5b;
  color: #ffffff;
  background: #d94b5b;
}

.internal-workspace input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
.internal-workspace select,
.internal-workspace textarea,
.internal-workspace .form-control {
  border: 1px solid #cfddec;
  border-radius: 7px;
  color: #1d2f48;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(20, 54, 92, 0.025);
}

.internal-workspace input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):hover,
.internal-workspace select:hover,
.internal-workspace textarea:hover,
.internal-workspace .form-control:hover {
  border-color: #9ebfe5;
}

.internal-workspace input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):focus,
.internal-workspace select:focus,
.internal-workspace textarea:focus,
.internal-workspace .form-control:focus {
  border-color: var(--platform-brand);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(18, 104, 214, 0.13);
}

.internal-workspace input[type="checkbox"],
.internal-workspace input[type="radio"] {
  accent-color: var(--platform-brand);
}

.internal-workspace input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 8px 12px;
  border: 0;
  border-right: 1px solid #cfddec;
  color: #0b5fc1;
  background: #edf6ff;
  font-weight: 700;
  cursor: pointer;
}

.internal-workspace label,
.internal-workspace .form-label {
  color: #31455f;
}

.internal-workspace .help-text,
.internal-workspace .form-help,
.internal-workspace .field-hint {
  color: #71839b;
}

.internal-workspace .table-responsive,
.internal-workspace .table-wrapper,
.internal-workspace .data-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--platform-line);
  border-radius: 8px;
  background: #ffffff;
}

.internal-workspace table {
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
}

.internal-workspace thead,
.internal-workspace table thead tr {
  background: #edf5ff;
}

.internal-workspace th {
  border-bottom-color: #d2e2f3;
  color: #24466d;
  background: #edf5ff;
  font-weight: 800;
}

.internal-workspace td {
  border-bottom-color: #e8eff7;
  color: #344760;
}

.internal-workspace tbody tr:hover,
.internal-workspace .data-table tbody tr:hover {
  background: #f5f9ff;
}

.internal-workspace .tabs,
.internal-workspace .tab-nav,
.internal-workspace .filter-tabs {
  border-bottom-color: var(--platform-line);
}

.internal-workspace .tab-link,
.internal-workspace .tab-button,
.internal-workspace .filter-tab {
  color: #60728a;
}

.internal-workspace .tab-link:hover,
.internal-workspace .tab-button:hover,
.internal-workspace .filter-tab:hover {
  color: var(--platform-brand);
  background: #f1f7ff;
}

.internal-workspace .tab-link.active,
.internal-workspace .tab-button.active,
.internal-workspace .filter-tab.active {
  border-color: var(--platform-brand);
  color: var(--platform-brand);
  background: #edf6ff;
}

.internal-workspace .pagination a,
.internal-workspace .pagination button,
.internal-workspace .page-link {
  border-color: #d5e2f1;
  color: #315171;
  background: #ffffff;
}

.internal-workspace .pagination a:hover,
.internal-workspace .pagination button:hover,
.internal-workspace .page-link:hover,
.internal-workspace .page-link.active,
.internal-workspace .pagination .active {
  border-color: var(--platform-brand);
  color: #ffffff;
  background: var(--platform-brand);
}

.internal-workspace .modal-overlay {
  padding: 24px;
  background: rgba(4, 24, 52, 0.54);
  backdrop-filter: blur(5px);
}

.internal-workspace .modal-card,
.internal-workspace .modal-content,
.internal-workspace .dialog-card {
  overflow: hidden;
  border: 1px solid #cdddf0;
  border-radius: 11px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(6, 39, 79, 0.24);
}

.internal-workspace .modal-header,
.internal-workspace .dialog-header {
  border-bottom-color: var(--platform-line);
  background: linear-gradient(135deg, #ffffff, #f1f7ff);
}

.internal-workspace .modal-header h2,
.internal-workspace .modal-header h3,
.internal-workspace .dialog-header h2 {
  color: #123158;
}

.internal-workspace .modal-footer,
.internal-workspace .dialog-footer {
  border-top-color: var(--platform-line);
  background: #f8fbff;
}

.internal-workspace .modal-close,
.internal-workspace .dialog-close {
  border-color: transparent;
  color: #71839a;
  background: transparent;
}

.internal-workspace .modal-close:hover,
.internal-workspace .dialog-close:hover {
  color: #0b5fc1;
  background: #eaf4ff;
}

.internal-workspace .badge-info,
.internal-workspace .status-info,
.internal-workspace .tag-info,
.internal-workspace .count-badge {
  color: #0b5fc1;
  background: #e9f4ff;
}

.internal-workspace .badge-success,
.internal-workspace .status-success,
.internal-workspace .status-approved {
  color: #087a52;
  background: #e8f7f1;
}

.internal-workspace .badge-warning,
.internal-workspace .status-warning,
.internal-workspace .status-pending {
  color: #a86108;
  background: #fff4df;
}

.internal-workspace .badge-danger,
.internal-workspace .status-danger,
.internal-workspace .status-rejected {
  color: #b83444;
  background: #fff0f2;
}

.internal-workspace .empty-state {
  border-color: #d8e7f6;
  color: #6c8098;
  background: #f8fbff;
}

.internal-workspace .footer {
  margin-top: auto;
  border-top: 1px solid rgba(96, 165, 250, 0.2);
  background: #06234a;
}

.internal-workspace .footer a:hover {
  color: #76c5ff;
}

@media (max-width: 1180px) {
  .internal-workspace .nav-surface {
    padding-right: 22px;
    padding-left: 22px;
  }

  .internal-workspace .nav-container {
    flex-wrap: wrap;
    row-gap: 6px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .internal-workspace .nav-links {
    order: 3;
    flex: 1 0 100%;
    justify-content: center;
  }
}

@media (max-width: 980px) {
  .internal-workspace .page-shell {
    padding: 18px 16px 34px;
  }

  .internal-workspace .role-workspace-layout,
  .internal-workspace .manager-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .internal-workspace .role-sidebar,
  .internal-workspace .manager-sidebar {
    position: static;
  }

  .internal-workspace .role-side-nav,
  .internal-workspace .manager-sidebar-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .internal-workspace .manager-nav-group {
    grid-column: 1 / -1;
  }

  .internal-workspace .modal-card,
  .internal-workspace .modal-content,
  .internal-workspace .dialog-card {
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
  }
}

@media (max-width: 720px) {
  .internal-workspace .topbar-shell {
    position: relative;
  }

  .internal-workspace .nav-surface {
    min-height: auto;
    padding: 10px 14px;
  }

  .internal-workspace .nav-container {
    align-items: stretch;
    padding: 0;
  }

  .internal-workspace .brand-lockup::before {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
  }

  .internal-workspace .brand-title {
    font-size: 15px;
    line-height: 1.35;
  }

  .internal-workspace .nav-links {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: thin;
  }

  .internal-workspace .nav-link {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 10px;
  }

  .internal-workspace .page-shell {
    padding: 12px 10px 28px;
  }

  .internal-workspace .enterprise-metrics,
  .internal-workspace .tm-metrics,
  .internal-workspace .summary-grid,
  .internal-workspace .reviewer-metrics,
  .internal-workspace .assessment-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .internal-workspace .role-side-nav,
  .internal-workspace .manager-sidebar-nav {
    grid-template-columns: minmax(0, 1fr);
  }

  .internal-workspace .modal-overlay {
    align-items: flex-end;
    padding: 10px;
  }

  .internal-workspace .modal-card,
  .internal-workspace .modal-content,
  .internal-workspace .dialog-card {
    width: 100%;
    max-width: none;
    max-height: calc(100vh - 20px);
    border-radius: 11px 11px 8px 8px;
  }

  .internal-workspace .modal-footer,
  .internal-workspace .dialog-footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .internal-workspace .modal-footer .btn,
  .internal-workspace .dialog-footer .btn {
    width: 100%;
  }

  .internal-workspace table {
    min-width: 680px;
  }
}

/* ================================================================
   Public portal and authentication theme
   Extends the homepage's visual language to every public list, detail,
   publishing, editing, login, and registration page. The homepage keeps
   its original route-home rules and is intentionally excluded.
   ================================================================ */
.public-portal,
.auth-portal {
  --platform-bg: #f4f8fd;
  --platform-surface: #ffffff;
  --platform-surface-soft: #f7faff;
  --platform-line: #d8e5f4;
  --platform-line-soft: #eaf1f9;
  --platform-text: #15233a;
  --platform-muted: #64748b;
  --platform-brand: #1268d6;
  --platform-brand-strong: #0754ba;
  --platform-accent: #18a8ff;
  --public-shadow: 0 12px 30px rgba(18, 72, 136, 0.08);
  --public-shadow-soft: 0 6px 18px rgba(18, 72, 136, 0.06);
  color: var(--platform-text);
  background:
    radial-gradient(circle at 7% 8%, rgba(24, 168, 255, 0.065), transparent 29rem),
    radial-gradient(circle at 92% 32%, rgba(18, 104, 214, 0.045), transparent 25rem),
    linear-gradient(180deg, #f9fcff 0, #f3f7fc 32rem, #f6f9fd 100%);
}

.public-portal .topbar-shell,
.auth-portal .topbar-shell {
  position: sticky;
  top: 0;
  z-index: 900;
  padding: 0;
  border-bottom: 1px solid #d9e7f7;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 3px 14px rgba(7, 61, 124, 0.06);
  backdrop-filter: blur(16px);
}

.public-portal .nav-surface,
.auth-portal .nav-surface {
  width: 100%;
  max-width: none;
  min-height: 74px;
  margin: 0;
  padding: 0 clamp(20px, 3.2vw, 58px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.public-portal .nav-container,
.auth-portal .nav-container {
  gap: clamp(18px, 2.2vw, 34px);
}

.public-portal .brand-lockup,
.auth-portal .brand-lockup {
  gap: 12px;
  min-width: 0;
}

.public-portal .brand-lockup::before,
.auth-portal .brand-lockup::before {
  content: "";
  flex: 0 0 43px;
  width: 43px;
  height: 43px;
  border: 2px solid #1268d6;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 48%, #ffffff 0 25%, transparent 26%),
    conic-gradient(from 15deg, #1268d6 0 12%, #18a8ff 12% 20%, #1268d6 20% 33%, #18a8ff 33% 42%, #1268d6 42% 100%);
  box-shadow: inset 0 0 0 4px #ffffff, 0 4px 12px rgba(18, 104, 214, 0.18);
}

.public-portal .brand-title,
.auth-portal .brand-title {
  color: #10213a;
  font-size: clamp(16px, 1.3vw, 20px);
  font-weight: 800;
  letter-spacing: 0.01em;
}

.public-portal .nav-links,
.auth-portal .nav-links {
  gap: 4px;
}

.public-portal .nav-link,
.auth-portal .nav-link {
  position: relative;
  min-height: 42px;
  padding: 10px 13px;
  border: 0;
  border-radius: 6px;
  color: #43536b;
  background: transparent;
  font-weight: 700;
}

.public-portal .nav-link:hover,
.auth-portal .nav-link:hover {
  color: var(--platform-brand);
  background: #f1f7ff;
}

.public-portal .nav-link-active,
.auth-portal .nav-link-active {
  color: var(--platform-brand) !important;
  background: transparent;
  box-shadow: none;
}

.public-portal .nav-link-active:hover,
.public-portal .nav-link-active:focus-visible,
.auth-portal .nav-link-active:hover,
.auth-portal .nav-link-active:focus-visible {
  color: var(--platform-brand) !important;
  background: #f1f7ff;
}

.public-portal .nav-link-active::after,
.auth-portal .nav-link-active::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 2px;
  left: 12px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--platform-brand), var(--platform-accent));
}

.public-portal .nav-link-primary,
.auth-portal .nav-link-primary {
  border: 1px solid var(--platform-brand);
  color: #ffffff;
  background: linear-gradient(135deg, #1268d6, #0878df);
  box-shadow: 0 5px 13px rgba(18, 104, 214, 0.18);
}

.public-portal .nav-link-primary:hover,
.auth-portal .nav-link-primary:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #0754ba, #1268d6);
}

.public-portal .role-pill,
.public-portal .notification-link,
.public-portal .notification-button {
  border-color: #cfe1f6;
  color: #185cae;
  background: #eef6ff;
}

.public-portal .page-shell {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 28px clamp(18px, 3.5vw, 52px) 48px;
}

.auth-portal .page-shell {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 42px 20px 56px;
}

.public-portal .page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #1268d6;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.public-portal .page-kicker::before {
  content: "";
  width: 18px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, #1268d6, #18a8ff);
}

.public-portal .portal-page-head {
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  padding: 24px 26px;
  border: 1px solid var(--platform-line);
  border-radius: 9px;
  background:
    radial-gradient(circle at 94% 20%, rgba(24, 168, 255, 0.11), transparent 14rem),
    linear-gradient(100deg, rgba(18, 104, 214, 0.06), transparent 42%),
    #ffffff;
  box-shadow: var(--public-shadow-soft);
}

.public-portal .portal-page-head::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #1268d6, #18a8ff);
}

.public-portal .portal-page-head h1,
.public-portal .portal-detail h1 {
  color: #10213a;
  font-size: clamp(25px, 2.5vw, 34px);
  line-height: 1.25;
}

.public-portal .portal-page-head p {
  max-width: 780px;
  margin-top: 8px;
  color: #687b94;
}

.public-portal .portal-search,
.public-portal .resource-search-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid var(--platform-line);
  border-radius: 9px;
  background: #ffffff;
  box-shadow: var(--public-shadow-soft);
}

.public-portal input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
.public-portal select,
.public-portal textarea,
.public-portal .form-control,
.auth-portal input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
.auth-portal select,
.auth-portal textarea,
.auth-portal .form-control {
  border: 1px solid #cfddec !important;
  border-radius: 7px !important;
  color: #1d2f48;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(20, 54, 92, 0.025);
}

.public-portal input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):hover,
.public-portal select:hover,
.public-portal textarea:hover,
.public-portal .form-control:hover,
.auth-portal input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):hover,
.auth-portal select:hover,
.auth-portal textarea:hover,
.auth-portal .form-control:hover {
  border-color: #9ebfe5 !important;
}

.public-portal input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):focus,
.public-portal select:focus,
.public-portal textarea:focus,
.public-portal .form-control:focus,
.auth-portal input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):focus,
.auth-portal select:focus,
.auth-portal textarea:focus,
.auth-portal .form-control:focus {
  border-color: #1268d6 !important;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(18, 104, 214, 0.13) !important;
}

.public-portal input[type="checkbox"],
.public-portal input[type="radio"],
.auth-portal input[type="checkbox"],
.auth-portal input[type="radio"] {
  accent-color: #1268d6;
}

.public-portal input[type="file"]::file-selector-button,
.auth-portal input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 8px 12px;
  border: 0;
  border-right: 1px solid #cfddec;
  color: #0b5fc1;
  background: #edf6ff;
  font-weight: 700;
  cursor: pointer;
}

.public-portal .btn,
.auth-portal .btn {
  border-radius: 7px;
}

.public-portal .btn-primary,
.auth-portal .btn-primary {
  border-color: #1268d6;
  color: #ffffff;
  background: linear-gradient(135deg, #1268d6, #0878df);
  box-shadow: 0 6px 14px rgba(18, 104, 214, 0.17);
}

.public-portal .btn-primary:hover,
.auth-portal .btn-primary:hover {
  border-color: #0754ba;
  color: #ffffff;
  background: linear-gradient(135deg, #0754ba, #1268d6);
  box-shadow: 0 8px 18px rgba(18, 104, 214, 0.23);
  transform: translateY(-1px);
}

.public-portal .btn-outline,
.auth-portal .btn-outline {
  border-color: #cbdced;
  color: #284968;
  background: #ffffff;
}

.public-portal .btn-outline:hover,
.auth-portal .btn-outline:hover {
  border-color: #8cb9ec;
  color: #0b5fc1;
  background: #eff7ff;
}

.public-portal .portal-list-page {
  gap: 14px;
}

.public-portal .portal-row-card {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--platform-line);
  border-radius: 9px;
  background: #ffffff;
  box-shadow: var(--public-shadow-soft);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.public-portal .portal-row-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, #1268d6, #18a8ff);
  opacity: 0;
  transition: opacity 180ms ease;
}

.public-portal .portal-row-card:hover {
  border-color: #a9cbed;
  box-shadow: 0 14px 30px rgba(18, 72, 136, 0.11);
  transform: translateY(-2px);
}

.public-portal .portal-row-card:hover::before {
  opacity: 1;
}

.public-portal .portal-row-card h2 {
  color: #17385f;
  font-size: 19px;
}

.public-portal .portal-row-card p {
  color: #64778f;
}

.public-portal .portal-meta span,
.public-portal .portal-readonly-badge {
  border: 1px solid #dbe9f8;
  color: #45617f;
  background: #f1f7ff;
}

.public-portal .portal-empty {
  border-color: #cbdff3;
  color: #71849b;
  background: #f8fbff;
}

.public-portal .portal-empty.big {
  padding: 48px 28px;
  border-style: dashed;
  background: #ffffff;
  box-shadow: var(--public-shadow-soft);
}

.public-portal .portal-detail {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 3vw, 36px);
  border: 1px solid var(--platform-line);
  border-radius: 9px;
  background: #ffffff;
  box-shadow: var(--public-shadow);
}

.public-portal .portal-detail::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #1268d6, #18a8ff);
}

.public-portal .portal-detail-head {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--platform-line-soft);
}

.public-portal .portal-detail-summary {
  margin: 20px 0;
  padding: 16px 18px;
  border-left-color: #1268d6;
  background: #f0f7ff;
}

.public-portal .portal-detail-section {
  padding-top: 20px;
  border-top: 1px solid var(--platform-line-soft);
}

.public-portal .portal-detail-section:first-of-type {
  border-top: 0;
}

.public-portal .portal-detail-section h2 {
  color: #17385f;
}

.public-portal .portal-detail-grid div {
  border-color: #dce9f6;
  background: #f7faff;
}

.public-portal .portal-detail-grid strong {
  color: #5d7290;
}

.public-portal .portal-detail-grid span {
  color: #17385f;
}

.public-portal .portal-hint {
  border-color: #f2d18e;
  color: #8b5a14;
  background: #fff8e9;
}

.public-portal .news-article-cover,
.public-portal .article-cover-admin-preview {
  border: 1px solid #d8e5f4;
  border-radius: 9px;
  background: #f4f8fd;
  box-shadow: var(--public-shadow-soft);
}

.public-portal .news-rich-content {
  color: #273a53;
  line-height: 1.9;
}

.public-portal .news-rich-content h2,
.public-portal .news-rich-content h3 {
  color: #153a68;
}

.public-portal .portal-form-card {
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--platform-line);
  border-radius: 9px;
  background: #ffffff;
  box-shadow: var(--public-shadow);
}

.public-portal .article-editor-layout {
  gap: 24px;
}

.public-portal .article-editor-sidebar {
  top: 94px;
  border-color: #d8e6f5;
  border-radius: 9px;
  background: #f4f8fd;
}

.public-portal .article-editor-tip {
  border-color: #d7e7f7;
  background: #edf6ff;
}

.public-portal .news-editor-shell {
  border-color: #cfddec;
  border-radius: 9px;
}

.public-portal .news-editor-shell:focus-within,
.public-portal .news-editor-shell.is-dragging {
  border-color: #1268d6;
  box-shadow: 0 0 0 3px rgba(18, 104, 214, 0.13);
}

.public-portal .news-editor-shell.is-dragging {
  background: #f3f8ff;
}

.public-portal .news-editor-toolbar,
.public-portal .news-image-tools {
  border-color: #dae7f5;
  background: #f7faff;
}

.public-portal .news-image-tool-group {
  border-color: #d2e2f3;
  background: #ffffff;
}

.public-portal .news-image-tool-group button:hover,
.public-portal .news-image-tool-group button.is-active {
  color: #0b5fc1;
  background: #eaf4ff;
}

.public-portal .modal-overlay {
  padding: 24px;
  background: rgba(4, 24, 52, 0.54);
  backdrop-filter: blur(5px);
}

.public-portal .modal-card {
  overflow: hidden;
  border: 1px solid #cdddf0;
  border-radius: 11px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(6, 39, 79, 0.24);
}

.public-portal .modal-header {
  border-bottom-color: var(--platform-line);
  background: linear-gradient(135deg, #ffffff, #f1f7ff);
}

.public-portal .modal-footer {
  border-top-color: var(--platform-line);
  background: #f8fbff;
}

.auth-portal .auth-container {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: calc(100vh - 310px);
  padding: 16px 0;
}

.auth-portal .auth-card {
  position: relative;
  overflow: hidden;
  width: min(100%, 480px);
  max-width: 480px;
  padding: 34px 36px;
  border: 1px solid #d5e4f5;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 52px rgba(11, 62, 122, 0.13);
}

.auth-portal .auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #1268d6, #18a8ff);
}

.auth-portal .auth-card h2 {
  margin-bottom: 7px;
  color: #10213a;
  font-size: 26px;
  text-align: center;
}

.auth-portal .auth-subtitle {
  color: #71829a;
  text-align: center;
}

.auth-portal .auth-form {
  gap: 18px;
}

.auth-portal .form-group label {
  color: #30465f;
  font-weight: 800;
}

.auth-portal .form-control,
.auth-portal .auth-form input,
.auth-portal .auth-form select,
.auth-portal .auth-form textarea {
  min-height: 46px;
}

.auth-portal .btn-block {
  min-height: 46px;
  font-size: 16px;
  font-weight: 800;
}

.auth-portal .auth-footer {
  padding-top: 18px;
  border-top: 1px solid #edf2f8;
  color: #71829a;
  text-align: center;
}

.auth-portal .auth-footer a {
  color: #1268d6;
  font-weight: 800;
}

.auth-portal .login-import-hint {
  border-color: #c9dff6;
  border-left-color: #1268d6;
  color: #4e6683;
  background: #f1f7ff;
}

.auth-portal .register-auth-container {
  padding-top: 6px;
  padding-bottom: 6px;
}

.auth-portal .register-card {
  width: min(100%, 980px);
  max-width: 980px !important;
  padding: clamp(24px, 3.5vw, 42px);
}

.auth-portal .register-section {
  padding: 20px;
  border-color: #dce8f5;
  border-radius: 9px;
  background: #f8fbff;
}

.auth-portal .register-section-title {
  color: #173b68;
}

.auth-portal .register-section-desc,
.auth-portal .register-note,
.auth-portal .field-help {
  color: #687c95;
}

.auth-portal .register-note {
  border-left-color: #1268d6;
  background: #edf6ff;
}

.public-portal .footer,
.auth-portal .footer {
  margin-top: auto;
  border-top: 1px solid rgba(96, 165, 250, 0.2);
  background: #06234a;
}

.public-portal .footer a:hover,
.auth-portal .footer a:hover {
  color: #76c5ff;
}

@media (max-width: 1180px) {
  .public-portal .nav-surface,
  .auth-portal .nav-surface {
    padding-right: 22px;
    padding-left: 22px;
  }

  .public-portal .nav-container,
  .auth-portal .nav-container {
    flex-wrap: wrap;
    row-gap: 6px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .public-portal .nav-links,
  .auth-portal .nav-links {
    order: 3;
    flex: 1 0 100%;
    justify-content: center;
  }
}

@media (max-width: 900px) {
  .public-portal .page-shell {
    padding: 20px 16px 38px;
  }

  .public-portal .portal-page-head {
    align-items: stretch;
  }

  .public-portal .article-editor-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .public-portal .article-editor-sidebar {
    position: static;
  }

  .public-portal .modal-card {
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
  }
}

@media (max-width: 720px) {
  .public-portal .topbar-shell,
  .auth-portal .topbar-shell {
    position: relative;
  }

  .public-portal .nav-surface,
  .auth-portal .nav-surface {
    min-height: auto;
    padding: 10px 14px;
  }

  .public-portal .nav-container,
  .auth-portal .nav-container {
    align-items: stretch;
    padding: 0;
  }

  .public-portal .brand-lockup::before,
  .auth-portal .brand-lockup::before {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
  }

  .public-portal .brand-title,
  .auth-portal .brand-title {
    font-size: 15px;
    line-height: 1.35;
  }

  .public-portal .nav-links,
  .auth-portal .nav-links {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: thin;
  }

  .public-portal .nav-link,
  .auth-portal .nav-link {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 10px;
  }

  .public-portal .page-shell {
    padding: 12px 10px 30px;
  }

  .auth-portal .page-shell {
    padding: 20px 10px 32px;
  }

  .public-portal .portal-page-head {
    display: grid;
    gap: 14px;
    padding: 20px 18px;
  }

  .public-portal .portal-page-head .btn,
  .public-portal .portal-admin-actions .btn {
    width: 100%;
  }

  .public-portal .portal-search > input,
  .public-portal .portal-search > select,
  .public-portal .portal-search > .btn {
    flex: 1 1 100%;
    width: 100%;
  }

  .public-portal .portal-row-card {
    grid-template-columns: minmax(0, 1fr);
    padding: 18px 16px;
  }

  .public-portal .portal-row-card > .btn,
  .public-portal .portal-row-card > .portal-readonly-badge {
    justify-self: stretch;
    width: 100%;
    text-align: center;
  }

  .public-portal .portal-detail {
    padding: 22px 16px;
  }

  .public-portal .portal-detail-head {
    display: grid;
  }

  .public-portal .portal-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .public-portal .portal-form-card {
    padding: 20px 14px;
  }

  .public-portal .modal-overlay {
    align-items: flex-end;
    padding: 10px;
  }

  .public-portal .modal-card {
    width: 100%;
    max-width: none;
    max-height: calc(100vh - 20px);
    border-radius: 11px 11px 8px 8px;
  }

  .auth-portal .auth-card {
    width: 100%;
    padding: 28px 20px;
  }

  .auth-portal .register-card {
    max-width: 100% !important;
    padding: 24px 16px;
  }

  .auth-portal .register-section {
    padding: 16px 14px;
  }
}

/* Final blue-theme coverage for specialized workspace components. */
.internal-workspace .manager-nav-group-summary:hover,
.internal-workspace .manager-nav-group[open] .manager-nav-group-summary {
  color: #0b5fc1;
  background: #f1f7ff;
}

.internal-workspace .manager-nav-group[open] {
  border-color: #cfe1f6;
}

.internal-workspace .manager-nav-icon {
  color: #0b5fc1;
  background: #e7f2ff;
}

.internal-workspace .assessment-help-text,
.internal-workspace .round-summary,
.internal-workspace .manager-privacy-note,
.internal-workspace .cooperation-followup-status {
  border-color: #d1e3f6;
  background: #f2f7ff;
}

.internal-workspace .assessment-mini-types span {
  color: #0b5fc1;
  background: #eaf4ff;
}

.internal-workspace .assessment-source-jump,
.internal-workspace .assessment-source-disclosure > summary {
  color: #0b5fc1;
}

.internal-workspace .assessment-source-row > td {
  background: #f7faff;
}

.internal-workspace .assessment-source-disclosure > summary {
  border-color: #cbdff3;
  background: #ffffff;
}

.internal-workspace .review-queue-section-heading.reviewed {
  border-left-color: #159468;
  background: #f5f9ff;
}

.internal-workspace .consultation-message-reply {
  border-color: #bcd9f5;
  background: #eff7ff;
}

.internal-workspace .patent-recommend-filter {
  border-color: #d5e5f5;
  background: linear-gradient(135deg, #f8fbff 0%, #edf6ff 100%);
}

.internal-workspace .rating-modal-card {
  border-color: #cbdff3;
  box-shadow: 0 28px 70px rgba(6, 39, 79, 0.24);
}

.internal-workspace .rating-modal-card .modal-header {
  border-bottom-color: #d9e7f6;
  background: linear-gradient(135deg, #edf6ff 0%, #ffffff 72%);
}

.internal-workspace .rating-modal-kicker {
  color: #0b5fc1;
}

.internal-workspace .rating-modal-intro {
  border-left-color: #18a8ff;
  background: #f0f7ff;
}

.internal-workspace .reviewer-message-item.unread {
  border-left-color: #1268d6;
  background: #f0f7ff;
}

.internal-workspace .upgrade-section-heading > span {
  color: #0b5fc1;
  background: #e7f2ff;
}

.internal-workspace .honor-file-icon,
.internal-workspace .honor-word-preview {
  color: #0b5fc1;
  background: #eaf4ff;
}

.internal-workspace .honor-upload-form {
  border-color: #d5e4f3;
  background: #f7faff;
}

.public-portal .enterprise-honor-tag {
  border-color: #c7ddf5;
  color: #0b5fc1;
  background: #eaf4ff;
}

.public-portal .enterprise-honor-tag:hover {
  border-color: #9fc5ed;
  background: #dceeff;
}

.public-portal .muted-honor-tag {
  border-color: #dce5ef;
  color: #64748b;
  background: #f3f6fa;
}

.public-portal .honor-file-icon,
.public-portal .honor-word-preview {
  color: #0b5fc1;
  background: #eaf4ff;
}

.public-portal .honor-upload-form {
  border-color: #d5e4f3;
  background: #f7faff;
}

.internal-workspace .upload-template-action {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 9px 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e1ebf6;
}

.internal-workspace .upload-template-action .btn {
  color: #0b5fc1;
  border-color: #9fc5ed;
  background: #edf6ff;
}

.internal-workspace .upload-template-action .btn:hover {
  color: #ffffff;
  border-color: #1268d6;
  background: #1268d6;
}

.internal-workspace .upload-template-action span {
  color: #6b7e96;
  font-size: 12px;
}

@media (max-width: 640px) {
  .internal-workspace .upload-template-action {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .internal-workspace .upload-template-action .btn {
    width: 100%;
  }
}

details.review-item-reason > summary {
    cursor: pointer;
    overflow-wrap: anywhere;
}

.service-archive-actions {
    margin-top: 0.75rem;
}

.service-archive-list {
    list-style: none;
    margin: 0.35rem 0;
    padding: 0;
}

.service-archive-list > li,
.service-archive-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
}

.service-archive-list > li {
    padding: 0.25rem 0;
}

.service-archive-list a {
    color: #1761a7;
    text-decoration: underline;
    overflow-wrap: anywhere;
}

.service-archive-actions input {
    max-width: 100%;
}
