:root {
  --bg: #fbf7ef;
  --surface: #ffffff;
  --surface-soft: #f6efe1;
  --ink: #243126;
  --muted: #6c735f;
  --line: #e6dcc9;
  --brand: #1f5b49;
  --brand-strong: #173f34;
  --gold: #d7a348;
  --blue: #456b63;
  --danger: #a84545;
  --cream: #fffaf0;
  --shadow: 0 18px 45px rgba(49, 42, 26, 0.09);
}

body.dark {
  --bg: #101816;
  --surface: #17231f;
  --surface-soft: #1e2b27;
  --ink: #f6f7f3;
  --muted: #aeb8b3;
  --line: #2e403b;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(215, 163, 72, 0.12), transparent 34rem),
    linear-gradient(180deg, #fffdf8 0%, var(--bg) 48%, #f3ead8 100%);
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, #fffaf0 0%, #f6ecd9 100%);
  border-right: 1px solid var(--line);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: 100vh;
  overflow-y: auto;
  padding: 26px 20px;
  position: sticky;
  top: 0;
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
  padding-bottom: 8px;
}

.brand-logo {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(49, 42, 26, 0.1);
  height: 74px;
  object-fit: contain;
  padding: 7px;
  width: 74px;
}

.brand strong,
.brand small,
.sidebar-card strong,
.sidebar-card small,
.sidebar-card span {
  display: block;
}

.brand small,
.sidebar-card small {
  color: var(--muted);
  line-height: 1.5;
}

.nav-list {
  display: grid;
  gap: 7px;
}

.nav-item {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  padding: 12px 14px;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(31, 91, 73, 0.1);
  border-color: rgba(35, 105, 90, 0.18);
  color: var(--brand);
}

.sidebar-card,
.auth-tabs {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}

.sidebar-card strong {
  font-size: 1.2rem;
  margin: 7px 0;
}

.sidebar-auth {
  display: grid;
  gap: 12px;
}

.auth-tabs {
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr 1fr;
  padding: 5px;
}

.auth-tab {
  background: transparent;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  font-weight: 800;
  min-height: 38px;
}

.auth-tab.active {
  background: var(--brand);
  color: var(--brand);
  color: #fff;
}

.main {
  padding: 34px;
}

.topbar,
.section-heading {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.inline-section-heading {
  margin-top: 28px;
}

.topbar {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(230, 220, 201, 0.72);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 18px 20px;
}

.user-actions,
.hero-actions,
.lesson-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  margin-bottom: 0;
}

h2 {
  font-size: 1.45rem;
  margin-bottom: 12px;
}

h3 {
  margin-bottom: 12px;
}

.eyebrow {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.content-panel,
.auth-panel,
.metric,
.course-card,
.material-card,
.plan-card,
.notice-card,
.history-panel,
.lesson-info,
.lesson-list,
.certificate-card,
.empty-state,
.exercise-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.content-panel,
.empty-state {
  padding: 24px;
}

.course-body p,
.lesson-info p,
.plan-card p,
.notice-card p,
.empty-state p {
  color: var(--muted);
  line-height: 1.6;
}

.sidebar-auth-panel {
  box-shadow: none;
  padding: 16px;
}

.sidebar-auth-panel input {
  background: #fffdf8;
}

.sidebar-auth-panel h2 {
  font-size: 1.1rem;
}

.form {
  display: grid;
  gap: 13px;
}

.filter-row {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 220px);
  margin: 12px 0 18px;
}

.inline-add-field {
  align-items: stretch;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 46px;
}

.icon-add-button {
  font-size: 1.2rem;
  min-height: 42px;
  padding: 0;
}

.extra-video-fields {
  display: grid;
  gap: 12px;
}

.extra-video-row {
  border-left: 3px solid var(--gold);
  display: grid;
  gap: 10px;
  padding-left: 12px;
}

#profileView {
  display: grid;
  gap: 18px;
}

label {
  color: var(--muted);
  display: grid;
  font-size: 0.92rem;
  gap: 7px;
}

.checkbox-label {
  align-items: center;
  display: flex;
  gap: 9px;
}

.checkbox-label input {
  min-height: auto;
  width: auto;
}

.form-hint {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0;
}

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

.rich-editor-label {
  color: var(--muted);
  display: grid;
  font-size: 0.92rem;
  gap: 8px;
}

.rich-editor-title {
  font-weight: 750;
}

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

.rich-toolbar button {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--brand);
  font-weight: 800;
  min-height: 34px;
  padding: 6px 10px;
}

.rich-toolbar button:hover {
  border-color: var(--brand);
}

.rich-editor {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 0 0 10px 10px;
  color: var(--ink);
  line-height: 1.6;
  min-height: 180px;
  overflow-y: auto;
  padding: 14px;
}

.rich-editor:focus {
  border-color: var(--brand);
  outline: 3px solid rgba(35, 105, 90, 0.18);
}

.rich-editor:empty::before {
  color: var(--muted);
  content: attr(data-placeholder);
}

input,
select,
textarea {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  min-height: 42px;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--brand);
  outline: 3px solid rgba(35, 105, 90, 0.18);
}

.primary-button,
.secondary-button,
.ghost-button,
.link-button {
  align-items: center;
  border-radius: 10px;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  text-decoration: none;
}

a.secondary-button,
a.primary-button,
a.ghost-button {
  text-decoration: none;
}

.primary-button {
  background: var(--brand);
  border: 1px solid var(--brand);
  color: #fff;
}

.primary-button:hover {
  background: var(--brand-strong);
}

.secondary-button {
  background: #fffdf8;
  border: 1px solid var(--line);
  color: var(--brand);
}

