/* Crescer Horários — pele Bento CRESCERP. Os tokens curtos daqui apontam para os --cx-* de
   crescer-base.css (padrão comum, CRESCERP_HUB/padrao-visual); coluna e barra do topo vêm de lá. */
:root {
  --paper: var(--cx-paper); --paper2: var(--cx-paper2); --tile: var(--cx-tile);
  --ink: var(--cx-ink); --ink2: var(--cx-ink2); --muted: var(--cx-muted); --faint: var(--cx-faint);
  --line: var(--cx-line); --line2: var(--cx-line2);
  --navy: var(--cx-navy); --navy2: var(--cx-navy2); --navy3: var(--cx-navy3); --navy-soft: var(--cx-navy-soft);
  --red: var(--cx-red); --red-soft: var(--cx-red-soft);
  --teal: var(--cx-teal); --teal-soft: var(--cx-teal-soft);
  --amber: var(--cx-amber); --amber-soft: var(--cx-amber-soft);
  --violet: var(--cx-navy3); --violet-soft: var(--cx-navy-soft);   /* sem roxo no padrão */
  --blue: var(--cx-navy2); --blue-soft: var(--cx-navy-soft);
  --green: var(--cx-green); --green-soft: var(--cx-green-soft);
  --r: var(--cx-r); --r2: var(--cx-r2); --r3: 10px;
  --sh: var(--cx-sh);
  --sh-lg: var(--cx-sh-lg);
  --font: var(--cx-font);
  --dur: var(--cx-dur); --ease: var(--cx-ease);
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); line-height: 1.5;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper2) 100%) fixed;
  -webkit-font-smoothing: antialiased; min-height: 100dvh;
}
[hidden] { display: none !important; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; font-weight: 800; color: var(--ink); }
h1 { font-size: 24px; } h2 { font-size: 18px; } h3 { font-size: 15px; }
p { margin: 0; }
a { color: var(--navy2); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.eyebrow { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; color: var(--faint); }
.tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.small { font-size: 13px; }
.mono { font-variant-numeric: tabular-nums; font-weight: 700; }

/* ---------- shell: coluna e barra do topo vêm de crescer-base.css (.cx-*) ---------- */
#nav .side-cen { color: #fff; font-weight: 800; padding: 0 11px 6px; font-size: 14px; letter-spacing: -.01em; line-height: 1.25; }
#nav .cx-grupo { margin-left: 11px; }
.topo-acoes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-left: auto; }
#view { padding: 24px 32px 48px; }
#view:focus { outline: none; }

/* ---------- login ---------- */
#login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.cartao-login { width: min(400px, 100%); background: var(--tile); border-radius: var(--r); box-shadow: var(--sh-lg); padding: 36px; display: flex; flex-direction: column; gap: 14px; }
.cartao-login .brand { display: flex; flex-direction: column; gap: 10px; color: var(--navy); margin-bottom: 8px; }
.cartao-login .brand-logo { width: 150px; height: auto; }
.cartao-login .brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.cartao-login .brand-text strong { font-size: 16px; font-weight: 800; }
.cartao-login .brand-text span { font-size: 12px; font-weight: 600; color: var(--muted); }
.cartao-login h1 { font-size: 22px; }
.cartao-login .sub { color: var(--muted); font-size: 14px; }

