/* ==========================================================================
   DESIGN SYSTEM — componentes (somente variáveis de tokens.css)
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: var(--fs-md); line-height: 1.45;
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: var(--fs-2xl); font-weight: var(--fw-bold); }
h2 { font-size: var(--fs-xl); font-weight: var(--fw-semibold); }
h3 { font-size: var(--fs-lg); font-weight: var(--fw-semibold); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: var(--accent-text); }
.muted { color: var(--text-60); }
.small { font-size: var(--fs-xs); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.row { display: flex; align-items: center; gap: var(--sp-3); }
.row-wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: var(--sp-3); }
.grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }
.right { margin-left: auto; }
.center { text-align: center; }
.hide { display: none !important; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.icon { width: 1em; height: 1em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.125em; }
.icon.fill { fill: currentColor; stroke: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--s3); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- Botões ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 20px; border: 0; border-radius: var(--radius-md);
  background: var(--s2); color: var(--text); font-weight: var(--fw-bold); font-size: var(--fs-md);
  transition: background var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t-fast), opacity var(--t);
  white-space: nowrap; user-select: none;
}
.btn:hover { background: var(--s3); }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--btn); color: var(--btn-text); }
.btn-primary:hover { background: var(--btn); box-shadow: 0 6px 22px var(--glow), inset 0 0 0 99px rgba(255,255,255,.1); }
.btn-outline { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text-60); border-radius: var(--radius-pill); }
.btn-outline:hover { background: var(--s1); box-shadow: inset 0 0 0 1.5px var(--text); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--s2); }
.btn-danger { background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: var(--fs-xs); }
.btn-lg { min-height: 48px; padding: 0 28px; font-size: var(--fs-base); }
.btn-block { width: 100%; }
.btn-icon { width: 40px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }
.btn.loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; color: var(--btn-text); animation: spin .7s linear infinite; }
.btn:not(.btn-primary).loading::after { color: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- Campos ---------------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--text-80); letter-spacing: .2px; }
.field-hint { font-size: var(--fs-xs); color: var(--text-60); }
.field-error { font-size: var(--fs-xs); color: var(--danger); }
.input, .select, .textarea {
  width: 100%; min-height: 42px; padding: 10px 14px; border: 0; border-radius: var(--radius-md);
  background: var(--s2); color: var(--text); font: inherit; font-size: var(--fs-md);
  transition: box-shadow var(--t-fast), background var(--t-fast);
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--text-40); }
.input:focus, .select:focus, .textarea:focus { outline: none; box-shadow: 0 0 0 2px var(--accent); background: var(--s2); }
.input.invalid, .select.invalid, .textarea.invalid { box-shadow: 0 0 0 2px var(--danger); }
.select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; }
.select option { background: #1b1b1b; color: #fff; }
.input[type=number] { appearance: textfield; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > .icon { position: absolute; left: 14px; color: var(--text-60); pointer-events: none; }
.input-wrap > .input { padding-left: 42px; }
.input-wrap > .eye { position: absolute; right: 6px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
.form-grid .full { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: var(--fs-sm); color: var(--text-80); }
.check input { appearance: none; width: 16px; height: 16px; border-radius: 4px; background: var(--s2); box-shadow: inset 0 0 0 1.5px var(--text-40); cursor: pointer; flex: none; display: grid; place-items: center; }
.check input:checked { background: var(--accent); box-shadow: none; }
.check input:checked::after { content: ""; width: 4px; height: 8px; border: solid var(--accent-text); border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }

/* Switch (ligado/desligado observados: #8BC32F / #E64B3C) */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 1; margin: 0; }
.switch i { position: absolute; inset: 0; background: var(--danger); border-radius: 24px; transition: background var(--t); }
.switch i::after { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform var(--t); }
.switch input:checked + i { background: var(--success); }
.switch input:checked + i::after { transform: translateX(20px); }

/* Multi-seleção com chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; min-height: 42px; border-radius: var(--radius-md); background: var(--s2); align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-pill); background: var(--s3); font-size: var(--fs-xs); font-weight: var(--fw-semibold); }
.chip button { all: unset; cursor: pointer; display: grid; place-items: center; opacity: .7; }
.chip button:hover { opacity: 1; }
.chips select { all: unset; flex: 1; min-width: 120px; color: var(--text-60); cursor: pointer; padding: 4px; }
.chips select option { background: #1b1b1b; color: #fff; }

/* Dropzone */
.dropzone { border: 2px dashed var(--text-40); border-radius: var(--radius); padding: 22px; text-align: center; color: var(--text-60); cursor: pointer; transition: all var(--t); }
.dropzone:hover, .dropzone.over { border-color: var(--accent); color: var(--text); background: var(--s1); }
.dropzone .icon { font-size: 26px; margin-bottom: 6px; }
.img-preview { position: relative; border-radius: var(--radius-md); overflow: hidden; background: var(--s1); display: grid; place-items: center; }
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.img-preview .x { position: absolute; top: 6px; right: 6px; }

/* Seletor de cor (conta-gotas) */
.color-field { display: flex; align-items: center; gap: 8px; }
.color-swatch { position: relative; width: 42px; height: 42px; border-radius: var(--radius-md); box-shadow: inset 0 0 0 1.5px var(--text-40); overflow: hidden; flex: none; cursor: pointer; }
.color-swatch input { position: absolute; inset: -10px; width: calc(100% + 20px); height: calc(100% + 20px); opacity: 0; cursor: pointer; }
.color-field .input { font-family: ui-monospace, Menlo, Consolas, monospace; text-transform: uppercase; }