.ghost-button,
.link-button {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

button:disabled,
.primary-button:disabled,
.secondary-button:disabled,
.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.link-button {
  border: 0;
  color: var(--brand);
  justify-content: flex-start;
  padding-left: 0;
}

.user-badge {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.course-grid,
.metrics-grid,
.material-grid,
.payment-layout,
.admin-grid {
  display: grid;
  gap: 18px;
}

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

.metrics-grid,
.payment-layout,
.material-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 22px;
}

.admin-grid {
  grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
}

.metric,
.material-card,
.plan-card,
.notice-card,
.certificate-card {
  padding: 20px;
}

.course-card,
.metric,
.material-card,
.notice-card,
.certificate-card,
.content-panel {
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.course-card:hover,
.metric:hover,
.material-card:hover,
.notice-card:hover {
  box-shadow: 0 22px 54px rgba(49, 42, 26, 0.13);
  transform: translateY(-2px);
}

.metric span,
.course-meta,
.material-card span,
.plan-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.metric strong {
  display: block;
  font-size: 2rem;
  margin-top: 8px;
}

.course-card {
  display: grid;
  gap: 14px;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.course-cover {
  align-items: flex-start;
  min-height: 168px;
  background:
    linear-gradient(135deg, rgba(31, 91, 73, 0.96), rgba(69, 107, 99, 0.9)),
    linear-gradient(45deg, rgba(215, 163, 72, 0.28), transparent);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  position: relative;
}

.ebook-cover {
  background:
    linear-gradient(135deg, rgba(215, 163, 72, 0.94), rgba(31, 91, 73, 0.88)),
    linear-gradient(45deg, rgba(255, 255, 255, 0.22), transparent);
}

.course-cover img {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
}

.course-cover::after {
  background: linear-gradient(180deg, rgba(20, 48, 40, 0.2), rgba(20, 48, 40, 0.82));
  content: "";
  inset: 0;
  position: absolute;
}

.course-status {
  background: rgba(215, 163, 72, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 6px 9px;
  position: relative;
  z-index: 1;
}

.course-cover strong {
  font-size: 1.28rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
  position: relative;
  z-index: 1;
}

.course-body {
  display: grid;
  gap: 12px;
  grid-template-rows: auto auto auto 1fr auto;
  padding: 0 16px 16px;
}

.course-body p {
  min-height: 52px;
}

.card-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

.learning-list {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding-top: 10px;
}

.learning-list strong {
  color: var(--ink);
  display: block;
  font-size: 0.88rem;
  margin-bottom: 6px;
}

.learning-list ul {
  display: grid;
  gap: 4px;
  list-style-position: inside;
  margin: 0;
  padding: 0;
}

.learning-list li {
  line-height: 1.35;
}

.course-price-row {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.course-price-row strong {
  color: var(--brand);
  white-space: nowrap;
}

.progress-track {
  background: #efe4cf;
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
}

.progress-bar {
  background: var(--gold);
  height: 100%;
}

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

.video-area {
  display: grid;
  gap: 18px;
}

.video-frame {
  aspect-ratio: 16 / 9;
  background: #111;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.video-frame iframe {
  border: 0;
  height: 100%;
  width: 100%;
}

.video-cover {
  align-items: center;
  background:
    linear-gradient(180deg, rgba(8, 30, 24, 0.14), rgba(8, 30, 24, 0.58)),
    linear-gradient(135deg, #0f1714, #1c2a24);
  background-position: center;
  background-size: cover;
  border: 0;
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  inset: 0;
  justify-content: center;
  position: absolute;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.42);
  transition: filter 160ms ease, transform 160ms ease;
  width: 100%;
  z-index: 2;
}

.video-cover:hover {
  filter: brightness(1.06);
}

.video-play-icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
  color: var(--brand);
  display: inline-flex;
  font-size: 1.35rem;
  height: 62px;
  justify-content: center;
  line-height: 1;
  padding-left: 4px;
  width: 62px;
}

.video-cover strong {
  font-size: 0.95rem;
}

.lesson-info,
.lesson-list {
  padding: 18px;
}

.lesson-list {
  align-self: start;
  display: grid;
  gap: 12px;
}

.module-block {
  display: grid;
  gap: 8px;
}

.lesson-button {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  padding: 12px;
  text-align: left;
  width: 100%;
}

.lesson-button.active {
  border-color: var(--brand);
  outline: 3px solid rgba(35, 105, 90, 0.14);
}

.lesson-button.done {
  background: rgba(35, 105, 90, 0.12);
}

.lesson-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.material-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.classroom-progress {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.classroom-progress span,
.lesson-nav-actions span,
.lesson-notes small,
.material-empty {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.lesson-nav-actions {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr auto 1fr;
}

.lesson-nav-actions .secondary-button {
  justify-self: end;
}

.lesson-notes {
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 8px;
  padding: 12px;
}

.lesson-notes-header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.lesson-notes-header .ghost-button {
  min-height: 32px;
  padding: 6px 10px;
}

.lesson-notes-header .ghost-button.active {
  background: rgba(7, 93, 122, 0.12);
  border-color: rgba(7, 93, 122, 0.35);
}

.lesson-notes label {
  color: var(--brand-strong);
  font-weight: 800;
}

.lesson-notes textarea {
  min-height: 92px;
  resize: vertical;
}

.classroom-notices {
  display: grid;
  gap: 8px;
}

.classroom-notice {
  background: rgba(132, 220, 225, 0.13);
  border: 1px solid rgba(7, 93, 122, 0.16);
  border-radius: 10px;
  padding: 10px 12px;
}

.classroom-notice strong {
  color: var(--brand-strong);
  display: block;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.classroom-notice p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.certificate-complete-box {
  align-items: center;
  background: rgba(145, 223, 229, 0.22);
  border: 1px solid rgba(7, 93, 122, 0.18);
  border-radius: 12px;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr auto;
  padding: 12px;
}

.certificate-complete-box strong {
  color: var(--brand-strong);
}

.certificate-complete-box span {
  color: var(--muted);
}

.material-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--brand);
  display: grid;
  min-width: 138px;
  padding: 10px 12px;
  text-decoration: none;
}

.material-card strong {
  color: var(--brand-strong);
}

.material-card span {
  color: var(--muted);
  font-size: 0.78rem;
}

.material-inline span {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  padding: 7px 10px;
}

.exercise-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 16px;
}

.notice-list {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

.pix-box {
  align-items: center;
  background: var(--surface-soft);
  border: 1px dashed var(--brand);
  border-radius: 8px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin: 16px 0;
  padding: 16px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.admin-tab {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 800;
  min-height: 40px;
  padding: 9px 12px;
}

.admin-tab.active {
  background: var(--brand);
  color: #fff;
}

.admin-item {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding: 14px 0;
}

.receipt-button {
  justify-self: start;
}

.admin-item:first-of-type {
  border-top: 0;
}

.panel-divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 22px 0;
}

.saved-modules {
  display: grid;
  gap: 10px;
}

.saved-module {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 6px;
  padding: 12px;
}

.saved-module-header {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.module-actions,
.module-order-controls {
  align-items: center;
  display: flex;
  gap: 6px;
}

.module-arrow {
  min-height: 34px;
  padding: 6px 9px;
}

.add-lesson-button {
  min-height: 34px;
  padding: 6px 10px;
}

.saved-module span,
.saved-module small {
  color: var(--muted);
}

.saved-lesson {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.saved-lesson .link-button {
  min-height: auto;
  padding: 4px 0;
}

.qr-image {
  background: #fff;
  border: 4px solid #fff;
  display: block;
  height: 92px;
  width: 92px;
}

.certificate-template {
  aspect-ratio: 1920 / 1365;
  background: url("assets/certificado.png") center / cover no-repeat;
  border: 0;
  box-shadow: var(--shadow);
  grid-column: 1 / -1;
  max-width: 1120px;
  overflow: hidden;
  padding: 0;
  position: relative;
  width: 100%;
}

.certificate-card.certificate-template {
  margin-bottom: 56px;
}

.certificate-list {
  display: grid;
  gap: 12px;
  grid-column: 1 / -1;
}

.certificate-row {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr auto auto;
  padding: 16px;
}

.certificate-row div {
  display: grid;
  gap: 5px;
}

.certificate-row span,
.certificate-row small {
  color: var(--muted);
}

.certificate-workload {
  white-space: nowrap;
}

.modal-open {
  overflow: hidden;
}

.sales-modal {
  inset: 0;
  position: fixed;
  z-index: 50;
}

.sales-modal-backdrop {
  background: rgba(22, 34, 29, 0.58);
  inset: 0;
  position: absolute;
}

.sales-modal-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(31, 42, 36, 0.26);
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(320px, 1fr);
  left: 50%;
  height: min(82vh, 640px);
  max-width: 980px;
  overflow: hidden;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(calc(100vw - 32px), 980px);
}

.sales-modal-close {
  align-items: center;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-size: 1.35rem;
  font-weight: 800;
  height: 40px;
  justify-content: center;
  position: absolute;
  right: 14px;
  top: 14px;
  width: 40px;
  z-index: 2;
}

.sales-modal-cover {
  align-items: flex-end;
  background:
    linear-gradient(135deg, rgba(31, 91, 73, 0.96), rgba(69, 107, 99, 0.9)),
    linear-gradient(45deg, rgba(215, 163, 72, 0.28), transparent);
  color: #fff;
  display: flex;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 28px;
  position: relative;
}

.sales-modal-cover img {
  height: 100%;
  inset: 0;
  object-fit: cover;
  object-position: center;
  position: absolute;
  width: 100%;
}

.sales-modal-cover::after {
  background: linear-gradient(180deg, rgba(20, 48, 40, 0.08), rgba(20, 48, 40, 0.84));
  content: "";
  inset: 0;
  position: absolute;
}

.sales-modal-cover strong {
  font-size: clamp(1.5rem, 3vw, 2.6rem);
  line-height: 1.06;
  overflow-wrap: anywhere;
  position: relative;
  z-index: 1;
}

.sales-modal-content {
  display: grid;
  gap: 16px;
  align-content: start;
  max-height: 100%;
  overflow-y: auto;
  padding: 42px 34px 30px;
}

.sales-modal-content h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.04;
}

.sales-modal-content > p {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.sales-modal-content .learning-list {
  max-height: none;
}

.sales-modal-content .learning-list ul {
  gap: 8px;
  list-style-position: outside;
  padding-left: 18px;
}

.sales-modal-content .learning-list li {
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.sales-modal-summary {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding-top: 14px;
}

.sales-modal-summary strong {
  color: var(--brand);
  font-size: 1.35rem;
}

.sales-modal-summary span {
  color: var(--muted);
  text-align: right;
}

.sales-modal-actions {
  display: grid;
  gap: 10px;
}

/* Visual refresh */
.topbar {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 250, 240, 0.9)),
    radial-gradient(circle at top right, rgba(215, 163, 72, 0.18), transparent 22rem);
  border-radius: 10px;
}

.topbar h1 {
  letter-spacing: 0;
}

.content-panel.compact {
  border-left: 4px solid var(--gold);
}

.course-grid {
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 22px;
}

.course-card {
  border-radius: 10px;
  gap: 0;
  min-height: 100%;
}

.course-cover {
  aspect-ratio: 16 / 9;
  min-height: 0;
  padding: 14px;
}

.course-cover img {
  object-position: center;
  transform: scale(1.01);
}

.course-status {
  backdrop-filter: blur(8px);
  background: rgba(31, 91, 73, 0.68);
}

.course-cover strong {
  font-size: 1.22rem;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.28);
}

.course-body {
  gap: 11px;
  grid-template-rows: auto auto auto auto;
  padding: 16px;
}

.course-body p {
  display: -webkit-box;
  min-height: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.course-card .learning-list {
  display: none;
}

.course-price-row {
  align-items: flex-start;
}

.course-price-row strong {
  background: rgba(31, 91, 73, 0.08);
  border-radius: 999px;
  padding: 5px 9px;
}

.card-actions {
  margin-top: auto;
}

.progress-track {
  background: #eadfc9;
  height: 8px;
}

.metrics-grid {
  gap: 16px;
}

.metric {
  border-left: 4px solid var(--gold);
  padding: 18px;
}

.pix-steps {
  background: rgba(255, 253, 248, 0.82);
  border: 1px solid rgba(218, 200, 166, 0.7);
  border-radius: 12px;
  margin: 18px 0;
  padding: 16px 18px;
}

.pix-steps h3 {
  font-size: 1rem;
  margin: 0 0 10px;
}

.pix-steps ol {
  counter-reset: pix-step;
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pix-steps li {
  align-items: flex-start;
  color: var(--muted);
  display: grid;
  gap: 10px;
  grid-template-columns: 28px 1fr;
  line-height: 1.45;
}

.pix-steps li::before {
  align-items: center;
  background: var(--brand);
  border-radius: 999px;
  color: #fff;
  content: counter(pix-step);
  counter-increment: pix-step;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  margin-top: 1px;
  width: 24px;
}

.metric strong {
  color: var(--brand);
}

.notice-card {
  border-left: 4px solid var(--gold);
}

.classroom {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}

.video-frame {
  background:
    linear-gradient(135deg, #0f1714, #1c2a24);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 46px rgba(31, 42, 36, 0.18);
}

.lesson-info {
  display: grid;
  gap: 14px;
}

.lesson-info h2 {
  font-size: clamp(1.5rem, 2vw, 2.1rem);
}

#lessonText {
  max-height: 380px;
  overflow-y: auto;
  padding-right: 8px;
  white-space: pre-wrap;
}

.lesson-list {
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  position: sticky;
  top: 18px;
}

.module-block {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.module-block:first-child {
  border-top: 0;
  padding-top: 0;
}

.module-block > strong {
  color: var(--brand-strong);
}

.lesson-button {
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.lesson-button:hover:not(:disabled) {
  border-color: rgba(31, 91, 73, 0.42);
  transform: translateY(-1px);
}

.lesson-button span {
  color: var(--muted);
  font-size: 0.82rem;
}

.lesson-button.active {
  background: rgba(31, 91, 73, 0.1);
}

.material-pill {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--brand);
  display: inline-flex;
  font-weight: 800;
  padding: 8px 11px;
  text-decoration: none;
}

.material-inline {
  display: grid;
  gap: 10px;
}

.material-button {
  align-items: center;
  display: flex;
  gap: 10px;
  min-height: 54px;
  padding: 10px 12px;
  text-decoration: none;
}

.material-button:hover {
  border-color: rgba(7, 93, 122, 0.32);
  transform: translateY(-1px);
}

.material-icon {
  align-items: center;
  background: rgba(7, 93, 122, 0.12);
  border: 1px solid rgba(7, 93, 122, 0.18);
  border-radius: 10px;
  color: var(--brand);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 900;
  justify-content: center;
  min-height: 34px;
  min-width: 46px;
}

.material-copy {
  display: grid;
  gap: 2px;
}

.material-copy strong {
  color: var(--brand-strong);
  font-size: 0.92rem;
}

.material-copy small {
  color: var(--muted);
  font-weight: 700;
}

.material-pdf .material-icon {
  background: rgba(215, 163, 72, 0.16);
  border-color: rgba(215, 163, 72, 0.28);
}

.material-audio .material-icon {
  background: rgba(132, 220, 225, 0.2);
}

.material-pill:hover {
  border-color: var(--brand);
}

.admin-tabs {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 6px;
}

.admin-tab {
  white-space: nowrap;
}

.admin-item {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line);
  border-radius: 10px;
  align-items: start;
  grid-template-columns: repeat(3, minmax(120px, max-content));
  padding: 12px;
}

.admin-item:first-of-type {
  border-top: 1px solid var(--line);
}

.admin-item strong,
.admin-item span,
.admin-item small {
  grid-column: 1 / -1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-item > button,
.admin-item > a,
.admin-item .status-actions {
  justify-self: start;
}

.admin-item.compact {
  grid-template-columns: 1fr;
}

/* Admin list fix: keep text readable and actions compact */
.admin-item {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.admin-item strong,
.admin-item span,
.admin-item small {
  flex: 0 0 100%;
  max-width: 100%;
  overflow-wrap: break-word;
  white-space: normal;
  word-break: normal;
}

.admin-item > button,
.admin-item > a,
.admin-item .status-actions {
  align-self: flex-start;
  flex: 0 0 auto;
  min-height: 38px;
  width: auto;
}

.filter-row input,
.filter-row select {
  min-width: 0;
}

.sales-modal-panel {
  border-radius: 10px;
  grid-template-columns: minmax(280px, 390px) minmax(0, 1fr);
  height: min(88vh, 760px);
  max-width: 1180px;
}

.sales-modal-cover {
  align-items: flex-end;
}

.sales-modal-cover.has-cover-image {
  align-items: center;
  background:
    linear-gradient(180deg, #f7f2e8, #e9dfcf);
  justify-content: center;
  padding: 18px;
}

.sales-modal-cover.has-cover-image::after {
  display: none;
}

.sales-modal-cover.has-cover-image img {
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(31, 42, 36, 0.16);
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  position: relative;
  width: 100%;
}

.sales-modal-cover strong {
  font-size: clamp(1.4rem, 2.6vw, 2.35rem);
  max-width: 90%;
}

.sales-modal-content {
  gap: 18px;
  padding: 32px 38px 28px;
}

.sales-modal-content h2 {
  font-size: clamp(1.55rem, 2.1vw, 2.25rem);
  line-height: 1.14;
}

.sales-modal-content .learning-list {
  display: block;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffaf0, #f6efe1);
  border: 1px solid var(--line);
  max-height: 430px;
  overflow-y: auto;
  padding: 18px 20px;
}

.sales-modal-content .learning-list strong {
  color: var(--brand-strong);
  font-size: 1rem;
  margin-bottom: 12px;
}

.sales-modal-summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
}

.sales-modal-content .learning-list ul {
  gap: 10px;
  list-style: none;
  padding-left: 0;
}

.sales-modal-content .learning-list li {
  color: var(--ink);
  display: grid;
  font-size: 0.98rem;
  grid-template-columns: 12px 1fr;
  line-height: 1.5;
}

.sales-modal-content .learning-list li::before {
  background: var(--gold);
  border-radius: 999px;
  content: "";
  height: 6px;
  margin-top: 9px;
  width: 6px;
}

.rich-learning .rich-text {
  color: var(--ink);
  display: grid;
  gap: 10px;
  line-height: 1.62;
}

.rich-learning .rich-text p,
.rich-learning .rich-text ul,
.rich-learning .rich-text ol {
  margin: 0;
}

.rich-learning .rich-text ul,
.rich-learning .rich-text ol {
  padding-left: 22px;
}

.sales-modal-content .rich-learning .rich-text li {
  display: list-item;
  font-size: 1rem;
  line-height: 1.6;
}

.sales-modal-content .rich-learning .rich-text li::before {
  display: none;
}

/* Second polish pass */
.sidebar {
  box-shadow: 12px 0 34px rgba(49, 42, 26, 0.06);
}

.sidebar-card {
  border-radius: 10px;
}

.nav-item {
  font-weight: 700;
}

.nav-item.active {
  box-shadow: inset 3px 0 0 var(--brand);
}

.section-heading input[type="search"] {
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 44px;
  padding: 0 18px;
  width: min(100%, 360px);
}

.section-heading input[type="search"]:focus {
  border-color: rgba(31, 91, 73, 0.55);
  outline: 3px solid rgba(31, 91, 73, 0.12);
}

.section-subtitle {
  color: var(--muted);
  line-height: 1.5;
  margin: 6px 0 0;
  max-width: 680px;
}

#homeView .course-grid {
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  max-width: 760px;
}

#studentDashboardView {
  display: grid;
  gap: 20px;
}

#studentDashboardView.hidden {
  display: none;
}

.student-area-block {
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.student-area-block > h2 {
  margin-bottom: 14px;
}

.student-area-block .inline-section-heading {
  margin-top: 0;
}

.student-area-block .course-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.course-card.has-access {
  border-color: rgba(31, 91, 73, 0.26);
}

.compact-access-card .course-cover {
  aspect-ratio: 16 / 8;
}

.compact-access-card .course-body {
  gap: 10px;
  padding: 12px 14px 14px;
}

.compact-access-card .course-price-row {
  margin-bottom: 0;
}

.compact-access-card .card-actions {
  margin-top: 2px;
}

.compact-access-card .primary-button {
  min-height: 40px;
}

.course-card.has-access .course-status {
  background: rgba(31, 91, 73, 0.84);
}

.course-card.sale-paused {
  opacity: 0.82;
}

.course-card.sale-paused .course-cover::after {
  background: linear-gradient(180deg, rgba(20, 48, 40, 0.35), rgba(20, 48, 40, 0.92));
}

.progress-group {
  display: grid;
  gap: 6px;
}

.progress-group small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: right;
}

.completion-badge {
  align-items: center;
  background: rgba(7, 93, 122, 0.1);
  border: 1px solid rgba(7, 93, 122, 0.22);
  border-radius: 999px;
  color: var(--brand);
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 900;
  justify-content: center;
  justify-self: start;
  min-height: 30px;
  padding: 6px 12px;
}

.course-card.course-completed .course-status {
  background: rgba(7, 93, 122, 0.96);
  color: #ffffff;
}

.empty-state {
  border-style: dashed;
}

.empty-state strong {
  display: block;
  margin-bottom: 4px;
}

#lastCourseBox:not(:empty) {
  margin-bottom: 22px;
}

#lastCourseBox .content-panel {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

#lastCourseBox .content-panel h2 {
  margin: 2px 0 0;
}

.notice-card strong {
  display: block;
  font-size: 1.06rem;
  margin-bottom: 6px;
}

.notice-card small {
  color: var(--brand);
  display: inline-block;
  font-weight: 800;
  margin-bottom: 8px;
}

.certificate-row {
  border-radius: 10px;
}

.certificate-row:hover {
  border-color: rgba(31, 91, 73, 0.28);
}

.primary-button,
.secondary-button,
.ghost-button {
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

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

.primary-button:disabled:hover,
.secondary-button:disabled:hover,
.ghost-button:disabled:hover {
  transform: none;
}

.toast {
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 40px rgba(20, 32, 28, 0.24);
}

.certificate-content {
  bottom: 6%;
  color: #385779;
  display: flex;
  flex-direction: column;
  justify-content: center;
  left: 35%;
  position: absolute;
  right: 9%;
  text-align: center;
  top: 35%;
}

.certificate-intro,
.certificate-text,
.certificate-details {
  color: #5f6f82;
  font-size: clamp(0.72rem, 1.35vw, 1.12rem);
  line-height: 1.35;
  margin: 0 0 1.15%;
}

.certificate-student {
  color: #385779;
  display: block;
  font-size: clamp(1.6rem, 3.3vw, 3.35rem);
  line-height: 1.1;
  margin: 0 auto 1.35%;
  max-width: 88%;
  overflow-wrap: anywhere;
}

.certificate-course {
  color: #385779;
  display: block;
  font-size: clamp(1.15rem, 2.4vw, 2.35rem);
  line-height: 1.16;
  margin: 0 auto 1.6%;
  max-width: 88%;
  overflow-wrap: anywhere;
}

.certificate-footer {
  align-items: end;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 9% auto 0;
  max-width: 82%;
  text-align: center;
  width: 100%;
}

.certificate-footer small {
  color: #385779;
  display: block;
  font-size: clamp(0.62rem, 1vw, 0.9rem);
  margin-top: 6px;
}

.signature-line {
  background: #385779;
  display: block;
  height: 1px;
  margin: 0 auto 8px;
  width: min(280px, 24vw);
}

.certificate-template > .secondary-button {
  bottom: -54px;
  left: 0;
  position: absolute;
}

.back-button {
  margin-bottom: 16px;
}

.compact {
  margin-bottom: 18px;
}

.toast {
  background: var(--ink);
  border-radius: 8px;
  bottom: 22px;
  color: var(--surface);
  left: 50%;
  max-width: min(520px, calc(100vw - 32px));
  padding: 13px 16px;
  position: fixed;
  transform: translateX(-50%);
  z-index: 20;
}

.hidden {
  display: none !important;
}

/* Premium layout pass */
body {
  background:
    linear-gradient(115deg, rgba(31, 91, 73, 0.08), transparent 34%),
    linear-gradient(180deg, #fffdf8 0%, #fbf7ef 42%, #efe5d2 100%);
}

.app-shell {
  background:
    linear-gradient(90deg, rgba(31, 91, 73, 0.05), transparent 24rem);
}

.sidebar {
  background:
    linear-gradient(180deg, #fffaf0 0%, #f5ecd8 58%, #eee2ca 100%);
  gap: 26px;
  padding: 30px 22px;
}

.brand {
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(230, 220, 201, 0.88);
  border-radius: 14px;
  padding: 12px;
}

.brand-logo {
  border-radius: 14px;
  height: 68px;
  width: 68px;
}

.brand strong {
  font-size: 1.08rem;
}

.nav-list {
  gap: 9px;
}

.nav-item {
  border-radius: 12px;
  color: #526050;
  min-height: 48px;
  padding: 14px 16px;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(31, 91, 73, 0.12);
  border-color: rgba(31, 91, 73, 0.22);
  color: var(--brand-strong);
}

.sidebar-card,
.auth-tabs {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(49, 42, 26, 0.06);
}

.main {
  padding: clamp(24px, 3vw, 42px);
}

.topbar {
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(49, 42, 26, 0.08);
  margin-bottom: 30px;
  padding: 24px 26px;
}

.topbar h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

.user-badge {
  background: rgba(31, 91, 73, 0.1);
  border: 1px solid rgba(31, 91, 73, 0.2);
  border-radius: 999px;
  color: var(--brand-strong);
  font-weight: 800;
  padding: 11px 14px;
}

.section-heading {
  background: rgba(255, 253, 248, 0.5);
  border: 1px solid rgba(230, 220, 201, 0.72);
  border-radius: 16px;
  padding: 18px 20px;
}

.section-heading h2 {
  font-size: clamp(1.45rem, 2vw, 2rem);
}

.inline-section-heading {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.content-panel,
.auth-panel,
.metric,
.course-card,
.material-card,
.plan-card,
.notice-card,
.history-panel,
.lesson-info,
.lesson-list,
.certificate-card,
.empty-state,
.exercise-panel,
.student-area-block {
  border-color: rgba(230, 220, 201, 0.9);
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(49, 42, 26, 0.08);
}

.course-grid {
  gap: 24px;
}

.course-card {
  background: #fffdf8;
  border-radius: 16px;
  box-shadow: 0 18px 36px rgba(49, 42, 26, 0.08);
}

.course-card:hover {
  box-shadow: 0 28px 58px rgba(31, 42, 36, 0.16);
  transform: translateY(-4px);
}

.course-cover {
  border-bottom: 1px solid rgba(230, 220, 201, 0.72);
}

.course-cover::after {
  background: linear-gradient(180deg, rgba(20, 48, 40, 0.08), rgba(20, 48, 40, 0.72));
}

.course-body {
  padding: 18px;
}

.course-meta {
  font-weight: 700;
}

.course-price-row strong {
  background: rgba(215, 163, 72, 0.16);
  color: #12513f;
  font-size: 1rem;
}

.primary-button {
  background: linear-gradient(180deg, #246b56, #185241);
  border-color: #185241;
  box-shadow: 0 10px 22px rgba(31, 91, 73, 0.18);
}

.primary-button:hover {
  background: linear-gradient(180deg, #2a765f, #174838);
}

.secondary-button {
  background: #fffaf0;
  border-color: rgba(215, 163, 72, 0.38);
  color: #185241;
}

.secondary-button:hover {
  background: rgba(215, 163, 72, 0.12);
  border-color: var(--gold);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.54);
}

.metric {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 250, 240, 0.86));
  border-left: 0;
  overflow: hidden;
  position: relative;
}

.metric::before {
  background: linear-gradient(180deg, var(--gold), rgba(31, 91, 73, 0.72));
  content: "";
  inset: 0 auto 0 0;
  position: absolute;
  width: 5px;
}

.metric span {
  font-weight: 800;
}

.student-area-block {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 250, 240, 0.82));
  padding: 24px;
}

#lastCourseBox .content-panel {
  background:
    linear-gradient(135deg, rgba(31, 91, 73, 0.12), rgba(215, 163, 72, 0.12)),
    #fffdf8;
  border-left: 0;
  border-radius: 16px;
}

.admin-tabs {
  background: rgba(255, 250, 240, 0.82);
  border-radius: 16px;
  box-shadow: 0 16px 34px rgba(49, 42, 26, 0.06);
}

.admin-tab {
  border-radius: 12px;
  min-height: 42px;
}

.admin-tab.active {
  box-shadow: 0 10px 22px rgba(31, 91, 73, 0.16);
}

.admin-grid {
  align-items: start;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
}

.admin-grid > *,
.content-panel,
.form,
label,
.rich-editor-label {
  min-width: 0;
}

.admin-grid .content-panel {
  overflow: hidden;
}

.admin-item {
  background: #fffdf8;
  border-radius: 14px;
  gap: 10px;
  padding: 14px;
}

.admin-item strong {
  color: var(--brand-strong);
  font-size: 1.04rem;
}

input,
select,
textarea,
.rich-editor {
  border-radius: 12px;
}

.rich-toolbar {
  border-radius: 12px 12px 0 0;
  display: flex !important;
  position: relative;
  z-index: 2;
}

.rich-editor {
  min-height: 220px;
  max-height: 420px;
}

.sales-modal-backdrop {
  background: rgba(22, 34, 29, 0.66);
  backdrop-filter: blur(3px);
}

.sales-modal-panel {
  border-radius: 18px;
  box-shadow: 0 36px 90px rgba(18, 28, 24, 0.34);
  overflow: hidden;
}

.sales-modal-close {
  box-shadow: 0 12px 28px rgba(49, 42, 26, 0.14);
}

.sales-modal-cover.has-cover-image {
  background:
    linear-gradient(180deg, #f9f4ea, #e8ddcc);
  padding: 24px;
}

.sales-modal-cover.has-cover-image img {
  background: #fff;
  object-fit: contain;
}

.sales-modal-content {
  background:
    linear-gradient(180deg, #fffdf8, #fffaf0);
}

.sales-modal-content .eyebrow {
  color: #65715f;
}

.sales-modal-content .learning-list {
  background: #fff8eb;
  border-radius: 14px;
}

.sales-modal-summary {
  border-radius: 14px;
}

.notice-card {
  background: #fffdf8;
  border-left: 0;
  position: relative;
}

.notice-card::before {
  background: var(--gold);
  border-radius: 999px;
  content: "";
  height: calc(100% - 28px);
  left: 0;
  position: absolute;
  top: 14px;
  width: 5px;
}

.toast {
  border-radius: 14px;
}

@media (max-width: 1120px) {
  .section-heading {
    align-items: stretch;
  }
}

@media (max-width: 780px) {
  .brand {
    padding: 10px;
  }

  .topbar,
  .section-heading,
  .student-area-block {
    border-radius: 14px;
  }

  .user-actions {
    align-items: stretch;
  }

  .user-badge {
    text-align: center;
  }
}

/* Modern translucent layer */
:root {
  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.74);
  --glass-soft: rgba(255, 250, 240, 0.62);
  --glass-border: rgba(255, 255, 255, 0.48);
  --glass-shadow: 0 22px 55px rgba(31, 42, 36, 0.12);
}

body {
  background:
    radial-gradient(circle at 18% 12%, rgba(215, 163, 72, 0.22), transparent 24rem),
    radial-gradient(circle at 82% 18%, rgba(31, 91, 73, 0.16), transparent 28rem),
    linear-gradient(135deg, #fffdf8 0%, #f7efe0 46%, #eadfc9 100%);
}

.sidebar,
.topbar,
.section-heading,
.content-panel,
.auth-panel,
.metric,
.course-card,
.material-card,
.plan-card,
.notice-card,
.history-panel,
.lesson-info,
.lesson-list,
.certificate-card,
.empty-state,
.exercise-panel,
.student-area-block,
.admin-tabs,
.sidebar-card,
.auth-tabs,
.sales-modal-panel,
.admin-item {
  backdrop-filter: blur(18px) saturate(1.12);
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.78), rgba(245, 236, 216, 0.62));
  border-right-color: rgba(255, 255, 255, 0.48);
}

.brand,
.sidebar-card,
.auth-tabs {
  background: var(--glass);
  border-color: var(--glass-border);
}

.topbar,
.section-heading,
.student-area-block,
.content-panel,
.course-card,
.metric,
.notice-card,
.lesson-info,
.lesson-list,
.certificate-row,
.empty-state {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 250, 240, 0.48));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.course-card {
  overflow: hidden;
}

.course-card::before,
.content-panel::before,
.student-area-block::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.58), transparent 42%);
  content: "";
  height: 90px;
  left: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  width: 100%;
}

