:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #282532;
  background: #f6f7f9;
  font-synthesis: none;
  --brand: #78304b;
  --orange: #c45217;
  --muted: #65616e;
  --line: #e4e1e8;
  --surface: #fff;
  --soft: #fcf0e8;
  --radius: 12px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--brand);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
button,
.button {
  border: 1px solid var(--line);
  background: white;
  color: #382e3e;
  border-radius: 8px;
  min-height: 42px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.button:hover {
  text-decoration: none;
}
button:hover,
.button:hover {
  background: #f4f1f5;
}
button.primary,
.button.primary {
  background: var(--brand);
  color: white;
  border-color: var(--brand);
}
button.primary:hover,
.button.primary:hover {
  background: #60263c;
}
.danger {
  color: #a52436;
}
.quiet {
  background: transparent;
  border-color: transparent;
}
.small {
  padding: 6px 10px;
  min-height: 34px;
  font-size: 13px;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid #bdb7c5;
  border-radius: 7px;
  background: #fff;
  color: #282532;
  padding: 11px 12px;
  min-height: 44px;
  font-size: 16px;
}
textarea {
  min-height: 110px;
  resize: vertical;
}
input[type="checkbox"],
input[type="radio"] {
  width: 20px;
  min-height: 20px;
  height: 20px;
  accent-color: var(--brand);
}
label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
}
label.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 400;
}
label.check input {
  flex-shrink: 0;
}
label small,
small,
.muted {
  color: var(--muted);
}
small {
  font-size: 12px;
}
h1 {
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.8px;
  margin: 0 0 12px;
}
h2 {
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.3px;
  margin: 0 0 16px;
}
h3 {
  font-size: 17px;
  line-height: 1.4;
  margin: 0 0 9px;
}
p {
  line-height: 1.65;
  margin: 0 0 16px;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}
