:root {
  --bg: #071426;
  --bg-deep: #0d213d;
  --panel: rgba(244, 249, 255, 0.88);
  --panel-border: rgba(76, 120, 204, 0.18);
  --text: #11233f;
  --muted: #607798;
  --accent: #1f7df2;
  --accent-deep: #0a56ca;
  --success: #16b58b;
  --warning: #d8a336;
  --shadow: 0 18px 50px rgba(6, 22, 48, 0.18);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(116, 177, 255, 0.22), transparent 32%),
    radial-gradient(circle at bottom right, rgba(31, 125, 242, 0.18), transparent 28%),
    linear-gradient(135deg, #091525 0%, #0d1d35 45%, #122a4a 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(122, 164, 228, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 164, 228, 0.07) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.page-shell {
  position: relative;
  z-index: 1;
  max-width: 1360px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}

.hero h1 {
  margin: 8px 0 12px;
  max-width: 780px;
  font-family: "DM Serif Display", serif;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.eyebrow,
.section-kicker,
.ticket-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  color: var(--accent);
}

.hero-text {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.view-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.view-chip {
  border: 1px solid rgba(84, 132, 214, 0.18);
  border-radius: 999px;
  padding: 11px 16px;
  background: rgba(247, 251, 255, 0.78);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.view-chip.active {
  background: rgba(31, 125, 242, 0.14);
  border-color: rgba(31, 125, 242, 0.34);
  color: var(--accent-deep);
}

.hero-tip {
  margin-top: 14px;
  max-width: 720px;
  color: var(--muted);
  font-size: 0.96rem;
}

.hero-badge {
  min-width: 220px;
  padding: 18px 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(8, 27, 55, 0.96), rgba(12, 37, 72, 0.94));
  color: #eef5ff;
  box-shadow: var(--shadow);
}

.hero-badge span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: rgba(215, 231, 255, 0.74);
}

.hero-badge strong {
  font-size: 1.3rem;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
}

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

.panel {
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.panel.wide {
  grid-column: 1 / -1;
}

.is-hidden {
  display: none !important;
}

.panel.is-hidden {
  display: none;
}

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

.panel h2,
.panel h3 {
  margin: 4px 0 0;
}

.section-note {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.field-with-action {
  display: flex;
  gap: 10px;
  align-items: center;
}

.field-with-action select,
.field-with-action input {
  flex: 1;
}

.field-with-action select {
  max-width: 136px;
}

.compact-button {
  padding: 11px 14px;
  white-space: nowrap;
}

.field-help {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.field-help.error {
  color: var(--accent-deep);
}

.field-help.success {
  color: var(--success);
}

input.is-invalid {
  border-color: rgba(31, 125, 242, 0.72);
  background: rgba(237, 246, 255, 0.96);
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--muted);
}

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

input,
select,
textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(131, 176, 241, 0.24);
  background: rgba(248, 252, 255, 0.9);
  color: var(--text);
}

textarea {
  resize: vertical;
  min-height: 84px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(31, 125, 242, 0.24);
  border-color: var(--accent);
}

.course-list {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.course-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 14px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(246, 250, 255, 0.96), rgba(235, 244, 255, 0.9));
  border: 1px solid rgba(129, 171, 233, 0.18);
}

.course-picker label {
  margin: 0;
}

.course-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(86, 128, 196, 0.16);
  background: rgba(248, 251, 255, 0.76);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.course-card:hover {
  transform: translateY(-2px);
  border-color: rgba(31, 125, 242, 0.42);
  box-shadow: 0 14px 30px rgba(11, 40, 86, 0.12);
}

.course-card.selected {
  border-color: rgba(31, 125, 242, 0.74);
  background: linear-gradient(135deg, rgba(232, 243, 255, 0.98), rgba(248, 252, 255, 0.94));
}

.course-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.course-card h3 {
  margin: 0 0 6px;
}

.course-meta,
.agreement-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(31, 125, 242, 0.1);
  color: var(--accent-deep);
  font-size: 0.82rem;
}

.course-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.course-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-deep);
}

.toggle {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(20, 58, 118, 0.08);
  color: var(--text);
  cursor: pointer;
}

.course-card.selected .toggle,
.primary-button {
  background: var(--accent);
  color: #fff;
}

.primary-button:hover,
.ghost-button:hover,
.toggle:hover,
.text-button:hover {
  filter: brightness(0.97);
}

.ghost-button,
.text-button {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(20, 58, 118, 0.08);
  color: var(--text);
  cursor: pointer;
}