.content-panel,
.student-area-block,
.course-card {
  position: relative;
}

.content-panel > *,
.student-area-block > *,
.course-card > * {
  position: relative;
  z-index: 1;
}

.nav-item {
  background: rgba(255, 255, 255, 0.22);
}

.nav-item:hover,
.nav-item.active {
  background: rgba(31, 91, 73, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

input,
select,
textarea,
.rich-editor {
  background: rgba(255, 253, 248, 0.72);
  border-color: rgba(230, 220, 201, 0.82);
}

.rich-toolbar,
.admin-tabs,
.sales-modal-summary,
.sales-modal-content .learning-list {
  background: rgba(255, 250, 240, 0.72);
  border-color: rgba(255, 255, 255, 0.52);
}

.primary-button {
  box-shadow:
    0 14px 28px rgba(31, 91, 73, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.secondary-button,
.ghost-button,
.rich-toolbar button {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.sales-modal-backdrop {
  background:
    radial-gradient(circle at 25% 20%, rgba(215, 163, 72, 0.18), transparent 26rem),
    rgba(22, 34, 29, 0.56);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.sales-modal-panel {
  background: rgba(255, 253, 248, 0.82);
  border-color: rgba(255, 255, 255, 0.58);
}

.sales-modal-content {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.8), rgba(255, 250, 240, 0.64));
}

.toast {
  background: rgba(22, 34, 29, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

@supports not ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
  .sidebar,
  .topbar,
  .section-heading,
  .content-panel,
  .course-card,
  .student-area-block,
  .sales-modal-panel {
    background: rgba(255, 253, 248, 0.94);
  }
}

/* Final aesthetic refinement */
body::before {
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.42), transparent 16rem),
    radial-gradient(circle at 86% 10%, rgba(215, 163, 72, 0.14), transparent 20rem);
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

.main {
  position: relative;
}

.main::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), transparent),
    radial-gradient(circle, rgba(31, 91, 73, 0.08) 0 1px, transparent 1px);
  background-size: auto, 28px 28px;
  border-radius: 28px;
  content: "";
  inset: 18px;
  opacity: 0.45;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

.brand {
  box-shadow:
    0 18px 38px rgba(49, 42, 26, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.brand-logo {
  box-shadow:
    0 12px 28px rgba(49, 42, 26, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.eyebrow {
  align-items: center;
  display: inline-flex;
  gap: 8px;
}

.eyebrow::before {
  background: var(--gold);
  border-radius: 999px;
  content: "";
  height: 7px;
  width: 7px;
}

.topbar {
  overflow: hidden;
  position: relative;
}

.topbar::after {
  background: linear-gradient(135deg, rgba(215, 163, 72, 0.2), transparent 42%);
  content: "";
  height: 100%;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 0;
  width: min(34%, 320px);
}

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

.section-heading {
  overflow: hidden;
  position: relative;
}

.section-heading::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  content: "";
  height: 1px;
  left: 18px;
  position: absolute;
  right: 18px;
  top: 0;
}

.course-cover {
  margin: 10px 10px 0;
  border-radius: 14px;
  overflow: hidden;
}

.course-cover img {
  transition: transform 280ms ease;
}

.course-card:hover .course-cover img {
  transform: scale(1.045);
}

.course-body {
  padding: 18px 20px 20px;
}

.course-status {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  letter-spacing: 0;
}

.course-body p {
  color: #606b5b;
}

.card-actions {
  gap: 9px;
}

.primary-button,
.secondary-button,
.ghost-button,
.link-button {
  border-radius: 12px;
  min-height: 44px;
}

.metrics-grid {
  gap: 18px;
}

.metric {
  min-height: 124px;
}

.metric strong {
  font-size: clamp(2rem, 3vw, 2.55rem);
}

.student-area-block .course-grid {
  margin-top: 4px;
}

.admin-tabs {
  position: static;
  z-index: 8;
}

.admin-tab {
  font-weight: 900;
}

.form label {
  font-weight: 750;
}

.form input,
.form select,
.form textarea,
.rich-editor {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.rich-toolbar {
  gap: 8px;
  margin-bottom: -1px;
}

.rich-toolbar button {
  min-width: 42px;
}

.rich-toolbar button:active {
  background: rgba(31, 91, 73, 0.12);
  border-color: var(--brand);
  transform: translateY(0);
}

.rich-editor {
  caret-color: var(--brand);
  outline-offset: 0;
}

.rich-editor ::selection {
  background: rgba(31, 91, 73, 0.18);
}

.sales-modal-cover.has-cover-image img {
  border: 10px solid rgba(255, 255, 255, 0.56);
}

.sales-modal-content {
  padding: 38px 42px 32px;
}

.sales-modal-content h2 {
  color: #243126;
  margin: 0;
}

.sales-modal-content > p {
  margin: 0;
}

.sales-modal-content .learning-list {
  margin-top: 4px;
}

.sales-modal-content {
  align-content: stretch;
  gap: 12px;
  padding-top: 28px;
}

.sales-modal-summary strong {
  font-size: 1.55rem;
}

.notice-list {
  gap: 14px;
}

.notice-card {
  padding-left: 24px;
}

.certificate-row {
  padding: 18px 20px;
}

/* Compact professional scale */
.main {
  padding: 22px 28px;
}

.topbar {
  border-radius: 14px;
  margin-bottom: 20px;
  min-height: auto;
  padding: 18px 22px;
}

.topbar h1 {
  font-size: clamp(1.7rem, 2.8vw, 2.35rem);
}

.topbar .eyebrow {
  font-size: 0.72rem;
  margin-bottom: 6px;
}

.section-heading {
  border-radius: 12px;
  margin-bottom: 18px;
  padding: 14px 16px;
}

.section-heading h2 {
  font-size: clamp(1.22rem, 1.6vw, 1.55rem);
}

.section-subtitle {
  font-size: 0.92rem;
}

.sidebar {
  gap: 18px;
  padding: 22px 18px;
}

.brand {
  border-radius: 12px;
  padding: 10px;
}

.brand-logo {
  height: 56px;
  width: 56px;
}

.brand strong {
  font-size: 1rem;
}

.brand small {
  font-size: 0.86rem;
}

.nav-list {
  gap: 7px;
}

.nav-item {
  border-radius: 10px;
  min-height: 40px;
  padding: 10px 14px;
}

.sidebar-card {
  padding: 14px;
}

.metrics-grid {
  gap: 14px;
}

.metric {
  min-height: 96px;
  padding: 16px 18px;
}

.metric span {
  font-size: 0.82rem;
}

.metric strong {
  font-size: clamp(1.7rem, 2.4vw, 2.15rem);
  margin-top: 6px;
}

.student-area-block,
.content-panel,
.course-card,
.notice-card,
.empty-state {
  border-radius: 12px;
}

.student-area-block {
  padding: 18px;
}

.course-grid {
  gap: 18px;
}

.course-body {
  padding: 14px 16px 16px;
}

.course-cover {
  margin: 8px 8px 0;
  border-radius: 10px;
}

.admin-tabs {
  border-radius: 12px;
  margin-bottom: 16px;
  padding: 5px;
}

.admin-tab {
  min-height: 34px;
  padding: 7px 11px;
}

.user-badge {
  padding: 8px 12px;
}

#studentDashboardView > .section-heading {
  display: none !important;
}

#homeView {
  margin-top: 0;
}

body:has(#homeView:not(.hidden)) .topbar {
  display: none;
}

body:has(#studentDashboardView:not(.hidden)) .topbar {
  display: none;
}

#homeView > .section-heading {
  align-items: center;
  background: transparent;
  border: 0;
  box-shadow: none;
  margin-bottom: 18px;
  padding: 0;
}

#homeView > .section-heading::after {
  display: none;
}

#homeView > .section-heading .eyebrow {
  display: none;
}

#homeView > .section-heading h2 {
  font-size: 1.55rem;
}