/* ---------------- Superfícies ---------------- */
.card { background: var(--menu); border-radius: var(--radius); padding: var(--sp-5); }
.card.flat { background: var(--s1); }
.section { background: var(--menu); border-radius: var(--radius); padding: var(--sp-5); margin-bottom: var(--sp-5); }
.section-head { display: flex; align-items: flex-start; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.section-head h2 { font-size: var(--fs-lg); font-weight: var(--fw-semibold); }
.section-head .sub { color: var(--text-60); font-size: var(--fs-sm); margin-top: 2px; }
.divider { height: 1px; background: var(--hair); margin: var(--sp-4) 0; border: 0; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 7px; border-radius: var(--radius-pill); background: var(--s3); font-size: 11px; font-weight: var(--fw-bold); }
.badge.accent { background: var(--accent); color: var(--accent-text); }
.badge.danger { background: var(--danger); color: #fff; }
.badge.success { background: color-mix(in srgb, var(--success) 25%, transparent); color: var(--success); }
.badge.warn { background: color-mix(in srgb, var(--warning) 22%, transparent); color: var(--warning); }
.tag-novo { background: var(--success); color: #0d0d0d; font-size: 9px; padding: 1px 6px; border-radius: 4px; font-weight: 800; text-transform: uppercase; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--s3); display: grid; place-items: center; overflow: hidden; flex: none; color: var(--text-60); font-weight: 700; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 88px; height: 88px; box-shadow: 0 0 0 3px var(--s3); font-size: 28px; }
.alert { padding: 12px 16px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--text); display: flex; gap: 10px; font-size: var(--fs-sm); }
.alert.warn { background: color-mix(in srgb, var(--warning) 14%, transparent); }
.alert.error { background: color-mix(in srgb, var(--danger) 16%, transparent); }
.alert.ok { background: color-mix(in srgb, var(--success) 16%, transparent); }
.empty { padding: 48px 20px; text-align: center; color: var(--text-60); }
.empty .icon { font-size: 36px; margin-bottom: 10px; opacity: .6; }

/* Progresso */
.progress { height: var(--progress-h); background: var(--s2); border-radius: var(--radius-pill); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width var(--t-slow) var(--ease); }

/* Estrelas */
.stars { display: inline-flex; gap: 2px; color: var(--text-40); }
.stars .on { color: #ffc24b; }
.stars button { all: unset; cursor: pointer; font-size: 20px; line-height: 1; display: grid; place-items: center; }
.stars button:hover { transform: scale(1.15); }

/* Abas */
.tabs { display: flex; gap: var(--sp-5); border-bottom: 2px solid var(--s2); overflow-x: auto; scrollbar-width: none; }
.tab { position: relative; padding: 14px 4px; background: none; border: 0; color: var(--text-60); font-weight: var(--fw-bold); font-size: var(--fs-md); white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); }
.tab.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; background: var(--accent); border-radius: 3px 3px 0 0; }
.tab .badge { background: #fff; color: #111; }

/* Breadcrumb */
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: var(--fs-xs); color: var(--text-60); }
.crumbs a:hover { color: var(--hover); }
.crumbs .sep { opacity: .5; }
.crumbs b { color: var(--text); font-weight: var(--fw-semibold); }

/* Tabela */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th { text-align: left; padding: 12px 14px; color: var(--text-60); font-size: var(--fs-xs); font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: .5px; background: var(--s1); white-space: nowrap; }
.table td { padding: 12px 14px; border-top: 1px solid var(--hair); vertical-align: middle; }
.table tr:hover td { background: var(--s1); }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; }
.table td.thumb { width: 64px; }
.thumb-img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--s2); }
.thumb-img.v { width: 40px; height: 84px; }
.thumb-img.h { width: 100px; height: 56px; }
.pager { display: flex; gap: 6px; align-items: center; justify-content: center; padding: 16px 0 0; }
.pager button { min-width: 34px; height: 34px; border: 0; border-radius: 8px; background: var(--s2); }
.pager button.on { background: var(--accent); color: var(--accent-text); font-weight: 700; }
.pager button[disabled] { opacity: .35; }

/* Modal */
.modal-back { position: fixed; inset: 0; background: var(--scrim); display: grid; place-items: center; z-index: 900; padding: 20px; animation: fade .15s; backdrop-filter: blur(3px); }
.modal { background: var(--menu); border-radius: var(--radius); width: min(560px, 100%); max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-pop); animation: pop .18s var(--ease); }
.modal.lg { width: min(900px, 100%); }
.modal.xl { width: min(1100px, 100%); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--hair); }
.modal-head h3 { flex: 1; }
.modal-body { padding: 22px; overflow: auto; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--hair); display: flex; gap: 10px; justify-content: flex-end; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* Toast */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; }
.toast { min-width: 240px; max-width: 380px; padding: 12px 16px; border-radius: var(--radius-md); background: #1f1f1f; color: #fff; box-shadow: var(--shadow-pop); border-left: 4px solid var(--info); animation: pop .2s; display: flex; gap: 10px; align-items: center; }
.toast.ok { border-color: var(--success); }
.toast.error { border-color: var(--danger); }

/* Dropdown */
.dropdown { position: relative; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--menu); border-radius: var(--radius-md); box-shadow: var(--shadow-pop); padding: 6px; z-index: 200; animation: pop .15s; }
.menu-pop a, .menu-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: none; border-radius: 6px; text-align: left; font-size: var(--fs-sm); }
.menu-pop a:hover, .menu-pop button:hover { background: var(--s2); }
.menu-pop hr { border: 0; height: 1px; background: var(--hair); margin: 6px 0; }

/* Skeleton */
.skel { background: linear-gradient(90deg, var(--s1), var(--s2), var(--s1)); background-size: 200% 100%; animation: sh 1.3s linear infinite; border-radius: var(--radius-md); }
@keyframes sh { to { background-position: -200% 0; } }

