/*
 * Ocean management UI foundation
 * Loaded after the migrated Ocean styles so every management page shares one
 * predictable visual system without changing business markup or behavior.
 */

:root {
  --core-canvas: #f5f7fb;
  --core-surface: #ffffff;
  --core-surface-subtle: #f8faff;
  --core-ink: #101828;
  --core-muted: #667085;
  --core-line: #e4e9f2;
  --core-line-strong: #cfd7e6;
  --core-blue: #1f3cff;
  --core-blue-hover: #1831d8;
  --core-blue-soft: #edf1ff;
  --core-radius-sm: 8px;
  --core-radius: 12px;
  --core-shadow-card: 0 1px 2px rgba(16, 24, 40, 0.03), 0 8px 24px rgba(31, 60, 255, 0.035);
  --core-shadow-float: 0 18px 48px rgba(16, 24, 40, 0.16);
}

html {
  min-width: 320px;
  background: var(--core-canvas);
}

body {
  height: auto;
  min-height: 100vh;
  overflow: auto;
  background: var(--core-canvas);
  color: var(--core-ink);
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 50%;
  z-index: 100;
  padding: 9px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--core-blue);
  box-shadow: var(--core-shadow-float);
  transform: translate(-50%, -160%);
  transition: transform 140ms ease;
}

.skip-link:focus {
  transform: translate(-50%, 0);
}

button,
input,
select,
textarea {
  font-family: inherit;
}

.app-shell {
  grid-template-columns: 260px minmax(0, 1fr);
  background: var(--core-canvas);
}

.sidebar {
  border-color: var(--core-line);
  box-shadow: 8px 0 28px rgba(16, 24, 40, 0.025);
}

.sidebar-brand {
  min-height: 76px;
  padding: 15px 18px;
  border-color: var(--core-line);
}

.sidebar-brand strong {
  color: var(--core-ink);
  letter-spacing: -0.01em;
}

.sidebar-nav {
  padding: 14px 10px 20px;
  scrollbar-color: #cbd3e1 transparent;
  scrollbar-width: thin;
}

.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #cbd3e1;
}

.nav-group-label {
  margin: 24px 13px 8px;
  color: #8a97a8;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.nav-button {
  min-height: 42px;
  margin-bottom: 3px;
  padding: 0 12px;
  border-radius: 9px;
  color: #475467;
  transition: color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.nav-button:hover {
  background: #f4f6fa;
  transform: translateX(1px);
}

.nav-button.active {
  color: var(--core-blue);
  background: var(--core-blue-soft);
  box-shadow: inset 3px 0 0 var(--core-blue);
}

.sidebar-user {
  min-height: 78px;
  padding: 13px 14px;
  border-color: var(--core-line);
  background: rgba(255, 255, 255, 0.96);
}

.workspace {
  min-width: 0;
  min-height: 100vh;
}

.topbar {
  min-height: 76px;
  padding: 12px clamp(20px, 2.2vw, 34px);
  border-color: var(--core-line);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 0 rgba(16, 24, 40, 0.015);
}

.breadcrumb {
  letter-spacing: 0.055em;
}

.topbar-leading h1 {
  margin-top: 4px;
  color: var(--core-ink);
  font-size: 21px;
  font-weight: 720;
  letter-spacing: -0.018em;
}

.environment-badge {
  padding: 6px 10px;
  border-color: #b8c5ff;
  color: #2442d8;
  background: #f1f4ff;
}

.content {
  width: 100%;
  max-width: 1800px;
  padding: clamp(18px, 1.55vw, 26px);
}

.core-ops-page {
  min-width: 0;
  color: var(--core-ink);
}

.core-page-title-duplicate,
.core-page-heading-only {
  display: none !important;
}

.product-summary-heading:has(> .core-page-title-duplicate) p {
  margin-top: 0;
}

.core-ops-page > .page > .page-header:has(.core-page-title-duplicate):not(.core-page-heading-only),
.core-ops-page > .page-header:has(.core-page-title-duplicate):not(.core-page-heading-only) {
  min-height: 40px;
  justify-content: flex-end;
  margin-bottom: 16px;
}

.core-ops-page .card,
.core-ops-page .product-summary-panel,
.core-ops-page .product-summary-stats > div,
.core-ops-page .stat-card {
  border-color: var(--core-line);
  border-radius: var(--core-radius);
  box-shadow: var(--core-shadow-card);
}

.core-ops-page .card {
  overflow: clip;
}

.core-ops-page .card-header {
  min-height: 54px;
  padding: 13px 18px;
  border-color: var(--core-line);
  background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%);
}

.core-ops-page .card-header h3 {
  color: var(--core-ink);
  font-size: 16px;
  font-weight: 700;
}

.core-ops-page .card-body {
  padding: 18px;
}

.core-ops-page .page-header {
  margin-bottom: 18px;
}

.core-ops-page .page-header h1,
.core-ops-page .page-header h2 {
  color: var(--core-ink);
  font-size: 24px;
  font-weight: 720;
  letter-spacing: -0.02em;
}

.core-ops-page .btn,
.core-ops-page button.btn {
  border-radius: var(--core-radius-sm);
  font-weight: 650;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.core-ops-page .btn-primary {
  background: var(--core-blue);
  box-shadow: 0 4px 12px rgba(31, 60, 255, 0.14);
}

.core-ops-page .btn-primary:hover {
  background: var(--core-blue-hover);
  box-shadow: 0 6px 16px rgba(31, 60, 255, 0.2);
}

.core-ops-page .btn-outline {
  border-color: var(--core-line-strong);
  color: #475467;
  background: #fff;
}

.core-ops-page .btn-outline:hover {
  border-color: #aebcff;
  color: var(--core-blue);
  background: #f7f8ff;
}

.core-ops-page :is(button, a, input, select, textarea):focus-visible {
  outline: 3px solid rgba(31, 60, 255, 0.18);
  outline-offset: 2px;
}

.core-ops-page input:not([type="checkbox"]):not([type="radio"]),
.core-ops-page select,
.core-ops-page textarea {
  border-color: var(--core-line-strong);
  border-radius: var(--core-radius-sm);
  color: var(--core-ink);
  background-color: #fff;
}

.core-ops-page input:not([type="checkbox"]):not([type="radio"]):focus,
.core-ops-page select:focus,
.core-ops-page textarea:focus {
  border-color: var(--core-blue);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(31, 60, 255, 0.1);
}

.core-ops-page .tabs {
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--core-line);
  border-radius: 10px;
  background: #f5f7fb;
}

.core-ops-page .tab-btn {
  border-radius: 7px;
}

.core-ops-page .tab-btn.active {
  background: #fff;
  box-shadow: 0 1px 4px rgba(16, 24, 40, 0.08);
}

.core-ops-page .tag,
.core-ops-page .badge {
  border-radius: 999px;
}

.core-ops-page .table-wrapper,
.core-ops-page .product-summary-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: #cbd3e1 #f6f8fb;
  scrollbar-width: thin;
}

.core-ops-page .table-wrapper::-webkit-scrollbar,
.core-ops-page .product-summary-table-wrap::-webkit-scrollbar {
  height: 8px;
}

.core-ops-page .table-wrapper::-webkit-scrollbar-track,
.core-ops-page .product-summary-table-wrap::-webkit-scrollbar-track {
  background: #f6f8fb;
}

.core-ops-page .table-wrapper::-webkit-scrollbar-thumb,
.core-ops-page .product-summary-table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid #f6f8fb;
  border-radius: 999px;
  background: #bcc6d6;
}

.core-ops-page .table-wrapper > table,
.core-ops-page table.data-table {
  table-layout: auto;
}

.core-ops-page th {
  height: 44px;
  color: #69778c;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.core-ops-page td {
  color: #344054;
  font-size: 13px;
  line-height: 1.48;
}

.core-ops-page tbody tr {
  transition: background-color 120ms ease;
}

.core-ops-page tbody tr:hover td {
  background: #f8faff;
}

.core-ops-page .table-wrapper td,
.core-ops-page table.data-table td {
  min-height: 58px;
  padding-top: 12px;
  padding-bottom: 12px;
  vertical-align: middle;
}

/* Keep high-value identifiers on one line. Long tables remain horizontally
 * scrollable instead of becoming tall, uneven rows. */
#content[data-module="student-users"] :is(th, td):nth-child(2) {
  min-width: 96px;
  white-space: nowrap;
}

#content[data-module="student-users"] :is(th, td):nth-child(3) {
  min-width: 210px;
  white-space: nowrap;
}

#content[data-module="student-users"] :is(th, td):nth-child(5) {
  min-width: 210px;
}

#content[data-module="student-users"] :is(th, td):nth-child(4),
#content[data-module="student-users"] td:nth-child(4) .tag {
  white-space: nowrap;
}

#content[data-module="student-users"] :is(th, td):nth-child(6),
#content[data-module="student-users"] :is(th, td):nth-child(8) {
  min-width: 128px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

#content[data-module="student-users"] td:nth-child(3) {
  overflow: hidden;
  text-overflow: ellipsis;
}

.core-ops-page .table-empty,
.core-ops-page .empty-state,
.core-ops-page .business-empty {
  color: var(--core-muted);
  background: linear-gradient(180deg, #fff 0%, #fafbfe 100%);
}

.core-list-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.core-user-toolbar {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--core-line);
  background: #fbfcff;
}

.core-user-search,
.core-user-filters {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.core-user-search {
  flex: 1 1 430px;
  max-width: 620px;
}

.core-user-search input {
  width: auto;
  flex: 1 1 240px;
  min-width: 220px;
  height: 38px;
  padding: 0 12px;
}

.core-user-search .btn {
  min-width: 64px;
  flex: 0 0 auto;
  white-space: nowrap;
}

.core-user-filters {
  flex: 0 1 auto;
  justify-content: flex-end;
}

.core-user-filters select {
  min-width: 132px;
  height: 38px;
}

.core-toolbar-label,
.core-toolbar-count {
  color: var(--core-muted);
  font-size: 12px;
  white-space: nowrap;
}

.core-toolbar-count {
  min-width: 54px;
  text-align: right;
}

.core-list-search {
  flex: 1 1 320px;
  max-width: 520px;
}

.core-list-search input {
  width: 100%;
  min-height: 36px;
}

.core-list-toolbar select {
  min-width: 130px;
  min-height: 36px;
}

.core-list-count {
  margin-left: auto;
  color: var(--core-muted);
  font-size: 12px;
  white-space: nowrap;
}

.core-list-pagination span {
  min-width: 104px;
  color: var(--core-muted);
  font-size: 13px;
  text-align: center;
}

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

/* Data-heavy pages: keep columns readable and scroll the table instead of
 * squeezing identifiers, emails and actions into overlapping cells. */
#content[data-module="student-users"] .table-wrapper > table {
  min-width: 1280px;
}

#content[data-module="provider-full-process"] .table-wrapper > table,
#content[data-module="provider-teachers"] .table-wrapper > table,
#content[data-module="provider-company"] .table-wrapper > table {
  min-width: 1120px;
}

#content[data-module="operators"] .card,
#content[data-module="space-mgmt"] .card,
#content[data-module="salary-rates"] .card,
#content[data-module="provider-permissions"] .card,
#content[data-module="operator-permissions"] .card {
  overflow-x: auto;
}

#content[data-module="course-ops"] .card {
  overflow: hidden;
}

#content[data-module="course-ops"] .card-body {
  overflow-x: auto;
}

#content[data-module="operators"] table {
  min-width: 920px;
}

#content[data-module="order-summary"] .table-wrapper > table,
#content[data-module="course-ops"] table {
  min-width: 1280px;
}

#content[data-module="guidance-ops"] .table-wrapper > table,
#content[data-module="space-mgmt"] table,
#content[data-module="salary-rates"] table {
  min-width: 980px;
}

#content[data-module="schools"] .table-wrapper > table,
#content[data-module="logs"] .table-wrapper > table {
  min-width: 1040px;
}

#content[data-module="provider-permissions"] table,
#content[data-module="operator-permissions"] table {
  min-width: 1080px;
}

#content[data-module="student-users"] td:nth-child(3),
#content[data-module="provider-full-process"] td:nth-child(3),
#content[data-module="provider-teachers"] td:nth-child(3),
#content[data-module="provider-company"] td:nth-child(3) {
  min-width: 190px;
  word-break: break-word;
}

#content[data-module="order-summary"] td:first-child,
#content[data-module="course-ops"] td:first-child {
  min-width: 138px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#content[data-module="order-summary"] td:last-child,
#content[data-module="student-users"] td:last-child {
  white-space: nowrap;
}