#homeView .section-subtitle {
  max-width: 520px;
}

#homeView > .home-hero {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 250, 240, 0.48));
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 16px;
  box-shadow: 0 22px 55px rgba(31, 42, 36, 0.1);
  margin-bottom: 18px;
  max-width: 980px;
  padding: 24px 26px;
}

#homeView > .home-hero > .secondary-button {
  display: none;
}

.home-hero h2 {
  font-size: clamp(1.8rem, 3.2vw, 3rem);
  line-height: 1.05;
  max-width: 760px;
}

.home-hero .section-subtitle {
  font-size: 1rem;
  margin: 12px 0 0;
  max-width: 680px;
}

.home-hero .hero-actions {
  margin-top: 18px;
}

.home-showcase {
  display: grid;
  gap: 16px;
  max-width: 980px;
}

.home-feature {
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(49, 42, 26, 0.08);
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1fr);
  overflow: hidden;
}

.home-feature-media {
  background: linear-gradient(180deg, #f6efe1, #e9dfcf);
  min-height: 260px;
}

.home-feature-media img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.home-feature-content {
  align-content: center;
  display: grid;
  gap: 12px;
  padding: 28px;
}

.home-feature-content h3 {
  font-size: clamp(1.5rem, 2.4vw, 2.35rem);
}

.home-feature-content p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
}