/* ---------- controles ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: 999px;
  border: 1px solid transparent; font-weight: 700; font-size: 14px; background: var(--navy-soft); color: var(--navy);
  transition: transform 120ms var(--ease), background var(--dur), box-shadow var(--dur); white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: #dfe7f5; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: linear-gradient(135deg, var(--navy2), var(--navy)); color: #fff; box-shadow: 0 8px 18px -10px rgba(10,42,94,.7); }
.btn-primary:hover { background: linear-gradient(135deg, var(--navy3), var(--navy2)); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink2); }
.btn-ghost:hover { background: var(--line2); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-danger:hover { background: #fadada; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #b91c26; }
.btn-sm { min-height: 32px; padding: 4px 12px; font-size: 13px; }
.btn-icon { width: 36px; min-height: 36px; padding: 0; justify-content: center; border-radius: 10px; }
.btn-icon svg { width: 16px; height: 16px; }
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo > label, .campo > .rotulo { font-size: 12px; font-weight: 700; color: var(--muted); }
.campo .ajuda { font-size: 12px; color: var(--faint); }
.campo .erro-campo { font-size: 12px; color: var(--red); font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=time], select, textarea {
  min-height: 42px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink);
  transition: border-color var(--dur), box-shadow var(--dur); width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--navy2); box-shadow: 0 0 0 3px rgba(10,42,94,.12); outline: none; }
input[type=number] { font-variant-numeric: tabular-nums; }
input[type=color] { width: 42px; height: 42px; padding: 3px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--navy2); }
.inline-num { width: 64px !important; min-height: 34px !important; padding: 4px 8px !important; text-align: center; display: inline-block; }
.linha { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.espaco { flex: 1; }
.erro { background: var(--red-soft); color: var(--red); padding: 10px 14px; border-radius: 12px; font-weight: 600; font-size: 14px; }
.aviso { background: var(--amber-soft); color: #92400e; padding: 12px 16px; border-radius: 14px; font-weight: 600; font-size: 14px; line-height: 1.5; }
.aviso code { background: rgba(0,0,0,.06); padding: 2px 6px; border-radius: 6px; }

/* ---------- tiles ---------- */
.tile { background: var(--tile); border-radius: var(--r); box-shadow: var(--sh); padding: 22px; }
.tile-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.tile-cab h2 { font-size: 17px; }
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-6 { grid-column: span 6; } .span-8 { grid-column: span 8; } .span-12 { grid-column: span 12; }
.hero { background: linear-gradient(135deg, #0d3271 0%, var(--navy) 60%, #081f45 100%); color: #fff; }
.hero h2, .hero h3 { color: #fff; }
.hero .eyebrow { color: #9fb2d8; }
.kpi { font-size: 34px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.kpi-lbl { font-size: 12px; font-weight: 700; color: var(--muted); margin-top: 6px; }
.hero .kpi-lbl { color: #b9c7e6; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--navy-soft); color: var(--navy); }
.pill-red { background: var(--red-soft); color: var(--red); }
.pill-amber { background: var(--amber-soft); color: var(--amber); }
.pill-green { background: var(--green-soft); color: var(--green); }
.pill-teal { background: var(--teal-soft); color: var(--teal); }
.pill-violet { background: var(--violet-soft); color: var(--violet); }
.pill-blue { background: var(--blue-soft); color: var(--blue); }
.pill-faint { background: var(--line2); color: var(--muted); }

/* ---------- cenários ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.cen-card { display: flex; flex-direction: column; gap: 12px; position: relative; transition: transform var(--dur) var(--ease), box-shadow var(--dur); }
.cen-card:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); }
.cen-card .nome { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.cen-card .nome a { color: var(--ink); text-decoration: none; }
.cen-card .nome a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r); }
.cen-card .meta { display: flex; gap: 6px; flex-wrap: wrap; }
.cen-card .status { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.cen-card .acoes { display: flex; gap: 6px; position: relative; z-index: 1; margin-top: auto; }

/* ---------- tabelas ---------- */
.tabela-wrap { overflow-x: auto; border-radius: var(--r2); }
table.tab { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
table.tab th { text-align: left; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.tab td { padding: 6px 10px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
table.tab tr:last-child td { border-bottom: 0; }
table.tab td input, table.tab td select { min-height: 36px; padding: 4px 10px; border-radius: 10px; }
table.tab td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tab .acoes-td { white-space: nowrap; text-align: right; }
table.tab tbody tr:hover td { background: #fafbfe; }
.cor-chip { width: 14px; height: 14px; border-radius: 4px; display: inline-block; vertical-align: -2px; margin-right: 6px; border: 1px solid rgba(0,0,0,.08); }

/* ---------- estado vazio / skeleton ---------- */
.vazio { text-align: center; padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.vazio .ico { width: 56px; height: 56px; border-radius: 18px; background: var(--navy-soft); color: var(--navy); display: grid; place-items: center; }
.vazio .ico svg { width: 26px; height: 26px; }
.vazio h3 { font-size: 17px; }
.vazio p { color: var(--muted); max-width: 42ch; font-size: 14px; }
.sk { border-radius: 12px; background: linear-gradient(90deg, var(--line2) 25%, #f6f8fc 50%, var(--line2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }
.sk-linha { height: 16px; margin: 10px 0; } .sk-bloco { height: 120px; }

/* ---------- modal ---------- */
.modal-fundo { position: fixed; inset: 0; background: rgba(8,31,69,.5); backdrop-filter: blur(3px); z-index: 50; display: grid; place-items: center; padding: 20px; animation: fade var(--dur) var(--ease); }
.modal { background: var(--tile); border-radius: var(--r); box-shadow: var(--sh-lg); width: min(var(--mw, 560px), 100%); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; animation: sobe 220ms var(--ease); }
.modal-cab { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 8px; }
.modal-cab h2 { font-size: 19px; }
.modal-corpo { padding: 8px 24px 16px; overflow: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-pe { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 24px 20px; border-top: 1px solid var(--line2); }
@keyframes fade { from { opacity: 0; } }
@keyframes sobe { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- toasts ---------- */
#toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 90; }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 14px; font-weight: 600; font-size: 14px; box-shadow: var(--sh-lg); max-width: 380px; animation: sobe 200ms var(--ease); display: flex; gap: 10px; align-items: center; }
.toast-erro { background: var(--red); }
.toast-ok { background: var(--green); }

/* ---------- grade de tempo ---------- */
.slots-lista { display: flex; flex-direction: column; gap: 6px; }
.slot-linha { display: grid; grid-template-columns: 32px 1fr 1fr 130px 36px; gap: 8px; align-items: center; }
.slot-linha .idx { font-weight: 800; color: var(--faint); font-variant-numeric: tabular-nums; text-align: center; }
.slot-linha input[type=time] { min-height: 36px; padding: 4px 8px; }
.slot-linha .apos { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.slot-intervalo { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: repeating-linear-gradient(90deg, var(--amber-soft) 0 8px, var(--amber) 8px 10px); opacity: .6; margin: 2px 0; }

/* ---------- disponibilidade ---------- */
.disp { display: inline-grid; gap: 4px; user-select: none; }
.disp .dcab { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); text-align: center; padding: 4px 0; }
.disp .dslot { font-size: 11px; font-weight: 700; color: var(--muted); padding: 0 8px; white-space: nowrap; font-variant-numeric: tabular-nums; display: flex; align-items: center; justify-content: flex-end; }
.disp .dcel { width: 44px; height: 36px; border-radius: 9px; border: 1px solid var(--line); display: grid; place-items: center; font-weight: 800; font-size: 14px; background: #fff; transition: transform 100ms, background var(--dur); }
.disp .dcel:hover { transform: scale(1.06); }
.disp .dcel[data-e="V"] { background: var(--green-soft); color: var(--green); border-color: transparent; }
.disp .dcel[data-e="Q"] { background: var(--amber-soft); color: var(--amber); border-color: transparent; }
.disp .dcel[data-e="X"] { background: var(--red-soft); color: var(--red); border-color: transparent; }
.disp-legenda { display: flex; gap: 12px; font-size: 12px; color: var(--muted); margin-top: 10px; align-items: center; flex-wrap: wrap; }
.disp-legenda .dcel { width: 22px; height: 22px; font-size: 11px; border-radius: 6px; }

/* ---------- professores master-detail ---------- */
.mestre-detalhe { display: grid; grid-template-columns: 280px 1fr; gap: 16px; align-items: start; }
.lista-mestre { display: flex; flex-direction: column; gap: 4px; }
.lista-mestre button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px; border: 0; background: transparent; font-weight: 600; transition: background var(--dur); }
.lista-mestre button:hover { background: var(--line2); }
.lista-mestre button.ativo { background: var(--navy); color: #fff; }
.lista-mestre .cod { font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px; background: var(--navy-soft); color: var(--navy); flex: none; }
.lista-mestre button.ativo .cod { background: rgba(255,255,255,.18); color: #fff; }
.lista-mestre .inativo { opacity: .55; }
.frases { display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.frases .frase { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.avatar { width: 44px; height: 44px; border-radius: 14px; background: var(--navy-soft); color: var(--navy); display: grid; place-items: center; font-weight: 800; font-size: 14px; letter-spacing: -.02em; flex: none; }

/* ---------- aulas matriz ---------- */
.matriz { border-collapse: separate; border-spacing: 0; font-size: 13px; }
.matriz th, .matriz td { padding: 4px; text-align: center; }
.matriz thead th { position: sticky; top: 0; background: var(--tile); z-index: 2; font-size: 11px; font-weight: 800; color: var(--muted); padding: 8px 4px; }
.matriz thead th .cor-chip { display: block; width: auto; height: 4px; margin: 4px auto 0; border-radius: 2px; border: 0; }
.matriz tbody th { text-align: left; font-weight: 800; padding: 4px 10px; white-space: nowrap; position: sticky; left: 0; background: var(--tile); z-index: 1; }
.matriz tbody th small { display: block; font-weight: 600; color: var(--faint); font-size: 11px; }
.cel-aula { width: 56px; height: 44px; border-radius: 10px; border: 1px dashed var(--line); background: #fff; font-weight: 800; font-size: 14px; color: var(--faint); transition: transform 100ms, background var(--dur), border-color var(--dur); display: grid; place-items: center; gap: 0; line-height: 1; }
.cel-aula:hover { transform: scale(1.05); border-color: var(--navy2); }
.cel-aula.tem { border-style: solid; border-color: transparent; background: var(--navy-soft); color: var(--navy); }
.cel-aula.tem small { font-size: 10px; font-weight: 700; color: var(--muted); }
.cel-aula.sem-prof { background: var(--amber-soft); color: var(--amber); }
.total { font-weight: 800; font-variant-numeric: tabular-nums; }
.total.estoura { color: var(--red); }
.total small { display: block; font-size: 10px; font-weight: 700; color: var(--faint); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-sel { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip-sel:has(input:checked) { background: var(--navy); color: #fff; border-color: var(--navy); }
.chip-sel input { position: absolute; opacity: 0; width: 1px; height: 1px; }

/* ---------- regras ---------- */
.regra { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--line); background: #fff; transition: background var(--dur); }
.regra.off { opacity: .55; }
.regra .desc { font-weight: 600; font-size: 14px; }
.regra .sub { font-size: 12px; color: var(--muted); margin-top: 2px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.toggle { position: relative; width: 42px; height: 24px; border-radius: 999px; background: var(--line); border: 0; transition: background var(--dur); flex: none; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform var(--dur) var(--ease); }
.toggle[aria-checked="true"] { background: var(--green); }
.toggle[aria-checked="true"]::after { transform: translateX(18px); }
.passos { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.passo { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--faint); }
.passo b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--line2); font-size: 12px; }
.passo.ativo { color: var(--navy); } .passo.ativo b { background: var(--navy); color: #fff; }
.passo.feito b { background: var(--green-soft); color: var(--green); }
.passos .sep { flex: 1; height: 1px; background: var(--line); }
.tipos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tipo-opt { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.tipo-opt b { font-weight: 800; }
.tipo-opt small { color: var(--muted); }
.tipo-opt:has(input:checked) { border-color: var(--navy); background: var(--navy-soft); }
.tipo-opt input { position: absolute; opacity: 0; }
.params { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--line2); font-size: 14px; }

/* ---------- gerar ---------- */
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); display: inline-block; }
.status-dot.rodando { background: var(--blue); animation: pulsa 1s infinite; }
.status-dot.concluida { background: var(--green); } .status-dot.erro { background: var(--red); } .status-dot.pendente { background: var(--amber); }
@keyframes pulsa { 50% { opacity: .35; } }
.spinner { width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: gira .8s linear infinite; display: inline-block; }
.hero .spinner { border-color: rgba(255,255,255,.25); border-top-color: #fff; }
@keyframes gira { to { transform: rotate(360deg); } }

/* ---------- horário ---------- */
.seg { display: inline-flex; background: var(--line2); border-radius: 999px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--muted); }
.seg button.on { background: #fff; color: var(--navy); box-shadow: var(--sh); }
.horario-layout { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.grades-h { display: grid; grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); gap: 16px; }
.grade-h { padding: 16px 16px 12px; }
.grade-h h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.grade-h h3 small { font-weight: 700; color: var(--faint); font-size: 12px; }
table.tt { width: 100%; border-collapse: separate; border-spacing: 3px; table-layout: fixed; }
table.tt th { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 2px; }
table.tt th.hora { width: 64px; text-align: right; text-transform: none; letter-spacing: 0; font-variant-numeric: tabular-nums; vertical-align: top; padding-right: 6px; line-height: 1.2; }
table.tt th.hora b { display: block; color: var(--ink2); font-size: 12px; }
table.tt th.hora span { font-weight: 600; font-size: 10px; }
table.tt td { height: 50px; border-radius: 10px; background: var(--line2); vertical-align: top; padding: 0; position: relative; }
table.tt td.q { background: repeating-linear-gradient(135deg, var(--amber-soft) 0 6px, #fbe6c0 6px 8px); }
table.tt td.x { background: repeating-linear-gradient(135deg, var(--red-soft) 0 6px, #f9d6d6 6px 8px); }
table.tt td.sobre { outline: 2px dashed var(--navy2); outline-offset: -2px; }
table.tt tr.recreio td { height: 8px; background: transparent; border-radius: 0; }
table.tt tr.recreio th { height: 8px; padding: 0; }
table.tt tr.recreio td::after { content: ""; position: absolute; inset: 2px 0; border-radius: 4px; background: repeating-linear-gradient(90deg, var(--amber-soft) 0 6px, transparent 6px 9px); }
.cardh { position: absolute; inset: 0; border-radius: 10px; padding: 5px 7px; background: #fff; box-shadow: var(--sh); border-left: 4px solid var(--navy); display: flex; flex-direction: column; justify-content: center; gap: 1px; cursor: grab; font-size: 12px; line-height: 1.2; transition: transform 120ms, box-shadow var(--dur), outline-color var(--dur); overflow: hidden; }
.cardh:hover { transform: translateY(-1px); box-shadow: var(--sh-lg); z-index: 2; }
.cardh.arrastando { opacity: .5; }
.cardh b { font-weight: 800; font-size: 13px; letter-spacing: -.01em; }
.cardh small { color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cardh.hl { outline: 3px solid var(--red); outline-offset: 1px; z-index: 3; }
.cardh.hl-soft { outline: 3px solid var(--amber); outline-offset: 1px; z-index: 3; }
.cardh .cadeado { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border: 0; background: transparent; padding: 0; color: var(--faint); border-radius: 6px; display: grid; place-items: center; }
.cardh .cadeado svg { width: 12px; height: 12px; }
.cardh .cadeado.on { color: var(--navy); background: var(--navy-soft); }
.cardh.fixo { cursor: default; border-left-style: double; }
.violacoes { display: flex; flex-direction: column; gap: 6px; max-height: 70vh; overflow: auto; }
.viol { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 8px 10px; font-size: 13px; display: grid; grid-template-columns: 4px 1fr auto; gap: 10px; align-items: start; }
.viol::before { content: ""; width: 4px; border-radius: 4px; background: var(--amber); align-self: stretch; }
.viol.hard::before { background: var(--red); }
.viol .obj { font-weight: 800; }
.viol .desc { color: var(--muted); }
.viol .pts { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--amber); font-size: 12px; }
.viol.hard .pts { color: var(--red); }
.viol.sel { border-color: var(--navy); background: var(--navy-soft); }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) {
  .horario-layout { grid-template-columns: 1fr; }
  .grades-h { grid-template-columns: 1fr; }
  .mestre-detalhe { grid-template-columns: 1fr; }
  .span-3, .span-4 { grid-column: span 6; }
}
@media (max-width: 820px) {
  #view { padding-left: 16px; padding-right: 16px; }
  .span-3, .span-4, .span-6, .span-8 { grid-column: span 12; }
  .grid2, .grid3, .tipos { grid-template-columns: 1fr; }
}

/* ---------- impressão ---------- */
@media print {
  body { background: #fff; }
  .cx-side, #topo, #toasts, .no-print, .horario-lado, .modal-fundo { display: none !important; }
  #shell { display: block; }
  #view { padding: 0; }
  .horario-layout { display: block; }
  .grades-h { grid-template-columns: 1fr 1fr; gap: 10px; }
  .grade-h { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  .cardh { box-shadow: none; border: 1px solid #ddd; }
  .cardh .cadeado { display: none; }
}

/* ---- lotes de opções (0007): chips no Gerar e barra no Horário */
.chip-opcao { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; }
.chip-opcao a { color: var(--ink); text-decoration: none; }
.chip-opcao a:hover { color: var(--navy2); text-decoration: underline; }
.chip-opcao.adotada { border-color: var(--green); background: var(--green-soft); }
.chip-opcao.com-hard { border-color: var(--red); }
.lote-row td { border-bottom: 0 !important; }
.lote-chips td { padding-top: 0 !important; }
.opcoes-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px; border-radius: 14px; background: var(--tile); box-shadow: var(--sh); border: 1px solid var(--line); }
.opcoes-bar .seg button { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 5px 12px; line-height: 1.15; }
.opcoes-bar .seg button small { font-weight: 500; font-size: 11px; color: var(--muted); }
.opcoes-bar .seg button.on small { color: var(--navy2); }
.opcoes-bar .seg button.hard { color: var(--red); }
.opcoes-bar details { position: relative; }
.opcoes-bar summary { list-style: none; cursor: pointer; }
.opcoes-bar summary::-webkit-details-marker { display: none; }
.opcoes-bar .popover { position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; width: min(440px, 80vw); padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); box-shadow: var(--sh-lg); font-size: 13px; }
.opcoes-bar .popover h4 { margin: 0 0 6px; font-size: 13px; }
.opcoes-bar .popover ul { margin: 0; padding-left: 18px; }
.opcoes-bar .popover li { margin: 3px 0; }
@media print { .opcoes-bar { display: none; } }
.kpi-lista { font-size: 26px; letter-spacing: -.02em; }

/* sql/61: modo só leitura — quem não é editor de 'horarios' no hub só vê */
body.so-leitura #doCad, body.so-leitura #novo, body.so-leitura #novo2, body.so-leitura [data-dup], body.so-leitura [data-del],
body.so-leitura #bVer, body.so-leitura #bAdotarOp, body.so-leitura .cadeado, body.so-leitura .vazio .btn-primary { display: none !important; }

body.so-leitura .horario-lado p.faint { display: none !important; }