#content[data-module="student-users"] th:first-child,
#content[data-module="student-users"] td:first-child {
  min-width: 58px;
  white-space: nowrap;
}

#content[data-module="student-users"] th:nth-child(4),
#content[data-module="student-users"] td:nth-child(4) {
  min-width: 74px;
}

#content[data-module="student-users"] th:last-child,
#content[data-module="student-users"] td:last-child,
#content[data-module="order-summary"] th:last-child,
#content[data-module="order-summary"] td:last-child,
#content[data-module="course-ops"] th:last-child,
#content[data-module="course-ops"] td:last-child {
  position: sticky;
  right: 0;
  z-index: 1;
  background: #fff;
  box-shadow: -10px 0 16px -16px rgba(16, 24, 40, 0.7);
}

#content[data-module="student-users"] th:last-child,
#content[data-module="student-users"] td:last-child {
  min-width: 240px;
}

#content[data-module="order-summary"] th:last-child,
#content[data-module="order-summary"] td:last-child {
  min-width: 112px;
}

#content[data-module="course-ops"] th:last-child,
#content[data-module="course-ops"] td:last-child {
  min-width: 210px;
}

#content[data-module="student-users"] th:last-child,
#content[data-module="order-summary"] th:last-child,
#content[data-module="course-ops"] th:last-child {
  z-index: 2;
  background: #f8fafc;
}

#content[data-module="student-users"] tbody tr:hover td:last-child,
#content[data-module="order-summary"] tbody tr:hover td:last-child,
#content[data-module="course-ops"] tbody tr:hover td:last-child {
  background: #f8faff;
}

/* The two course-operation pages share the same dense table behavior. */
#content[data-module="class-course-ops"] .card { overflow: hidden; }
#content[data-module="class-course-ops"] .card-body { overflow-x: auto; }
#content[data-module="class-course-ops"] table { min-width: 1280px; }
#content[data-module="class-course-ops"] td:first-child { min-width: 138px; white-space: nowrap; }
#content[data-module="class-course-ops"] th:last-child,
#content[data-module="class-course-ops"] td:last-child {
  position: sticky;
  right: 0;
  z-index: 1;
  min-width: 210px;
  background: #fff;
  box-shadow: -10px 0 16px -16px rgba(16, 24, 40, 0.7);
}
#content[data-module="class-course-ops"] th:last-child { z-index: 2; background: #f8fafc; }
#content[data-module="class-course-ops"] tbody tr:hover td:last-child { background: #f8faff; }
#content[data-module="course-ops"] .guidance-ops-table { min-width: 980px; }

@media (max-width: 760px) {
  #content[data-module="class-course-ops"] th:last-child,
  #content[data-module="class-course-ops"] td:last-child { position: static; box-shadow: none; }
}

/* Course and guidance orders share one operational list and detail language. */
.course-primary-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid #dfe7f3;
  border-radius: 12px;
  background: #fff;
}

.course-primary-filters .btn {
  white-space: nowrap;
}

#content[data-module="course-reservations"] .core-ops-page,
#content[data-module="guidance-reservations"] .core-ops-page,
#content[data-module="service-reservations"] .core-ops-page {
  display: block;
}

.order-page-heading .btn {
  flex: 0 0 auto;
}

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

.order-metrics article {
  padding: 16px 18px;
  border: 1px solid var(--core-line);
  border-radius: var(--core-radius-card);
  background: var(--core-surface);
}

.order-metrics span {
  display: block;
  color: var(--core-text-secondary);
  font-size: 12px;
}

.order-metrics strong {
  display: block;
  margin-top: 6px;
  color: var(--core-ink);
  font-size: 24px;
}

.order-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 160px 160px auto auto;
  align-items: center;
}

#content[data-module="course-reservations"] .order-toolbar {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
}

.order-filter-field {
  display: grid;
  min-width: 0;
  gap: 5px;
  color: var(--core-text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.order-filter-field input,
.order-filter-field select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--core-line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--core-ink);
  font: inherit;
}

.order-filter-wide { grid-column: span 2; }

.order-filter-actions {
  grid-column: span 4;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.order-filter-actions .btn { white-space: nowrap; }

@media (max-width: 1150px) {
  #content[data-module="course-reservations"] .order-toolbar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .order-filter-actions { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  #content[data-module="course-reservations"] .order-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  #content[data-module="course-reservations"] .order-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-filter-wide { grid-column: span 2; }
  .order-filter-actions { grid-column: span 2; justify-content: flex-start; }
}

.order-toolbar .business-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.order-toolbar .business-search input {
  width: 100%;
}

.order-table-panel {
  overflow: hidden;
}

.order-table {
  min-width: 1260px;
}

.order-table th:last-child,
.order-table td:last-child {
  position: sticky;
  right: 0;
  min-width: 210px;
  background: #fff;
  box-shadow: -10px 0 16px -16px rgba(16, 24, 40, 0.7);
}

.order-table th:last-child {
  z-index: 2;
  background: var(--core-surface-subtle);
}

.education-order-table .business-table {
  min-width: 1220px;
}

.education-order-table .business-table th:last-child,
.education-order-table .business-table td:last-child {
  position: sticky;
  right: 0;
  min-width: 230px;
  background: #fff;
  box-shadow: -10px 0 16px -16px rgba(16, 24, 40, 0.7);
}

.education-order-table .business-table th:last-child {
  z-index: 2;
  background: var(--core-surface-subtle);
}

.order-list-row {
  cursor: pointer;
}

.order-list-row:focus {
  outline: 2px solid var(--core-blue);
  outline-offset: -2px;
}

.order-row-actions {
  display: flex;
  min-width: 196px;
  flex-wrap: wrap;
  gap: 6px;
}

.order-type-chip {
  display: inline-flex;
  padding: 4px 9px;
  border-radius: 999px;
  color: #175cd3;
  background: #eef4ff;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.order-type-chip.guidance {
  color: #6941c6;
  background: #f4f3ff;
}

.order-muted,
.order-empty {
  color: var(--core-text-secondary);
}

.order-empty {
  padding: 44px !important;
  text-align: center;
}

.order-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.order-detail-grid > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--core-line-soft);
  border-radius: 10px;
  background: var(--core-surface-subtle);
}

.order-detail-grid span {
  display: block;
  margin-bottom: 6px;
  color: var(--core-text-secondary);
  font-size: 12px;
}

.order-detail-grid strong {
  color: var(--core-ink);
  overflow-wrap: anywhere;
}

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

.order-detail-section h4 {
  margin: 0 0 8px;
  color: var(--core-ink);
}

.order-detail-section p {
  margin: 0;
  color: var(--core-text-secondary);
  line-height: 1.7;
  white-space: pre-wrap;
}

.internal-order-notice {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 10px;
  color: #175cd3;
  background: #eef4ff;
}

.internal-order-notice span {
  font-size: 12px;
  line-height: 1.6;
}

.course-order-total {
  margin-top: 16px;
  padding: 14px;
  border-radius: 10px;
  color: var(--core-ink);
  background: var(--core-surface-subtle);
  font-size: 16px;
  font-weight: 650;
}

/* Finance and statistical pages use an even, responsive metric rhythm. */
#content[data-module="finance"] .stats-grid,
#content[data-module="statistics"] .stats-grid,
#content[data-module="education-earnings"] .stats-grid {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px;
}

#content[data-module="finance"] .stat-card,
#content[data-module="statistics"] .stat-card,
#content[data-module="education-earnings"] .stat-card {
  box-sizing: border-box;
  min-width: 0;
  min-height: 112px;
  padding: 20px;
}

#content[data-module="finance"] .stat-info,
#content[data-module="statistics"] .stat-info,
#content[data-module="education-earnings"] .stat-info {
  min-width: 0;
}

#content[data-module="product-summary"] .product-summary-header {
  min-height: 40px;
}

#content[data-module="product-summary"] .product-summary-stats > div {
  min-height: 96px;
  padding: 18px 20px;
}

/* The message workspace must fill the available viewport and use the static
 * stylesheet; otherwise the strict Core CSP leaves the chat as raw markup. */
#content[data-module="messages"] {
  width: 100%;
  max-width: none;
  height: calc(100vh - 76px);
  padding: 20px;
}

.core-ops-loading {
  min-height: 240px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  color: var(--muted, #667085);
  font-size: 14px;
}

.core-ops-loading-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #e8edff;
  border-top-color: var(--primary, #1f3cff);
  border-radius: 50%;
  animation: core-ops-spin .8s linear infinite;
}

@keyframes core-ops-spin { to { transform: rotate(360deg); } }

.core-list-toolbar input[type="search"] {
  min-width: min(320px, 100%);
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border, #d9e0ec);
  border-radius: 8px;
  background: #fff;
  color: var(--text, #172033);
}

#content[data-module="operators"] .page-heading,
#content[data-module="operator-permissions"] .page-heading {
  align-items: center;
  margin-bottom: 16px;
}

#content[data-module="operators"] .page-heading > div:first-child,
#content[data-module="operator-permissions"] .page-heading > div:first-child {
  min-width: 0;
}

#content[data-module="operators"] .page-heading .section-kicker,
#content[data-module="operators"] .page-heading h1,
#content[data-module="operator-permissions"] .page-heading .section-kicker,
#content[data-module="operator-permissions"] .page-heading h1 {
  display: none;
}

#content[data-module="operators"] .page-heading p,
#content[data-module="operator-permissions"] .page-heading p {
  max-width: 680px;
  line-height: 1.55;
}

.modal-backdrop {
  padding: 16px;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(3px);
}

.modal-backdrop > .modal {
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  border: 1px solid rgba(208, 213, 221, 0.9);
  border-radius: 16px;
  box-shadow: 0 28px 72px rgba(15, 23, 42, 0.24);
}

.modal-backdrop > .modal > .modal-body {
  min-height: 0;
  overflow-y: auto;
}

/* Dialog foundation: fixed header/footer, one scrollable body and a calmer
 * information hierarchy. This applies to migrated Ocean dialogs in Core. */
body:has(.modal-overlay) { overflow: hidden; }

.modal-overlay {
  padding: 16px;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(3px);
}

.modal-overlay .modal {
  max-height: calc(100dvh - 32px);
  overflow: hidden;
  border: 1px solid rgba(208, 213, 221, 0.9);
  border-radius: 16px;
  box-shadow: 0 28px 72px rgba(15, 23, 42, 0.24);
}

.modal-overlay .modal:not(.modal-wide):not(.chat-modal):not(.expert-booking-modal):not(.course-detail-lg):not(.essay-draft-modal):not(.rc-course-modal):not(.provider-editor-modal):not(.modal-ledger):not(.course-stage-modal) {
  width: min(720px, calc(100vw - 32px));
  max-width: 720px;
}

.modal-overlay .modal-header {
  min-height: 64px;
  flex: 0 0 auto;
  padding: 16px 22px;
  background: rgba(255, 255, 255, 0.98);
}

.modal-overlay .modal-header h3 {
  color: var(--core-ink);
  font-size: 18px;
  font-weight: 720;
  letter-spacing: -0.015em;
}

.modal-overlay .modal-close {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 22px;
}

.modal-overlay .modal-body {
  min-height: 0;
  padding: 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #cbd3e1 transparent;
  scrollbar-width: thin;
}

.modal-overlay .modal-footer {
  min-height: 68px;
  flex: 0 0 auto;
  align-items: center;
  padding: 13px 22px;
  border-top-color: var(--core-line);
  background: #fff;
  box-shadow: 0 -10px 26px rgba(15, 23, 42, 0.04);
}

.modal-overlay .modal-footer-spacer { flex: 1 1 auto; }

.modal-overlay .modal-footer .btn {
  min-width: 84px;
  min-height: 40px;
  border-radius: 9px;
}

.modal-overlay .modal.provider-editor-modal {
  width: min(1080px, calc(100vw - 40px));
  max-width: 1080px;
  max-height: calc(100dvh - 28px);
}

.provider-editor-modal .modal-body {
  padding: 20px 24px 28px;
  background: #f6f8fc;
}

.provider-form-intro {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  padding: 0 2px;
}

.provider-form-intro strong {
  color: var(--core-ink);
  font-size: 15px;
}

.provider-form-intro span {
  color: var(--core-muted);
  font-size: 12px;
}

.provider-form-section {
  margin-bottom: 16px;
  padding: 18px 20px 20px;
  border: 1px solid var(--core-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.025);
}

.provider-form-section:last-child { margin-bottom: 0; }

.provider-editor-modal .provider-edit-section-title {
  margin: 0 0 16px;
  padding: 0 0 11px;
  font-size: 16px;
}

.provider-editor-modal .form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 16px;
}

.provider-editor-modal .form-group {
  min-width: 0;
  margin-bottom: 16px;
}