.home-feature-actions,
.home-paths {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.home-paths article {
  background: rgba(255, 253, 248, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 14px;
  display: grid;
  gap: 8px;
  padding: 18px;
}

.home-paths span {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.home-paths strong {
  color: var(--ink);
}

/* Minha Area compacta */
#studentDashboardView {
  gap: 14px !important;
}

#studentDashboardView .metrics-grid {
  gap: 10px !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 6px;
}

#studentDashboardView .metric {
  border-radius: 10px;
  box-shadow: none;
  min-height: 72px;
  padding: 12px 14px;
}

#studentDashboardView .metric::before {
  width: 3px;
}

#studentDashboardView .metric span {
  font-size: 0.75rem;
}

#studentDashboardView .metric strong {
  font-size: 1.5rem;
  margin-top: 4px;
}

#lastCourseBox:not(:empty) {
  margin-bottom: 8px;
}

#lastCourseBox .content-panel {
  border-radius: 10px;
  box-shadow: none;
  min-height: 0;
  padding: 11px 14px;
}

#lastCourseBox .content-panel .eyebrow {
  display: none;
}

#lastCourseBox .content-panel h2 {
  font-size: 1rem;
}

#lastCourseBox .content-panel .primary-button {
  min-height: 34px;
  padding: 7px 12px;
}

#studentDashboardView .student-area-block {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

#studentDashboardView .student-area-block::before {
  display: none;
}

#studentDashboardView .student-area-block .inline-section-heading {
  margin-bottom: 10px;
}

#studentDashboardView .student-area-block .inline-section-heading .eyebrow {
  display: none;
}

#studentDashboardView .student-area-block h2 {
  font-size: 1.15rem;
}

#studentDashboardView .student-area-block .course-grid {
  gap: 14px;
}

#studentDashboardView .compact-access-card {
  max-width: 260px;
}

#studentDashboardView .compact-access-card .course-cover {
  aspect-ratio: 16 / 7;
}

#studentDashboardView .compact-access-card .course-body {
  padding: 10px 12px 12px;
}

#studentDashboardView .compact-access-card .primary-button {
  min-height: 36px;
  padding: 8px 12px;
}

.student-continue-card,
.compact-purchase,
.favorite-lesson-card {
  align-items: center;
  background: rgba(255, 253, 248, 0.82);
  border: 1px solid rgba(7, 93, 122, 0.14);
  border-radius: 12px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
}

.student-continue-card {
  margin-bottom: 12px;
}

.student-continue-card span,
.favorite-lesson-card span {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
}

.student-continue-card strong,
.favorite-lesson-card strong {
  color: var(--brand-strong);
}

.favorite-lesson-list,
.compact-purchase-list {
  display: grid;
  gap: 8px;
}

.favorite-lesson-card {
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.favorite-lesson-card:hover {
  border-color: rgba(7, 93, 122, 0.34);
}

.favorite-lesson-card-wide {
  align-items: flex-start;
  flex-direction: column;
}

.favorite-lesson-card-wide small {
  color: var(--muted);
  font-weight: 700;
}

.annotation-list {
  display: grid;
  gap: 14px;
}

.annotation-card {
  background: rgba(255, 253, 248, 0.86);
  border: 1px solid rgba(7, 93, 122, 0.14);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(20, 40, 32, 0.06);
  display: grid;
  gap: 12px;
  padding: 16px;
}

.annotation-card span,
.annotation-card small {
  color: var(--muted);
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
}

.annotation-card h3 {
  color: var(--brand-strong);
  font-size: 1.06rem;
  margin-top: 3px;
}

.annotation-card p {
  background: rgba(145, 223, 229, 0.12);
  border-left: 4px solid var(--brand);
  border-radius: 10px;
  color: var(--ink);
  line-height: 1.65;
  margin: 0;
  padding: 12px 14px;
  white-space: pre-wrap;
}

.study-plan-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  margin-bottom: 18px;
}

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

.study-plan-today,
.weekly-study-grid,
.study-day-items {
  display: grid;
  gap: 10px;
}

.weekly-study-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.study-day-card {
  background: rgba(255, 253, 248, 0.86);
  border: 1px solid rgba(7, 93, 122, 0.14);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(20, 40, 32, 0.06);
  display: grid;
  gap: 12px;
  padding: 14px;
}

.study-day-card.empty {
  opacity: 0.74;
}

.study-day-card header {
  align-items: center;
  display: flex;
  gap: 10px;
}

.study-day-card header span {
  align-items: center;
  background: rgba(145, 223, 229, 0.26);
  border: 1px solid rgba(7, 93, 122, 0.16);
  border-radius: 999px;
  color: var(--brand);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  width: 34px;
}

.study-day-card header strong {
  color: var(--brand-strong);
  font-family: var(--font-heading);
  letter-spacing: 0.02em;
}

.study-day-items > p {
  color: var(--muted);
  margin: 0;
}

.study-plan-item {
  align-items: center;
  background: rgba(247, 255, 255, 0.72);
  border: 1px solid rgba(7, 93, 122, 0.12);
  border-radius: 12px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
}

.study-plan-item span {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  font-weight: 800;
}

.study-plan-item strong {
  color: var(--brand-strong);
}

.study-plan-item p {
  color: var(--muted);
  line-height: 1.45;
  margin: 4px 0 0;
}

.study-plan-time {
  align-items: flex-end;
  display: grid;
  gap: 8px;
  justify-items: end;
}

.study-plan-time > strong {
  color: var(--brand);
  font-size: 1rem;
}

.platform-features,
.help-grid {
  display: grid;
  gap: 14px;
}

.platform-features {
  margin-bottom: 24px;
}

.feature-grid,
.help-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

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

.feature-grid article,
.help-grid article {
  background: rgba(255, 253, 248, 0.84);
  border: 1px solid rgba(7, 93, 122, 0.14);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(20, 40, 32, 0.06);
  display: grid;
  gap: 8px;
  padding: 16px;
}

.feature-grid span,
.help-grid span {
  align-items: center;
  background: rgba(145, 223, 229, 0.26);
  border: 1px solid rgba(7, 93, 122, 0.16);
  border-radius: 999px;
  color: var(--brand);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 900;
  height: 30px;
  justify-content: center;
  width: 38px;
}

.feature-grid strong,
.help-grid strong {
  color: var(--brand-strong);
  font-size: 1rem;
}

.feature-grid p,
.help-grid p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.platform-features {
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid rgba(7, 93, 122, 0.12);
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(20, 40, 32, 0.06);
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px;
}

.platform-features .home-card-heading {
  margin-bottom: 6px;
}

.platform-features .home-card-heading h2 {
  font-size: 1rem;
}

.platform-features .home-card-heading h2::after {
  display: none;
}

.platform-features .feature-grid {
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.platform-features .feature-grid article {
  align-items: center;
  background: rgba(247, 255, 255, 0.78);
  border-radius: 999px;
  box-shadow: none;
  display: flex;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  position: relative;
}

.platform-features .feature-grid span {
  flex: 0 0 auto;
  font-size: 0.68rem;
  height: 24px;
  width: 28px;
}

.platform-features .feature-grid strong {
  font-size: 0.86rem;
  line-height: 1.2;
}

.platform-features .feature-grid p {
  background: #fffdf8;
  border: 1px solid rgba(7, 93, 122, 0.18);
  border-radius: 12px;
  box-shadow: 0 18px 38px rgba(20, 40, 32, 0.14);
  color: var(--ink);
  display: block;
  font-size: 0.86rem;
  left: 12px;
  line-height: 1.45;
  min-width: min(260px, 78vw);
  opacity: 0;
  padding: 12px;
  pointer-events: none;
  position: absolute;
  top: calc(100% + 8px);
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  visibility: hidden;
  z-index: 20;
}

.platform-features .feature-grid article:hover p,
.platform-features .feature-grid article:focus-within p {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.platform-features .feature-grid article:hover,
.platform-features .feature-grid article:focus-within {
  border-color: rgba(7, 93, 122, 0.28);
  box-shadow: 0 10px 24px rgba(20, 40, 32, 0.08);
}

.compact-purchase strong {
  color: var(--brand);
  font-size: 0.9rem;
}

.compact-notice-list {
  gap: 8px;
}

.compact-notice-list .notice-card {
  padding: 12px 14px 12px 18px;
}

.compact-notice-list .notice-card p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

#studentCourses .course-price-row,
#studentEbooks .course-price-row,
#studentCourses .course-body > p,
#studentEbooks .course-body > p,
#studentCourses .card-actions .secondary-button,
#studentEbooks .card-actions .secondary-button {
  display: none !important;
}

#studentCourses .course-body,
#studentEbooks .course-body {
  gap: 10px;
}