/* ---------------- Casca do app ---------------- */
.topbar { position: fixed; z-index: 100; top: 0; left: 0; right: 0; height: var(--header-h); background: var(--menu); color: var(--menu-text); display: flex; align-items: center; box-shadow: var(--shadow-header); }
.topbar .brand { display: flex; align-items: center; gap: 12px; padding: 0 16px; min-width: var(--sidebar-w); font-weight: var(--fw-black); font-size: var(--fs-md); letter-spacing: .3px; text-transform: uppercase; }
.topbar .brand img { width: 32px; height: 32px; border-radius: 6px; object-fit: cover; }
.topbar .search { flex: 0 1 440px; position: relative; }
.topbar .search input { width: 100%; height: 40px; border: 0; border-radius: var(--radius-pill); background: var(--s2); color: var(--text); padding: 0 46px 0 20px; font: inherit; font-size: var(--fs-sm); letter-spacing: .5px; }
.topbar .search input:focus { outline: none; box-shadow: 0 0 0 2px var(--accent); }
.topbar .search button { position: absolute; right: 6px; top: 4px; width: 32px; height: 32px; border: 0; background: none; border-radius: 50%; }
.topbar .tools { margin-left: auto; display: flex; align-items: stretch; height: 100%; }
.topbar .tool { display: flex; align-items: center; gap: 10px; padding: 0 18px; border: 0; background: none; height: 100%; font-weight: var(--fw-bold); font-size: var(--fs-sm); position: relative; }
.topbar .tool.bell { background: var(--s2); }
.topbar .tool:hover { background: var(--s2); }
.topbar .dot { position: absolute; top: 14px; right: 14px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 10px; display: grid; place-items: center; }
.sidebar { position: fixed; z-index: 90; top: var(--header-h); bottom: 0; left: 0; width: var(--sidebar-w); background: var(--menu); color: var(--menu-text); overflow-y: auto; display: flex; flex-direction: column; }
.sidebar .me { padding: 30px 20px 18px; text-align: center; }
.sidebar .me .avatar { margin: 0 auto 12px; }
.sidebar .me .nm { font-weight: var(--fw-semibold); font-size: var(--fs-base); }
.sidebar .me .pg { text-align: left; margin-top: 22px; font-size: var(--fs-xs); }
.sidebar .me .pg .progress { margin-top: 6px; height: 6px; }
.nav { margin-top: 10px; border-top: 1px solid var(--hair); }
.nav a { position: relative; display: flex; align-items: center; gap: 14px; padding: 15px 22px; border-bottom: 1px solid var(--hair); font-weight: var(--fw-semibold); font-size: var(--fs-sm); transition: background var(--t); }
.nav a .icon { font-size: 20px; }
.nav a:hover { background: var(--s1); }
.nav a.on { color: var(--hover); background: var(--s1); }
.nav a.on::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.side-foot { margin-top: auto; padding: 22px 20px; display: flex; flex-direction: column; gap: 10px; font-size: var(--fs-xs); color: var(--text-60); border-top: 1px solid var(--hair); }
.side-foot a:hover, .side-foot button:hover { color: var(--hover); }
.side-foot button { all: unset; cursor: pointer; }
.side-foot .org { color: var(--text-80); font-weight: 700; margin-top: 8px; }
.main { margin-left: var(--sidebar-w); padding-top: var(--header-h); min-height: 100vh; }
.main .page { padding: var(--sp-5); max-width: var(--content-max); }
.main .page.wide { max-width: none; }
.main.rail { margin-left: var(--rail-w); }
.rail-bar { position: fixed; z-index: 90; top: var(--header-h); bottom: 0; left: 0; width: var(--rail-w); background: var(--menu); display: flex; flex-direction: column; align-items: center; padding-top: 24px; }
.rail-bar .avatar { margin-bottom: 18px; }
.rail-bar a { width: 100%; height: 50px; display: grid; place-items: center; font-size: 20px; border-top: 1px solid var(--hair); }
.rail-bar a:hover, .rail-bar a.on { color: var(--hover); background: var(--s1); }
.bottom-nav { display: none; position: fixed; z-index: 100; left: 0; right: 0; bottom: 0; height: var(--bottom-nav-h); background: var(--menu); border-top: 1px solid var(--hair); }
.bottom-nav a, .bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; background: none; font-size: 10px; font-weight: var(--fw-semibold); color: var(--text-60); }
.bottom-nav .icon { font-size: 22px; }
.bottom-nav .on { color: var(--hover); }
.scrim { display: none; }
.burger { display: none; }
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); transition: transform var(--t) var(--ease); width: min(300px, 86vw); z-index: 150; top: 0; }
  .sidebar.open { transform: none; }
  .scrim.open { display: block; position: fixed; inset: 0; z-index: 140; background: var(--scrim); }
  .main, .main.rail { margin-left: 0; padding-bottom: var(--bottom-nav-h); }
  .rail-bar { display: none; }
  .bottom-nav { display: flex; }
  .topbar .brand { min-width: 0; flex: 1; }
  .topbar .brand span { display: none; }
  .topbar .search { display: none; }
  .topbar .tool .nm { display: none; }
  .burger { display: grid; place-items: center; width: 52px; height: 100%; border: 0; background: none; font-size: 22px; }
  .main .page { padding: var(--sp-3); }
  .form-grid { grid-template-columns: 1fr; }
}