ul,
ol {
  padding-left: 22px;
  line-height: 1.7;
}
:focus-visible {
  outline: 3px solid #b15323;
  outline-offset: 3px;
}
.skip {
  position: absolute;
  top: -60px;
  left: 12px;
  padding: 12px;
  background: white;
  z-index: 20;
}
.skip:focus {
  top: 10px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 28px;
  background: white;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 2;
}
.brand {
  font-size: 23px;
  letter-spacing: -0.8px;
  white-space: nowrap;
  color: #3b3443;
}
.brand b {
  color: var(--orange);
}
.brand span {
  font-weight: 400;
  margin-left: 5px;
}
.toplinks {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.identity {
  font-size: 13px;
  max-width: 180px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.shell {
  max-width: 1600px;
  margin: auto;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
}
.sidebar {
  padding: 25px 14px;
  border-right: 1px solid var(--line);
  min-height: calc(100vh - 78px);
  background: #fcfcfd;
}
.sidebar a {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-radius: 8px;
  color: #5f5968;
  font-size: 14px;
  gap: 10px;
  margin-bottom: 5px;
}
.sidebar a.current {
  background: #f2e9ee;
  color: var(--brand);
  font-weight: 700;
}
.sidebar .nav-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  color: #716a7a;
  padding: 18px 14px 12px;
}
.sidebar .secondary {
  margin-top: 24px;
  border-top: 1px solid var(--line);
}
.content {
  padding: 32px;
  min-width: 0;
}
.public-content {
  max-width: 1180px;
  margin: auto;
  padding: 44px 24px;
}
.head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}
.head p {
  max-width: 650px;
  color: var(--muted);
  margin: 0;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.3px;
  font-size: 11px;
  font-weight: 750;
  color: var(--brand);
  margin-bottom: 10px;
}
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.stack {
  display: grid;
  gap: 20px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  min-width: 0;
}
.card.course {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.course .cover {
  padding: 25px 22px;
  background: linear-gradient(125deg, #f5e8ee, #fff0e1);
  min-height: 108px;
  display: flex;
  align-items: flex-end;
  color: var(--brand);
}
.course .cover strong {
  font-size: 13px;
  letter-spacing: 0.4px;
}
.course .course-body {
  padding: 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.course p {
  color: var(--muted);
  font-size: 14px;
  flex: 1;
  margin: 0;
}
.course .actions {
  margin-top: 12px;
}
.badge {
  display: inline-flex;
  border-radius: 5px;
  background: #f1edf3;
  color: #57445f;
  font-size: 11px;
  font-weight: 650;
  padding: 4px 7px;
  line-height: 1.4;
}
.badge.success {
  background: #e9f5ee;
  color: #216543;
}
.badge.orange {
  background: #fff0e5;
  color: #9a4216;
}
.badge.danger {
  background: #fdecee;
  color: #a52436;
}
.filters {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.filters label {
  min-width: 160px;
  flex: 1;
}
.filters .search {
  flex: 2;
  min-width: 230px;
}
.hero {
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  display: flex;
  gap: 30px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}
.hero h1 {
  font-size: 42px;
  max-width: 700px;
}
.hero p {
  max-width: 610px;
  color: var(--muted);
}
.hero .decoration {
  font-size: 75px;
  color: var(--brand);
  font-weight: 800;
  letter-spacing: -6px;
}
.progress-line {
  display: flex;
  gap: 12px;
  align-items: center;
}
.progress-line progress {
  flex: 1;
}
.progress-line small {
  white-space: nowrap;
}
progress {
  width: 100%;
  height: 7px;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #eee9ef;
  accent-color: var(--orange);
}
progress::-webkit-progress-bar {
  background: #eee9ef;
}
progress::-webkit-progress-value {
  background: var(--orange);
  border-radius: 8px;
}
.empty {
  text-align: center;
  padding: 45px 25px;
  color: var(--muted);
}
.empty h2 {
  color: #413847;
}
.notice {
  border-left: 3px solid var(--orange);
  background: var(--soft);
  padding: 15px 18px;
  border-radius: 0 8px 8px 0;
  line-height: 1.6;
  font-size: 14px;
}
.notice.error {
  border-color: #b12a3c;
  background: #fff0f2;
}
.auth {
  max-width: 470px;
  margin: 42px auto;
}
.auth form {
  display: grid;
  gap: 19px;
}
.auth h1 {
  font-size: 28px;
}
.auth .links {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 20px;
  font-size: 13px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.form-stack {
  display: grid;
  gap: 18px;
}
.text-content {
  font-size: 17px;
  line-height: 1.85;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 75ch;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.row:last-child {
  border-bottom: 0;
}
.row small {
  display: block;
  margin-top: 5px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  font-weight: 650;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  background: #faf9fb;
}
td {
  padding: 15px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
td small {
  display: block;
  margin-top: 5px;
}
td .actions {
  flex-wrap: nowrap;
}
tr:last-child td {
  border-bottom: 0;
}
.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
  padding-bottom: 12px;
}
.tabs button {
  border: 0;
  background: transparent;
  font-weight: 500;
}
.tabs button[aria-selected="true"] {
  background: #f0e7ed;
  color: var(--brand);
  font-weight: 700;
}
.editor {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr);
  gap: 20px;
}
.outline {
  border: 1px solid var(--line);
  background: #fff;
  padding: 15px;
  border-radius: 10px;
}
.outline h3 {
  margin-top: 12px;
}
.outline a,
.outline button {
  display: block;
  width: 100%;
  text-align: left;
  margin: 6px 0;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 450;
  border-color: transparent;
}
.outline .selected {
  background: var(--soft);
  border-color: #d2a58a;
  color: #883e1d;
}
.outline .module {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.outline .module:last-child {
  border: 0;
}
.player {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 22px;
}
.player-main {
  min-width: 0;
}
.media {
  width: 100%;
  aspect-ratio: 16/9;
  border: 0;
  background: #17151d;
  border-radius: 10px;
}
.slide {
  padding: 35px;
  background: #fcf5ef;
  border-radius: 10px;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.slide h2 {
  font-size: 28px;
}
.slide img {
  max-width: 100%;
  max-height: 600px;
  object-fit: contain;
}
.pdf {
  height: 650px;
  width: 100%;
  border: 1px solid var(--line);
}
.lesson-nav {
  display: flex;
  gap: 15px;
  justify-content: space-between;
  align-items: center;
  margin: 22px 0;
}
.answer {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 10px 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  font-weight: 400;
}
.question {
  margin-bottom: 28px;
}
.question legend {
  font-weight: 650;
  font-size: 17px;
  margin-bottom: 14px;
}
.question fieldset,
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}
.form-error {
  color: #ab2338;
  font-size: 14px;
  min-height: 20px;
}
.loading {
  padding: 60px;
  text-align: center;
}
.stat {
  font-size: 30px;
  font-weight: 700;
  margin: 8px 0;
}
.certificate {
  max-width: 860px;
  margin: auto;
  padding: 60px;
  background: white;
  border: 10px double #d9b7c5;
  text-align: center;
}
.certificate h1 {
  font-size: 35px;
}
.certificate .name {
  font-size: 31px;
  color: var(--brand);
  margin: 35px 0 20px;
}
.certificate .brand {
  font-size: 28px;
}
.certificate p {
  font-size: 17px;
}
.footer {
  padding: 25px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  width: min(700px, calc(100% - 24px));
  padding: 26px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 20px 80px #29182930;
}
dialog::backdrop {
  background: #241c2a66;
}
dialog .head h2 {
  margin: 0;
}
#toast:empty {
  display: none;
}
#toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  background: #332b3d;
  color: #fff;
  border-radius: 9px;
  padding: 15px 20px;
  max-width: min(450px, 90vw);
  z-index: 50;
  box-shadow: 0 8px 30px #0002;
}
.block-editor {
  border: 1px solid var(--line);
  padding: 16px;
  border-radius: 8px;
  margin-top: 14px;
}
details {
  border: 1px solid var(--line);
  padding: 15px;
  border-radius: 8px;
  background: white;
}
summary {
  cursor: pointer;
  font-weight: 650;
}
.pill-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.spaced {
  margin-top: 24px;
}
.screen-reader {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 1100px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .content {
    padding: 24px;
  }
  .shell {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .editor,
  .player {
    grid-template-columns: 200px minmax(0, 1fr);
  }
}
@media (max-width: 760px) {
  .topbar {
    padding: 16px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .identity {
    display: none;
  }
  .shell {
    display: block;
  }
  .sidebar {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 10px 12px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
  }
  .sidebar a {
    padding: 9px 11px;
    margin: 0;
    font-size: 12px;
  }
  .sidebar .nav-label {
    display: none;
  }
  .sidebar .secondary {
    margin: 0;
    border: 0;
    display: flex;
    flex-wrap: wrap;
  }
  .content {
    padding: 23px 16px;
  }
  .public-content {
    padding: 25px 16px;
  }
  .hero {
    padding: 24px;
    display: block;
  }
  .hero h1 {
    font-size: 33px;
  }
  .hero .decoration {
    display: none;
  }
  .head {
    flex-wrap: wrap;
  }
  .head h1 {
    font-size: 27px;
  }
  .grid,
  .two,
  .form-grid {
    grid-template-columns: 1fr;
  }
  .editor,
  .player {
    grid-template-columns: 1fr;
  }
  .player .player-main {
    order: -1;
  }
  .outline {
    max-height: none;
  }
  .row {
    flex-wrap: wrap;
  }
  .tabs {
    gap: 0;
  }
  .tabs button {
    padding: 9px 10px;
    font-size: 12px;
  }
  .card {
    padding: 18px;
  }
  .auth {
    margin: 25px auto;
  }
  .slide {
    padding: 23px;
  }
  .certificate {
    padding: 25px;
  }
  .certificate h1 {
    font-size: 26px;
  }
  .certificate .name {
    font-size: 25px;
  }
  .toplinks .button,
  .toplinks button {
    padding: 8px 12px;
  }
  .filters label {
    min-width: 140px;
  }
  .pdf {
    height: 470px;
  }
  .text-content {
    font-size: 16px;
  }
}
@media print {
  .topbar,
  .sidebar,
  .footer,
  #toast,
  .no-print,
  .skip {
    display: none !important;
  }
  .shell {
    display: block;
  }
  .content,
  .public-content {
    padding: 0;
  }
  .certificate {
    border: 7px double #78304b;
    width: 100%;
    max-width: none;
    padding: 35px;
  }
  body {
    background: white;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

.rich-body {
  min-height: 200px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  line-height: 1.7;
  white-space: pre-wrap;
  background: #fff;
}
.rich-toolbar {
  margin: 12px 0;
}
.rich-toolbar button {
  font-size: 12px;
  padding: 7px 9px;
}

.nav-group {
  padding: 0;
  border: 0;
}
.nav-group summary {
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 600;
  border-radius: 8px;
}
.nav-group summary:hover {
  background: #f6f2f5;
}
.nav-group a {
  margin-left: 12px;
}

.workspace-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.workspace-metrics .card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 24px;
}
.workspace-metrics strong {
  font-size: 32px;
  color: var(--brand);
  letter-spacing: -1px;
}
.workspace-metrics span {
  color: var(--muted);
  font-size: 14px;
}
.person-link {
  font-weight: 650;
  text-underline-offset: 3px;
}
.workspace-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}
.workspace-tabs a {
  font-weight: 600;
}
.assessment-result {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 16px;
  margin: 12px 0;
}
.preview-banner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  background: var(--soft);
  border: 2px solid var(--orange);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 24px;
}
.preview-banner small {
  display: block;
  margin-top: 6px;
}
.evidence {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #f6f7f9;
  padding: 20px;
  border-radius: 8px;
}
.editor details.module > summary {
  padding: 12px 0;
  font-weight: 600;
}
.editor .outline {
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  position: sticky;
  top: 20px;
  align-self: start;
}
[hidden] {
  display: none !important;
}
@media (max-width: 700px) {
  .workspace-metrics {
    grid-template-columns: 1fr;
  }
  .preview-banner {
    align-items: flex-start;
    flex-direction: column;
  }
  .editor .outline {
    position: static;
    max-height: 350px;
  }
}

/* Shared management patterns: stable navigation, tables, detail tabs and contextual forms. */
:root {
  --brand: #a84016;
  --orange: #e96523;
  --soft: #fff3ed;
  --line: #e1e6ed;
  --muted: #5b6575;
  --radius: 10px;
  color: #233044;
}
.shell {
  max-width: none;
  grid-template-columns: 216px minmax(0, 1fr);
}
.sidebar {
  background: #233044;
  border: 0;
}
.sidebar a {
  color: #e2e8f0;
  padding: 10px 12px;
}
.sidebar a:hover {
  background: #344359;
  text-decoration: none;
}
.sidebar a.current {
  background: #fff3ed;
  color: #983a15;
}
.nav-section {
  margin-top: 23px;
}
.nav-section h2 {
  margin: 0 12px 8px;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #b7c3d4;
}
.content {
  padding: 28px 32px 50px;
}
h1 {
  font-size: 27px;
  letter-spacing: -0.6px;
}
.head {
  align-items: center;
}
.head p {
  font-size: 14px;
}
.head .actions {
  flex-shrink: 0;
}
.badge {
  background: #edf1f5;
  color: #435269;
}
.detail-tabs {
  display: flex;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  margin: 26px 0;
  overflow-x: auto;
}
.detail-tabs a {
  padding: 12px 0;
  white-space: nowrap;
  font-size: 14px;
  color: var(--muted);
  border-bottom: 3px solid transparent;
}
.detail-tabs a[aria-current="page"] {
  color: var(--brand);
  border-bottom-color: var(--orange);
  font-weight: 700;
}
.detail-tabs a:hover {
  text-decoration: none;
  color: var(--brand);
}
.tabs button[aria-selected="true"] {
  background: var(--soft);
}
.data-table {
  overflow-x: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.data-table table {
  width: 100%;
  border-collapse: collapse;
}
.data-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.data-table th {
  background: #f7f9fb;
  color: #586679;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 13px 16px;
  white-space: nowrap;
}
.data-table td {
  padding: 16px;
  font-size: 13px;
  vertical-align: middle;
  border-bottom: 1px solid #edf0f4;
}
.data-table tbody tr:hover {
  background: #fcfcfd;
}
.data-table td:first-child {
  min-width: 200px;
}
.data-table small {
  display: block;
  margin-top: 5px;
  line-height: 1.5;
}
.data-table .person-link {
  color: #233044;
  font-size: 14px;
}
.data-table .person-link:hover {
  color: var(--brand);
}
.table-empty {
  text-align: center;
  padding: 30px !important;
  color: var(--muted);
}
.comment-cell {
  white-space: pre-wrap;
  min-width: 220px;
  max-width: 450px;
  overflow-wrap: anywhere;
}
.pagination,
.management-signals {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 13px;
  flex-wrap: wrap;
}
.management-signals {
  justify-content: flex-start;
}
.large-number {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -1px;
}
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 2px 12px;
  margin: 22px 0;
}
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
}
.steps li span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.module-section {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-top: 20px;
  overflow: hidden;
}
.module-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 20px;
  gap: 20px;
  background: #f8fafc;
}
.module-heading > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 180px;
}
.module-heading h3 {
  font-size: 15px;
  margin: 0 0 4px;
}
.module-number {
  border-radius: 8px;
  padding: 9px;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
  background: var(--soft);
}
.module-heading .actions {
  justify-content: flex-end;
  gap: 5px;
}
.module-section .data-table {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}
.module-section th:first-child {
  width: 45%;
}
.text-button {
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  justify-content: flex-start;
  color: #233044;
  font-size: 14px;
}
.text-button:hover {
  color: var(--brand);
  background: none;
  text-decoration: underline;
}
dialog.editor-dialog {
  width: min(1040px, 96vw);
  max-width: 1040px;
}
.editor-dialog .card {
  border: 0;
  padding: 0;
  margin: 0;
}
.editor-dialog .head h2 {
  font-size: 19px;
}
.dialog-footer {
  position: sticky;
  bottom: -24px;
  padding: 18px 0;
  background: white;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
}
.certificate-steps {
  display: flex;
  gap: 12px;
  margin: 0 0 24px;
  flex-wrap: wrap;
}
.certificate-steps button {
  background: transparent;
  border-color: transparent;
}
.certificate-steps button[aria-current="step"] {
  color: var(--brand);
  background: var(--soft);
  border-color: #efd7c8;
}
.certificate-designer {
  display: grid;
  grid-template-columns: minmax(280px, 350px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.certificate-designer > section:last-child {
  position: sticky;
  top: 20px;
}
.preview-caption {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.certificate-preview {
  padding: 18px;
  background: #e9edf2;
  overflow: auto;
  border-radius: 10px;
}
.certificate-sheet {
  --certificate-accent: #a84016;
  position: relative;
  background: white;
  color: #233044;
  width: 100%;
  max-width: 1050px;
  margin: auto;
  padding: 55px 7%;
  min-height: 660px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  border-top: 12px solid var(--certificate-accent);
  box-shadow: 0 6px 20px #23304412;
  overflow: hidden;
}
.certificate-sheet.portrait {
  max-width: 680px;
  min-height: 900px;
}
.certificate-brand {
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 44px;
  letter-spacing: -0.5px;
}
.certificate-eyebrow {
  color: var(--certificate-accent);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 700;
  margin-bottom: 20px;
}
.certificate-sheet h1 {
  font-size: 38px;
  overflow-wrap: anywhere;
}
.certificate-sheet h2 {
  font-size: 23px;
  margin: 20px 0;
}
.certificate-message {
  font-size: 15px;
  line-height: 1.9;
  margin: 16px auto 0;
  max-width: 700px;
  white-space: pre-wrap;
}
.certificate-facts {
  display: flex;
  gap: 25px;
  justify-content: center;
  color: #586679;
  font-size: 12px;
  flex-wrap: wrap;
}
.certificate-signature {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid #94a0b0;
  padding-top: 12px;
  margin: 48px auto 30px;
  min-width: 200px;
}
.certificate-signature span {
  font-size: 12px;
  color: #586679;
}
.certificate-sheet footer p {
  font-size: 12px;
  margin: 10px 0;
}
.certificate-sheet footer small {
  font-size: 9px;
  overflow-wrap: anywhere;
}
.certificate-watermark {
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 9px;
  color: #64748b;
  letter-spacing: 1px;
}
.certificate-sheet.classic {
  border: 8px double var(--certificate-accent);
  font-family: Georgia, serif;
}
.certificate-sheet.minimal {
  border-top: 0;
  text-align: left;
}
.certificate-sheet.minimal .certificate-facts {
  justify-content: flex-start;
}
.certificate-sheet.minimal .certificate-signature {
  margin-left: 0;
}
.certificate-designer .certificate-sheet {
  padding: 40px 6%;
  min-height: 450px;
}
.certificate-designer .certificate-sheet.portrait {
  min-height: 650px;
}
.certificate-designer .certificate-sheet h1 {
  font-size: 27px;
}
.certificate-designer .certificate-brand {
  margin-bottom: 22px;
  font-size: 16px;
}
.certificate-designer .certificate-message {
  font-size: 12px;
}
.certificate-designer .certificate-sheet h2 {
  font-size: 18px;
}
.certificate-designer .certificate-signature {
  margin-top: 30px;
}
@media (max-width: 1100px) {
  .head {
    flex-wrap: wrap;
  }
  .module-heading {
    flex-wrap: wrap;
  }
  .module-heading .actions {
    justify-content: flex-start;
  }
  .certificate-designer {
    grid-template-columns: 1fr;
  }
  .certificate-designer > section:last-child {
    position: static;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 10px;
  }
  .sidebar > a {
    white-space: nowrap;
  }
  .nav-section {
    display: contents;
  }
  .nav-section h2 {
    display: none;
  }
  .content {
    padding: 20px 16px;
  }
  .data-table table {
    min-width: 640px;
  }
  .content-builder {
    padding: 16px;
  }
  .module-heading {
    padding: 14px;
  }
  .module-heading .actions {
    gap: 3px;
  }
  .detail-tabs {
    gap: 20px;
  }
  .head .actions {
    flex-shrink: 1;
  }
  .certificate-sheet {
    min-width: 620px;
  }
  .certificate-steps button {
    flex: 1 1 180px;
  }
}
@media print {
  @page {
    size: A4 landscape;
    margin: 12mm;
  }
  body {
    background: white;
  }
  .topbar,
  .sidebar,
  .footer,
  .skip,
  .no-print,
  #toast {
    display: none !important;
  }
  .public-content {
    max-width: none;
    padding: 0;
  }
  .certificate-sheet {
    box-shadow: none;
    width: 100%;
    max-width: none;
    min-height: 175mm;
    break-inside: avoid;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .certificate-sheet.portrait {
    min-height: 255mm;
    page: portrait-certificate;
  }
  @page portrait-certificate {
    size: A4 portrait;
    margin: 12mm;
  }
}

.workspace-metrics {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.workspace-metrics strong {
  color: #233044;
  font-size: 28px;
}