#studentCourses .card-actions,
#studentEbooks .card-actions {
  margin-top: 0;
}

/* Remove repeated page headings */
#catalogView > .section-heading > div,
#ebooksView > .section-heading > div {
  display: none;
}

#catalogView > .section-heading,
#ebooksView > .section-heading {
  background: transparent;
  border: 0;
  box-shadow: none;
  justify-content: flex-end;
  margin-bottom: 18px;
  padding: 0;
}

#catalogView > .section-heading::after,
#ebooksView > .section-heading::after {
  display: none;
}

#studentDashboardView > .section-heading,
#certificatesView > .section-heading,
#libraryView > .section-heading,
#agendaView > .section-heading,
#adminDashboardView > .section-heading {
  display: none;
}

/* Button scale refinement */
.primary-button,
.secondary-button,
.ghost-button,
.link-button {
  border-radius: 10px;
  min-height: 40px;
  padding: 9px 14px;
}

.card-actions .primary-button,
.card-actions .secondary-button,
.sales-modal-actions .primary-button,
.sales-modal-actions .secondary-button {
  min-height: 44px;
  padding: 11px 16px;
}

.admin-tab {
  min-height: 38px;
  padding: 8px 13px;
}

.admin-item > button,
.admin-item > a,
.admin-item .status-actions button {
  font-size: 0.92rem;
  min-height: 34px;
  padding: 7px 12px;
}

.form-actions .primary-button,
.form-actions .secondary-button,
.form-actions .ghost-button {
  min-height: 38px;
  padding: 8px 14px;
}

.rich-toolbar {
  gap: 6px;
  padding: 7px;
}

.rich-toolbar button {
  border-radius: 8px;
  font-size: 0.88rem;
  min-height: 32px;
  min-width: 36px;
  padding: 5px 9px;
}

.receipt-button,
.add-lesson-button,
.saved-lesson .link-button {
  min-height: 32px;
  padding: 6px 10px;
}

input[type="file"] {
  min-height: 36px;
  padding: 7px 10px;
}

@media (max-width: 1120px) {
  .course-grid,
  .metrics-grid,
  .payment-layout,
  .material-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .classroom,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .lesson-list {
    max-height: none;
    position: static;
  }

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

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

  .sidebar {
    height: auto;
    position: static;
  }

  .main {
    padding: 20px;
  }

  .topbar,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .course-grid,
  .metrics-grid,
  .payment-layout,
  .material-grid {
    grid-template-columns: 1fr;
  }

  #homeView .course-grid {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .home-feature,
  .home-paths {
    grid-template-columns: 1fr;
  }

  .home-feature-media {
    min-height: 220px;
  }

  .filter-row {
    grid-template-columns: 1fr;
  }

  .course-cover {
    aspect-ratio: 4 / 3;
  }

  .course-body {
    padding: 14px;
  }

  .classroom {
    gap: 14px;
  }

  #lessonText {
    max-height: 300px;
  }

  .certificate-row {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .certificate-workload {
    white-space: normal;
  }

  .sales-modal-panel {
    grid-template-columns: 1fr;
    height: auto;
    max-height: calc(100vh - 24px);
    overflow: auto;
  }

  .sales-modal-cover {
    height: 220px;
    min-height: 220px;
  }

  .sales-modal-content {
    max-height: none;
    overflow: visible;
    padding: 28px 20px 22px;
  }

  .sales-modal-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .sales-modal-summary span {
    text-align: left;
  }
}

@media print {
  .sidebar,
  .topbar,
  .toast,
  .nav-list,
  button {
    display: none !important;
  }

  .app-shell,
  .main {
    display: block;
    padding: 0;
  }

  body {
    background: #fff;
  }

  .view:not(#certificatesView),
  #certificateList .certificate-card:not(:first-child) {
    display: none !important;
  }

  .certificate-template {
    box-shadow: none;
    margin: 0;
    max-width: none;
    width: 100vw;
  }
}

/* Casa Luz site-inspired refinement */
:root {
  --site-green: #142820;
  --site-green-soft: #1f5b49;
  --site-gold: #d7a348;
  --site-paper: #fffaf0;
  --site-ink-soft: #68715f;
}

body {
  background:
    radial-gradient(circle at 80% 0%, rgba(215, 163, 72, 0.11), transparent 30rem),
    linear-gradient(180deg, #fffdf8 0%, #fbf6eb 52%, #f1e7d5 100%);
  color: var(--site-green);
}

.app-shell {
  background: transparent;
}

.sidebar {
  background: linear-gradient(180deg, rgba(255, 250, 240, 0.96), rgba(246, 238, 224, 0.94));
  border-right: 1px solid rgba(215, 163, 72, 0.18);
  box-shadow: 10px 0 28px rgba(20, 40, 32, 0.06);
}

.brand,
.sidebar-card,
.auth-tabs,
.topbar,
.content-panel,
.student-area-block,
.course-card,
.metric,
.notice-card,
.admin-tabs,
.admin-item {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.brand {
  background: #fffdf8;
  border: 1px solid rgba(215, 163, 72, 0.18);
  box-shadow: 0 12px 28px rgba(20, 40, 32, 0.06);
}

.nav-item {
  background: transparent;
  border-color: transparent;
  color: #586252;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(31, 91, 73, 0.09);
  border-color: rgba(31, 91, 73, 0.18);
  box-shadow: inset 4px 0 0 var(--site-green-soft);
  color: var(--site-green);
}

.sidebar-card {
  background: #fffdf8;
  border-color: rgba(215, 163, 72, 0.16);
}

.home-hero {
  background:
    linear-gradient(135deg, rgba(20, 40, 32, 0.96), rgba(31, 91, 73, 0.92)) !important;
  border: 0 !important;
  box-shadow: 0 24px 60px rgba(20, 40, 32, 0.18) !important;
  color: #fffaf0;
  overflow: hidden;
  position: relative;
}

.home-hero::after {
  border: 1px solid rgba(215, 163, 72, 0.26);
  border-radius: 999px;
  content: "";
  height: 260px;
  opacity: 0.5;
  position: absolute;
  right: -90px;
  top: -90px;
  width: 260px;
}

.home-hero > div {
  position: relative;
  z-index: 1;
}

.home-hero .eyebrow,
.home-hero h2,
.home-hero .section-subtitle {
  color: #fffaf0;
}

.home-hero .eyebrow::before {
  background: var(--site-gold);
}

.home-hero .section-subtitle {
  color: rgba(255, 250, 240, 0.82);
}

.home-hero .secondary-button {
  background: rgba(255, 250, 240, 0.08);
  border-color: rgba(255, 250, 240, 0.3);
  color: #fffaf0;
}

.home-feature {
  background: #fffdf8;
  border: 1px solid rgba(215, 163, 72, 0.16);
  box-shadow: 0 18px 44px rgba(20, 40, 32, 0.09);
}

.home-feature-content .eyebrow,
.home-paths span,
.eyebrow {
  color: #c39135;
}

.home-feature-content h3,
.section-heading h2,
.student-area-block h2,
.content-panel h2 {
  color: var(--site-green);
}

.home-paths article {
  background: #fffdf8;
  border-color: rgba(215, 163, 72, 0.16);
  box-shadow: 0 14px 34px rgba(20, 40, 32, 0.06);
}

.course-card,
.content-panel,
.metric,
.notice-card,
.empty-state,
.certificate-row {
  background: #fffdf8;
  border-color: rgba(215, 163, 72, 0.15);
  box-shadow: 0 14px 34px rgba(20, 40, 32, 0.07);
}

.course-card:hover {
  box-shadow: 0 22px 48px rgba(20, 40, 32, 0.12);
}

.primary-button {
  background: var(--site-green-soft);
  border-color: var(--site-green-soft);
}

.primary-button:hover {
  background: var(--site-green);
}

.secondary-button,
.ghost-button,
.link-button {
  background: #fffaf0;
  border-color: rgba(215, 163, 72, 0.28);
  color: var(--site-green-soft);
}

.metric::before,
.notice-card::before {
  background: var(--site-gold);
}

.admin-tabs {
  background: #fffdf8;
  border-color: rgba(215, 163, 72, 0.16);
}

.admin-tab.active {
  background: var(--site-green-soft);
  color: #fff;
}

.sales-modal-panel {
  background: #fffdf8;
}

.sales-modal-content {
  background: #fffdf8;
}

/* Compact classroom */
body:has(#classroomView:not(.hidden)) .topbar {
  margin-bottom: 16px;
  padding: 14px 18px;
}

body:has(#classroomView:not(.hidden)) .topbar h1 {
  font-size: clamp(1.55rem, 2.3vw, 2.1rem);
}

body:has(#classroomView:not(.hidden)) .topbar .eyebrow {
  font-size: 0.7rem;
  margin-bottom: 4px;
}

#classroomView .back-button {
  margin-bottom: 12px;
  min-height: 34px;
  padding: 7px 12px;
}

#classroomView .classroom {
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) 320px;
}

#classroomView .video-area {
  gap: 14px;
}

#classroomView .video-frame {
  border-radius: 8px;
  max-height: 58vh;
}

#classroomView .lesson-info,
#classroomView .lesson-list {
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(20, 40, 32, 0.06);
  padding: 14px 16px;
}

#classroomView .watching-panel {
  background: rgba(255, 252, 245, 0.78);
  border: 1px solid rgba(218, 200, 166, 0.72);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(20, 40, 32, 0.05);
  padding: 12px 16px;
}

#classroomView .watching-panel .eyebrow {
  font-size: 0.68rem;
  margin-bottom: 3px;
}

#classroomView .watching-panel h2 {
  font-size: clamp(1.15rem, 1.5vw, 1.45rem);
  margin: 0;
}

#classroomView .lesson-info .eyebrow {
  font-size: 0.72rem;
  margin-bottom: 2px;
}

#classroomView .lesson-info h2 {
  font-size: clamp(1.2rem, 1.6vw, 1.55rem);
}

#classroomView #lessonText {
  max-height: 240px;
}

#classroomView .lesson-list {
  max-height: calc(100vh - 170px);
}

#classroomView .lesson-list h3 {
  font-size: 1rem;
  margin-bottom: 10px;
}

#classroomView .module-block {
  gap: 7px;
}