/* ---------------- Carrossel / cartões de curso ---------------- */
.car { position: relative; }
.car .swiper { overflow: hidden; padding-bottom: 34px; }
.car .swiper-slide { width: var(--car-slide-w); height: auto; }
.car.h .swiper-slide { width: calc(var(--car-h-w) + 20px); }
.car-nav { margin-left: auto; display: flex; gap: 6px; }
.car-nav button { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 50%; background: rgba(var(--surface-rgb), .5); color: var(--menu); display: grid; place-items: center; font-size: 12px; transition: background var(--t-fast); }
.car-nav button:hover { background: rgba(var(--surface-rgb), .85); }
.car-nav button.swiper-button-disabled { opacity: .35; pointer-events: none; }
.car .swiper-pagination { bottom: 6px !important; }
.car .swiper-pagination-bullet { width: 10px; height: 10px; background: #979797; opacity: 1; }
.car .swiper-pagination-bullet-active { background: var(--text); }
.cbox { position: relative; display: block; width: var(--car-card-w); height: var(--car-card-h); border-radius: var(--radius); overflow: hidden; background: var(--s1); transition: box-shadow var(--t) var(--ease); cursor: pointer; isolation: isolate; }
.cbox:hover { box-shadow: var(--shadow-card-hover); }
.cbox > img { width: 100%; height: 100%; object-fit: cover; }
.cbox .ph { position: absolute; inset: 0; display: grid; place-items: end start; padding: 20px; font-size: 22px; font-weight: 800; line-height: 1.1; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 35%, #000), #000 70%); text-transform: uppercase; letter-spacing: 1px; }
.cbox .labels { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 2; }
.cbox .chipx { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 4px; background: #121212; color: #fff; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; transition: background var(--t); }
.cbox .chipx.accent { background: var(--accent); color: var(--accent-text); }
.cbox.locked > img, .cbox.locked .ph { filter: grayscale(.85) brightness(.55); }
.cbox .lockmark { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; font-size: 34px; color: rgba(255,255,255,.85); pointer-events: none; }
.cbox .pbar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(0,0,0,.55); z-index: 2; }
.cbox .pbar i { display: block; height: 100%; background: var(--accent); }
.cbox.h { width: var(--car-h-w); height: var(--car-h-h); }
.hcard { display: block; width: var(--car-h-w); cursor: pointer; }
.hcard .thumb { position: relative; height: var(--car-h-h); border-radius: 6px; overflow: hidden; background: var(--s1); transition: box-shadow var(--t) var(--ease); }
.hcard:hover .thumb { box-shadow: var(--shadow-card-hover); }
.hcard .thumb img { width: 100%; height: 100%; object-fit: cover; }
.hcard .thumb .ph { position: absolute; inset: 0; display: grid; place-items: center; padding: 14px; text-align: center; font-weight: 800; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 30%, #000), #000 75%); }
.hcard .progress { height: 5px; margin-top: 6px; border-radius: 3px; }
.hcard .ttl { margin-top: 8px; font-size: var(--fs-base); color: var(--text-80); transition: color var(--t); }
.hcard:hover .ttl { color: var(--hover); }

/* Hero */
.hero { position: relative; margin: calc(var(--sp-5) * -1) calc(var(--sp-5) * -1) var(--sp-5); background: #000; }
.hero .swiper { height: auto; }  /* como na Astron: o banner mantém a proporção da imagem (inteiro) em qualquer largura/zoom */
.hero .swiper-slide { display: block; }
.hero img { width: 100%; height: auto; display: block; }
.hero .swiper-pagination-bullet { background: #fff; opacity: .5; width: 8px; height: 8px; }
.hero .swiper-pagination-bullet-active { background: var(--accent); opacity: 1; width: 22px; border-radius: 6px; }
@media (max-width: 960px) { .hero { margin: calc(var(--sp-3) * -1) calc(var(--sp-3) * -1) var(--sp-4); } }  /* celular/tablet: imagem inteira na proporção dela (a Astron serve a arte de celular e não corta) */

/* ---------------- Aula ---------------- */
.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
.lesson-main { min-width: 0; }
.player { position: relative; background: #000; aspect-ratio: 16 / 9; width: 100%; }
.player iframe, .player video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.next-btn { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 44px; height: 58px; border: 0; border-radius: 10px 0 0 10px; background: var(--btn); color: var(--btn-text); display: grid; place-items: center; z-index: 3; font-size: 20px; }
.player .wm { position: absolute; z-index: 4; pointer-events: none; color: rgba(255,255,255,.35); font-size: 12px; font-weight: 700; text-shadow: 0 0 3px #000; white-space: nowrap; transition: top 1.2s, left 1.2s; }
.player .blocked { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; background: radial-gradient(circle at 50% 40%, #1b1b1b, #000); }
.lesson-info { padding: 20px 24px; }
.lesson-info h1 { font-size: var(--fs-xl); font-weight: var(--fw-semibold); }
.lesson-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.lesson-actions .btn { min-height: 50px; border-radius: 10px; }
.lesson-tabs { margin: 0 24px 24px; background: var(--menu); border-radius: var(--radius); overflow: hidden; }
.lesson-tabs .tabs { padding: 0 20px; background: var(--menu); }
.lesson-tabs .pane { padding: 22px 24px; }
.rich { line-height: 1.65; color: var(--text-80); }
.rich p { margin: 0 0 12px; }
.rich a { color: var(--accent); text-decoration: underline; }
.rich ul, .rich ol { padding-left: 22px; }
.rich h2, .rich h3 { margin: 18px 0 8px; color: var(--text); }
.rich img { border-radius: 8px; margin: 8px 0; }
.lesson-side { background: var(--menu); min-height: calc(100vh - var(--header-h)); position: sticky; top: var(--header-h); max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
.lesson-side .head { padding: 22px 20px 14px; border-bottom: 1px solid var(--hair); }
.lesson-side .head .progress { margin-top: 8px; }
.mod { margin: 14px; background: var(--s1); border-radius: var(--radius); overflow: hidden; }
.mod-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 16px; border: 0; background: none; text-align: left; font-weight: var(--fw-semibold); font-size: var(--fs-sm); }
.mod-head .c { font-size: 11px; color: var(--text-60); font-weight: 400; }
.mod-head .icon { transition: transform var(--t); }
.mod.closed .mod-head .icon { transform: rotate(-90deg); }
.mod.closed .lessons { display: none; }
.litem { position: relative; display: flex; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--hair); cursor: pointer; transition: background var(--t); }
.litem:hover { background: var(--s1); }
.litem.on { background: var(--s2); }
.litem.on::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.litem .th { position: relative; width: 100px; height: 56px; border-radius: 4px; overflow: hidden; background: var(--s2); flex: none; }
.litem .th img { width: 100%; height: 100%; object-fit: cover; }
.litem .ck { position: absolute; left: 4px; bottom: 4px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.6); display: grid; place-items: center; font-size: 11px; color: #fff; }
.litem .ck.done { background: var(--accent); color: var(--accent-text); }
.litem .tt { font-size: var(--fs-sm); font-weight: var(--fw-semibold); line-height: 1.25; }
.litem .mn { font-size: 11px; color: var(--text-60); margin-top: 4px; }
.litem.lock { opacity: .55; }
@media (max-width: 1180px) { .lesson-layout { grid-template-columns: 1fr; } .lesson-side { position: static; max-height: none; min-height: 0; } }
@media (max-width: 960px) { .lesson-info { padding: 16px 12px; } .lesson-tabs { margin: 0 0 16px; } }

/* Página do curso */
.course-hero { display: grid; grid-template-columns: 240px 1fr; gap: var(--sp-6); align-items: start; }
.course-hero .cv { width: 240px; aspect-ratio: 708 / 1494; border-radius: var(--radius); overflow: hidden; background: var(--s1); }
.course-hero .cv img { width: 100%; height: 100%; object-fit: cover; }
.lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
@media (max-width: 720px) { .course-hero { grid-template-columns: 1fr; } .course-hero .cv { width: 160px; } }

/* ---------------- Login ---------------- */
.login-page { min-height: 100vh; background: var(--login-bg); color: var(--login-text); display: flex; flex-direction: column; align-items: center; padding: 56px 16px 40px; background-size: cover; background-position: center; }
.login-page .logo { width: 64px; height: 64px; border-radius: 4px; object-fit: cover; margin-bottom: 18px; }
.login-page .logo.big { width: 120px; height: 120px; }
.login-box { width: min(384px, 100%); background: var(--login-form); border-radius: 20px; margin-bottom: 18px; overflow: hidden; }
.login-box .hd { padding: 28px 24px 24px; text-align: center; font-weight: var(--fw-black); font-size: var(--fs-sm); letter-spacing: 3px; text-transform: uppercase; border-bottom: 5px solid var(--login-btn); }
.login-box .bd { padding: 26px 40px 28px; display: flex; flex-direction: column; gap: 10px; }
.login-box .input { background: rgba(255,255,255,.08); color: var(--login-text); height: 42px; font-weight: 700; font-size: 11px; letter-spacing: .3px; }
.login-box .input::placeholder { color: color-mix(in srgb, var(--login-text) 60%, transparent); }
.login-box .input-wrap > .icon { color: color-mix(in srgb, var(--login-text) 55%, transparent); }
.login-box .row.opts { justify-content: space-between; font-size: 11px; color: color-mix(in srgb, var(--login-text) 60%, transparent); }
.login-box .row.opts a { color: var(--login-text); text-decoration: underline; font-weight: 700; }
.login-btn { min-height: 42px; border: 0; border-radius: var(--radius-md); background: var(--login-btn); color: var(--login-btn-text); font-weight: 800; font-size: var(--fs-md); transition: filter var(--t); }
.login-btn:hover { filter: brightness(1.08); }
.login-btn[disabled] { opacity: .6; }
.login-box .secure { font-size: 11px; text-align: center; color: color-mix(in srgb, var(--login-text) 55%, transparent); display: flex; justify-content: center; gap: 6px; align-items: center; }
.login-box.alt { text-align: center; padding: 22px 40px 28px; }
.login-box.alt h4 { font-size: 12px; font-weight: 800; letter-spacing: 2.5px; text-transform: uppercase; margin-bottom: 8px; }
.login-box.alt p { font-size: 10.5px; color: color-mix(in srgb, var(--login-text) 55%, transparent); margin-bottom: 18px; line-height: 1.5; }
.login-foot { max-width: 384px; text-align: center; font-size: 10px; line-height: 1.7; color: color-mix(in srgb, var(--login-text) 45%, transparent); font-weight: 700; }
.login-foot a { text-decoration: underline; }
.login-err { color: #ff7a6e; font-size: 12px; text-align: center; font-weight: 700; }

/* ---------------- Admin ---------------- */
.admin-group { margin-bottom: var(--sp-5); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.tile { position: relative; display: flex; gap: 14px; align-items: center; min-height: 92px; padding: 16px 18px 16px 22px; background: var(--s2); border-radius: 6px; overflow: hidden; transition: background var(--t), transform var(--t); }
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.tile:hover { background: var(--s3); transform: translateY(-1px); }
.tile .ti { font-size: 38px; color: var(--text-60); }
.tile .tt { font-weight: var(--fw-bold); font-size: var(--fs-md); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tile .td { font-size: 11.5px; color: var(--text-60); margin-top: 4px; line-height: 1.35; }
.tile.soon { opacity: .5; pointer-events: none; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: var(--sp-5); flex-wrap: wrap; }
.page-head h1 { font-size: var(--fs-xl); }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: var(--sp-4); }
.toolbar .input, .toolbar .select { width: auto; min-width: 180px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stat { background: var(--s1); border-radius: var(--radius-md); padding: 12px 14px; }
.stat b { display: block; font-size: var(--fs-xl); }
.stat span { font-size: var(--fs-xs); color: var(--text-60); }
.tree-mod { background: var(--s1); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.tree-mod > .hd { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--s1); font-weight: var(--fw-bold); }
.tree-lesson { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--hair); }
.tree-lesson .th { width: 80px; height: 45px; border-radius: 4px; background: var(--s2); object-fit: cover; flex: none; }
.tree-lesson.drag-over, .tree-mod.drag-over { outline: 2px dashed var(--accent); }
.grip { cursor: grab; color: var(--text-40); display: grid; place-items: center; }
.file-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--s1); border-radius: var(--radius-md); }
.file-card .ic { width: 40px; height: 40px; border-radius: 8px; background: color-mix(in srgb, var(--danger) 25%, transparent); color: var(--danger); display: grid; place-items: center; }
.rte { border-radius: var(--radius-md); background: var(--s2); overflow: hidden; }
.rte-bar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--hair); background: var(--s1); }
.rte-bar button { min-width: 32px; height: 32px; border: 0; border-radius: 6px; background: none; font-weight: 700; display: grid; place-items: center; }
.rte-bar button:hover { background: var(--s2); }
.rte-bar .sep { width: 1px; background: var(--hair); margin: 4px 4px; }
.rte-area { min-height: 200px; padding: 14px 16px; outline: none; line-height: 1.6; }
.preview-box { border-radius: var(--radius); background: var(--bg); padding: 14px; box-shadow: inset 0 0 0 1px var(--hair); }
.kbd { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; background: var(--s2); padding: 2px 6px; border-radius: 4px; }
.split { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--sp-5); align-items: start; }
@media (max-width: 960px) { .split { grid-template-columns: 1fr; } }

/* Certificado */
.cert { position: relative; width: 1123px; height: 794px; background: #fff; color: #222; margin: 0 auto; padding: 60px 80px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; overflow: hidden; background-size: cover; }
.cert h1 { font-size: 54px; letter-spacing: 6px; text-transform: uppercase; }
.cert .body { font-size: 22px; line-height: 1.7; max-width: 800px; margin: 26px 0; white-space: pre-line; }
@media print { body * { visibility: hidden; } .cert, .cert * { visibility: visible; } .cert { position: fixed; inset: 0; margin: 0; } @page { size: A4 landscape; margin: 0; } }

/* ícones dentro de span.ico-wrap (componente Icon) */
.input-wrap > .ico-wrap { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-60); pointer-events: none; z-index: 1; }
.login-box .input-wrap > .ico-wrap { color: color-mix(in srgb, var(--login-text) 55%, transparent); }
.login-box .check { font-size: inherit; color: inherit; }
.login-box .input:focus { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--login-btn) 70%, transparent); }

/* ---------- Menu lateral: itens "Em breve" / liberação programada (cinza, para destacar o que já está pronto) ---------- */
.nav a.soon { color: var(--text-40); }
.nav a.soon .icon, .nav a.soon .ico-wrap { opacity: .55; }
.nav a.soon:hover { color: var(--text-60); }
.nav a.soon.on { color: var(--text-60); }
.nav a.soon.on::before { background: var(--text-40); }
.nav a .nav-lbl { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.soon-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: var(--radius-pill); border: 1px solid var(--hair); background: var(--s1); color: var(--text-60); font-size: 10px; font-weight: var(--fw-bold); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.soon-chip .icon { font-size: 12px; }

/* ---------- Tela "Em breve" ---------- */
.soon-stage { min-height: calc(100vh - var(--header-h) - 120px); display: grid; place-items: center; padding: var(--sp-6) 0; }
.soon-card { position: relative; overflow: hidden; isolation: isolate; width: min(560px, 100%); padding: 48px 32px 36px; text-align: center; border: 1px solid var(--hair); border-radius: var(--radius-lg); background: linear-gradient(180deg, var(--s2), var(--s1)); box-shadow: var(--shadow-pop); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.soon-aura { position: absolute; z-index: -1; inset: -40% -20% auto; height: 340px; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 26%, transparent), transparent); filter: blur(10px); animation: soon-breathe 5s var(--ease) infinite; }
.soon-icon { position: relative; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; font-size: 40px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--bg)); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 0 0 10px color-mix(in srgb, var(--accent) 6%, transparent), 0 0 40px color-mix(in srgb, var(--accent) 25%, transparent); margin-bottom: 6px; }
.soon-icon::after { content: ""; position: absolute; inset: -12px; border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--accent) 40%, transparent); animation: soon-spin 18s linear infinite; }
.soon-badge-ic { position: absolute; right: -4px; bottom: -4px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; background: var(--accent); color: var(--accent-text); border: 3px solid var(--s2); }
.soon-pill { display: inline-flex; padding: 6px 14px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); font-size: var(--fs-xs); font-weight: var(--fw-black); letter-spacing: .14em; text-transform: uppercase; }
.soon-title { font-size: var(--fs-2xl); font-weight: var(--fw-black); line-height: 1.15; margin: 0; }
.soon-text { color: var(--text-60); font-size: var(--fs-md); line-height: 1.6; max-width: 420px; margin: 0 0 6px; }
.soon-dots { display: flex; gap: 8px; margin: 2px 0 10px; }
.soon-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); opacity: .25; animation: soon-dot 1.4s var(--ease) infinite; }
.soon-dots i:nth-child(2) { animation-delay: .2s; } .soon-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes soon-breathe { 0%, 100% { opacity: .7; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes soon-spin { to { transform: rotate(360deg); } }
@keyframes soon-dot { 0%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
@media (max-width: 600px) { .soon-card { padding: 40px 20px 28px; } .soon-title { font-size: var(--fs-xl); } }
@media (prefers-reduced-motion: reduce) { .soon-aura, .soon-icon::after, .soon-dots i { animation: none; } .soon-dots i { opacity: .6; } }

/* ---------- Ficha do usuário (painel) — layout igual ao da Astron ---------- */
.ud { max-width: none; }
.ud-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 18px; margin-bottom: 14px; border-radius: var(--radius-md); background: var(--s1); font-size: var(--fs-xs); font-weight: var(--fw-semibold); }
.ud-crumbs a { display: inline-flex; align-items: center; gap: 6px; } .ud-crumbs a:hover { color: var(--hover); } .ud-crumbs .sep { opacity: .45; }
.ud-box { background: var(--s1); border-radius: var(--radius-md); padding: 22px 18px; margin-bottom: 14px; }
.ud-sec-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; } .ud-sec-head > div:first-child { flex: 1; min-width: 0; }
.ud-sec-head h2 { font-size: var(--fs-md); font-weight: var(--fw-semibold); margin: 0; }
.ud-name { font-weight: var(--fw-bold) !important; }
.ud-sub { font-size: 11px; color: var(--text-60); margin-top: 2px; }
.ud-pill { border-radius: var(--radius-pill) !important; border: 1px solid rgba(var(--surface-rgb), .5) !important; background: transparent !important; }
.ud-grid { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 14px; align-items: start; }
.ud-side { display: flex; flex-direction: column; gap: 10px; }
.ud-card { background: var(--s2); border-radius: var(--radius-sm); padding: 12px; font-size: 11px; }
.ud-photo { aspect-ratio: 1; padding: 0; overflow: hidden; display: grid; place-items: center; } .ud-photo img { width: 100%; height: 100%; object-fit: cover; }
.ud-ph { font-size: 54px; color: var(--text-40); }
.ud-line { display: flex; align-items: center; gap: 8px; }
.ud-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-40); } .ud-dot.on { background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 25%, transparent); }
.ud-stats { display: flex; flex-direction: column; } .ud-stats > div { padding: 8px 0; border-bottom: 1px solid var(--hair); line-height: 1.5; } .ud-stats > div:first-child { padding-top: 0; } .ud-stats > div:last-child { border-bottom: 0; padding-bottom: 0; }
.ud-loc { display: flex; align-items: center; gap: 6px; } .ud-loc .ico-wrap { color: var(--success); }
.ud-link { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); margin-top: 4px; }
.ud-mini { min-height: 24px !important; padding: 0 8px !important; font-size: 10px !important; }
.ud-ib { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--radius-sm); background: rgba(var(--surface-rgb), .12); color: var(--text); border: 0; cursor: pointer; transition: background var(--t); }
.ud-ib:hover { background: rgba(var(--surface-rgb), .22); color: var(--hover); }
.ud-actions { display: flex; gap: 6px; justify-content: center; }
.ud-main { background: var(--s2); border-radius: var(--radius-sm); padding: 4px 14px 18px; min-width: 0; }
.ud-form { display: flex; flex-direction: column; gap: 12px; padding-top: 16px; } .ud-form .label, .ud-form label { font-weight: var(--fw-bold); font-size: 11px; }
.ud-note { display: flex; align-items: center; gap: 10px; padding: 12px 14px; margin-bottom: 12px; border-radius: var(--radius-sm); background: var(--s2); font-size: 11px; font-weight: var(--fw-semibold); }
.ud-note.blue { background: #1f6fb0; color: #fff; }
.ud-table th { font-size: 11px; font-weight: var(--fw-bold); background: var(--s2); text-transform: none; letter-spacing: 0; color: var(--text); } .ud-table td { font-size: 11px; vertical-align: middle; }
.ud-acc { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; } .ud-acc.ok { color: var(--success); } .ud-acc.no { color: var(--text-80); }
.ud-course { display: flex; align-items: center; gap: 10px; } .ud-course img, .ud-cph { width: 26px; height: 26px; border-radius: 4px; object-fit: cover; flex: none; } .ud-cph { display: grid; place-items: center; background: rgba(var(--surface-rgb), .1); }
.ud-obs { color: var(--text-80); max-width: 420px; }
.ud-pager { display: flex; gap: 6px; margin-top: 14px; } .ud-pager button { min-width: 26px; height: 26px; border-radius: 6px; border: 0; background: rgba(var(--surface-rgb), .12); color: var(--text); font-size: 11px; font-weight: var(--fw-bold); cursor: pointer; } .ud-pager button.on { background: var(--accent); color: var(--accent-text); }
.ud-empty { padding: 14px; font-size: var(--fs-xs); color: var(--text-60); }
@media (max-width: 760px) { .ud-grid { grid-template-columns: 1fr; } .ud-side { display: grid; grid-template-columns: 1fr 1fr; } .ud-photo { grid-row: span 2; } }

/* ---------- Termos de uso: formatação igual à Astron (/signterms: caixa .htmlEditorFormat, Nunito 14px) ---------- */
.terms-box { background: rgba(var(--surface-rgb), .05); border-radius: 5px; padding: 30px; max-height: calc(100vh - 340px); min-height: 280px; overflow-y: auto; }
.terms-box.static { max-height: none; overflow: visible; }
.terms-doc { font-size: 14px; line-height: 1.4; color: var(--text); text-align: left; }
.terms-doc p { margin: 0 0 14px; }
.terms-doc h1, .terms-doc h2, .terms-doc h3, .terms-doc h4, .terms-doc h5, .terms-doc h6 { font-size: 14px; line-height: 1.4; font-weight: 400; text-transform: none; letter-spacing: 0; margin: 0 0 14px; }
.terms-doc > h1:first-child, .terms-doc > h2:first-child { text-align: center; font-size: 24px; line-height: 1.2; margin-bottom: 18px; }
.terms-doc strong, .terms-doc b { font-weight: 700; font-size: 16px; } /* como na Astron: negrito em 16px (a 1ª linha do título fica menor que a 2ª) */
.terms-doc ul, .terms-doc ol { margin: 0 0 14px 22px; }
.terms-doc a { color: var(--accent); text-decoration: underline; }
.sign-alert { display: flex; align-items: center; gap: 12px; padding: 14px 18px; margin-bottom: 18px; border-radius: 5px; background: #1f6fb0; color: #fff; font-size: 12px; font-weight: var(--fw-semibold); }
.sign-alert .ico-wrap { font-size: 18px; flex: none; }
.sign-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; margin-top: 18px; }
.sign-check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; flex: 1 1 320px; }
.sign-check input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.sign-btn { border-radius: 24px !important; min-width: 140px; min-height: 48px; }
@media (max-width: 600px) { .terms-box { padding: 18px; max-height: calc(100vh - 380px); } .sign-btn { width: 100%; } }