.text-button {
  padding: 0;
  background: transparent;
  color: var(--accent);
}

.summary-box,
.status-box,
.ticket-card,
.agreement-card {
  border-radius: var(--radius-md);
  background: rgba(249, 252, 255, 0.8);
  border: 1px solid rgba(86, 128, 196, 0.14);
}

.summary-box {
  padding: 16px;
  margin-bottom: 18px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  color: var(--muted);
}

.summary-row + .summary-row {
  border-top: 1px solid rgba(86, 128, 196, 0.12);
}

.summary-row.total {
  color: var(--text);
  font-size: 1.08rem;
}

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

.discount-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: rgba(28, 123, 87, 0.08);
  color: #215843;
}

.special-discount-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.discount-mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.discount-mode-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.policy-overview {
  margin-bottom: 16px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(232, 243, 255, 0.96), rgba(248, 252, 255, 0.9));
  border: 1px solid rgba(31, 125, 242, 0.16);
}

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

.policy-overview-card,
.policy-tier-card {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(249, 252, 255, 0.92);
  border: 1px solid rgba(86, 128, 196, 0.12);
}

.policy-overview-label,
.policy-tier-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.84rem;
}

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

#specialDiscountCard .inline-status {
  margin-top: 14px;
}

.special-discount-history {
  display: grid;
  gap: 10px;
}

.special-discount-history-item {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: rgba(249, 252, 255, 0.86);
  border: 1px solid rgba(86, 128, 196, 0.12);
}

.empty-state {
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.ticket-card,
.agreement-card {
  padding: 22px;
}

.subsection-head {
  margin: 26px 0 14px;
}

.subsection-head h3 {
  margin: 0;
}

.inline-status {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(248, 252, 255, 0.82);
  border: 1px solid rgba(86, 128, 196, 0.14);
  color: var(--muted);
}

.inline-status.error {
  color: #9a6a15;
  background: linear-gradient(135deg, rgba(255, 247, 226, 0.94), rgba(242, 247, 255, 0.92));
  border-color: rgba(214, 168, 68, 0.24);
}

.compact-status {
  margin-top: 14px;
  margin-bottom: 0;
}

.ops-bar {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(300px, 420px) minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.admin-hub {
  margin-bottom: 18px;
}

.admin-switch {
  margin-top: 0;
}

.admin-tip {
  margin-top: 10px;
}

.ops-role-picker,
.ops-scope-picker,
.ops-summary {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(247, 251, 255, 0.82);
  border: 1px solid rgba(86, 128, 196, 0.14);
}

.ops-scope-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.ops-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ops-summary-label {
  font-size: 0.9rem;
  color: var(--muted);
}

.permission-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.config-column,
.config-agreements {
  display: grid;
  gap: 14px;
}

.config-subhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.agreement-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
}

.agreement-toolbar .section-note {
  max-width: 640px;
}

.agreement-version-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.agreement-version-tools label {
  min-width: 150px;
}

.config-list,
.agreement-config-grid {
  display: grid;
  gap: 14px;
}

.agreement-config-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.agreement-version-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.agreement-version-card {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: rgba(249, 252, 255, 0.86);
  border: 1px solid rgba(86, 128, 196, 0.12);
}

.config-extension-grid {
  margin-top: 14px;
}

.config-item,
.agreement-config-card {
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(248, 252, 255, 0.84);
  border: 1px solid rgba(86, 128, 196, 0.14);
}

.config-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

.config-form-grid {
  margin-bottom: 12px;
}

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

.inline-checkbox {
  align-items: center;
  min-height: 100%;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  white-space: nowrap;
}

.status-chip.active {
  background: rgba(28, 123, 87, 0.12);
  color: var(--success);
}

.status-chip.warning {
  background: rgba(216, 163, 54, 0.16);
  color: var(--warning);
}

.status-chip.muted {
  background: rgba(20, 58, 118, 0.08);
  color: var(--muted);
}

.policy-cycle-note {
  margin-top: 4px;
}

.permission-note {
  margin-top: 0;
}

.permission-matrix-card {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(232, 243, 255, 0.96), rgba(248, 252, 255, 0.9));
  border: 1px solid rgba(31, 125, 242, 0.16);
}

.permission-matrix-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

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

.permission-matrix-role {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(249, 252, 255, 0.84);
  border: 1px solid rgba(86, 128, 196, 0.12);
}