.provider-editor-modal .form-grid > .form-group { margin-bottom: 0; }

.provider-editor-modal .form-group > label {
  margin-bottom: 7px;
  color: #475467;
  font-size: 12px;
  font-weight: 650;
}

.provider-editor-modal :is(input:not([type="checkbox"]):not([type="radio"]), select) {
  min-height: 42px;
}

.provider-editor-modal #expert-service-tags-group {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #dbe3ff;
  border-radius: 11px;
  background: #f7f9ff;
}

.provider-editor-modal #expert-service-tags-group .form-hint {
  display: block;
  margin: -2px 0 10px;
  color: var(--core-muted);
  font-size: 12px;
}

.provider-editor-modal .task-tag-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.provider-editor-modal .task-tag-options .tag-opt {
  min-height: 38px;
  margin: 0;
  border-radius: 9px;
  text-align: center;
}

.provider-editor-modal .provider-avatar-field {
  margin: 16px 0 0;
}

.provider-editor-modal .provider-avatar-field > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.provider-editor-modal .provider-avatar-field label { margin: 0; }

.provider-editor-modal .provider-avatar-field .admin-expert-upload-preview {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  margin: 0;
  border-radius: 12px;
}

.provider-editor-modal .modal-footer-spacer { display: none; }

.modal.modal-ledger { width: min(92vw, 920px); max-width: 920px; }
.ledger-summary-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.ledger-summary-grid > div { border:1px solid var(--border,#e4e7ec); border-radius:10px; padding:10px 12px; background:#f8faff; min-width:0; }
.ledger-summary-grid span { display:block; color:var(--text-muted,#667085); font-size:12px; margin-bottom:4px; }
.ledger-summary-grid strong { display:block; overflow-wrap:anywhere; }
.ledger-technical { margin-top:12px; border:1px solid var(--border,#e4e7ec); border-radius:10px; padding:10px 12px; font-size:12px; color:var(--text-secondary,#475467); }
.ledger-technical summary { cursor:pointer; font-weight:600; color:var(--text,#172033); }
.ledger-technical div { margin-top:8px; overflow-wrap:anywhere; }
.ledger-decline { margin-top:12px; padding:10px 12px; border-radius:8px; background:#fff4ed; color:#b54708; }
.ledger-snapshot { margin-top:12px; border:1px solid var(--border,#e4e7ec); border-radius:10px; padding:16px; max-height:48vh; overflow:auto; background:#fff; font-size:13px; line-height:1.75; }

@media (max-width: 760px) {
  .ledger-summary-grid { grid-template-columns:1fr; }
  .core-list-toolbar input[type="search"] { min-width:100%; flex-basis:100%; }
}

@media (max-width: 900px) {
  .provider-editor-modal .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .core-user-toolbar { align-items: stretch; flex-direction: column; }
  .core-user-search { max-width: none; }
  .core-user-filters { justify-content: flex-start; flex-wrap: wrap; }
  .core-toolbar-count { margin-left: auto; }
}

@media (max-width: 640px) {
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-overlay .modal,
  .modal-overlay .modal.provider-editor-modal { width: 100vw; max-width: 100vw; max-height: 94dvh; border-radius: 16px 16px 0 0; }
  .provider-editor-modal .form-grid { grid-template-columns: 1fr !important; }
  .provider-editor-modal .task-tag-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .provider-form-section { padding: 16px; }
  .core-user-search { flex-wrap: wrap; }
  .core-user-search input { min-width: 100%; flex-basis: 100%; }
}

#content[data-module="messages"] .core-ops-page,
#content[data-module="messages"] .imchat-root,
#content[data-module="messages"] .im-wrap {
  height: 100%;
  min-height: 0;
}

#content[data-module="messages"] .im-wrap {
  overflow: hidden;
  border: 1px solid var(--core-line);
  border-radius: var(--core-radius);
  box-shadow: var(--core-shadow-card);
}

#content[data-module="messages"] .im-side {
  width: 330px;
  border-color: var(--core-line);
}

#content[data-module="messages"] .im-side-hd {
  min-height: 60px;
  border-bottom: 1px solid #f0f2f6;
}

#content[data-module="messages"] .im-newbtn {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--core-blue);
  font-weight: 650;
}

#content[data-module="messages"] .im-side-tools {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f2f6;
}

#content[data-module="messages"] .im-gsearch {
  height: 38px;
  border-color: var(--core-line);
  border-radius: 9px;
  background: #f7f8fb;
}

#content[data-module="messages"] .im-conv {
  margin: 2px 8px;
  padding: 10px;
  border-radius: 9px;
}

#content[data-module="messages"] .im-conv-body {
  padding-bottom: 0;
}

#content[data-module="messages"] .im-main {
  background: #fff;
}

#content[data-module="messages"] .im-mobile-back {
  display: none;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #475467;
  background: #f2f4f7;
  font-size: 25px;
  line-height: 1;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 236px minmax(0, 1fr);
  }

  .content {
    padding: 22px;
  }

  #content[data-module="messages"] .im-side {
    width: 300px;
  }

  #content[data-module="education-earnings"] .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  .order-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .order-toolbar .business-search {
    grid-column: 1 / -1;
  }

  #content[data-module="messages"] .im-side {
    width: 280px;
  }
}

@media (max-width: 760px) {
  body {
    overflow-x: hidden;
  }

  .app-shell {
    display: block;
  }

  .topbar {
    min-height: 66px;
    padding: 10px 14px;
  }

  .topbar-leading h1 {
    font-size: 18px;
  }

  .content {
    padding: 16px 12px 24px;
  }

  .core-ops-page .card,
  .core-ops-page .product-summary-panel,
  .core-ops-page .stat-card {
    border-radius: 10px;
  }

  .core-ops-page .card-header,
  .core-ops-page .card-body {
    padding-left: 14px;
    padding-right: 14px;
  }

  .core-ops-page th,
  .core-ops-page td {
    padding-left: 12px;
    padding-right: 12px;
  }

  #content[data-module="messages"] {
    height: calc(100dvh - 66px);
    padding: 8px;
  }

  #content[data-module="messages"] .im-wrap {
    border-radius: 10px;
  }

  #content[data-module="messages"] .im-side {
    width: 100%;
    min-width: 0;
  }

  #content[data-module="messages"] .im-main {
    display: none;
  }

  #content[data-module="messages"] .im-wrap:has(.im-main .im-thd) .im-side {
    display: none;
  }

  #content[data-module="messages"] .im-wrap:has(.im-main .im-thd) .im-main {
    display: flex;
  }

  #content[data-module="messages"] .im-mobile-back {
    display: inline-flex;
  }

  #content[data-module="messages"] .im-conv {
    margin-inline: 4px;
    padding-inline: 7px;
  }

  #content[data-module="messages"] .im-ava {
    width: 38px;
    height: 38px;
  }

  #content[data-module="student-users"] th:last-child,
  #content[data-module="student-users"] td:last-child,
  #content[data-module="order-summary"] th:last-child,
  #content[data-module="order-summary"] td:last-child,
  #content[data-module="course-ops"] th:last-child,
  #content[data-module="course-ops"] td:last-child {
    position: static;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
@media (max-width: 520px) {
  .topbar-actions {
    gap: 4px;
  }

  .core-ops-page .product-summary-stats,
  #content[data-module="finance"] .stats-grid,
  #content[data-module="statistics"] .stats-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  #content[data-module="messages"] .im-conv-time,
  #content[data-module="messages"] .im-conv-last {
    display: initial;
  }
}

/* Figma v1 implementation layer
 * Source: Ocean management / All Screens. This layer intentionally changes only
 * presentation and responsive behavior; business requests stay in Core.
 */
:root {
  --core-canvas: #f6f8fc;
  --core-surface: #ffffff;
  --core-surface-subtle: #f9fafc;
  --core-ink: #0d1426;
  --core-text-secondary: #546380;
  --core-caption: #6b7891;
  --core-muted: #6b7891;
  --core-line: #e3e8f2;
  --core-line-soft: #ebedf5;
  --core-line-strong: #cfd7e6;
  --core-blue: #1f3cff;
  --core-blue-hover: #1732dc;
  --core-blue-soft: #eef2ff;
  --core-green: #0d8c57;
  --core-warning: #eb7d0d;
  --core-danger: #e8333d;
  --core-radius-control: 8px;
  --core-radius-card: 12px;
  --core-radius-panel: 16px;
  --core-shadow-card: 0 1px 2px rgba(13, 20, 38, 0.03), 0 8px 24px rgba(31, 60, 255, 0.035);
  --core-shadow-float: 0 20px 56px rgba(13, 20, 38, 0.18);
}

.app-shell {
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar-brand {
  min-height: 80px;
  padding: 16px 18px;
}

.sidebar-nav {
  padding: 16px 10px 24px;
}

.nav-button {
  min-height: 44px;
  border-radius: var(--core-radius-control);
  color: var(--core-text-secondary);
}

.nav-button.active {
  color: var(--core-blue);
  background: var(--core-blue-soft);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 80px;
  padding: 12px 32px;
  backdrop-filter: blur(14px);
}

.topbar-leading h1 {
  color: var(--core-ink);
  font-size: 22px;
}

.content {
  max-width: none;
  padding: 32px;
}

.core-ops-page,
.business-page {
  display: grid;
  gap: 16px;
  min-width: 0;
}

#content[data-module="product-summary"] .core-ops-page,
#content[data-module="product-summary"] .product-summary-page {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

#content[data-module="product-summary"] :is(
  .product-summary-header,
  .product-summary-stats,
  .product-summary-panel,
  .product-summary-toolbar,
  .product-summary-result,
  .product-summary-table-wrap
) {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

#content[data-module="product-summary"] .product-summary-table-wrap {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.core-ops-page > .page,
.business-page > .page {
  min-width: 0;
}

.panel,
.business-panel,
.core-ops-page .card,
.core-ops-page .product-summary-panel,
.core-ops-page .product-summary-stats > div,
.core-ops-page .stat-card,
.metric-card,
.empty-state {
  border: 1px solid var(--core-line);
  border-radius: var(--core-radius-card);
  background: var(--core-surface);
  box-shadow: var(--core-shadow-card);
}

.core-ops-page .card-header,
.panel-header,
.business-panel-header {
  min-height: 56px;
  padding: 14px 20px;
  border-color: var(--core-line-soft);
  background: var(--core-surface);
}

.core-ops-page .card-body,
.business-panel-body {
  padding: 20px;
}

.toolbar,
.core-list-toolbar,
.core-user-toolbar,
.core-ops-page .toolbar,
.business-toolbar,
.product-summary-toolbar {
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--core-line-soft);
  border-radius: 10px;
  background: var(--core-surface-subtle);
}

:is(.content, .modal, .core-ops-page) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea),
.search-box,
.core-user-search {
  border-color: var(--core-line);
  border-radius: var(--core-radius-control);
  color: var(--core-ink);
  background: #fff;
}

:is(.content, .modal, .core-ops-page) :is(input:not([type="checkbox"]):not([type="radio"]), select) {
  min-height: 40px;
}

:is(.content, .modal, .core-ops-page) :is(input, select, textarea):focus {
  border-color: #8091ff;
  outline: 3px solid rgba(31, 60, 255, 0.11);
  box-shadow: none;
}

.primary-button,
.secondary-button,
.danger-button,
.core-ops-page .btn,
.core-ops-page button.btn {
  min-height: 40px;
  border-radius: var(--core-radius-control);
}

.primary-button,
.core-ops-page .btn-primary {
  color: #fff;
  background: var(--core-blue);
}

.core-ops-page table,
.business-table,
.table-wrap table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--core-ink);
}

.core-ops-page thead th,
.business-table thead th,
.table-wrap thead th {
  height: 44px;
  padding: 0 16px;
  border-bottom: 1px solid var(--core-line);
  color: var(--core-caption);
  background: var(--core-surface-subtle);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  text-align: left;
  white-space: nowrap;
}

.core-ops-page tbody td,
.business-table tbody td,
.table-wrap tbody td {
  min-height: 64px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--core-line-soft);
  color: var(--core-text-secondary);
  line-height: 1.5;
  vertical-align: middle;
}

.core-ops-page tbody tr,
.business-table tbody tr,
.table-wrap tbody tr {
  transition: background-color 140ms ease;
}

.core-ops-page tbody tr:hover,
.business-table tbody tr:hover,
.table-wrap tbody tr:hover {
  background: #fafbff;
}

.core-ops-page .status-badge,
.status-chip,
.tag,
.badge,
.role-chip {
  border-radius: 999px;
  font-weight: 650;
}