#classroomView .module-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--brand-strong);
  cursor: pointer;
  display: flex;
  font-weight: 800;
  justify-content: space-between;
  min-height: 34px;
  padding: 4px 0;
  text-align: left;
  width: 100%;
}

#classroomView .module-toggle::after {
  align-items: center;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--brand);
  content: "+";
  display: inline-flex;
  flex: 0 0 26px;
  font-size: 1rem;
  height: 26px;
  justify-content: center;
  margin-left: 10px;
}

#classroomView .module-block.open .module-toggle::after {
  content: "-";
}

#classroomView .module-toggle small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: auto;
}

#classroomView .module-lessons {
  display: grid;
  gap: 8px;
}

#classroomView .lesson-button {
  border-radius: 8px;
  padding: 9px 10px;
}

#classroomView .lesson-button span {
  font-size: 0.76rem;
}

/* Harmonized final system */
:root {
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 18px;
  --space-5: 24px;
  --shadow-soft: 0 12px 30px rgba(20, 40, 32, 0.07);
  --shadow-hover: 0 18px 42px rgba(20, 40, 32, 0.12);
}

body {
  font-size: 15px;
}

.main {
  padding: 26px 32px;
}

.sidebar {
  gap: var(--space-4);
  padding: 22px 18px;
}

.brand {
  align-items: center;
  border-radius: var(--radius-lg);
  padding: 12px;
}

.brand-logo {
  height: 54px;
  width: 54px;
}

.nav-list {
  gap: var(--space-2);
}

.nav-item {
  border-radius: var(--radius-md);
  font-size: 0.96rem;
  min-height: 42px;
  padding: 10px 14px;
}

.sidebar-auth,
.form {
  gap: var(--space-3);
}

.sidebar-card,
.auth-panel,
.content-panel,
.student-area-block,
.metric,
.course-card,
.notice-card,
.certificate-row,
.empty-state,
.admin-tabs,
.admin-item,
.home-feature,
.home-paths article {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.topbar {
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-5);
  padding: 18px 22px;
}

.topbar h1 {
  font-size: clamp(1.8rem, 2.7vw, 2.55rem);
}

.user-actions {
  gap: var(--space-2);
}

.user-badge {
  font-size: 0.92rem;
  min-height: 38px;
}

.section-heading {
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
  padding: 16px 18px;
}

.section-heading h2 {
  font-size: clamp(1.25rem, 1.65vw, 1.7rem);
}

.home-hero {
  border-radius: 20px !important;
  margin-bottom: 18px;
  max-width: 980px;
  padding: 22px 26px !important;
}

.home-hero h2 {
  font-size: clamp(1.55rem, 2.5vw, 2.35rem);
  line-height: 1.12;
  max-width: 660px;
}

.home-hero .section-subtitle {
  font-size: 0.94rem;
  line-height: 1.55;
  max-width: 560px;
}

.home-hero .hero-actions {
  margin-top: 14px;
}

.home-social-proof {
  align-items: center;
  background: rgba(255, 250, 240, 0.1);
  border: 1px solid rgba(255, 250, 240, 0.24);
  border-radius: 999px;
  color: rgba(255, 250, 240, 0.86);
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding: 8px 12px;
}

.home-social-proof strong {
  color: #fffaf0;
  font-size: 0.98rem;
}

.home-social-proof span {
  font-size: 0.86rem;
}

.home-showcase {
  gap: var(--space-4);
  max-width: 1040px;
}