.permission-matrix-role.active {
  border-color: rgba(31, 125, 242, 0.4);
  box-shadow: 0 12px 28px rgba(11, 40, 86, 0.12);
}

.permission-matrix-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.matrix-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
}

.matrix-tag.enabled {
  background: rgba(28, 123, 87, 0.12);
  color: var(--success);
}

.matrix-tag.disabled {
  background: rgba(20, 58, 118, 0.08);
  color: var(--muted);
}

.permission-grid {
  display: grid;
  gap: 14px;
}

.permission-card {
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(249, 252, 255, 0.82);
  border: 1px solid rgba(86, 128, 196, 0.14);
}

.permission-card.active {
  border-color: rgba(31, 125, 242, 0.42);
  background: linear-gradient(135deg, rgba(232, 243, 255, 0.96), rgba(248, 252, 255, 0.9));
}

.permission-card-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.permission-card-scope {
  margin: 6px 0 0;
  color: var(--accent-deep);
  font-size: 0.88rem;
  line-height: 1.5;
}

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

.permission-checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(244, 249, 255, 0.84);
  border: 1px solid rgba(131, 176, 241, 0.18);
  color: var(--text);
}

.permission-checkbox input {
  width: 16px;
  height: 16px;
}

.ticket-head,
.ticket-block,
.ticket-row,
.ticket-footer,
.signature-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.ticket-meta,
.ticket-block {
  color: var(--muted);
}

.ticket-block {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 14px;
  padding: 18px 0;
}

.ticket-block div,
.ticket-total {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ticket-table {
  border-top: 1px solid rgba(131, 176, 241, 0.22);
  border-bottom: 1px solid rgba(131, 176, 241, 0.22);
  padding: 14px 0;
}

.ticket-row {
  padding: 9px 0;
}

.ticket-row.header {
  color: var(--muted);
}

.ticket-footer {
  align-items: end;
  padding-top: 18px;
}

.ticket-total strong {
  font-size: 1.35rem;
  color: var(--accent-deep);
}

.ticket-note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed rgba(131, 176, 241, 0.22);
  color: var(--muted);
  line-height: 1.7;
}

.agreement-layout {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 24px;
}

.agreement-card {
  line-height: 1.8;
}

.agreement-card h3 {
  margin-top: 0;
  margin-bottom: 14px;
}

.agreement-card p {
  margin: 0 0 12px;
  color: #233a5d;
}

.agreement-effective-block {
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(31, 125, 242, 0.08);
  border: 1px solid rgba(31, 125, 242, 0.14);
}

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

.agreement-signature-grid div {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(245, 250, 255, 0.88);
  border: 1px solid rgba(131, 176, 241, 0.14);
}

.agreement-signature-grid span {
  font-size: 0.84rem;
  color: var(--muted);
}

.stamp-mark {
  display: inline-flex;
  margin-top: 16px;
  padding: 18px 22px;
  border: 3px solid rgba(185, 24, 24, 0.75);
  border-radius: 999px;
  color: rgba(185, 24, 24, 0.88);
  font-weight: 700;
  letter-spacing: 0.08em;
  transform: rotate(-10deg);
  box-shadow: inset 0 0 0 2px rgba(185, 24, 24, 0.14);
}

.stamp-mark img,
.seal-image-mark {
  display: block;
  max-width: 180px;
  max-height: 180px;
  object-fit: contain;
  filter: saturate(1.05);
}

.ticket-stamp-mark {
  justify-self: end;
  margin-top: 22px;
  margin-bottom: 6px;
  max-width: 280px;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.5;
}

.seal-upload-preview {
  margin-top: 12px;
  width: min(220px, 100%);
  max-height: 220px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(248, 251, 255, 0.92);
  border: 1px solid rgba(131, 176, 241, 0.22);
  padding: 10px;
}

.agreement-card .clause {
  padding: 14px 0;
  border-top: 1px dashed rgba(131, 176, 241, 0.22);
}

.signature-panel {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: rgba(8, 27, 55, 0.95);
  color: #edf5ff;
}

.signature-panel label {
  color: rgba(220, 233, 255, 0.82);
  margin-bottom: 14px;
}

.signature-panel input {
  background: rgba(255, 255, 255, 0.96);
}