.table-actions,
.action-buttons,
.core-ops-page td:last-child > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.core-ops-page td:last-child :is(button, .btn),
.table-actions :is(button, a) {
  min-height: 34px;
  white-space: nowrap;
}

.modal-backdrop,
.modal-overlay {
  padding: 24px;
  background: rgba(13, 20, 38, 0.48);
  backdrop-filter: blur(3px);
}

.modal-backdrop > .modal,
.modal-overlay .modal,
.core-ops-page .modal {
  overflow: hidden;
  max-height: min(88vh, 920px);
  border: 1px solid rgba(227, 232, 242, 0.9);
  border-radius: var(--core-radius-panel);
  box-shadow: var(--core-shadow-float);
}

.modal-header,
.modal-footer,
.core-ops-page .modal-header,
.core-ops-page .modal-footer {
  flex: 0 0 auto;
  padding: 16px 24px;
  border-color: var(--core-line);
  background: #fff;
}

.modal-body,
.core-ops-page .modal-body {
  overflow-y: auto;
  padding: 22px 24px;
  overscroll-behavior: contain;
}

.provider-form-section,
.form-section,
.detail-section {
  border-color: var(--core-line);
  border-radius: var(--core-radius-card);
  background: var(--core-surface-subtle);
}

.task-tag-options,
.tag-options,
.skill-tag-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.task-tag-options label,
.tag-options label,
.skill-tag-options label {
  min-height: 36px;
  border-radius: 999px;
}

.core-error-state .primary-button {
  display: inline-flex;
  margin-top: 18px;
}

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 236px minmax(0, 1fr);
  }

  .content {
    padding: 24px;
  }

  .core-ops-page .form-grid,
  .business-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  html,
  body,
  .app-shell,
  .workspace {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .workspace {
    min-height: 100dvh;
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }

  .topbar {
    min-height: 72px;
    padding: 10px 16px;
  }

  .breadcrumb,
  .environment-badge {
    display: none;
  }

  .topbar-leading h1 {
    margin: 0;
    font-size: 22px;
  }

  .content {
    padding: 16px;
  }

  .core-ops-page,
  .business-page {
    gap: 12px;
  }

  .page-heading,
  .core-ops-page .page-header,
  .business-page-header,
  .product-summary-header {
    align-items: flex-start;
    gap: 12px;
  }

  .page-heading-actions,
  .core-ops-page .page-actions {
    width: 100%;
  }

  .page-heading-actions .primary-button,
  .core-ops-page .page-actions .btn-primary {
    flex: 1 1 auto;
  }

  .toolbar,
  .core-list-toolbar,
  .core-user-toolbar,
  .core-ops-page .toolbar,
  .business-toolbar,
  .product-summary-toolbar {
    align-items: stretch;
    padding: 10px;
  }

  .toolbar > *,
  .core-list-toolbar > *,
  .core-user-toolbar > *,
  .business-toolbar > * {
    max-width: 100%;
  }

  .metric-grid,
  .stats-grid,
  .core-ops-page .stats-grid,
  .core-ops-page .product-summary-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .core-ops-page .form-grid,
  .business-form-grid,
  .operation-case-grid {
    grid-template-columns: 1fr !important;
  }

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

  .table-wrap,
  .table-wrapper,
  .business-table-wrap,
  .product-summary-table-wrap,
  .core-ops-page .table-wrapper {
    overflow: visible;
  }

  .core-responsive-table {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  .core-responsive-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .core-responsive-table tbody {
    display: grid;
    gap: 12px;
    width: 100%;
  }

  .core-responsive-table tbody tr {
    display: block;
    width: 100%;
    padding: 12px 16px;
    overflow: hidden;
    border: 1px solid var(--core-line);
    border-radius: var(--core-radius-card);
    background: #fff;
    box-shadow: 0 1px 2px rgba(13, 20, 38, 0.025);
  }

  .core-responsive-table tbody td {
    position: static !important;
    display: grid !important;
    grid-template-columns: minmax(82px, 0.42fr) minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0;
    padding: 9px 0 !important;
    overflow-wrap: anywhere;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    white-space: normal !important;
  }

  .core-responsive-table tbody td::before {
    content: attr(data-label);
    color: var(--core-caption);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
  }

  .core-responsive-table tbody td[colspan] {
    display: block !important;
  }

  .core-responsive-table tbody td[colspan]::before,
  .core-responsive-table tbody td[data-label="操作"]::before {
    display: none;
  }

  .core-responsive-table tbody td[data-label="操作"] {
    display: block !important;
    margin-top: 7px;
    padding-top: 13px !important;
    border-top: 1px solid var(--core-line-soft) !important;
  }

  .core-responsive-table .table-actions,
  .core-responsive-table .action-buttons,
  .core-responsive-table td[data-label="操作"] > div {
    justify-content: flex-start;
  }

  .modal-backdrop,
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal-backdrop > .modal,
  .modal-overlay .modal,
  .core-ops-page .modal {
    width: 100% !important;
    max-width: none !important;
    max-height: calc(92dvh - env(safe-area-inset-top));
    margin: 0;
    border-radius: 18px 18px 0 0;
  }

  .modal-header,
  .modal-footer,
  .core-ops-page .modal-header,
  .core-ops-page .modal-footer {
    padding: 14px 16px;
  }

  .modal-body,
  .core-ops-page .modal-body {
    padding: 18px 16px;
  }

  .mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 5px 8px env(safe-area-inset-bottom);
    border-top: 1px solid var(--core-line);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -8px 24px rgba(13, 20, 38, 0.06);
    backdrop-filter: blur(16px);
  }

  .mobile-nav-button {
    display: flex;
    min-width: 0;
    min-height: 54px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    border-radius: 9px;
    color: var(--core-caption);
    background: transparent;
    font-size: 11px;
    line-height: 1.15;
  }

  .mobile-nav-button svg {
    width: 20px;
    height: 20px;
  }

  .mobile-nav-button.active {
    color: var(--core-blue);
    background: var(--core-blue-soft);
    font-weight: 650;
  }

  #content[data-module="messages"] {
    height: calc(100dvh - 72px - 64px - env(safe-area-inset-bottom));
    padding: 8px;
  }
}

@media (max-width: 420px) {
  .content {
    padding: 14px 12px;
  }

  .metric-grid,
  .stats-grid,
  .core-ops-page .stats-grid,
  .core-ops-page .product-summary-stats {
    grid-template-columns: 1fr !important;
  }

  .core-responsive-table tbody tr {
    padding-inline: 14px;
  }
}

/* Class orders share the compact order-workspace rhythm without inheriting
 * the reservation-specific nine-column layout. */
#content[data-module="class-course-orders"] .order-metrics article {
  box-sizing: border-box;
  min-height: 84px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 18px;
}

#content[data-module="class-course-orders"] .order-toolbar {
  box-sizing: border-box;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
  margin-bottom: 16px;
  background: var(--core-surface);
}

#content[data-module="class-course-orders"] .order-filter-actions { grid-column: span 3; }
#content[data-module="class-course-orders"] .class-order-table {
  width: 100%;
  min-width: 1090px;
  table-layout: fixed;
}
.class-order-columns col:nth-child(1) { width: 220px; }
.class-order-columns col:nth-child(2) { width: 100px; }
.class-order-columns col:nth-child(3) { width: 155px; }
.class-order-columns col:nth-child(4) { width: 130px; }
.class-order-columns col:nth-child(5) { width: 110px; }
.class-order-columns col:nth-child(6) { width: 110px; }
.class-order-columns col:nth-child(7) { width: 115px; }
.class-order-columns col:nth-child(8) { width: 150px; }
#content[data-module="class-course-orders"] .class-order-table thead th { box-sizing: border-box; height: 44px; padding: 0 12px; }
#content[data-module="class-course-orders"] .class-order-table tbody td { box-sizing: border-box; height: 72px; padding: 9px 12px; vertical-align: middle; }
#content[data-module="class-course-orders"] .class-order-table .business-status { white-space: nowrap; }

@media (max-width: 1000px) {
  #content[data-module="class-course-orders"] .order-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #content[data-module="class-course-orders"] .order-filter-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Course order creation: keep the confirmation footer inside the dialog and
 * make the two long option lists searchable without widening the form. */
.modal-overlay .modal.course-order-create-modal {
  width: min(960px, calc(100vw - 32px));
  max-width: 960px;
  max-height: min(92dvh, 920px);
}

.modal-overlay .course-order-create-modal .modal-body {
  min-height: 0;
  overflow-y: auto;
}

.modal-overlay .course-order-create-modal .modal-footer {
  box-sizing: border-box;
  margin: 0;
  flex: 0 0 auto;
}

.course-order-create-modal .course-order-choice-field {
  display: grid;
  min-width: 0;
  gap: 7px;
  align-content: start;
}

.course-order-create-modal .course-order-choice-field input,
.course-order-create-modal .course-order-choice-field select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

.course-order-create-modal .course-order-search-count {
  color: var(--core-text-secondary);
  font-size: 12px;
}

@media (max-width: 760px) {
  .modal-overlay .modal.course-order-create-modal {
    width: 100vw;
    max-width: 100vw;
    max-height: calc(94dvh - env(safe-area-inset-top));
  }

  .modal-overlay .course-order-create-modal .modal-footer {
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }
}

/* Order workspaces: keep every list row compact and move long operational
 * content into the existing detail dialogs. These rules mirror the approved
 * Figma order-management frames and deliberately scope to the two pages. */
#content[data-module="course-reservations"] .order-metrics article,
#content[data-module="service-reservations"] .order-metrics article {
  box-sizing: border-box;
  min-height: 84px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 18px;
}

#content[data-module="course-reservations"] .order-toolbar,
#content[data-module="service-reservations"] .order-toolbar {
  box-sizing: border-box;
  min-height: 64px;
  margin-bottom: 16px;
  background: var(--core-surface);
}

.education-order-heading {
  align-items: flex-start;
}

.order-heading-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.internal-order-tag {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  color: #175cd3;
  background: #eef4ff;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.education-order-toolbar {
  grid-template-columns: minmax(260px, 1fr) 180px 150px auto auto;
}

.order-table-panel .business-table-wrap,
.education-order-table .business-table-wrap {
  overflow: auto;
  overscroll-behavior-inline: contain;
}

#content[data-module="course-reservations"] .order-table,
#content[data-module="service-reservations"] .education-order-table .business-table {
  width: 100%;
  min-width: 1128px;
  table-layout: fixed;
}

.order-table-columns col:nth-child(1) { width: 220px; }
.order-table-columns col:nth-child(2) { width: 92px; }
.order-table-columns col:nth-child(3) { width: 92px; }
.order-table-columns col:nth-child(4) { width: 92px; }
.order-table-columns col:nth-child(5) { width: 122px; }
.order-table-columns col:nth-child(6) { width: 120px; }
.order-table-columns col:nth-child(7) { width: 148px; }
.order-table-columns col:nth-child(8) { width: 104px; }
.order-table-columns col:nth-child(9) { width: 168px; }

.education-order-columns col:nth-child(1) { width: 236px; }
.education-order-columns col:nth-child(2) { width: 94px; }
.education-order-columns col:nth-child(3) { width: 102px; }
.education-order-columns col:nth-child(4) { width: 142px; }
.education-order-columns col:nth-child(5) { width: 108px; }
.education-order-columns col:nth-child(6) { width: 148px; }
.education-order-columns col:nth-child(7) { width: 148px; }
.education-order-columns col:nth-child(8) { width: 150px; }

#content[data-module="course-reservations"] .order-table thead th,
#content[data-module="service-reservations"] .education-order-table thead th {
  box-sizing: border-box;
  height: 44px;
  padding: 0 12px;
}

#content[data-module="course-reservations"] .order-table tbody tr,
#content[data-module="service-reservations"] .education-order-table tbody tr {
  height: 80px;
}

#content[data-module="course-reservations"] .order-table tbody td,
#content[data-module="service-reservations"] .education-order-table tbody td {
  box-sizing: border-box;
  height: 80px;
  max-height: 80px;
  padding: 10px 12px;
  overflow: visible;
  vertical-align: middle;
}

#content[data-module="course-reservations"] .order-table th:last-child,
#content[data-module="course-reservations"] .order-table td:last-child,
#content[data-module="service-reservations"] .education-order-table th:last-child,
#content[data-module="service-reservations"] .education-order-table td:last-child {
  min-width: 0;
}

.order-list-row .business-primary,
.order-schedule-summary,
.order-datetime-summary,
.education-order-period,
.order-money-summary {
  min-width: 0;
}