/* ---------- Login: aluno sem senha (aviso neutro + botão para receber o link) ---------- */
.login-info { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--login-btn) 45%, transparent); background: color-mix(in srgb, var(--login-btn) 9%, transparent); color: var(--login-text); font-size: 13px; line-height: 1.5; text-align: center; }
.login-info b { font-weight: 800; } .login-info > b:first-child { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; }
.login-info a { color: var(--login-btn); text-decoration: underline; }
.login-btn.alt { margin-top: 2px; }

/* ---------- Ficha do usuário v2: medidas tiradas da Astron (/configuracao/usuarios/edit, px reais, zoom 100%) ----------
   cartão externo = cor do menu sólida (rgb 20) raio 10 · caixas internas = branco 5% raio 10 · campos 50px branco 10% raio 7
   rótulos 12px/400 espaçamento 1px · abas 14px pad 20/15 · títulos de seção 18px/400 · subtítulos 12px/300 · tabela branco 5% raio 5 */
.ud { font-family: var(--font); }
.ud-crumbs { background: var(--menu); border-radius: 10px; padding: 16px 20px; font-size: 12px; font-weight: 400; margin-bottom: 20px; }
.ud-box { background: var(--menu); border-radius: 10px; padding: 20px; margin-bottom: 20px; }
.ud-sec-head { margin-bottom: 20px; align-items: center; }
.ud-sec-head h2 { font-size: 18px; font-weight: 400; line-height: 1.3; }
.ud-name { font-size: 18px !important; font-weight: 400 !important; }
.ud-sub { font-size: 12px; font-weight: 300; color: var(--text); opacity: 1; margin-top: 1px; }
.ud-pill { height: 40px; min-height: 40px !important; padding: 0 16px !important; font-size: 12px !important; font-weight: 700 !important; border: 1px solid rgba(var(--surface-rgb), .6) !important; }
.ud-grid { grid-template-columns: 250px minmax(0, 1fr); gap: 20px; }
.ud-side { gap: 10px; }
.ud-card { background: rgba(var(--surface-rgb), .05); border-radius: 10px; padding: 20px; font-size: 11px; }
.ud-photo { padding: 0; aspect-ratio: auto; height: 250px; }
.ud-line { padding: 10px 20px; min-height: 56px; }
.ud-stats > div { padding: 10px 0; line-height: 1.4; }
.ud-stats b { font-weight: 800; font-size: 11px; padding-right: 5px; }
.ud-mini { background: rgba(var(--surface-rgb), .1) !important; border: 0 !important; border-radius: 3px !important; min-height: 24px !important; padding: 5px 10px !important; font-size: 10px !important; font-weight: 700 !important; }
.ud-main { background: rgba(var(--surface-rgb), .05); border-radius: 10px; padding: 0 15px 20px; }
.ud-main .tabs { gap: 0; border-bottom: 1px solid rgba(var(--surface-rgb), .1); margin: 0 -15px; padding: 0 15px; }
.ud-main .tab { padding: 20px 15px; font-size: 14px; font-weight: 400; color: var(--text); }
.ud-main .tab.on { color: var(--accent); font-weight: 700; }
.ud-main .tab.on::after { height: 4px; bottom: -1px; left: 6px; right: 6px; border-radius: 0; }
.ud-form { gap: 10px; padding-top: 20px; }
.ud-form .label, .ud-form label { font-size: 12px; font-weight: 700; letter-spacing: 1px; padding: 5px 0; margin: 0; }
.ud-form .input, .ud-form .select { height: 50px; background: rgba(var(--surface-rgb), .1); border: 0; border-radius: 7px; font-size: 13.33px; color: rgba(var(--surface-rgb), .85); box-shadow: none; }
.ud-form .input::placeholder { color: rgba(var(--surface-rgb), .4); }
.ud-form .input-wrap > .input { padding-left: 40px; }
.ud-form .btn-primary { height: 50px; min-height: 50px; padding: 0 15px; border-radius: 7px; font-size: 14px; font-weight: 900; letter-spacing: .2px; }
.ud-note { background: rgba(var(--surface-rgb), .05); border: 1.5px solid rgba(0, 0, 0, .1); border-radius: 4px; padding: 15px 15px 15px 50px; position: relative; font-size: 12px; font-weight: 400; margin-bottom: 20px; }
.ud-note > .ico-wrap { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); font-size: 18px; }
.ud-note.blue { background: #1f6fb0; border-color: transparent; }
.ud-table { background: rgba(var(--surface-rgb), .05); border-radius: 5px; overflow: hidden; }
.ud-table th { background: transparent; font-size: 14px !important; font-weight: 700 !important; padding: 10px 20px !important; color: var(--text) !important; }
.ud-table td { padding: 5px 10px 5px 20px !important; border-top: 1px solid rgba(var(--surface-rgb), .05) !important; font-size: 12px !important; height: 51px; }
.ud-table td b { font-size: 12px; font-weight: 700; }
.ud-table td .ud-sub, .ud-obs { font-size: 10px !important; font-weight: 400; }
.ud-obs { color: var(--text) !important; }
.ud-acc { font-size: 10px; }
.ud-table .progress { height: 7px; width: 220px; max-width: 100%; border-radius: 7px; background: rgba(var(--surface-rgb), .1); }
.ud-course img, .ud-cph { width: 22px; height: 22px; border-radius: 3px; }
.ud-ib { width: 30px; height: 30px; border-radius: 4px; background: rgba(var(--surface-rgb), .1); }
.ud-pager button { min-width: 28px; height: 28px; border-radius: 4px; font-size: 12px; }
@media (max-width: 900px) { .ud-grid { grid-template-columns: 1fr; } .ud-side { display: grid; grid-template-columns: 1fr 1fr; } .ud-photo { height: 180px; } }
/* ficha v2: largura total como na Astron (master-body com 20px de margem) e campos colados ao rótulo */
.main .page.ud { padding: 20px; }
.ud-form { gap: 0; }
.ud-form .field { gap: 0; margin-bottom: 4px; }
.ud-form > div:last-child { margin-top: 12px; }