.seal-summary-card {
  margin: 6px 0 4px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.seal-summary-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.seal-summary-head h4 {
  margin: 0;
  font-size: 1rem;
}

.seal-summary-text {
  margin: 10px 0 0;
  color: rgba(220, 233, 255, 0.82);
  line-height: 1.6;
}

.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.checkbox input {
  width: 18px;
  height: 18px;
}

.signature-wrap {
  margin: 10px 0 18px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
}

#signaturePad {
  width: 100%;
  margin-top: 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(252, 254, 255, 0.98), rgba(239, 247, 255, 0.94));
  cursor: crosshair;
}

.wide-button {
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  border-radius: 999px;
  cursor: pointer;
}

.status-box {
  margin-top: 16px;
  padding: 16px;
  color: rgba(220, 233, 255, 0.82);
  background: rgba(255, 255, 255, 0.08);
}

.status-box.success {
  color: #d9ffed;
  background: rgba(28, 123, 87, 0.22);
}

.ledger-head {
  align-items: end;
}

.ledger-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: end;
}

.filter-select {
  min-width: 180px;
  padding: 11px 14px;
  border-radius: 999px;
  border: 1px solid rgba(86, 128, 196, 0.24);
  background: rgba(247, 251, 255, 0.9);
  color: var(--text);
}

.warning-button {
  background: rgba(216, 163, 54, 0.14);
  color: #946a14;
}

.metric-grid,
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.metric-card,
.category-card {
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(248, 252, 255, 0.86);
  border: 1px solid rgba(86, 128, 196, 0.14);
}

.metric-card.highlight {
  background: linear-gradient(135deg, rgba(228, 241, 255, 0.98), rgba(247, 251, 255, 0.9));
  border-color: rgba(31, 125, 242, 0.28);
}

.metric-label,
.category-name,
.metric-sub,
.category-sub,
.category-foot {
  display: block;
}

.metric-label,
.category-name {
  color: var(--muted);
  font-size: 0.92rem;
}

.metric-value,
.category-value {
  display: block;
  margin: 10px 0 6px;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--accent-deep);
}

.metric-sub,
.category-sub,
.category-foot {
  color: var(--muted);
  font-size: 0.9rem;
}

.category-empty {
  grid-column: 1 / -1;
}

.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(86, 128, 196, 0.14);
  background: rgba(248, 252, 255, 0.84);
}

.ledger-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1160px;
}

.ledger-table th,
.ledger-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(86, 128, 196, 0.12);
  text-align: left;
  vertical-align: top;
}

.ledger-table th {
  color: var(--muted);
  font-weight: 600;
  background: rgba(240, 247, 255, 0.96);
}

.ledger-table tbody tr:hover {
  background: rgba(31, 125, 242, 0.04);
}

.cell-strong {
  font-weight: 700;
  color: var(--accent-deep);
}

.table-sub {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.84rem;
  color: var(--muted);
}

.ledger-status-cell {
  min-width: 170px;
}

.ledger-status-cell .status-chip + .status-chip {
  margin-left: 6px;
}

.ledger-status-cell .table-sub {
  display: block;
  margin-top: 8px;
}

.mini-button {
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(20, 58, 118, 0.08);
  color: var(--text);
  cursor: pointer;
}

.table-empty {
  display: none;
  padding: 24px;
}

#specialDiscountLedgerRows td:nth-child(4),
#specialDiscountLedgerRows td:nth-child(5) {
  white-space: nowrap;
}

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

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

.showcase-card {
  padding: 22px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(248, 252, 255, 0.96), rgba(237, 246, 255, 0.86));
  border: 1px solid rgba(129, 171, 233, 0.18);
  box-shadow: 0 18px 32px rgba(9, 31, 67, 0.07);
}

.showcase-card.highlight {
  background: linear-gradient(135deg, rgba(219, 236, 255, 0.98), rgba(242, 248, 255, 0.92));
  border-color: rgba(31, 125, 242, 0.28);
}

.showcase-card.dark {
  background: rgba(8, 27, 55, 0.95);
  border-color: rgba(180, 214, 255, 0.08);
  color: #edf5ff;
}

.showcase-kicker {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.76rem;
  color: var(--accent);
}

.showcase-card.dark .showcase-kicker {
  color: rgba(214, 231, 255, 0.74);
}

.showcase-card h3 {
  margin: 0 0 16px;
}

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

.snapshot-item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(250, 253, 255, 0.9);
  border: 1px solid rgba(131, 176, 241, 0.14);
}

.showcase-card.dark .snapshot-item {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
}

.snapshot-label {
  font-size: 0.82rem;
  color: var(--muted);
}

.showcase-card.dark .snapshot-label {
  color: rgba(214, 231, 255, 0.72);
}