.order-list-row .business-primary strong,
.order-list-row .business-primary > span,
.order-schedule-summary strong,
.order-schedule-summary span,
.order-datetime-summary strong,
.order-datetime-summary span,
.education-order-period strong,
.education-order-period span,
.order-money-summary strong,
.order-money-summary span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-list-row .business-primary strong,
.order-schedule-summary strong,
.order-datetime-summary strong,
.education-order-period strong,
.order-money-summary strong {
  color: var(--core-ink);
  font-size: 13px;
  font-weight: 650;
}

.order-list-row .business-primary > span,
.order-schedule-summary span,
.order-datetime-summary span,
.education-order-period span,
.order-money-summary span {
  margin-top: 4px;
  color: var(--core-text-secondary);
  font-size: 12px;
  line-height: 1.25;
}

.order-schedule-summary.is-empty strong {
  color: var(--core-text-secondary);
  font-weight: 550;
}

.order-money-warning {
  color: #b54708 !important;
}

.order-title-line {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.order-title-line strong {
  min-width: 0;
  flex: 1 1 auto;
}

.order-type-chip.education {
  flex: 0 0 auto;
  color: #027a48;
  background: #ecfdf3;
}

#content[data-module="course-reservations"] .business-status,
#content[data-module="service-reservations"] .business-status {
  min-height: 28px;
  padding: 5px 10px;
  white-space: nowrap;
}

.order-row-actions,
.order-detail-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.order-row-actions {
  flex-wrap: nowrap;
  white-space: nowrap;
}

.order-detail-actions {
  flex-wrap: wrap;
}

.order-row-actions .btn,
.order-row-actions .primary-button,
.order-row-actions .secondary-button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
  line-height: 30px;
}

.order-action-overflow {
  position: relative;
  flex: 0 0 auto;
}

/* Sticky action cells from later rows must not paint over an open menu. */
.order-table tbody tr:has(.order-action-overflow[open]),
.education-order-table tbody tr:has(.order-action-overflow[open]) {
  position: relative;
  z-index: 40;
}

.order-table tbody tr:has(.order-action-overflow[open]) > td:last-child,
.education-order-table tbody tr:has(.order-action-overflow[open]) > td:last-child {
  z-index: 41;
}

.order-action-overflow[open] {
  z-index: 42;
}

.order-action-overflow > summary {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--core-line-strong);
  border-radius: 8px;
  color: var(--core-text-secondary);
  background: var(--core-surface);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  list-style: none;
}

.order-action-overflow > summary::-webkit-details-marker {
  display: none;
}

.order-action-overflow[open] > summary {
  border-color: #8091ff;
  color: var(--core-blue);
  background: var(--core-blue-soft);
}

.order-action-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 43;
  display: grid;
  min-width: 128px;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--core-line);
  border-radius: 10px;
  background: var(--core-surface);
  box-shadow: var(--core-shadow-float);
}

.order-table tbody tr:nth-last-child(-n + 2) .order-action-menu,
.education-order-table tbody tr:nth-last-child(-n + 2) .order-action-menu {
  top: auto;
  bottom: calc(100% + 6px);
}

.order-action-menu button,
.order-overflow-action {
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  color: var(--core-ink);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 550;
  text-align: left;
  white-space: nowrap;
}

.order-action-menu button:hover,
.order-overflow-action:hover {
  background: var(--core-surface-subtle);
}

.order-action-menu .danger,
.order-action-danger {
  color: var(--core-danger) !important;
}

@media (max-width: 900px) {
  .education-order-toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .education-order-toolbar .business-search {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  #content[data-module="course-reservations"] .order-table,
  #content[data-module="service-reservations"] .education-order-table .business-table {
    min-width: 0;
    table-layout: auto;
  }

  #content[data-module="course-reservations"] .order-table tbody tr,
  #content[data-module="service-reservations"] .education-order-table tbody tr,
  #content[data-module="course-reservations"] .order-table tbody td,
  #content[data-module="service-reservations"] .education-order-table tbody td {
    height: auto;
    max-height: none;
  }

  .education-order-toolbar,
  .order-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .education-order-toolbar .business-search,
  .order-toolbar .business-search {
    grid-column: 1 / -1;
  }

  .order-row-actions {
    flex-wrap: wrap;
  }

  .order-action-menu {
    right: auto;
    left: 0;
  }
}
.ocean-management-embedded #logout-button {
  display: none;
}

/* Figma v2 implementation
 * The current design source uses a single 72px application bar, a 248px
 * navigation rail and an 8/12/16px radius hierarchy. These rules are kept in
 * one final layer so migrated Ocean screens inherit the same system without
 * changing their data or event handlers.
 */
:root {
  --core-control-sm: 32px;
  --core-control-md: 40px;
  --core-sidebar-width: 248px;
  --core-topbar-height: 72px;
  --core-success-soft: #eaf8f1;
  --core-warning-soft: #fff5e7;
  --core-danger-soft: #fff0f1;
  --core-info-soft: #eef2ff;
}

.app-shell {
  grid-template-columns: var(--core-sidebar-width) minmax(0, 1fr);
}

.sidebar {
  width: var(--core-sidebar-width);
  background: var(--core-surface);
  box-shadow: none;
}

.sidebar-brand {
  min-height: var(--core-topbar-height);
  padding: 12px 20px;
}

.sidebar-brand .brand-mark.small {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 11px;
  font-size: 22px;
}

.sidebar-brand strong {
  font-size: 15px;
  font-weight: 650;
}

.sidebar-brand > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.sidebar-brand span:not(.brand-mark) {
  color: var(--core-caption);
  font-size: 11px;
}

.sidebar-nav {
  padding: 10px 12px 18px;
}

.nav-group-label {
  margin: 14px 12px 6px;
  color: var(--core-caption);
  font-size: 11px;
  font-weight: 550;
  letter-spacing: 0.06em;
}

.nav-group-label:first-child {
  margin-top: 0;
}

.nav-button {
  min-height: 44px;
  margin: 0 0 4px;
  padding: 0 12px;
  gap: 12px;
  border-radius: var(--core-radius-control);
  color: var(--core-text-secondary);
  font-size: 14px;
  font-weight: 550;
}

.nav-button svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  stroke-width: 1.8;
}

.nav-button:hover {
  color: var(--core-ink);
  background: var(--core-surface-subtle);
  transform: none;
}

.nav-button.active {
  color: var(--core-blue);
  background: var(--core-blue-soft);
  box-shadow: none;
}

.sidebar-user {
  min-height: 64px;
  padding: 10px 16px;
}

.sidebar-user .avatar,
.topbar-avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  color: var(--core-blue);
  background: var(--core-blue-soft);
  font-size: 14px;
  font-weight: 650;
}

.topbar {
  min-height: var(--core-topbar-height);
  height: var(--core-topbar-height);
  padding: 0 24px;
  border-bottom: 1px solid var(--core-line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: none;
  backdrop-filter: blur(16px);
}

.topbar-leading,
.topbar-context,
.topbar-actions,
.topbar-user {
  display: flex;
  align-items: center;
}

.topbar-leading {
  min-width: 0;
  gap: 12px;
}

.topbar-context {
  min-width: 0;
  gap: 8px;
  color: var(--core-text-secondary);
  font-size: 13px;
  line-height: 1;
}

.topbar-context svg {
  width: 14px;
  height: 14px;
  color: var(--core-line-strong);
}

.topbar-context .breadcrumb {
  color: var(--core-text-secondary);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  white-space: nowrap;
}

.topbar-context strong {
  overflow: hidden;
  color: var(--core-ink);
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  gap: 12px;
}

.topbar-user {
  gap: 8px;
  color: var(--core-ink);
  font-size: 13px;
  font-weight: 550;
}

.environment-badge {
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  color: var(--core-green);
  background: var(--core-success-soft);
  font-size: 11px;
  font-weight: 600;
}

.content {
  max-width: none;
  padding: 24px;
}

.page-heading,
.business-page-header,
.core-ops-page .page-header,
.product-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 18px;
}

.page-heading h1,
.business-page-header h1,
.core-ops-page .page-header h1,
.core-ops-page .page-header h2,
.product-summary-header h1,
.product-summary-header h2 {
  margin: 0;
  color: var(--core-ink);
  font-size: 24px;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.page-heading p,
.business-page-header p,
.core-ops-page .page-header p,
.product-summary-header p {
  max-width: 760px;
  margin: 4px 0 0;
  color: var(--core-text-secondary);
  font-size: 13px;
  line-height: 1.55;
}

.section-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--core-blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.metric-grid,
.stats-grid,
.settlement-metrics,
.core-ops-page .stats-grid,
.core-ops-page .product-summary-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card,
.settlement-metrics > article,
.core-ops-page .stat-card,
.core-ops-page .product-summary-stats > div {
  min-width: 0;
  min-height: 128px;
  padding: 20px;
  border: 1px solid var(--core-line);
  border-radius: var(--core-radius-card);
  background: var(--core-surface);
  box-shadow: 0 1px 2px rgba(13, 20, 38, 0.025);
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.metric-copy {
  min-width: 0;
}

.metric-copy strong,
.settlement-metrics strong,
.core-ops-page .stat-card strong {
  display: block;
  color: var(--core-ink);
  font-size: 28px;
  font-weight: 650;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.metric-copy span,
.settlement-metrics span,
.core-ops-page .stat-card span {
  display: block;
  margin-top: 8px;
  color: var(--core-text-secondary);
  font-size: 13px;
}

.metric-icon {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 10px;
  color: var(--core-blue);
  background: var(--core-blue-soft);
}

.metric-icon svg {
  width: 20px;
  height: 20px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 16px;
  margin-top: 16px;
}

.panel,
.business-panel,
.core-ops-page .card,
.core-ops-page .product-summary-panel,
.empty-state {
  border-radius: var(--core-radius-card);
  box-shadow: 0 1px 2px rgba(13, 20, 38, 0.025);
}

.panel-header,
.business-panel-header,
.core-ops-page .card-header {
  min-height: 56px;
  padding: 0 20px;
  border-bottom: 1px solid var(--core-line-soft);
}

.primary-button,
.secondary-button,
.danger-button,
.icon-button,
.core-ops-page .btn,
.core-ops-page button.btn {
  min-height: var(--core-control-md);
  border-radius: var(--core-radius-control);
  font-size: 14px;
  font-weight: 600;
}

.primary-button,
.core-ops-page .btn-primary {
  border-color: var(--core-blue);
  background: var(--core-blue);
  box-shadow: none;
}

.primary-button:hover,
.core-ops-page .btn-primary:hover {
  background: var(--core-blue-hover);
  box-shadow: none;
  transform: none;
}

.secondary-button,
.core-ops-page .btn-outline {
  border-color: var(--core-line-strong);
  color: var(--core-ink);
  background: var(--core-surface);
}

.compact-button,
.icon-button.compact,
.core-ops-page .btn-sm {
  min-height: var(--core-control-sm);
}

.business-status,
.status-chip,
.core-ops-page .status-badge,
.source-badge,
.role-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 4px 8px;
  border: 0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.business-status::before,
.status-chip::before,
.core-ops-page .status-badge::before {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: currentColor;
  content: '';
}

.business-status.info,
.status-chip.active,
.core-ops-page .status-badge.info {
  color: var(--core-blue);
  background: var(--core-info-soft);
}

.business-status.success {
  color: var(--core-green);
  background: var(--core-success-soft);
}

.business-status.warning {
  color: var(--core-warning);
  background: var(--core-warning-soft);
}

.business-status.danger,
.status-chip.revoked {
  color: var(--core-danger);
  background: var(--core-danger-soft);
}

.business-status.neutral,
.status-chip.not_granted {
  color: var(--core-text-secondary);
  background: #f1f3f7;
}

.toolbar,
.core-list-toolbar,
.core-user-toolbar,
.core-ops-page .toolbar,
.business-toolbar,
.product-summary-toolbar {
  min-height: 64px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--core-line);
  border-radius: 10px;
  background: var(--core-surface);
}

.business-search,
.core-user-search {
  border: 0;
  background: transparent;
}

:is(.content, .modal, .core-ops-page) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  border: 1px solid var(--core-line);
  border-radius: var(--core-radius-control);
  color: var(--core-ink);
  background: var(--core-surface);
}

:is(.content, .modal, .core-ops-page) :is(input, select, textarea)::placeholder {
  color: #98a2b3;
}

.business-form-grid,
.education-service-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.education-service-form .full-width-field {
  grid-column: 1 / -1;
}

.form-inline-error {
  margin: 12px 0 0;
  color: #b42318;
  font-size: 13px;
}

.core-ops-page thead th,
.business-table thead th,
.table-wrap thead th {
  height: 44px;
  padding: 0 16px;
  color: var(--core-caption);
  background: var(--core-surface-subtle);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

.core-ops-page tbody td,
.business-table tbody td,
.table-wrap tbody td {
  min-height: 56px;
  padding: 13px 16px;
  color: var(--core-text-secondary);
  font-size: 13px;
}

#content[data-module="messages"] {
  height: calc(100dvh - var(--core-topbar-height));
  padding: 18px 24px 24px;
}

#content[data-module="messages"] .im-wrap {
  border: 1px solid var(--core-line);
  border-radius: var(--core-radius-panel);
  background: var(--core-surface);
  box-shadow: 0 1px 2px rgba(13, 20, 38, 0.025);
}

