:root {
  color-scheme: light;
  --ink: #1d3029;
  --muted: #738079;
  --paper: #f7f8f5;
  --white: #fff;
  --green: #176b52;
  --green-dark: #104c3c;
  --green-pale: #e6f1eb;
  --line: #e4e9e3;
  font-family: "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 82px; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.wrap { width: min(1280px, calc(100% - 64px)); margin: 0 auto; }
.topbar { position: sticky; z-index: 5; top: 0; height: 70px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.9); backdrop-filter: blur(14px); }
.nav { display: flex; height: 100%; align-items: center; gap: 30px; }
.brand { display: inline-flex; align-items: center; gap: 9px; flex-shrink: 0; }
.brand img { width: 35px; height: 46px; object-fit: contain; }
.brand strong { display: block; font-size: 16px; letter-spacing: 1px; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { padding: 9px 13px; border-radius: 99px; color: #66736c; font-size: 12px; font-weight: 700; }
.nav-links a:hover, .nav-links a.active { background: var(--green-pale); color: var(--green-dark); }
.public-link { margin-left: auto; color: var(--green); font-size: 12px; font-weight: 750; }
.public-link:hover { color: var(--green-dark); }
main { padding-top: 28px; padding-bottom: 56px; }
.demo-banner { display: flex; align-items: baseline; gap: 10px; margin-bottom: 25px; padding: 11px 15px; border: 1px solid #e8dfc7; border-radius: 12px; background: #fcf8ed; color: #74643d; font-size: 11px; line-height: 1.5; }
.demo-banner strong { white-space: nowrap; }
.welcome { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 26px; }
.eyebrow { color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; }
h1 { margin: 8px 0 6px; font-size: clamp(28px, 3.5vw, 40px); letter-spacing: -1.5px; }
.welcome p, .section-head p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
h2 { margin: 0 0 5px; font-size: 19px; letter-spacing: -.4px; }
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 13px; margin-bottom: 28px; }
.stat { min-height: 108px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); }
.stat span { display: block; color: #68756e; font-size: 10px; font-weight: 750; letter-spacing: .45px; text-transform: uppercase; }
.stat strong { display: block; margin: 8px 0 2px; font-size: 25px; }
.stat small { color: var(--muted); font-size: 9px; }
.panel { margin-top: 20px; padding: 21px 22px; border: 1px solid var(--line); border-radius: 19px; background: var(--white); box-shadow: 0 2px 5px rgba(36,54,44,.025); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 17px; }
.button { min-height: 39px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 15px; border: 0; border-radius: 9px; font-size: 11px; font-weight: 750; cursor: pointer; transition: .18s; white-space: nowrap; }
.button.primary { background: var(--green); color: var(--white); }
.button.primary:hover { background: var(--green-dark); }
.button.secondary { border: 1px solid var(--line); background: var(--white); color: var(--ink); }
.button.secondary:hover { border-color: #a8c9b4; color: var(--green-dark); }
.button.compact { min-height: 35px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 10px 11px; border-bottom: 1px solid var(--line); color: #7a857e; font-size: 9px; font-weight: 800; letter-spacing: .65px; text-transform: uppercase; white-space: nowrap; }
td { padding: 12px 11px; border-bottom: 1px solid #eff2ee; color: #536159; font-size: 11px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
td strong { display: block; max-width: 300px; color: var(--ink); font-size: 11px; }
td small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.status { display: inline-flex; align-items: center; padding: 5px 8px; border-radius: 99px; background: #edf1ed; color: #59665f; font-size: 9px; font-weight: 750; white-space: nowrap; }
.status.published, .status.approved { background: #e7f3e9; color: #276447; }
.status.draft { background: #f1f2ed; color: #667167; }
.status.progress { background: #eef2f8; color: #48617d; }
.status.failed { background: #fcf1e8; color: #936343; }
.table-action { padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); color: var(--ink); font-size: 10px; font-weight: 700; cursor: pointer; }
.table-action:hover { border-color: #9cc2a8; color: var(--green-dark); }
.table-action.danger { color: #a4463d; }
.table-action.danger:hover { border-color: #e2b8b4; background: #fff8f6; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }
.empty-row { margin: 0; padding: 18px 10px; color: #89928c; font-size: 11px; text-align: center; }
.empty-row[hidden], [hidden] { display: none !important; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.field { min-width: 0; }
.field label { display: block; margin-bottom: 6px; color: #405047; font-size: 10px; font-weight: 750; }
.field input, .field select, .field textarea { width: 100%; min-height: 39px; padding: 9px 11px; border: 1px solid #dfe6df; border-radius: 8px; outline: none; background: white; color: var(--ink); font-size: 11px; }
.field textarea { min-height: 76px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #72a687; box-shadow: 0 0 0 3px rgba(23,107,82,.1); }
.field input::placeholder, .field textarea::placeholder { color: #a0a9a2; }
.span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.form-message { margin: 13px 0 0; padding: 10px 12px; border-radius: 9px; background: var(--green-pale); color: var(--green-dark); font-size: 10px; line-height: 1.5; }
.form-message[hidden] { display: none; }
.enrollment-form { margin: 16px 0; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: #fbfcfa; }
.enrollment-form[hidden] { display: none; }
.check-label { display: flex; align-items: flex-start; gap: 8px; color: #58665e; font-size: 10px; line-height: 1.5; }
.check-label input { width: 15px; height: 15px; margin: 0; accent-color: var(--green); }
.criteria { display: flex; gap: 9px; margin: 0 0 13px; padding: 10px 12px; border: 1px solid #dcebe0; border-radius: 10px; background: #f3f8f3; color: #52695a; font-size: 10px; line-height: 1.5; }
.criteria strong { flex-shrink: 0; color: var(--green-dark); }
.material-course-picker { max-width: 640px; margin-bottom: 14px; }
.lesson-editor { display: grid; gap: 12px; }
.material-topic { padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: #fbfcfa; }
.material-topic summary { color: var(--green-dark); font-size: 12px; font-weight: 750; cursor: pointer; line-height: 1.6; }
.topic-fields { margin: 14px 0; }
.field small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.material-topic h3 { margin: 16px 0 10px; font-size: 13px; }
.assessment-question-list { display: grid; gap: 10px; margin: 10px 0; }
.assessment-question { display: grid; grid-template-columns: minmax(0,1fr) 130px auto; gap: 10px; align-items: end; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); }
.assessment-question .form-grid { grid-column: 1 / -1; }
.assessment-question label { display: grid; gap: 5px; color: #405047; font-size: 10px; font-weight: 750; }
.assessment-question input, .assessment-question select { width: 100%; min-height: 36px; padding: 8px 10px; border: 1px solid #dfe6df; border-radius: 8px; background: white; color: var(--ink); font-size: 11px; }
.topic-actions { margin-top: 12px; }
.agreement-logo-preview { width: 48px; height: 38px; margin-right: 9px; object-fit: contain; vertical-align: middle; }
.page-note { margin: 24px 0 0; color: #828d85; font-size: 10px; line-height: 1.6; text-align: center; }
footer { padding: 17px; border-top: 1px solid var(--line); color: #89928c; font-size: 10px; text-align: center; }
.certificate-paper { padding: 12px; color: var(--ink); font-family: Georgia,serif; text-align: center; }

@media(max-width:850px) {
  .wrap { width: min(100% - 36px, 720px); }
  .nav { gap: 13px; }
  .nav-links { gap: 0; }
  .nav-links a { padding: 9px 8px; font-size: 10px; }
  .stats { grid-template-columns: repeat(2,1fr); }
}
@media(max-width:600px) {
  .wrap { width: calc(100% - 28px); }
  .topbar { position: static; height: auto; min-height: 63px; }
  .nav { min-height: 63px; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 8px 0; }
  .nav-links { order: 3; width: 100%; justify-content: space-between; border-top: 1px solid #eff2ee; }
  .nav-links a { padding: 10px 7px; }
  .public-link { margin-left: auto; font-size: 10px; }
  main { padding-top: 18px; }
  .demo-banner { align-items: flex-start; flex-direction: column; gap: 3px; }
  .welcome { align-items: flex-start; flex-direction: column; }
  .welcome .button { align-self: stretch; }
  h1 { font-size: 29px; }
  .stats { gap: 8px; }
  .stat { min-height: 95px; padding: 13px; }
  .stat strong { font-size: 22px; }
  .panel { padding: 16px 12px; border-radius: 15px; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .section-head .button { align-self: flex-start; }
  .form-grid { grid-template-columns: 1fr; gap: 12px; }
  .span-2 { grid-column: 1; }
  .assessment-question { grid-template-columns: 1fr; }
  .assessment-question .form-grid { grid-column: 1; }
  .criteria { flex-direction: column; gap: 3px; }
  table { min-width: 730px; }
  #cursos table { min-width: 590px; }
}