.snapshot-value {
  color: var(--text);
  font-weight: 700;
  line-height: 1.5;
}

.showcase-card.dark .snapshot-value {
  color: #edf5ff;
}

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

.rollout-card {
  padding: 22px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(248, 252, 255, 0.96), rgba(237, 246, 255, 0.86));
  border: 1px solid rgba(129, 171, 233, 0.18);
  box-shadow: 0 18px 32px rgba(9, 31, 67, 0.07);
}

.rollout-card.highlight {
  background: linear-gradient(135deg, rgba(219, 236, 255, 0.98), rgba(242, 248, 255, 0.92));
  border-color: rgba(31, 125, 242, 0.28);
}

.rollout-card.dark {
  background: rgba(8, 27, 55, 0.95);
  border-color: rgba(180, 214, 255, 0.08);
  color: #edf5ff;
}

.rollout-card .snapshot-list {
  margin-top: 12px;
}

.rollout-card.dark .snapshot-item {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.08);
}

.rollout-card.dark .snapshot-label {
  color: rgba(214, 231, 255, 0.72);
}

.rollout-card.dark .snapshot-value {
  color: #edf5ff;
}

.compliance-card {
  padding: 20px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(248, 252, 255, 0.96), rgba(237, 246, 255, 0.88));
  border: 1px solid rgba(129, 171, 233, 0.18);
  box-shadow: 0 18px 32px rgba(9, 31, 67, 0.06);
}

.compliance-card.warning {
  background: linear-gradient(135deg, rgba(227, 239, 255, 0.98), rgba(244, 249, 255, 0.92));
  border-color: rgba(92, 148, 229, 0.24);
}

.compliance-card ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .grid,
  .agreement-layout,
  .compliance-grid,
  .showcase-grid,
  .rollout-grid,
  .metric-grid,
  .category-grid,
  .config-grid,
  .agreement-config-grid,
  .policy-overview-grid,
  .policy-tier-grid,
  .form-grid,
  .ticket-block {
    grid-template-columns: 1fr;
  }

  .hero,
  .ledger-head,
  .ticket-head,
  .ticket-footer {
    flex-direction: column;
    align-items: start;
  }

  .ops-bar,
  .permission-checkbox-grid,
  .permission-matrix-grid {
    grid-template-columns: 1fr;
  }

  .ops-scope-picker {
    grid-template-columns: 1fr;
  }

  .agreement-toolbar {
    flex-direction: column;
    align-items: start;
  }

  .agreement-signature-grid {
    grid-template-columns: 1fr;
  }

  .course-picker {
    grid-template-columns: 1fr;
  }

  .agreement-version-tools {
    width: 100%;
  }

  .ledger-actions {
    width: 100%;
    justify-content: start;
  }
}

@media print {
  body {
    background: #fff;
  }

  body::before,
  .app-sidebar,
  .workspace-topbar,
  .workspace-ribbon,
  .hero,
  .ledger-panel,
  .showcase-panel,
  .compliance-panel,
  #resetCourses,
  #printTicket,
  #printAgreement {
    display: none !important;
  }

  body.print-ticket-mode .panel,
  body.print-agreement-mode .panel {
    display: none !important;
  }

  body.print-ticket-mode #ticketPanel,
  body.print-agreement-mode #agreementPanel {
    display: block !important;
  }

  body.print-agreement-mode .signature-panel {
    display: none !important;
  }

  body.print-ticket-mode .panel-head,
  body.print-agreement-mode .panel-head,
  body.print-ticket-mode .section-kicker,
  body.print-agreement-mode .section-kicker,
  body.print-ticket-mode #processFlowHint,
  body.print-agreement-mode #processFlowHint {
    display: none !important;
  }

  .page-shell {
    max-width: none;
    padding: 0;
    display: block;
  }

  .grid {
    display: block;
  }

  .panel {
    box-shadow: none;
    background: #fff;
    border: none;
    margin-bottom: 12px;
    padding: 0;
  }

  .ticket-card,
  .agreement-card {
    box-shadow: none;
    border: none;
    padding: 0;
    background: #fff;
  }

  .agreement-layout {
    display: block;
  }
}