#content[data-module="messages"] .im-side {
  width: 320px;
  flex: 0 0 320px;
  border-right: 1px solid var(--core-line);
}

#content[data-module="messages"] .im-side-hd,
#content[data-module="messages"] .im-thd {
  min-height: 64px;
  border-bottom: 1px solid var(--core-line-soft);
}

#content[data-module="messages"] .im-side-tools {
  padding: 12px;
  border-bottom: 1px solid var(--core-line-soft);
}

#content[data-module="messages"] .im-gsearch {
  height: 40px;
  border-color: var(--core-line);
  border-radius: var(--core-radius-control);
  background: var(--core-surface-subtle);
}

#content[data-module="messages"] .im-newbtn {
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--core-radius-control);
  box-shadow: none;
}

#content[data-module="messages"] .im-conv {
  min-height: 68px;
  margin: 4px 8px;
  padding: 10px 12px;
  border-radius: var(--core-radius-control);
}

#content[data-module="messages"] .im-conv:hover,
#content[data-module="messages"] .im-conv.active {
  background: var(--core-blue-soft);
}

.ocean-management-embedded .topbar-actions,
.ocean-management-embedded #logout-button {
  display: none;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .sidebar {
    width: 232px;
  }

  .metric-grid,
  .stats-grid,
  .settlement-metrics,
  .core-ops-page .stats-grid,
  .core-ops-page .product-summary-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #content[data-module="messages"] .im-side {
    width: 300px;
    flex-basis: 300px;
  }
}

@media (max-width: 760px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: min(320px, calc(100vw - 48px));
    transform: translateX(-102%);
    transition: transform 180ms ease;
  }

  .sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: block;
    border: 0;
    opacity: 0;
    pointer-events: none;
    background: rgba(13, 20, 38, 0.42);
    transition: opacity 180ms ease;
  }

  .sidebar-open .sidebar-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .topbar {
    min-height: 64px;
    height: 64px;
    padding: 0 16px;
  }

  .topbar-context .breadcrumb,
  .topbar-context svg {
    display: none;
  }

  .topbar-context strong {
    font-size: 16px;
  }

  .topbar-user > span:last-child,
  .environment-badge {
    display: none;
  }

  .ocean-management-embedded .topbar {
    padding-right: 64px;
  }

  .content {
    padding: 16px;
  }

  .page-heading,
  .business-page-header,
  .core-ops-page .page-header,
  .product-summary-header {
    align-items: flex-start;
    gap: 12px;
  }

  .page-heading h1,
  .business-page-header h1,
  .core-ops-page .page-header h1,
  .core-ops-page .page-header h2,
  .product-summary-header h1,
  .product-summary-header h2 {
    font-size: 22px;
  }

  .metric-grid,
  .stats-grid,
  .settlement-metrics,
  .core-ops-page .stats-grid,
  .core-ops-page .product-summary-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
  }

  .metric-card,
  .settlement-metrics > article,
  .core-ops-page .stat-card,
  .core-ops-page .product-summary-stats > div {
    min-height: 104px;
    padding: 16px;
  }

  .metric-copy strong,
  .settlement-metrics strong,
  .core-ops-page .stat-card strong {
    font-size: 24px;
  }

  .metric-icon {
    display: none;
  }

  .dashboard-grid,
  .business-form-grid,
  .education-service-form {
    grid-template-columns: 1fr;
  }

  .education-service-form .full-width-field {
    grid-column: auto;
  }

  #content[data-module="messages"] {
    height: calc(100dvh - 64px - 64px - env(safe-area-inset-bottom));
    padding: 8px;
  }

  #content[data-module="messages"] .im-wrap {
    border-radius: var(--core-radius-card);
  }

  #content[data-module="messages"] .im-side {
    width: 100%;
    flex-basis: auto;
  }
}

@media (max-width: 420px) {
  .metric-grid,
  .stats-grid,
  .settlement-metrics,
  .order-metrics,
  .order-detail-grid,
  .core-ops-page .stats-grid,
  .core-ops-page .product-summary-stats {
    grid-template-columns: 1fr !important;
  }
}

.business-workspace-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 6px;
  margin-bottom: 18px;
  padding: 6px;
  border: 1px solid var(--core-line);
  border-radius: 12px;
  background: var(--core-surface);
}

.business-workspace-tab {
  min-height: 40px;
  padding: 8px 16px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--core-text-secondary);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.business-workspace-tab:hover,
.business-workspace-tab:focus-visible {
  color: #1849a9;
  background: #eef4ff;
}

.business-workspace-tab.active {
  color: #fff;
  background: #2447e8;
  box-shadow: 0 2px 6px rgba(36, 71, 232, 0.17);
}

.business-workspace-tab.active:focus-visible { outline: 3px solid #99b4ff; }

@media (max-width: 620px) {
  .business-workspace-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .business-workspace-tab { padding-inline: 8px; font-size: 12px; line-height: 1.35; }
}

/* One-to-one order workspace — Figma frame 50:3. Keep all transaction actions
 * in the list while leaving scheduling and fulfilment in the adjacent tab. */
#content[data-module="course-reservations"] .business-workspace-tabs {
  min-height: 60px;
  box-sizing: border-box;
  align-items: center;
  gap: 6px;
  margin-bottom: 22px;
  padding: 6px;
  border-color: #e3e8f2;
  background: #fff;
}

#content[data-module="course-reservations"] .business-workspace-tab {
  min-height: 42px;
  padding: 10px 18px;
  font-size: 13px;
}

#content[data-module="course-reservations"] .business-workspace-tab.active {
  background: #1a73e8;
  box-shadow: none;
}

#content[data-module="course-reservations"] .order-page-heading {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

#content[data-module="course-reservations"] .order-page-heading .section-kicker {
  color: #1a73e8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

#content[data-module="course-reservations"] .order-page-heading h1 {
  margin: 5px 0 4px;
  color: #172033;
  font-size: 24px;
  font-weight: 720;
  line-height: 1.25;
}

#content[data-module="course-reservations"] .order-page-heading p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

#content[data-module="course-reservations"] .order-page-heading > .btn {
  min-width: 142px;
  min-height: 40px;
  background: #1a73e8;
}

#content[data-module="course-reservations"] .order-metrics {
  gap: 16px;
  margin-bottom: 18px;
}

#content[data-module="course-reservations"] .order-metrics article {
  min-height: 110px;
  padding: 17px 19px;
  border-color: #e3e8f2;
  border-radius: 10px;
  box-shadow: none;
}

#content[data-module="course-reservations"] .order-metrics span {
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
}

#content[data-module="course-reservations"] .order-metrics strong {
  margin-top: 8px;
  color: #172033;
  font-size: 28px;
  line-height: 1.1;
}

#content[data-module="course-reservations"] .order-toolbar {
  min-height: 172px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: end;
  column-gap: 12px;
  row-gap: 16px;
  margin-bottom: 18px;
  padding: 18px;
  border-color: #e3e8f2;
  border-radius: 10px;
  box-shadow: none;
}

#content[data-module="course-reservations"] .order-filter-field {
  gap: 7px;
  color: #52627b;
  font-size: 12px;
}

#content[data-module="course-reservations"] .order-filter-field:nth-child(1) { grid-column: span 3; }
#content[data-module="course-reservations"] .order-filter-field:nth-child(2) { grid-column: span 4; }
#content[data-module="course-reservations"] .order-filter-field:nth-child(3) { grid-column: span 2; }
#content[data-module="course-reservations"] .order-filter-field:nth-child(4) { grid-column: span 3; }
#content[data-module="course-reservations"] .order-filter-field:nth-child(5),
#content[data-module="course-reservations"] .order-filter-field:nth-child(6) { grid-column: span 2; }

#content[data-module="course-reservations"] .order-filter-field :is(input, select) {
  height: 42px;
  min-height: 42px;
  padding: 0 12px;
  border-color: #dce4f0;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
}

#content[data-module="course-reservations"] .order-filter-actions {
  grid-column: span 8;
  flex-wrap: nowrap;
  gap: 8px;
}

#content[data-module="course-reservations"] .order-filter-actions .btn {
  min-height: 42px;
  padding: 0 16px;
  font-size: 13px;
}

#content[data-module="course-reservations"] .order-table-panel {
  border: 1px solid #e3e8f2;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
}

#content[data-module="course-reservations"] .order-table {
  min-width: 1240px;
  table-layout: fixed;
}

#content[data-module="course-reservations"] .order-table-columns col:nth-child(1) { width: 20%; }
#content[data-module="course-reservations"] .order-table-columns col:nth-child(2) { width: 6%; }
#content[data-module="course-reservations"] .order-table-columns col:nth-child(3) { width: 7%; }
#content[data-module="course-reservations"] .order-table-columns col:nth-child(4) { width: 7%; }
#content[data-module="course-reservations"] .order-table-columns col:nth-child(5) { width: 10%; }
#content[data-module="course-reservations"] .order-table-columns col:nth-child(6) { width: 10%; }
#content[data-module="course-reservations"] .order-table-columns col:nth-child(7) { width: 13%; }
#content[data-module="course-reservations"] .order-table-columns col:nth-child(8) { width: 9%; }
#content[data-module="course-reservations"] .order-table-columns col:nth-child(9) { width: 18%; }

#content[data-module="course-reservations"] .order-table thead th {
  height: 48px;
  padding: 0 12px;
  border-bottom-color: #e3e8f2;
  color: #64748b;
  background: #f8fafc;
  font-size: 12px;
}

#content[data-module="course-reservations"] .order-table tbody tr,
#content[data-module="course-reservations"] .order-table tbody td {
  height: 86px;
  max-height: 86px;
}

#content[data-module="course-reservations"] .order-table tbody td {
  padding: 11px 12px;
  border-bottom-color: #e9edf4;
  font-size: 13px;
}

#content[data-module="course-reservations"] .order-table tbody tr:last-child td {
  border-bottom: 0;
}

#content[data-module="course-reservations"] .order-table :is(th, td):last-child {
  box-shadow: none;
}

#content[data-module="course-reservations"] .order-table tbody tr:hover td:last-child {
  background: #fafbff;
}

#content[data-module="course-reservations"] .order-row-actions {
  gap: 6px;
  flex-wrap: nowrap;
}

#content[data-module="course-reservations"] .order-row-actions .btn {
  padding: 0 9px;
}

.course-order-pagination {
  min-height: 56px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid #e9edf4;
  color: #64748b;
  font-size: 12px;
}

.course-order-pagination nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.course-order-pagination button {
  width: 32px;
  height: 32px;
  border: 1px solid #dce4f0;
  border-radius: 7px;
  color: #52627b;
  background: #fff;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.course-order-pagination button.active {
  border-color: #1a73e8;
  color: #fff;
  background: #1a73e8;
}

.course-order-pagination button:hover:not(:disabled):not(.active) {
  border-color: #1a73e8;
  color: #1a73e8;
}

.course-order-pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.course-order-pagination .page-ellipsis { padding: 0 2px; }

@media (max-width: 1240px) {
  #content[data-module="course-reservations"] .order-toolbar {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  #content[data-module="course-reservations"] .order-filter-field:nth-child(1),
  #content[data-module="course-reservations"] .order-filter-field:nth-child(2) { grid-column: span 3; }
  #content[data-module="course-reservations"] .order-filter-field:nth-child(3),
  #content[data-module="course-reservations"] .order-filter-field:nth-child(4),
  #content[data-module="course-reservations"] .order-filter-field:nth-child(5),
  #content[data-module="course-reservations"] .order-filter-field:nth-child(6) { grid-column: span 3; }
  #content[data-module="course-reservations"] .order-filter-actions { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  #content[data-module="course-reservations"] .order-page-heading { align-items: flex-start; flex-direction: column; }
  #content[data-module="course-reservations"] .order-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #content[data-module="course-reservations"] .order-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #content[data-module="course-reservations"] .order-filter-field:nth-child(n) { grid-column: span 1; }
  #content[data-module="course-reservations"] .order-filter-field:nth-child(-n + 2) { grid-column: span 2; }
  #content[data-module="course-reservations"] .order-filter-actions { grid-column: span 2; justify-content: flex-start; flex-wrap: wrap; }
  .course-order-pagination { align-items: flex-start; flex-direction: column; }
}