.home-card-heading {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.home-card-heading h2 {
  font-size: 1.35rem;
}

.home-course-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.home-course-grid .course-card {
  max-width: none;
}

.home-course-grid .course-cover {
  aspect-ratio: 16 / 10;
}

.home-course-grid .course-body {
  padding: 14px;
}

.home-course-grid .course-body p {
  -webkit-line-clamp: 2;
}

.home-feature {
  grid-template-columns: minmax(220px, 0.68fr) minmax(0, 1fr);
}

.home-feature-media {
  min-height: 230px;
}

.home-feature-content {
  gap: var(--space-3);
  padding: 26px;
}

.home-feature-content h3 {
  font-size: clamp(1.35rem, 2.1vw, 2rem);
}

.home-paths {
  gap: var(--space-4);
}

.home-paths article {
  padding: 16px 18px;
}

.course-grid {
  gap: var(--space-4);
}

.course-card {
  border-radius: var(--radius-lg);
}

.course-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.course-cover {
  border-radius: var(--radius-md);
  margin: 8px 8px 0;
}

.course-body {
  gap: var(--space-2);
  padding: 14px 16px 16px;
}

.course-body p {
  font-size: 0.94rem;
  line-height: 1.55;
}

.course-price-row {
  gap: var(--space-2);
}

.course-price-row strong {
  font-size: 0.94rem;
}

.primary-button,
.secondary-button,
.ghost-button,
.link-button {
  border-radius: var(--radius-md);
  font-size: 0.94rem;
  min-height: 38px;
  padding: 8px 13px;
}

.card-actions .primary-button,
.card-actions .secondary-button {
  min-height: 40px;
}

.metrics-grid {
  gap: var(--space-3);
}

.metric {
  min-height: 84px;
  padding: 14px 16px;
}

.metric strong {
  font-size: clamp(1.55rem, 2.3vw, 2rem);
}

.admin-tabs {
  gap: var(--space-1);
  padding: 6px;
}

.admin-tab {
  border-radius: var(--radius-md);
  min-height: 36px;
  padding: 7px 12px;
}

.admin-grid {
  gap: var(--space-5);
}

.admin-item {
  border-radius: var(--radius-md);
  padding: 12px;
}

input,
select,
textarea,
.rich-editor {
  border-radius: var(--radius-md);
  font-size: 0.95rem;
}

.rich-toolbar {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.sales-modal-panel {
  border-radius: 18px;
  max-width: 1100px;
}

.sales-modal-content {
  gap: var(--space-3);
  padding: 30px 34px 28px;
}

.sales-modal-content h2 {
  font-size: clamp(1.45rem, 2vw, 2.15rem);
}

.sales-modal-cover.has-cover-image {
  padding: 20px;
}

.notice-card {
  padding: 16px 18px 16px 22px;
}

@media (max-width: 780px) {
  .main {
    padding: 18px;
  }

  .home-hero,
  .home-feature-content {
    padding: 20px !important;
  }

  .home-feature {
    grid-template-columns: 1fr;
  }
}

/* Casa Luz visual identity: aqua and deep blue */
:root {
  --bg: #eefafa;
  --surface: #fffefe;
  --surface-soft: #e8f8f8;
  --ink: #08243a;
  --muted: #426572;
  --line: #cfe9eb;
  --brand: #075d7a;
  --brand-strong: #064b63;
  --gold: #91dfe5;
  --blue: #075d7a;
  --cream: #f7ffff;
  --site-green: #08243a;
  --site-green-soft: #075d7a;
  --site-gold: #91dfe5;
  --site-paper: #f7ffff;
  --site-ink-soft: #426572;
  --font-heading: "Cinzel", Georgia, serif;
  --font-body: "Montserrat", Arial, sans-serif;
  --shadow: 0 18px 42px rgba(7, 93, 122, 0.08);
}

body {
  background:
    radial-gradient(circle at 82% 0%, rgba(145, 223, 229, 0.28), transparent 30rem),
    radial-gradient(circle at 12% 16%, rgba(7, 93, 122, 0.08), transparent 24rem),
    linear-gradient(180deg, #f7ffff 0%, #eefafa 54%, #e6f6f7 100%);
  color: var(--ink);
  font-family: var(--font-body);
}

h1,
h2,
h3,
.brand strong,
.home-hero h2,
.section-heading h2,
.student-area-block h2,
.content-panel h2,
.sales-modal-content h2,
#classroomView .watching-panel h2,
#classroomView .lesson-info h2 {
  color: var(--brand-strong);
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.app-shell {
  background: transparent;
}

.sidebar {
  background: linear-gradient(180deg, rgba(247, 255, 255, 0.98), rgba(232, 248, 248, 0.94));
  border-right-color: rgba(7, 93, 122, 0.12);
}

.brand,
.sidebar-card,
.auth-panel,
.auth-tabs,
.content-panel,
.section-heading,
.student-area-block,
.course-card,
.metric,
.notice-card,
.empty-state,
.certificate-row,
.lesson-info,
.lesson-list,
.admin-tabs,
.admin-item,
.sales-modal-panel,
.pix-steps,
.pix-box,
.topbar {
  background: rgba(255, 254, 254, 0.88);
  border-color: rgba(7, 93, 122, 0.14);
  box-shadow: 0 16px 36px rgba(7, 93, 122, 0.07);
}

.nav-item,
.auth-tab,
.secondary-button,
.ghost-button,
.link-button {
  background: rgba(247, 255, 255, 0.9);
  border-color: rgba(7, 93, 122, 0.14);
  color: var(--brand);
}

.nav-item.active,
.auth-tab.active,
.admin-tab.active,
.primary-button {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.primary-button:hover {
  background: var(--brand-strong);
}

.eyebrow,
.home-feature-content .eyebrow,
.home-paths span {
  color: var(--brand);
}

.eyebrow::before,
.metric::before,
.notice-card::before,
.progress-bar,
.home-hero .eyebrow::before {
  background: var(--gold);
}

.home-hero {
  background:
    radial-gradient(circle at 88% 12%, rgba(145, 223, 229, 0.26), transparent 16rem),
    linear-gradient(135deg, #064b63, #075d7a 48%, #0b6b83) !important;
}

.home-hero h2,
.home-hero .eyebrow,
.home-hero .section-subtitle {
  color: #f7ffff;
}

.course-cover {
  background:
    linear-gradient(180deg, rgba(232, 248, 248, 0.76), rgba(7, 93, 122, 0.18)),
    var(--surface-soft);
}

.course-status,
.user-badge {
  background: rgba(145, 223, 229, 0.3);
  color: var(--brand-strong);
}

.course-price-row strong,
.material-pill,
.module-toggle,
.lesson-button span {
  color: var(--brand);
}

input,
select,
textarea,
.rich-editor {
  background: #fcffff;
  border-color: rgba(7, 93, 122, 0.18);
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus,
.rich-editor:focus {
  border-color: var(--brand);
  outline-color: rgba(145, 223, 229, 0.45);
}

.password-field {
  display: block;
  position: relative;
  width: 100%;
}

.password-field input {
  padding-right: 46px;
  width: 100%;
}

.password-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--brand);
  cursor: pointer;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  min-height: 0;
  padding: 0;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
}

.password-toggle:hover,
.password-toggle.active {
  background: rgba(145, 223, 229, 0.24);
}

.password-toggle svg {
  fill: none;
  height: 20px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 20px;
}

/* Refined Casa Luz headings */
.topbar h1,
.section-heading h2,
.content-panel > h2,
.student-area-block > h2,
.home-card-heading h2,
.sales-modal-content h2,
#classroomView .watching-panel h2 {
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.section-heading,
.content-panel,
.student-area-block,
.home-card-heading,
.sales-modal-content {
  position: relative;
}

.section-heading h2::after,
.content-panel > h2::after,
.student-area-block > h2::after,
.home-card-heading h2::after,
.sales-modal-content h2::after {
  background: var(--gold);
  border-radius: 999px;
  content: "";
  display: block;
  height: 3px;
  margin-top: 12px;
  width: 86px;
}

.home-card-heading h2::after,
.student-area-block > h2::after {
  margin-top: 10px;
  width: 72px;
}

.sidebar .brand strong {
  font-size: 1.08rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.sidebar .brand small {
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.82rem;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.home-hero h2 {
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.home-hero h2::after {
  background: var(--gold);
  border-radius: 999px;
  content: "";
  display: block;
  height: 4px;
  margin-top: 18px;
  width: 110px;
}

.course-card h3,
.course-cover strong,
.admin-item strong,
.notice-card strong,
.certificate-row strong {
  color: var(--brand-strong);
  font-family: var(--font-heading);
  letter-spacing: 0.01em;
}

.publish-checklist {
  align-items: center;
  background: rgba(145, 223, 229, 0.18);
  border: 1px solid rgba(7, 93, 122, 0.14);
  border-radius: 999px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.78rem;
  font-weight: 700;
  gap: 6px;
  padding: 7px 10px;
}

.publish-checklist.ready {
  background: rgba(32, 105, 85, 0.12);
  color: var(--brand);
}

.publish-checklist span {
  background: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  color: var(--brand-strong);
  padding: 2px 7px;
}

.student-contact-actions,
.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.admin-log-row {
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 4px;
  margin: 8px 0;
  padding: 12px;
}

.admin-log-row span,
.admin-log-row small {
  color: var(--muted);
}

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

  .sidebar {
    border-right: 0;
    min-height: auto;
    position: static;
  }

  .admin-grid,
  .catalog-grid,
  .student-summary,
  .classroom-layout {
    grid-template-columns: 1fr !important;
  }

  .admin-tabs,
  .export-actions,
  .student-contact-actions {
    overflow-x: auto;
  }

  .admin-item,
  .admin-item.compact {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .topbar,
  .section-heading,
  .content-panel,
  .student-area-block {
    border-radius: 14px;
    padding: 16px;
  }

  .topbar h1,
  .home-hero h2,
  .section-heading h2 {
    font-size: clamp(1.45rem, 8vw, 2.1rem);
  }

  .lesson-nav-actions,
  .certificate-complete-box {
    grid-template-columns: 1fr;
  }

  .lesson-nav-actions .secondary-button {
    justify-self: stretch;
  }
}

/* iOS/mobile alignment guard */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  min-width: 0;
}

img,
video,
iframe {
  max-width: 100%;
}

@media (max-width: 820px) {
  body {
    width: 100%;
  }

  .app-shell {
    display: block !important;
    min-height: 100dvh;
    width: 100%;
  }

  .sidebar,
  .main {
    width: 100%;
  }

  .sidebar {
    border-right: 0 !important;
    box-shadow: none;
    gap: 14px;
    min-height: 0;
    padding: 14px;
    position: static !important;
  }

  .brand {
    align-items: center;
    gap: 12px;
    padding: 12px;
  }

  .brand-logo {
    height: 52px !important;
    width: 52px !important;
  }

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

  .sidebar-auth,
  .sidebar-card {
    width: 100%;
  }

  .main {
    padding: 14px;
  }

  .topbar,
  .section-heading,
  .home-card-heading,
  .inline-section-heading {
    align-items: stretch !important;
    display: grid !important;
    gap: 12px;
    grid-template-columns: 1fr !important;
    justify-content: stretch !important;
  }

  .topbar {
    margin-bottom: 14px;
    padding: 14px;
  }

  .topbar h1 {
    font-size: clamp(1.5rem, 9vw, 2rem) !important;
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

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

  .home-hero {
    border-radius: 16px !important;
    display: grid !important;
    gap: 14px;
    margin-bottom: 16px;
    max-width: 100%;
    padding: 18px !important;
  }

  .home-hero::after {
    display: none;
  }

  .home-hero h2 {
    font-size: clamp(1.45rem, 8vw, 2rem) !important;
    max-width: 100%;
  }

  .hero-actions,
  .card-actions,
  .form-actions,
  .sales-modal-actions {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr;
  }

  .primary-button,
  .secondary-button,
  .ghost-button,
  .link-button,
  .auth-tab,
  .admin-tab {
    width: 100%;
  }

  .course-grid,
  .home-course-grid,
  .metrics-grid,
  .material-grid,
  .payment-layout,
  .admin-grid,
  .classroom {
    display: grid !important;
    grid-template-columns: 1fr !important;
    max-width: 100%;
  }

  .course-card,
  .metric,
  .content-panel,
  .student-area-block,
  .lesson-info,
  .lesson-list,
  .admin-item,
  .sales-modal-panel {
    max-width: 100%;
    width: 100%;
  }

  .course-cover {
    aspect-ratio: 16 / 10;
  }

  .course-body,
  .content-panel,
  .student-area-block,
  .lesson-info,
  .lesson-list {
    padding: 14px;
  }

  .course-price-row,
  .sales-modal-summary,
  .certificate-complete-box,
  .lesson-nav-actions {
    align-items: stretch;
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr;
  }

  .lesson-nav-actions span,
  .sales-modal-summary span {
    text-align: left;
  }

  .video-frame {
    max-height: none !important;
    width: 100%;
  }

  .lesson-list {
    max-height: none !important;
    overflow: visible;
    position: static !important;
  }

  .material-inline {
    display: grid;
    grid-template-columns: 1fr;
  }

  .material-card {
    min-width: 0;
  }

  .sales-modal-panel {
    border-radius: 14px;
    grid-template-columns: 1fr !important;
    height: auto !important;
    left: 12px;
    max-height: calc(100dvh - 24px);
    overflow: auto;
    top: 12px;
    transform: none;
    width: calc(100vw - 24px);
  }

  .sales-modal-cover {
    min-height: 210px;
  }

  .sales-modal-content {
    max-height: none;
    overflow: visible;
    padding: 18px;
  }
}

@supports (-webkit-touch-callout: none) {
  input,
  select,
  textarea {
    font-size: 16px;
  }
}

/* Let the page scroll as one piece instead of making the sidebar scroll separately. */
.sidebar {
  -ms-overflow-style: none;
  height: auto;
  min-height: 100vh;
  overflow: visible;
  scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
  height: 0;
  width: 0;
}

.course-card-title {
  color: var(--brand-strong);
  flex: 1;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

#studentAvailableCourses {
  display: none !important;
}

#studentAvailableCourses:empty {
  display: none !important;
}

.student-area-block:has(#studentAvailableCourses) {
  display: none !important;
}

.purchase-list {
  display: grid;
  gap: 14px;
}

.purchase-card {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  gap: 14px;
  padding: 18px;
}

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

.purchase-card p {
  color: var(--muted);
  margin: 0;
}

.purchase-type {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.purchase-status {
  background: rgba(7, 93, 122, 0.1);
  border-radius: 999px;
  color: var(--brand);
  justify-self: start;
  padding: 7px 12px;
}

.purchase-card.approved .purchase-status {
  background: rgba(35, 105, 90, 0.14);
}

.purchase-card.rejected .purchase-status {
  background: rgba(160, 56, 56, 0.12);
  color: #8f2d2d;
}

.purchase-timeline {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.purchase-timeline li {
  border-top: 3px solid rgba(7, 93, 122, 0.16);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  padding-top: 8px;
}

.purchase-timeline li.done {
  border-color: var(--brand);
  color: var(--brand-strong);
}

.purchase-timeline.rejected li.done {
  border-color: #8f2d2d;
}

@media (max-width: 780px) {
  .purchase-timeline {
    grid-template-columns: 1fr;
  }
}

.admin-password-form {
  background: rgba(145, 223, 229, 0.08);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-top: 14px;
  padding: 14px;
}

.admin-password-form h3 {
  margin: 0;
}

.admin-summary-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 18px;
}

.admin-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.student-status-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

.temporary-password-alert {
  align-items: center;
  background: #fff8e8;
  border: 1px solid rgba(215, 163, 72, 0.35);
  border-radius: 12px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin: 0 0 14px;
  padding: 14px 16px;
}

.temporary-password-alert strong,
.temporary-password-alert span {
  display: block;
}

.temporary-password-alert strong {
  color: var(--brand-strong);
  margin-bottom: 3px;
}

.temporary-password-alert span {
  color: var(--muted);
  font-size: 0.92rem;
}

.temporary-password-alert .secondary-button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 14px;
}

.settings-video-thumb-preview {
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: block;
  max-width: 360px;
  object-fit: cover;
  width: 100%;
}

@media (max-width: 640px) {
  .temporary-password-alert {
    align-items: stretch;
    flex-direction: column;
  }
}

.status-pill {
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
  padding: 7px 11px;
}

.status-pill.approved {
  background: rgba(35, 105, 90, 0.14);
  color: var(--brand);
}

.status-pill.rejected {
  background: rgba(160, 56, 56, 0.12);
  color: #8f2d2d;
}

.access-validity {
  color: var(--muted);
  font-weight: 800;
}

.card-title-copy {
  display: grid;
  gap: 5px;
}

.card-title-copy strong {
  color: var(--brand-strong);
  font-size: 1rem;
  line-height: 1.25;
}

.card-title-copy p {
  color: var(--ink);
  font-weight: 400;
  line-height: 1.45;
  margin: 0;
}

.course-card .course-status {
  background: rgba(7, 93, 122, 0.92);
  border-color: rgba(255, 255, 255, 0.46);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
}

.course-card.has-access .course-status {
  background: rgba(7, 93, 122, 0.96);
  color: #ffffff;
}

.form-section {
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.form-section h3 {
  margin: 0;
}

.seo-fields textarea {
  min-height: 86px;
  resize: vertical;
}

@media (max-width: 780px) {
  .study-plan-layout,
  .form-grid-3 {
    grid-template-columns: 1fr;
  }

  .study-plan-item {
    align-items: stretch;
    display: grid;
  }

  .study-plan-time {
    align-items: center;
    display: flex;
    justify-content: space-between;
  }
}

.seo-box {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

.seo-box-header {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.seo-box-header h3 {
  margin: 2px 0 0;
}

.seo-score {
  align-self: flex-start;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 900;
  padding: 7px 10px;
}

.seo-score.good {
  background: rgba(35, 105, 90, 0.14);
  color: var(--brand);
}

.seo-score.medium {
  background: rgba(219, 166, 52, 0.16);
  color: #8a5e0f;
}

.seo-score.weak {
  background: rgba(160, 56, 56, 0.12);
  color: #8f2d2d;
}

.seo-preview {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.seo-preview span {
  color: #177245;
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.seo-preview strong {
  color: #0b57d0;
  font-size: 1rem;
  line-height: 1.25;
}

.seo-preview p {
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0;
}

.seo-checklist {
  display: grid;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.seo-checklist li {
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 800;
  padding: 8px 10px;
}

.seo-checklist li.ok {
  background: rgba(35, 105, 90, 0.09);
  color: var(--brand);
}

.seo-checklist li.warn {
  background: rgba(219, 166, 52, 0.12);
  color: #7b550f;
}