body {
  background:
    radial-gradient(circle at top left, rgba(97, 160, 255, 0.18), transparent 26%),
    radial-gradient(circle at 85% 14%, rgba(61, 123, 255, 0.16), transparent 18%),
    linear-gradient(180deg, #071321 0%, #0c1c32 48%, #102543 100%);
}

body::before {
  background-image:
    linear-gradient(rgba(117, 159, 222, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(117, 159, 222, 0.08) 1px, transparent 1px);
  background-size: 38px 38px;
}

.page-shell {
  max-width: none;
  margin: 0;
  padding: 22px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.workspace-shell {
  display: grid;
  gap: 20px;
}

.app-sidebar {
  position: sticky;
  top: 22px;
  min-height: calc(100vh - 44px);
  padding: 28px 26px;
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(7, 22, 46, 0.98) 0%, rgba(10, 31, 61, 0.98) 100%);
  border: 1px solid rgba(166, 205, 255, 0.12);
  color: #ecf5ff;
  box-shadow: 0 28px 50px rgba(3, 13, 31, 0.32);
  overflow: hidden;
}

.app-sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 34%),
    radial-gradient(circle at top right, rgba(64, 141, 255, 0.16), transparent 24%);
  pointer-events: none;
}

.sidebar-brand,
.sidebar-nav,
.sidebar-footer {
  position: relative;
  z-index: 1;
}

.brand-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(65, 143, 255, 0.16);
  color: #8ec1ff;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sidebar-brand h2 {
  margin: 18px 0 10px;
  font-family: "DM Serif Display", serif;
  font-size: clamp(2rem, 2.6vw, 3rem);
  line-height: 1.02;
  color: #f3f8ff;
}

.sidebar-brand p {
  margin: 0;
  color: rgba(214, 230, 252, 0.74);
  font-size: 1rem;
  line-height: 1.7;
}