/* One-to-one operation stages are derived from scheduling and lesson completion. */
.course-stage-trigger {
  --stage-fg: #475467;
  --stage-bg: #f2f4f7;
  --stage-line: #d0d5dd;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--stage-line);
  border-radius: 8px;
  background: var(--stage-bg);
  color: var(--stage-fg);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  vertical-align: middle;
}

.course-stage-trigger:hover { filter: brightness(0.97); }
.course-stage-trigger:focus-visible { outline: 3px solid #99b4ff; outline-offset: 2px; }
.course-stage-trigger-hint { font-size: 11px; font-weight: 650; line-height: 1; }
.course-stage-open { --stage-fg: #6941c6; --stage-bg: #f4ebff; --stage-line: #d9c4ff; }
.course-stage-pending { --stage-fg: #92400e; --stage-bg: #fff4d6; --stage-line: #f4d58d; }
.course-stage-ongoing { --stage-fg: #175cd3; --stage-bg: #e8f1ff; --stage-line: #afcdfb; }
.course-stage-finished { --stage-fg: #067647; --stage-bg: #dcfae6; --stage-line: #a6e7c1; }
.course-stage-paused { --stage-fg: #475467; --stage-bg: #eaecf0; --stage-line: #c7cdd6; }
.course-stage-cancelled { --stage-fg: #b42318; --stage-bg: #fee9e7; --stage-line: #f5bbb5; }
.course-stage-closed, .course-stage-full { --stage-fg: #57534e; --stage-bg: #f5f5f4; --stage-line: #d6d3d1; }
.course-stage-scheduling { --stage-fg: #9a5000; --stage-bg: #fff4dc; --stage-line: #f1ca81; }
.course-stage-consuming { --stage-fg: #175cd3; --stage-bg: #e8f1ff; --stage-line: #afcdfb; }
.course-stage-closing { --stage-fg: #6941c6; --stage-bg: #f2ebff; --stage-line: #d8c5fa; }
.course-stage-ended { --stage-fg: #067647; --stage-bg: #dcfae6; --stage-line: #a6e7c1; }

.business-workspace[data-business-line="one_on_one"] .course-ops-schedule {
  border-color: #afcdfb;
  background: #f2f7ff;
  color: #175cd3;
  font-weight: 700;
}

.business-workspace[data-business-line="one_on_one"] .course-ops-schedule:hover { background: #e5efff; }

.modal-overlay .modal.course-stage-modal {
  width: min(640px, calc(100vw - 32px));
  max-width: 640px;
  max-height: calc(100dvh - 32px);
  border-color: var(--core-line);
  box-shadow: 0 12px 32px -8px rgba(13, 20, 38, 0.14);
}

.modal-overlay .course-stage-modal .modal-header {
  min-height: 72px;
  flex: 0 0 72px;
  padding: 0 24px;
  border-bottom: 0;
}

.modal-overlay .course-stage-modal .modal-header h3 { font-size: 18px; font-weight: 650; letter-spacing: 0; }
.modal-overlay .course-stage-modal .modal-close { width: auto; height: 32px; padding: 0; font-size: 0; }
.modal-overlay .course-stage-modal .modal-close::after { content: '关闭'; font-size: 13px; font-weight: 500; }

.modal-overlay .course-stage-modal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 24px;
}

.modal-overlay .course-stage-modal .modal-footer {
  min-height: 72px;
  flex: 0 0 72px;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 16px 24px;
  box-sizing: border-box;
  box-shadow: none;
}

.modal-overlay .course-stage-modal .modal-footer .btn { width: 116px; min-width: 116px; min-height: 40px; }

.course-stage-dialog { display: grid; gap: 20px; }
.course-stage-summary {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: var(--core-radius-card);
  background: var(--core-surface-subtle);
}
.course-stage-summary strong { color: var(--core-ink); font-size: 16px; font-weight: 650; line-height: 24px; overflow-wrap: anywhere; }
.course-stage-summary span { color: var(--core-text-secondary); font-size: 13px; line-height: 20px; }
.course-stage-progress { display: grid; gap: 12px; }
.course-stage-progress > strong { color: var(--core-ink); font-size: 13px; font-weight: 650; line-height: 18px; }
.course-stage-track { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.course-stage-pill { font-weight: 500; }
.course-stage-pill.is-current { box-shadow: 0 0 0 1px currentColor; }
.course-stage-pill.is-done { opacity: .78; }
.course-stage-connector { color: var(--core-muted); font-size: 16px; line-height: 24px; }
.course-stage-help { margin: 0; color: var(--core-text-secondary); font-size: 14px; line-height: 22px; }
.course-stage-warning {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--core-radius-sm);
  background: var(--core-warning-soft);
}
.course-stage-warning strong { color: var(--core-ink); font-size: 13px; font-weight: 650; line-height: 18px; }
.course-stage-warning p { margin: 0; color: var(--core-text-secondary); font-size: 13px; line-height: 20px; }

@media (max-width: 700px) {
  .modal-overlay .modal.course-stage-modal { max-height: calc(92dvh - env(safe-area-inset-top)); }
  .modal-overlay .course-stage-modal .modal-header { min-height: 64px; flex-basis: 64px; padding: 0 16px; }
  .modal-overlay .course-stage-modal .modal-body { padding: 18px 16px; }
  .modal-overlay .course-stage-modal .modal-footer {
    min-height: calc(72px + env(safe-area-inset-bottom));
    flex-basis: calc(72px + env(safe-area-inset-bottom));
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  }
  .course-stage-dialog { gap: 16px; }
  .course-stage-track { gap: 8px; }
}

/* Ocean management design system · Figma All Screens (2026-10-08).
 * Shared shell and controls are used by every operations page. Business
 * renderers keep their data, actions, and authorization checks unchanged. */
:root {
  --core-canvas: #f6f8fc;
  --core-surface-subtle: #f9fafc;
  --core-ink: #0d1426;
  --core-text-secondary: #546380;
  --core-muted: #6b7891;
  --core-caption: #6b7891;
  --core-line: #e3e8f2;
  --core-line-soft: #ebedf5;
  --core-blue: #1a73e8;
  --core-blue-hover: #1765cd;
  --core-blue-soft: #e8f0fe;
  --core-shadow-card: none;
}

.app-shell { grid-template-columns: 272px minmax(0, 1fr); }
.sidebar { box-shadow: none; }
.sidebar-brand { min-height: 72px; padding: 14px 18px; }
.sidebar-nav { padding: 14px 10px 24px; }
.nav-group { margin: 0 0 10px; }
.nav-group + .nav-group { border-top: 1px solid var(--core-line-soft); padding-top: 10px; }
.nav-group-label,
.nav-group-label:first-child {
  box-sizing: border-box;
  width: 100%;
  min-height: 32px;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 4px 12px;
  border: 0;
  color: var(--core-muted);
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-align: left;
}
.nav-group-label.active { color: var(--core-blue); }
.nav-group-items { padding: 2px 0 4px; }
.nav-button {
  min-height: 42px;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  margin-bottom: 2px;
  padding: 0 12px 0 16px;
  border-radius: 8px;
  color: var(--core-text-secondary);
  font-size: 15px;
  font-weight: 550;
  transform: none;
}
.nav-button svg { width: 18px; height: 18px; stroke-width: 1.8; }
.nav-button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-button:hover { color: var(--core-blue); background: #f3f7fd; transform: none; }
.nav-button.active {
  color: var(--core-blue);
  background: var(--core-blue-soft);
  box-shadow: inset 3px 0 0 var(--core-blue);
  font-weight: 700;
}
.sidebar-user { min-height: 73px; padding: 12px 17px; }
.topbar {
  min-height: 72px;
  padding: 10px 32px;
  box-shadow: none;
  background: #fff;
}
.topbar-context { color: var(--core-text-secondary); font-size: 14px; }
.topbar-context strong { color: var(--core-ink); font-weight: 650; }
.content { max-width: none; padding: 30px 32px; }
.core-ops-page,
.business-page { gap: 16px; }
.page-heading,
.core-ops-page .page-header,
.business-page-header { margin-bottom: 18px; }
.page-heading h1,
.core-ops-page .page-header h1,
.core-ops-page .page-header h2 { color: var(--core-ink); font-size: 25px; line-height: 1.35; }
.page-heading p,
.core-ops-page .page-header p { color: var(--core-text-secondary); font-size: 13px; line-height: 1.5; }
.core-view-intro { display: grid; gap: 4px; margin: 0 0 2px; }
.core-view-intro h1 { margin: 0; color: var(--core-ink); font-size: 25px; line-height: 1.35; font-weight: 700; }
.core-view-intro p { margin: 0; color: var(--core-text-secondary); font-size: 13px; line-height: 1.5; }
.section-kicker { color: var(--core-blue); font-size: 11px; letter-spacing: .04em; }

.panel,
.business-panel,
.core-ops-page .card,
.core-ops-page .product-summary-panel,
.core-ops-page .product-summary-stats > div,
.core-ops-page .stat-card,
.metric-card,
.empty-state {
  border-color: var(--core-line);
  border-radius: 12px;
  box-shadow: none;
}
.core-ops-page .card-header,
.panel-header,
.business-panel-header { background: #fff; }
.toolbar,
.core-list-toolbar,
.core-user-toolbar,
.core-ops-page .toolbar,
.business-toolbar,
.product-summary-toolbar {
  border-color: var(--core-line);
  background: #fff;
}
.primary-button,
.core-ops-page .btn-primary,
.business-workspace-tab.active { background: var(--core-blue); box-shadow: none; }
.primary-button:hover,
.core-ops-page .btn-primary:hover { background: var(--core-blue-hover); box-shadow: none; }
.secondary-button,
.core-ops-page .btn-outline { border-color: var(--core-line); color: var(--core-ink); background: #fff; }
.core-ops-page :is(button, a, input, select, textarea):focus-visible { outline: 3px solid rgba(26, 115, 232, .2); outline-offset: 2px; }
.core-ops-page :is(input, select, textarea):focus { border-color: var(--core-blue); box-shadow: 0 0 0 3px rgba(26, 115, 232, .1); }
.core-ops-page .table-wrapper,
.business-table-wrap { border-radius: inherit; }
.core-ops-page thead th,
.business-table thead th,
.table-wrap thead th {
  height: 47px;
  color: var(--core-text-secondary);
  background: var(--core-surface-subtle);
  font-size: 12px;
  font-weight: 650;
}
.core-ops-page tbody td,
.business-table tbody td,
.table-wrap tbody td {
  height: 66px;
  box-sizing: border-box;
  padding: 10px 16px;
  border-bottom-color: var(--core-line-soft);
  color: var(--core-text-secondary);
  font-size: 13px;
}
.core-ops-page tbody td strong,
.business-table tbody td strong,
.table-wrap tbody td strong { color: var(--core-ink); }
.core-ops-page tbody tr:hover,
.business-table tbody tr:hover,
.table-wrap tbody tr:hover { background: #f8fbff; }
.business-workspace-tabs {
  min-height: 50px;
  box-sizing: border-box;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 11px;
}
.business-workspace-tab { min-height: 36px; padding: 7px 16px; font-size: 13px; }

/* Transaction list: short metrics, compact filters and predictable 66px rows.
 * The historical guidance-type and date filters remain available. */
#content[data-module="course-reservations"] .business-workspace-tabs { min-height: 50px; margin-bottom: 18px; }
#content[data-module="course-reservations"] .business-workspace-tab { min-height: 36px; padding: 7px 16px; }
#content[data-module="course-reservations"] .order-page-heading { min-height: 66px; margin-bottom: 16px; }
#content[data-module="course-reservations"] .order-metrics { gap: 14px; margin-bottom: 18px; }
#content[data-module="course-reservations"] .order-metrics article { min-height: 92px; box-sizing: border-box; padding: 14px 17px; border-radius: 12px; }
#content[data-module="course-reservations"] .order-metrics span { font-size: 12px; }
#content[data-module="course-reservations"] .order-metrics strong { margin-top: 4px; font-size: 27px; }
#content[data-module="course-reservations"] .order-toolbar {
  min-height: 0;
  grid-template-columns: minmax(140px, 1fr) minmax(190px, 1.55fr) minmax(145px, .95fr) minmax(220px, 1.4fr) auto;
  align-items: end;
  gap: 12px;
  margin-bottom: 18px;
  padding: 15px;
  border-radius: 11px;
}
#content[data-module="course-reservations"] .order-filter-field:nth-child(n) { grid-column: auto; }
#content[data-module="course-reservations"] .order-filter-actions { grid-column: auto; justify-content: flex-end; flex-wrap: nowrap; }
#content[data-module="course-reservations"] .order-filter-field :is(input, select),
#content[data-module="course-reservations"] .order-filter-actions .btn { min-height: 40px; height: 40px; }
.order-date-pair { display: flex; align-items: center; gap: 5px; min-width: 0; }
.order-date-pair label { flex: 1 1 0; min-width: 0; }
.order-date-pair > span { color: var(--core-muted); }
#content[data-module="course-reservations"] .order-date-pair input { width: 100%; min-width: 0; padding: 0 5px; font-size: 11px; }
.order-more-filters { position: relative; flex: 0 0 auto; }
.order-more-filters > summary {
  display: grid;
  min-height: 40px;
  box-sizing: border-box;
  place-items: center;
  padding: 0 9px;
  border: 1px solid var(--core-line);
  border-radius: 8px;
  color: var(--core-text-secondary);
  background: #fff;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  list-style: none;
  cursor: pointer;
}
.order-more-filters > summary::-webkit-details-marker { display: none; }
.order-more-filters[open] > summary { border-color: var(--core-blue); color: var(--core-blue); background: var(--core-blue-soft); }
.order-more-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 8;
  width: 220px;
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid var(--core-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--core-shadow-float);
}
#content[data-module="course-reservations"] .order-table { min-width: 1230px; }
#content[data-module="course-reservations"] .order-table thead th { height: 47px; background: var(--core-surface-subtle); }
#content[data-module="course-reservations"] .order-table tbody tr,
#content[data-module="course-reservations"] .order-table tbody td { height: 66px; max-height: none; }
#content[data-module="course-reservations"] .order-table tbody td { padding: 9px 12px; }
#content[data-module="course-reservations"] .order-table :is(th, td):last-child { min-width: 190px; }

/* Product workspaces share the same category/metric/catalog rhythm as the
 * 1-to-1, class and education-service design screens. */
#content:is([data-module="admin-courses"], [data-module="admin-class-courses"], [data-module="admin-education"]) .course-primary-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  padding: 11px 12px;
  border: 1px solid var(--core-line);
  border-radius: 11px;
  background: #fff;
}
#content:is([data-module="admin-courses"], [data-module="admin-class-courses"]) .course-primary-filters .btn {
  min-height: 32px;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 650;
}
#content:is([data-module="admin-courses"], [data-module="admin-class-courses"], [data-module="admin-education"]) .expert-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}
#content:is([data-module="admin-courses"], [data-module="admin-class-courses"], [data-module="admin-education"]) .expert-stats > div {
  min-height: 92px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 14px 17px;
  border: 1px solid var(--core-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}
#content:is([data-module="admin-courses"], [data-module="admin-class-courses"], [data-module="admin-education"]) .expert-stats > div span { order: -1; color: var(--core-text-secondary); font-size: 12px; }
#content:is([data-module="admin-courses"], [data-module="admin-class-courses"], [data-module="admin-education"]) .expert-stats > div strong { color: var(--core-ink); font-size: 27px; line-height: 1.15; }
#content:is([data-module="admin-courses"], [data-module="admin-class-courses"]) .expert-catalog-board { gap: 14px; }
#content:is([data-module="admin-courses"], [data-module="admin-class-courses"]) .expert-catalog-category { border-color: var(--core-line); border-radius: 11px; }
#content:is([data-module="admin-courses"], [data-module="admin-class-courses"]) .expert-catalog-category-head {
  min-height: 49px;
  box-sizing: border-box;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-color: var(--core-line-soft);
  background: var(--core-surface-subtle);
}
#content:is([data-module="admin-courses"], [data-module="admin-class-courses"]) .expert-catalog-category-head h4 { color: var(--core-ink); font-size: 14px; font-weight: 700; }
#content:is([data-module="admin-courses"], [data-module="admin-class-courses"]) .expert-catalog-actions { gap: 6px; }
#content:is([data-module="admin-courses"], [data-module="admin-class-courses"]) .expert-catalog-items { padding: 8px 12px 12px; }
#content[data-module="admin-courses"] .course-admin-row-one-to-one > div:first-child {
  grid-template-columns: 52px minmax(0, 1fr) auto !important;
  gap: 12px !important;
  padding: 13px 14px !important;
}
#content[data-module="admin-courses"] .course-admin-row-one-to-one .course-admin-cover { width: 42px; height: 42px; }
#content[data-module="admin-courses"] .course-admin-row-one-to-one .course-admin-main strong { color: var(--core-ink); font-size: 14px; }
#content[data-module="admin-courses"] .course-admin-row-one-to-one .course-admin-main p { margin: 3px 0; color: var(--core-text-secondary); font-size: 12px; }
#content[data-module="admin-courses"] .course-admin-row-one-to-one .expert-assigned-list { gap: 0; margin: 0 14px 10px 78px !important; }
#content[data-module="admin-courses"] .expert-assigned-entry {
  min-height: 66px;
  box-sizing: border-box;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-color: var(--core-line-soft);
  border-radius: 0;
  background: #fff;
}
#content[data-module="admin-courses"] .expert-assigned-entry:nth-child(even) { background: var(--core-surface-subtle); }
#content[data-module="admin-courses"] .expert-assigned-entry:first-child { border-radius: 8px 8px 0 0; }
#content[data-module="admin-courses"] .expert-assigned-entry:last-child { border-radius: 0 0 8px 8px; }
#content[data-module="admin-courses"] .expert-assigned-entry:hover { border-color: #b9d3f9; background: #f2f7ff; }
#content[data-module="admin-courses"] .expert-assigned-entry-main strong { color: var(--core-ink); font-size: 13px; }
#content[data-module="admin-courses"] .expert-assigned-entry-main span { color: var(--core-text-secondary); font-size: 12px; }
#content[data-module="admin-courses"] .expert-assigned-entry-main small { color: var(--core-muted); font-size: 11px; }

/* Scheduling workspace uses the same four-metric, filter, table structure,
 * while stage changes and fulfilment stay in the class workflow. */
.course-ops-metrics { gap: 14px; margin: 0 0 16px; }
.course-ops-metrics article { min-height: 92px; box-sizing: border-box; padding: 14px 17px; }
.course-ops-metrics strong { margin-top: 4px; font-size: 27px; }
.course-ops-toolbar {
  display: grid;
  grid-template-columns: minmax(200px, 1.6fr) minmax(150px, 1fr) minmax(180px, 1fr) auto;
  align-items: end;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--core-line);
  border-radius: 11px;
  background: #fff;
}
.course-ops-toolbar .order-filter-field { min-width: 0; }
.course-ops-toolbar .order-filter-field :is(input, select) { width: 100%; min-height: 40px; box-sizing: border-box; }
.course-ops-filter-actions { display: flex; align-items: center; gap: 8px; }
.course-ops-filter-actions .btn { min-height: 40px; white-space: nowrap; }
.course-ops-card { overflow: hidden; }
.course-ops-card .card-body { padding: 0; overflow-x: auto; }
.course-ops-card table { min-width: 1100px; }
.course-ops-card thead th { height: 47px; }
.course-ops-card tbody td { height: 66px; padding: 9px 12px; }
.course-ops-card :is(th, td):last-child { min-width: 180px; }
.course-ops-actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.course-ops-actions .btn { min-height: 32px; padding: 0 10px; font-size: 12px; }
.course-ops-overflow { flex: 0 0 auto; }
.course-ops-overflow > summary {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--core-line);
  border-radius: 8px;
  background: #fff;
  color: var(--core-text-secondary);
  font-size: 15px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
.course-ops-overflow > summary::-webkit-details-marker { display: none; }
.course-ops-overflow[open] > summary { border-color: var(--core-blue); color: var(--core-blue); background: var(--core-blue-soft); }
.course-ops-menu { display: grid; min-width: 120px; gap: 2px; margin-top: 6px; padding: 5px; border: 1px solid var(--core-line); border-radius: 8px; background: #fff; }
.course-ops-menu button { min-height: 30px; border: 0; border-radius: 6px; color: var(--core-ink); background: #fff; text-align: left; cursor: pointer; }
.course-ops-menu button:hover { background: var(--core-surface-subtle); }
.course-ops-menu button.danger { color: var(--core-danger); }
.course-ops-card .course-ops-pagination { border-top-color: var(--core-line-soft); }
.business-workspace[data-business-line="one_on_one"] .course-ops-card :is(th, td):last-child,
.business-workspace[data-business-line="guidance"] .course-ops-card :is(th, td):last-child { min-width: 92px; width: 92px; }
.course-ops-detail { display: grid; gap: 16px; }
.course-ops-detail .page-header { margin-bottom: 0; }
.course-ops-detail .card { margin: 0; }
.course-ops-stage-panel.is-focused { border-color: #92b4ff; box-shadow: 0 0 0 3px #e8f0ff; }
.course-ops-stage-track { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.course-ops-step { padding: 8px 12px; border: 1px solid #dce3ed; border-radius: 8px; background: #f6f8fb; color: #667085; font-size: 13px; font-weight: 700; }
.course-ops-step.is-done { background: #e7f6ed; border-color: #bce5cd; color: #067647; }
.course-ops-step.is-current { background: #eaf1ff; border-color: #9abaff; color: #175cd3; }
.course-ops-step-arrow { color: #98a2b3; font-weight: 700; }
.course-ops-stage-panel .card-body > p { margin: 0 0 16px; color: #475467; line-height: 1.5; }
.course-ops-stage-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.course-ops-close-check { display: inline-flex; align-items: center; gap: 8px; color: #344054; font-size: 13px; }
.course-ops-close-check input { width: 16px; height: 16px; }
.course-ops-info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 20px; margin: 0; }
.course-ops-info-grid div { min-width: 0; }
.course-ops-info-grid dt { color: #667085; font-size: 12px; margin-bottom: 4px; }
.course-ops-info-grid dd { color: #182230; font-size: 14px; font-weight: 600; margin: 0; overflow-wrap: anywhere; }
.course-ops-detail .table-wrapper { overflow-x: auto; }
.course-ops-detail table { width: 100%; }
.course-ops-detail th, .course-ops-detail td { padding: 11px 12px; vertical-align: middle; }
@media (max-width: 900px) {
  .course-ops-info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .course-ops-detail table { min-width: 650px; }
}
@media (max-width: 620px) {
  .course-ops-info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1050px) {
  .course-ops-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .course-ops-filter-actions { justify-content: flex-end; }
}
@media (max-width: 620px) {
  .course-ops-toolbar { grid-template-columns: 1fr; }
  .course-ops-filter-actions { justify-content: flex-start; }
}

@media (max-width: 980px) {
  #content[data-module="admin-courses"] .course-admin-row-one-to-one > div:first-child { grid-template-columns: 48px minmax(0, 1fr) !important; }
  #content[data-module="admin-courses"] .course-admin-row-one-to-one > div:first-child .expert-catalog-actions { grid-column: 1 / -1; justify-content: flex-start; }
  #content[data-module="admin-courses"] .course-admin-row-one-to-one .expert-assigned-list { margin-left: 14px !important; }
}

/* Keep actions reachable and the footer visible in every long form. */
.modal-overlay .modal,
.modal-backdrop > .modal { display: flex; flex-direction: column; max-height: calc(100dvh - 48px); }
.modal-overlay .modal-body,
.modal-backdrop .modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.modal-overlay .modal-footer,
.modal-backdrop .modal-footer { flex: 0 0 auto; position: relative; z-index: 1; background: #fff; }

@media (max-width: 1180px) {
  #content[data-module="course-reservations"] .order-toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #content[data-module="course-reservations"] .order-filter-actions { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .topbar { min-height: 72px; padding: 10px 16px; }
  .content { padding: 16px; }
  .nav-group-label { min-height: 38px; }
  .nav-button { min-height: 46px; }
  #content[data-module="course-reservations"] .order-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #content[data-module="course-reservations"] .order-filter-field:nth-child(n) { grid-column: auto; }
  #content[data-module="course-reservations"] .order-filter-field:nth-child(-n + 2) { grid-column: 1 / -1; }
  #content[data-module="course-reservations"] .order-date-range { grid-column: 1 / -1 !important; }
  #content[data-module="course-reservations"] .order-filter-actions { grid-column: 1 / -1; justify-content: flex-start; flex-wrap: wrap; }
  .modal-overlay .modal,
  .modal-backdrop > .modal { max-height: calc(100dvh - 16px); }
}

@media (min-width: 761px) and (max-width: 1180px) {
  .app-shell { grid-template-columns: 252px minmax(0, 1fr); }
  .sidebar { width: 252px; }
}