.sidebar-nav {
  display: grid;
  gap: 10px;
  margin-top: 30px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  padding: 15px 16px;
  border-radius: 20px;
  color: rgba(227, 239, 255, 0.86);
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.sidebar-link:hover,
.sidebar-link.active {
  transform: translateX(4px);
  background: rgba(82, 145, 238, 0.14);
  color: #f3f8ff;
}

.sidebar-footer {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.sidebar-footer-card {
  padding: 14px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(168, 209, 255, 0.08);
}

.sidebar-footer-card span {
  display: block;
  margin-bottom: 4px;
  color: rgba(204, 224, 250, 0.64);
  font-size: 0.82rem;
}

.sidebar-footer-card strong {
  color: #f3f8ff;
  font-size: 0.98rem;
}

.workspace-topbar,
.workspace-ribbon,
.hero,
.panel {
  border-radius: 32px;
}

.workspace-topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 18px 22px;
  background: rgba(243, 249, 255, 0.9);
  border: 1px solid rgba(129, 171, 233, 0.18);
  box-shadow: 0 20px 36px rgba(9, 31, 67, 0.1);
  backdrop-filter: blur(10px);
}

.workspace-greeting {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 1.4rem;
  font-weight: 800;
}

.topbar-pill,
.meta-pill,
.hero-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.topbar-pill {
  padding: 10px 14px;
  background: rgba(31, 125, 242, 0.12);
  color: #0f63da;
  font-size: 0.9rem;
  font-weight: 700;
}

.workspace-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-pill {
  padding: 10px 16px;
  background: rgba(237, 246, 255, 0.96);
  border: 1px solid rgba(129, 177, 241, 0.34);
  color: #2a67c8;
  font-size: 0.92rem;
}

.workspace-ribbon {
  padding: 18px 20px;
  background: linear-gradient(90deg, rgba(219, 236, 255, 0.92), rgba(201, 224, 255, 0.82));
  border: 1px solid rgba(104, 156, 227, 0.2);
  color: #24539f;
  font-size: 1.02rem;
  box-shadow: 0 16px 26px rgba(9, 31, 67, 0.08);
}

.hero {
  margin-bottom: 0;
  padding: 26px;
  align-items: stretch;
  background: linear-gradient(135deg, rgba(245, 250, 255, 0.98), rgba(231, 242, 255, 0.88));
  border: 1px solid rgba(129, 171, 233, 0.18);
  box-shadow: 0 26px 42px rgba(9, 31, 67, 0.1);
}

.hero-copy {
  padding: 12px 4px 4px;
}

.hero h1 {
  max-width: 900px;
  margin: 12px 0 16px;
  font-size: clamp(3rem, 4.8vw, 5.4rem);
  line-height: 0.95;
  color: #0f1f38;
}

.hero-text {
  max-width: 820px;
  color: #5d7394;
  font-size: 1.08rem;
  line-height: 1.8;
}

.hero-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.hero-tag {
  padding: 11px 16px;
  background: rgba(239, 247, 255, 0.98);
  border: 1px solid rgba(136, 182, 243, 0.42);
  color: #2c69cb;
  font-size: 0.94rem;
}

.hero .view-switch {
  margin-top: 22px;
}

.hero-tip {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(235, 244, 255, 0.82);
  border: 1px solid rgba(145, 181, 234, 0.22);
}

.hero-badge {
  min-width: 290px;
  padding: 24px 22px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(14, 42, 84, 0.98), rgba(20, 59, 112, 0.9));
  color: #edf5ff;
  border: 1px solid rgba(135, 181, 245, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.hero-badge span {
  color: rgba(208, 226, 255, 0.76);
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-badge strong {
  display: block;
  margin: 16px 0 12px;
  font-size: 1.9rem;
  line-height: 1.28;
}

.hero-badge p {
  margin: 0;
  color: rgba(223, 235, 255, 0.82);
  line-height: 1.7;
}

.grid {
  gap: 20px;
}

.panel {
  position: relative;
  padding: 24px;
  background: linear-gradient(180deg, rgba(246, 250, 255, 0.92), rgba(239, 247, 255, 0.82));
  border: 1px solid rgba(129, 171, 233, 0.16);
  box-shadow: 0 22px 36px rgba(9, 31, 67, 0.08);
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.panel::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -18px;
  width: 130px;
  height: 130px;
  border-radius: 36px;
  background: radial-gradient(circle, rgba(76, 150, 255, 0.14), transparent 72%);
  pointer-events: none;
}

.panel > * {
  position: relative;
  z-index: 1;
}

.panel-head h2,
.panel h3,
.showcase-card h3,
.rollout-card h3,
.compliance-card h3 {
  font-family: "DM Serif Display", serif;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.panel-head h2 {
  font-size: 2rem;
}

.section-note,
.field-help,
.snapshot-label,
.metric-label,
.category-name,
.metric-sub,
.category-sub,
.category-foot {
  color: #647a9a;
}

.view-chip {
  background: rgba(245, 250, 255, 0.94);
  border-color: rgba(131, 176, 241, 0.26);
  color: #556d90;
  font-weight: 600;
}

.view-chip.active {
  background: rgba(31, 125, 242, 0.16);
  border-color: rgba(31, 125, 242, 0.28);
  color: #0d60d7;
}

.primary-button,
.ghost-button,
.text-button,
.mini-button {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button:hover,
.ghost-button:hover,
.mini-button:hover {
  transform: translateY(-1px);
}

.primary-button {
  border: none;
  border-radius: 999px;
  padding: 13px 18px;
  background: linear-gradient(135deg, #2f8fff, #1268e3);
  color: #f4f9ff;
  box-shadow: 0 14px 26px rgba(18, 104, 227, 0.24);
}

.ghost-button {
  border: 1px solid rgba(131, 176, 241, 0.28);
  border-radius: 999px;
  background: rgba(245, 250, 255, 0.88);
  color: #526a8d;
}

.mini-button {
  margin-top: 6px;
  margin-right: 6px;
  background: rgba(31, 125, 242, 0.08);
}

input,
select,
textarea {
  background: rgba(250, 252, 255, 0.92);
  border-color: rgba(131, 176, 241, 0.22);
}

.summary-box,
.config-item,
.showcase-card,
.rollout-card,
.compliance-card,
.metric-card,
.category-card,
.table-wrap {
  background: linear-gradient(180deg, rgba(248, 252, 255, 0.96), rgba(237, 246, 255, 0.86));
  border-color: rgba(129, 171, 233, 0.18);
}

.signature-panel {
  background: linear-gradient(180deg, rgba(7, 22, 46, 0.98), rgba(11, 31, 61, 0.98));
  border: 1px solid rgba(166, 205, 255, 0.12);
  box-shadow: 0 20px 34px rgba(3, 13, 31, 0.28);
}

.signature-wrap,
.seal-summary-card,
.status-box {
  background: rgba(255, 255, 255, 0.08);
}

.metric-card.highlight,
.showcase-card.highlight,
.rollout-card.highlight {
  background: linear-gradient(135deg, rgba(219, 236, 255, 0.98), rgba(242, 248, 255, 0.92));
}

.showcase-card.dark,
.rollout-card.dark {
  background: linear-gradient(180deg, rgba(7, 22, 46, 0.98), rgba(11, 31, 61, 0.98));
}

.ops-bar {
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(246, 250, 255, 0.96), rgba(237, 246, 255, 0.88));
  border: 1px solid rgba(129, 171, 233, 0.18);
}

.ticket-card,
.agreement-card {
  background: linear-gradient(180deg, rgba(250, 253, 255, 0.98), rgba(236, 245, 255, 0.94));
  border: 1px solid rgba(129, 171, 233, 0.18);
  box-shadow: 0 20px 36px rgba(9, 31, 67, 0.09);
}

@media (max-width: 1200px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: relative;
    top: 0;
    min-height: auto;
  }
}

@media (max-width: 980px) {
  .page-shell {
    padding: 16px;
    gap: 18px;
  }

  .workspace-topbar,
  .workspace-greeting {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .hero-badge {
    min-width: 0;
  }

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

@media (max-width: 720px) {
  .app-sidebar {
    padding: 22px 18px;
  }

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

  .hero h1 {
    font-size: 2.6rem;
  }

  .workspace-meta,
  .hero-tag-row,
  .view-switch {
    gap: 8px;
  }

  .workspace-topbar,
  .workspace-ribbon,
  .hero,
  .panel {
    border-radius: 24px;
  }
}

.sidebar-link {
  position: relative;
  justify-content: space-between;
  gap: 12px;
}

.sidebar-link::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.03);
}

.sidebar-link[data-nav-status="pending"]::after {
  background: rgba(171, 195, 228, 0.38);
}

.sidebar-link[data-nav-status="active"]::after {
  background: #5bb3ff;
  box-shadow: 0 0 0 4px rgba(91, 179, 255, 0.14);
}

.sidebar-link[data-nav-status="done"]::after {
  background: #5fd6af;
  box-shadow: 0 0 0 4px rgba(95, 214, 175, 0.14);
}

.sidebar-link[data-nav-status="done"] {
  background: rgba(62, 128, 230, 0.12);
  color: #f3f8ff;
}

.cohort-editor {
  margin-top: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(244, 249, 255, 0.92), rgba(234, 243, 255, 0.84));
  border: 1px solid rgba(126, 172, 238, 0.18);
  display: grid;
  gap: 12px;
}

.cohort-editor.is-collapsed .cohort-editor-advanced {
  display: none;
}

.cohort-editor-advanced {
  display: grid;
  gap: 12px;
}

.cohort-editor .field-help {
  margin: 0;
}

.filter-select {
  min-width: 140px;
}

.signature-wrap canvas,
#signaturePad {
  background: linear-gradient(180deg, #f7fbff 0%, #edf5ff 100%);
  border: 1px dashed rgba(67, 126, 214, 0.28);
}

.ticket-card,
.agreement-card {
  position: relative;
}

.ticket-card::before,
.agreement-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(90deg, #1c72f2, #67c3ff 55%, #b9d8ff);
}

@media print {
  @page {
    size: A4;
    margin: 12mm 12mm 14mm;
  }

  html,
  body {
    background: #fff !important;
    color: #111 !important;
  }

  body.print-ticket-mode #ticketPanel,
  body.print-agreement-mode #agreementPanel {
    margin: 0 !important;
    padding: 0 !important;
  }

  .ticket-card,
  .agreement-card {
    position: relative;
    padding: 10mm 9mm 12mm !important;
    border: none !important;
    box-shadow: none !important;
    background: #fff !important;
  }

  .ticket-card::before,
  .agreement-card::before {
    display: none !important;
  }

  .ticket-card::after,
  .agreement-card::after {
    content: "优研教育培训学校";
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-18deg);
    font-size: 42px;
    letter-spacing: 10px;
    color: rgba(35, 106, 201, 0.08);
    white-space: nowrap;
    pointer-events: none;
  }

  .ticket-head,
  .agreement-header,
  .agreement-summary,
  .agreement-signature-grid {
    page-break-inside: avoid;
  }

  .agreement-card .clause {
    page-break-inside: avoid;
    break-inside: avoid;
    margin-bottom: 10px;
  }

  .agreement-signature-grid {
    margin-top: 18mm;
    padding-top: 8mm;
    border-top: 1px solid #cfd9e8;
  }

  .status-chip {
    border: 1px solid #cfd9e8;
    color: #1c3f72 !important;
    background: #fff !important;
  }

  .ticket-card .table-sub,
  .agreement-card .table-sub,
  .ticket-card .section-note,
  .agreement-card .section-note {
    color: #50627f !important;
  }
}
