/* ============================================================
   Portal Pedagógico — Tutores
   Estilos globais (Fase 1)
   ============================================================ */

:root {
  --brand: #F26A21;          /* laranja Tutores */
  --brand-dark: #d4550f;
  --brand-2: #6D28D9;        /* roxo secundário */
  --sidebar: #241147;        /* menu lateral roxo escuro */
  --sidebar-hover: rgba(255,255,255,.08);
  --sidebar-text: #cbbfe6;
  --sidebar-active: #ffffff;
  --bg: #F4F6F9;             /* fundo do conteúdo */
  --card: #ffffff;
  --line: #e6e9ef;
  --text: #1f2733;
  --text-soft: #6b7583;
  --ok: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
  --info: #2563eb;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(16,24,40,.06), 0 8px 24px rgba(16,24,40,.05);
  --font: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; }

/* ---------- Marca ---------- */
.brand { display: flex; align-items: center; gap: 11px; }
.brand .mark {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  display: grid; place-items: center; padding: 5px; background: #fff;
  box-shadow: 0 6px 16px rgba(20,8,40,.35);
}
.brand .mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand .name { display: flex; flex-direction: column; gap: 5px; line-height: 1; }
.brand .name .wordmark { height: 22px; width: auto; display: block; }
.brand .name span { font-size: 10.5px; font-weight: 600; letter-spacing: .3px; color: #b6a7dc; }

/* ============================================================
   LOGIN
   ============================================================ */
.login-wrap { min-height: 100%; display: grid; grid-template-columns: 1.1fr .9fr; }
.login-hero {
  background:
    radial-gradient(900px 500px at 85% 110%, rgba(242,106,33,.35), transparent 60%),
    linear-gradient(150deg, #4a2394 0%, #2d1461 58%, #1b0d38 100%);
  color: #fff; padding: 56px 60px; display: flex; flex-direction: column; justify-content: space-between;
}
.login-hero .brand .name b { color: #fff; }
.login-hero .brand .name span { color: #c4b6e6; }
.login-hero h1 { font-size: 40px; line-height: 1.1; margin: 28px 0 14px; font-weight: 800; }
.login-hero h1 em { color: var(--brand); font-style: normal; }
.login-hero p { color: #c4cbd6; font-size: 16px; max-width: 460px; }
.login-hero .feature-list { margin-top: 28px; display: grid; gap: 12px; }
.login-hero .feature-list li { list-style: none; display: flex; gap: 10px; align-items: center; color: #dbe0e8; font-size: 14px; }
.login-hero .feature-list .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; }
.login-hero .foot { color: #9c8fc4; font-size: 12px; }

.login-panel { display: grid; place-items: center; padding: 40px; }
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { font-size: 24px; margin-bottom: 4px; }
.login-card .sub { color: var(--text-soft); margin-bottom: 24px; font-size: 14px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #40495a; }
.field input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
.field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(242,106,33,.15); }
.btn-primary {
  width: 100%; padding: 12px 16px; border-radius: 10px; color: #fff; font-weight: 700; font-size: 15px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark)); transition: filter .15s, transform .05s;
}
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:active { transform: translateY(1px); }
.login-error { color: var(--danger); font-size: 13px; margin-bottom: 12px; min-height: 18px; }

.demo-box { margin-top: 26px; border-top: 1px dashed var(--line); padding-top: 18px; }
.demo-box .demo-title { font-size: 12px; color: var(--text-soft); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; }
.demo-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 12px; font-size: 12.5px;
  color: #40495a; font-weight: 600; transition: all .15s;
}
.demo-chip:hover { border-color: var(--brand); color: var(--brand); }
.demo-hint { font-size: 12px; color: var(--text-soft); margin-top: 10px; }

/* ---------- Login elegante (card central escuro) ---------- */
.login2 { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(880px 520px at 50% -8%, rgba(124,58,237,.42), transparent 60%),
    radial-gradient(600px 460px at 82% 108%, rgba(109,40,217,.20), transparent 60%),
    linear-gradient(165deg, #211048 0%, #170b31 56%, #0d0620 100%); }
.login2-card { width: 100%; max-width: 410px; background: rgba(35,24,60,.80); border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px; padding: 40px 36px; box-shadow: 0 34px 80px rgba(0,0,0,.5); backdrop-filter: blur(9px); text-align: center; }
.login2-logo { height: 40px; margin-bottom: 16px; }
.login2-title { color: #fff; font-size: 25px; font-weight: 800; letter-spacing: -.3px; }
.login2-sub { color: #a693d6; font-size: 13.5px; margin-top: 5px; }
.login2-div { height: 1px; background: rgba(255,255,255,.10); margin: 22px 0; }
.login2-erro { color: #fca5a5; font-size: 13px; min-height: 18px; text-align: left; }
.login2-field { text-align: left; margin-bottom: 16px; }
.login2-field label { display: block; font-size: 13px; font-weight: 600; color: #d6cbee; margin-bottom: 7px; }
.login2-field input { width: 100%; padding: 13px 14px; border-radius: 10px; border: 1px solid #d9dce8;
  background: #edeef6; color: #1f2733; font-size: 14.5px; font-family: inherit; transition: border-color .15s, box-shadow .15s, background .15s; }
.login2-field input:focus { outline: none; border-color: #8b5cf6; background: #fff; box-shadow: 0 0 0 3px rgba(124,58,237,.28); }
.login2-field input::placeholder { color: #9aa1b5; }
.login2-pass { position: relative; }
.login2-pass input { padding-right: 46px; }
.login2-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px;
  display: grid; place-items: center; color: #6b7280; border-radius: 8px; }
.login2-eye:hover { color: #4b5563; background: rgba(0,0,0,.06); }
.login2-btn { width: 100%; margin-top: 4px; padding: 13px; border-radius: 10px; color: #fff; font-weight: 700; font-size: 15px;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed); box-shadow: 0 10px 24px rgba(124,58,237,.45); transition: filter .15s, transform .05s; }
.login2-btn:hover { filter: brightness(1.07); }
.login2-btn:active { transform: translateY(1px); }
.login2-btn:disabled { opacity: .7; cursor: default; }
.login2-forgot { display: inline-block; margin-top: 15px; color: #a78bfa; font-size: 13.5px; font-weight: 600; }
.login2-forgot:hover { color: #c4b5fd; text-decoration: underline; }
.login2-demo { margin-top: 22px; border-top: 1px dashed rgba(255,255,255,.12); padding-top: 16px; }
.login2-demo-t { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: #8b7bb5; margin-bottom: 10px; }
.login2-chips { display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; }
.login2-chip { border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: #d5c9ee;
  border-radius: 999px; padding: 6px 11px; font-size: 12px; font-weight: 600; transition: all .15s; }
.login2-chip:hover { border-color: var(--brand); color: #fff; background: rgba(242,106,33,.16); }
.login2-hint { font-size: 12px; color: #a693d6; margin-top: 10px; }
.login2-foot { margin-top: 18px; font-size: 11.5px; color: #6f6094; }

/* ============================================================
   SHELL (dashboard)
   ============================================================ */
.shell { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; }

/* Sidebar */
.sidebar { background: linear-gradient(185deg, #3a1e73 0%, #251349 55%, #190c31 100%); color: var(--sidebar-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar .brand { padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,.10); }
.sidebar .brand .name b { color: #fff; }
.sidebar .brand .name span { color: #b6a7dc; }
.nav { flex: 1; overflow-y: auto; padding: 14px 12px; }
.nav-group { margin-bottom: 8px; }
.nav-group .group-label { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: #a693d6; padding: 12px 12px 6px; font-weight: 700; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 10px;
  color: var(--sidebar-text); font-size: 14px; font-weight: 600; text-align: left; transition: background .15s, color .15s;
}
.nav-item:hover { background: var(--sidebar-hover); color: #fff; }
.nav-item.active { background: linear-gradient(135deg, rgba(242,106,33,.18), rgba(242,106,33,.06)); color: #fff; box-shadow: inset 3px 0 0 var(--brand); }
.nav-item .ico { width: 20px; text-align: center; font-size: 16px; flex: none; }
.sidebar .side-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.10); }
.user-mini { display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg,var(--brand-2),#4c1d95); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.user-mini .info { line-height: 1.2; overflow: hidden; }
.user-mini .info b { display: block; font-size: 13px; color: #fff; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.user-mini .info span { font-size: 11.5px; color: #b6a7dc; }

/* Topbar */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 64px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 26px; position: sticky; top: 0; z-index: 5; }
.topbar::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--brand) 0%, var(--brand) 40%, var(--brand-2) 100%); }
.topbar .crumbs { font-size: 13px; color: var(--text-soft); }
.topbar .crumbs b { color: var(--text); }
.topbar .actions { display: flex; align-items: center; gap: 14px; }
.topsearch { position: relative; flex: 0 1 320px; margin: 0 14px; }
.topsearch input { width: 100%; padding: 8px 12px 8px 32px; border: 1px solid var(--line); border-radius: 9px; font-size: 13.5px; font-family: inherit; color: var(--text); background: #f7f8fb; transition: border-color .15s, box-shadow .15s, background .15s; }
.topsearch input:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(242,106,33,.12); }
.topsearch input::placeholder { color: var(--text-soft); }
.topsearch .ts-ic { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 12.5px; opacity: .55; pointer-events: none; }
@media (max-width: 760px) { .topsearch { flex-basis: 150px; margin: 0 8px; } }
.role-badge { font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: rgba(242,106,33,.12); color: var(--brand-dark); }
.btn-ghost { font-size: 13px; font-weight: 600; color: var(--text-soft); padding: 8px 12px; border-radius: 8px; }
.btn-ghost:hover { background: var(--bg); color: var(--text); }

/* Content */
.content { padding: 28px 26px 60px; }
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: 24px; font-weight: 800; }
.page-head p { color: var(--text-soft); margin-top: 4px; font-size: 14px; }

/* Cards / grids */
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card.pad { padding: 20px; }
.card-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-h h3 { font-size: 15px; font-weight: 700; }
.card-b { padding: 20px; }

/* Stat cards */
.stat { display: flex; flex-direction: column; gap: 8px; }
.stat .label { color: var(--text-soft); font-size: 13px; font-weight: 600; }
.stat .value { font-size: 30px; font-weight: 800; line-height: 1; }
.stat .trend { font-size: 12.5px; font-weight: 600; }
.stat .trend.up { color: var(--ok); }
.stat .trend.down { color: var(--danger); }
.stat .ico-badge { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 20px; color: #fff; }

/* Tool cards (home) */
.tool-card { padding: 20px; display: flex; flex-direction: column; gap: 10px; transition: transform .12s, box-shadow .12s, border-color .12s; }
.tool-card:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: 0 10px 26px rgba(16,24,40,.1); }
.tool-card .tc-top { display: flex; align-items: center; justify-content: space-between; }
.tool-card .tc-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; }
.tool-card h4 { font-size: 16px; }
.tool-card p { color: var(--text-soft); font-size: 13.5px; line-height: 1.5; }

/* Badges */
.badge { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; letter-spacing: .2px; }
.badge.ok { background: rgba(22,163,74,.12); color: var(--ok); }
.badge.warn { background: rgba(217,119,6,.14); color: var(--warn); }
.badge.danger { background: rgba(220,38,38,.12); color: var(--danger); }
.badge.info { background: rgba(37,99,235,.12); color: var(--info); }
.badge.soft { background: var(--bg); color: var(--text-soft); }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-soft); font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover, .table tr:hover td { background: #fafbfc; }
.table-wrap { overflow-x: auto; }

/* Progress bars */
.bar { height: 8px; border-radius: 999px; background: var(--bg); overflow: hidden; min-width: 90px; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-dark)); }
.bar.green > span { background: linear-gradient(90deg,#22c55e,#16a34a); }
.bar.red > span { background: linear-gradient(90deg,#f87171,#dc2626); }

/* Empty / construction state */
.empty { text-align: center; padding: 60px 20px; }
.empty .big { font-size: 46px; }
.empty h3 { margin: 14px 0 6px; font-size: 20px; }
.empty p { color: var(--text-soft); max-width: 460px; margin: 0 auto; font-size: 14px; }
.empty .tag { display: inline-block; margin-top: 16px; }

.list-clean { list-style: none; display: grid; gap: 12px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: none; }
.list-row .meta { color: var(--text-soft); font-size: 13px; }

.donut-wrap { display: flex; align-items: center; gap: 20px; }
.legend { display: grid; gap: 8px; font-size: 13px; }
.legend .li { display: flex; align-items: center; gap: 8px; }
.legend .sw { width: 12px; height: 12px; border-radius: 3px; }

.section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-soft); margin: 4px 0 12px; }

/* Responsivo */
@media (max-width: 1000px) {
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .login-wrap { grid-template-columns: 1fr; }
  .login-hero { display: none; }
}
@media (max-width: 720px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 30; width: 256px; transform: translateX(-100%); transition: transform .2s; }
  .shell.nav-open .sidebar { transform: translateX(0); }
  .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .menu-toggle { display: inline-flex !important; }
}
.menu-toggle { display: none; font-size: 22px; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 8px; }
.menu-toggle:hover { background: var(--bg); }

/* ---------- Impressão (planilha de estágio) ---------- */
.print-only { display: none; }

@media print {
  @page { size: landscape; margin: 10mm; }
  body { background: #fff; }
  .sidebar, .topbar, .menu-toggle,
  .btn-ghost, .btn-add, .btn-ghost-add, .est-del,
  .no-print, .cron-x, .cron-busca, .cron-chip, .doc-btn,
  .page-head { display: none !important; }
  /* Cronogramas na impressão */
  .cron-tab { font-size: 10.5px; }
  .cron-tab th, .cron-tab td { border: 1px solid #bbb; padding: 5px 6px; }
  .cron-tab th, .cron-banner { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  .cron-tab tr.feita td { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  .cron-check { display: none !important; }
  .cron-tab tbody tr:hover td { background: inherit; }
  .shell, .main, .content { display: block; padding: 0; margin: 0; }
  .content { padding: 0; }
  .card { box-shadow: none; border: none; background: transparent; }
  .card-h { padding: 0 0 8px; }
  .est-table { font-size: 10.5px; }
  .est-table th, .est-table td { border: 1px solid #bbb; padding: 5px 7px; }
  .table tr:hover td, .est-table tbody tr:hover td { background: inherit; }
  /* Garante que as cores das situações saiam na impressão */
  .est-table tr td, .badge-sit, .cidade-head {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Elementos só de impressão: cabeçalho, rodapé e arte de fundo */
  .print-only { display: block !important; }
  .print-bg {
    position: fixed; inset: 0; z-index: -1;
    background-image: url('../img/impressao-fundo.png');
    background-size: cover; background-position: center; background-repeat: no-repeat;
    -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important;
  }
  .print-header { text-align: center; margin-bottom: 12px; }
  .print-header .ph-escola { font-size: 13px; color: #333; }
  .print-header .ph-titulo { font-size: 16px; font-weight: 800; margin-top: 3px; color: #111; }
  .print-footer { margin-top: 46px; text-align: center; }
  .print-footer .assinatura { display: inline-block; font-size: 12px; color: #333; }
  .print-footer .assinatura .linha { display: block; width: 320px; border-top: 1px solid #333; margin: 0 auto 6px; }
}

/* Botões de documento (planos de ensino) */
.doc-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line); color: var(--brand-dark); background: #fff; margin-left: 8px; transition: all .15s; white-space: nowrap; }
.doc-btn:hover { border-color: var(--brand); background: #fff7f2; }
.doc-btn.ghost { color: var(--text-soft); }
.doc-btn.ghost:hover { color: var(--text); border-color: var(--text-soft); background: var(--bg); }
/* Lista de diplomas gerados */
.dip-tabela { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dip-tabela th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-soft); padding: 6px 8px; border-bottom: 2px solid var(--line); }
.dip-tabela td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dip-tabela tbody tr:hover { background: #faf7ff; }
.dip-dl { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 7px; border: 1px solid var(--line); color: var(--brand-dark); background: #fff; margin-left: 6px; transition: all .15s; white-space: nowrap; }
.dip-dl:hover { border-color: var(--brand); background: #fff7f2; }
.dip-del { font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 7px; border: 1px solid #f0c9c9; color: #dc2626; background: #fff; margin-left: 6px; cursor: pointer; transition: all .15s; white-space: nowrap; }
.dip-del:hover { border-color: #dc2626; background: #fef2f2; }

/* ---------- Cronogramas (Cursos Livres) ---------- */
.cron-busca { flex: 1; min-width: 240px; font-size: 14px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--text); }
.cron-busca:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(242,106,33,.12); }
.cron-chip { font-size: 12.5px; font-weight: 600; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--text-soft); cursor: pointer; transition: all .15s; }
.cron-chip:hover { border-color: var(--brand); color: var(--brand-dark); }
.cron-chip.on { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); border-color: transparent; color: #fff; }

/* Plano de Curso (documento completo) */
.plano-curso { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.plano-curso .pc-info { display: flex; align-items: center; gap: 13px; }
.plano-curso .pc-ico { width: 48px; height: 48px; min-width: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; }
.plano-curso .pc-info b { display: block; font-size: 15.5px; margin-bottom: 2px; }
.plano-curso .pc-info span { font-size: 13px; color: var(--text-soft); max-width: 620px; display: block; }
.plano-curso .pc-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* Botão global "Voltar" (barra superior) */
.btn-voltar { align-items: center; gap: 5px; font-size: 13px; font-weight: 700; padding: 7px 13px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--brand-dark); cursor: pointer; transition: all .15s; white-space: nowrap; }
.btn-voltar:hover { border-color: var(--brand); background: #fff7f2; transform: translateX(-2px); }

/* seções Em andamento / Encerrados */
.section-title.sec-ativo, .section-title.sec-enc { display: flex; align-items: center; gap: 8px; }
.section-title.sec-ativo { color: #15803d; }
.section-title.sec-enc { color: var(--text-soft); }
.sec-n { font-size: 11.5px; font-weight: 800; padding: 2px 9px; border-radius: 999px; background: rgba(22,163,74,.12); color: #15803d; }
.section-title.sec-enc .sec-n { background: var(--bg); color: var(--text-soft); }

/* pastas (cursos) */
.cron-folder { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 18px; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
.cron-folder-edit { position: absolute; top: 8px; right: 8px; opacity: 0; transition: opacity .15s; }
.cron-folder:hover .cron-folder-edit { opacity: 1; }
.cron-folder-edit:hover { background: #f3eefc; color: var(--brand-dark); }
.cron-folder:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(75,37,130,.14); border-color: #d8cbee; }
.cron-folder-ico { width: 46px; height: 46px; min-width: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; }
.cron-folder-txt h4 { font-size: 15.5px; margin: 0 0 3px; line-height: 1.3; }
.cron-folder-txt p { font-size: 12.5px; color: var(--text-soft); margin: 0; }
.cron-bread { font-size: 12.5px; font-weight: 700; color: var(--text-soft); margin-bottom: 2px; }
.cron-pasta { min-width: 240px; font-size: 14px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.cron-pasta:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(242,106,33,.12); }

.cron-card { cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
.cron-card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(75,37,130,.14); border-color: #d8cbee; }
.cron-card.enc { opacity: .72; }
.cron-card h4 { font-size: 15px; margin: 8px 0 4px; line-height: 1.35; }
.cron-card p { font-size: 13px; color: var(--text-soft); margin: 0; }
.cron-card-top { display: flex; justify-content: space-between; align-items: center; }

.cron-x { border: none; background: transparent; cursor: pointer; font-size: 13px; color: var(--text-soft); padding: 2px 5px; border-radius: 6px; line-height: 1; }
.cron-x:hover { background: #fef2f2; color: #dc2626; }

.cron-titulo { width: 100%; min-width: 420px; max-width: 680px; font-size: 19px; font-weight: 800; color: var(--brand-dark); padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 4px; }
.cron-titulo:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(242,106,33,.12); }
.cron-sel { font-size: 13px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.cron-info { width: 100%; font-size: 14px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; resize: vertical; font-family: inherit; }
.cron-info-list { margin: 0; padding-left: 18px; font-size: 14px; color: var(--text-soft); }
.cron-info-list li { margin-bottom: 3px; }
.cron-banner { font-weight: 700; font-size: 13px; color: var(--brand-dark); background: #f6f2fc; border-radius: 8px; padding: 7px 11px; margin-bottom: 10px; }
.cron-wrap { margin-bottom: 16px; }

.cron-tab { width: 100%; border-collapse: collapse; font-size: 13px; }
.cron-tab th { background: #f6f2fc; color: var(--brand-dark); font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; font-weight: 800; padding: 8px 8px; border: 1px solid var(--line); text-align: left; vertical-align: middle; }
.cron-tab td { padding: 6px 8px; border: 1px solid var(--line); vertical-align: top; }
.cron-tab tbody tr:hover td { background: #faf7ff; }
.cron-tab .cron-n { width: 38px; text-align: center; color: var(--text-soft); font-size: 12px; background: #fbfafd; }
.cron-th { display: flex; align-items: center; gap: 4px; }
.cron-h { width: 100%; min-width: 80px; font-size: 11.5px; font-weight: 800; text-transform: uppercase; color: var(--brand-dark); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; }
.cron-c { width: 100%; min-width: 90px; font-size: 13px; padding: 4px 6px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--text); font-family: inherit; }
.cron-c:hover { border-color: var(--line); background: #fff; }
.cron-c:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px rgba(242,106,33,.12); }

/* aula concluída */
.cron-tab .cron-ck { width: 40px; text-align: center; background: #fbfafd; }
.cron-check { width: 17px; height: 17px; cursor: pointer; accent-color: #16a34a; }
.cron-tab tr.feita td { background: #f0fdf4 !important; color: #4b5563; }
.cron-tab tr.feita td:not(.cron-ck):not(.cron-n) { text-decoration: line-through; text-decoration-color: rgba(22,163,74,.45); }
.cron-tab tr.feita .cron-ck { background: #dcfce7 !important; }
.cron-tab tr.feita:hover td { background: #e7fbee !important; }
.cron-tab-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.cron-mini { font-size: 12.5px; font-weight: 700; color: var(--text-soft); }

/* barra de progresso */
.cron-prog { height: 7px; border-radius: 999px; background: var(--bg); overflow: hidden; margin-top: 8px; }
.cron-prog-in { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #22c55e, #16a34a); transition: width .3s; }
.cron-prog-wrap { margin-top: 8px; max-width: 420px; }
.cron-prog-wrap b { display: block; margin-top: 5px; font-size: 12.5px; color: #15803d; }
.doc-btn.ghost { color: var(--text-soft); }
.doc-btn.ghost:hover { color: #dc2626; border-color: #f0c9c9; background: #fef2f2; }

/* Grupos por cidade (Estágio) */
.cidade-group { margin-bottom: 26px; }
.cidade-head { font-size: 14px; font-weight: 800; color: var(--text); margin: 4px 0 14px; padding-bottom: 8px; border-bottom: 2px solid var(--line); display: flex; align-items: center; gap: 10px; }

/* Planilha de controle de estágio */
.est-table th { font-size: 11px; white-space: nowrap; }
.est-table th small { display: block; font-weight: 500; color: var(--text-soft); text-transform: none; letter-spacing: 0; margin-top: 2px; }
.est-table td { padding: 8px 10px; vertical-align: middle; }
.est-nome, .est-obs { width: 150px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; font-family: inherit; }
.est-obs { width: 160px; }
.est-nome:focus, .est-obs:focus, .est-inp:focus, .est-sit:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(242,106,33,.12); }
.est-h { white-space: nowrap; text-align: center; }
.est-h span { color: var(--text-soft); margin: 0 3px; }
.est-inp { width: 46px; padding: 5px 4px; border: 1px solid var(--line); border-radius: 6px; font-size: 12.5px; text-align: center; font-family: inherit; }
.est-total { white-space: nowrap; font-size: 13.5px; }
.est-sit { padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 12.5px; font-weight: 700; background: #fff; font-family: inherit; cursor: pointer; }
.est-del { color: var(--danger); font-size: 15px; padding: 4px 7px; border-radius: 6px; }
.est-del:hover { background: #fef2f2; }
/* Declarações e Atestado (anexos) */
.est-docs { min-width: 180px; max-width: 240px; }
.est-doc-link { display: block; font-size: 12px; color: var(--brand-dark); text-decoration: none; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.est-doc-link:hover { text-decoration: underline; }
.est-doc-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 220px; margin: 0 4px 4px 0; padding: 3px 6px; background: #f1f5f9; border: 1px solid var(--line); border-radius: 7px; font-size: 11.5px; }
.est-doc-chip a { color: var(--brand-dark); text-decoration: none; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.est-doc-chip a:hover { text-decoration: underline; }
.est-doc-x { color: var(--danger); font-weight: 700; font-size: 12px; line-height: 1; padding: 1px 3px; border-radius: 5px; cursor: pointer; }
.est-doc-x:hover { background: #fef2f2; }
.est-doc-add { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--brand-dark); background: #fff; border: 1px dashed var(--brand); border-radius: 7px; padding: 4px 9px; cursor: pointer; }
.est-doc-add:hover { background: #fff7ed; }

/* ============================================================
   COMUNICADOS — mural de avisos
   ============================================================ */
.com-hero { position: relative; border-radius: 18px; overflow: hidden; margin-bottom: 24px; color: #fff; box-shadow: var(--shadow); }
.com-hero-bg { position: absolute; inset: 0; background: linear-gradient(120deg, #241147 0%, #6D28D9 50%, #F26A21 118%); }
.com-hero-bg::after { content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 86% 16%, rgba(255,255,255,.18), transparent 44%),
    radial-gradient(circle at 10% 96%, rgba(255,255,255,.10), transparent 42%); }
.com-hero-in { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 30px 34px; }
.com-hero-sub { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; opacity: .82; }
.com-hero-txt h1 { font-size: 30px; margin: 5px 0 6px; letter-spacing: -.5px; }
.com-hero-txt p { font-size: 15px; opacity: .93; }
.com-novo { background: #fff; color: var(--brand-dark); font-weight: 800; font-size: 14px; padding: 12px 20px; border-radius: 12px; box-shadow: 0 8px 20px rgba(20,8,40,.28); transition: transform .12s ease, box-shadow .12s ease; }
.com-novo:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(20,8,40,.36); }

.com-mural { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; align-items: start; }
.com-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px 20px 15px; box-shadow: var(--shadow); overflow: hidden; transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease; }
.com-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--cat, #6D28D9); }
.com-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(16,24,40,.13); }
.com-card.fixado { background: linear-gradient(180deg, color-mix(in srgb, var(--cat) 7%, #fff), #fff 62%); border-color: color-mix(in srgb, var(--cat) 40%, var(--line)); }
.com-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.com-pin { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 800; color: var(--cat, #6D28D9); background: color-mix(in srgb, var(--cat) 13%, #fff); border: 1px solid color-mix(in srgb, var(--cat) 30%, #fff); padding: 3px 9px; border-radius: 999px; }
.com-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 12px; min-height: 26px; }
.com-cat { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--cat, #6D28D9); background: color-mix(in srgb, var(--cat) 12%, #fff); padding: 5px 11px; border-radius: 999px; }
.com-acoes { display: flex; gap: 2px; opacity: 0; transition: opacity .14s ease; flex: none; }
.com-card:hover .com-acoes { opacity: 1; }
.com-acoes button { font-size: 14px; padding: 4px 6px; border-radius: 7px; line-height: 1; }
.com-acoes button:hover { background: var(--bg); }
.com-titulo { font-size: 16.5px; font-weight: 800; color: var(--text); letter-spacing: -.2px; margin-bottom: 7px; line-height: 1.32; }
.com-texto { font-size: 13.7px; line-height: 1.62; color: var(--text-soft); margin-bottom: 15px; word-break: break-word; }
.com-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.com-autor { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700; color: var(--text); }
.com-av { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--brand-2), var(--brand)); }
.com-data { font-size: 12px; color: var(--text-soft); white-space: nowrap; }

.com-empty { text-align: center; padding: 54px 20px; background: var(--card); border: 1.5px dashed var(--line); border-radius: 18px; }
.com-empty-ico { font-size: 46px; margin-bottom: 10px; }
.com-empty h3 { font-size: 18px; margin-bottom: 6px; }
.com-empty p { color: var(--text-soft); font-size: 14px; margin-bottom: 16px; }

.com-modal { max-width: 560px; }
.com-lbl { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-soft); margin: 12px 0 5px; }
.com-input { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; font-family: inherit; color: var(--text); background: #fff; }
.com-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(242,106,33,.12); }
.com-textarea { min-height: 130px; resize: vertical; line-height: 1.55; }
.com-row { display: flex; align-items: flex-end; gap: 16px; }
.com-check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; padding-bottom: 11px; cursor: pointer; }

/* ============================================================
   USUÁRIOS E ACESSOS
   ============================================================ */
.usr-mail { font-size: 12px; color: var(--text-soft); font-weight: 500; margin-top: 2px; }
.usr-role { display: inline-flex; align-items: center; font-size: 12px; font-weight: 800; color: var(--rc, #64748b); background: color-mix(in srgb, var(--rc) 12%, #fff); border: 1px solid color-mix(in srgb, var(--rc) 30%, #fff); padding: 4px 10px; border-radius: 999px; }
.usr-acao { font-size: 15px; padding: 5px 7px; border-radius: 7px; }
.usr-acao:hover { background: var(--bg); }
.usr-modal { max-width: 640px; max-height: 90vh; overflow-y: auto; }
.usr-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.usr-sec { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; background: #fbfcfe; }
.usr-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; font-size: 13.5px; }
.usr-todos { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--brand-dark); cursor: pointer; }
.usr-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 14px; }
.usr-chk { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text); cursor: pointer; padding: 3px 0; }
.usr-chk input { flex: none; }
.usr-nota { font-size: 11.5px; color: var(--text-soft); margin-top: 9px; }
@media (max-width: 560px) { .usr-grid2 { grid-template-columns: 1fr; } }
.perf-lista { display: flex; flex-wrap: wrap; gap: 8px; }
.perf-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; color: var(--rc, #64748b); background: color-mix(in srgb, var(--rc) 12%, #fff); border: 1px solid color-mix(in srgb, var(--rc) 30%, #fff); padding: 5px 11px; border-radius: 999px; }
.perf-x { color: var(--danger); font-weight: 800; font-size: 12px; line-height: 1; padding: 0 2px; border-radius: 5px; cursor: pointer; }
.perf-x:hover { background: #fef2f2; }
.perf-lock { font-size: 10px; opacity: .6; }
.perf-form { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.perf-form .com-input { flex: 1; }
.perf-cor { width: 44px; height: 40px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; flex: none; }

/* ============================================================
   ATOS LEGAIS
   ============================================================ */
.atl-info { font-size: 12.5px; color: var(--text-soft); margin-bottom: 16px; background: #fbf7ff; border: 1px solid #eee1fb; border-radius: 10px; padding: 10px 14px; }
.atl-table td { vertical-align: middle; }
.atl-atos { font-size: 11.5px; color: var(--text-soft); margin-top: 5px; }
.atl-ato-linha { line-height: 1.5; }
.atl-ato-linha + .atl-ato-linha { margin-top: 1px; }
.atl-chip { display: inline-block; font-size: 12px; font-weight: 800; color: var(--c, #64748b); background: color-mix(in srgb, var(--c) 13%, #fff); border: 1px solid color-mix(in srgb, var(--c) 30%, #fff); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.atl-chip.atl-crit  { --c: #dc2626; }
.atl-chip.atl-alto  { --c: #ea580c; }
.atl-chip.atl-medio { --c: #d97706; }
.atl-chip.atl-baixo { --c: #6d28d9; }
.atl-chip.atl-ok    { --c: #16a34a; }
.atl-st { display: inline-block; font-size: 12px; font-weight: 800; color: var(--c, #64748b); }

/* Lembretes dentro dos Comunicados */
.atl-lembretes { margin-bottom: 22px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow); }
.atl-lem-h { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 800; color: var(--text); margin-bottom: 12px; }
.atl-lem-count { font-size: 12px; font-weight: 800; color: #fff; background: #dc2626; border-radius: 999px; padding: 1px 9px; }
.atl-lem { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); border-left: 5px solid var(--lc, #6d28d9); background: var(--lb, #faf9ff); margin-bottom: 9px; }
.atl-lem.atl-crit  { --lc: #dc2626; --lb: #fef2f2; }
.atl-lem.atl-alto  { --lc: #ea580c; --lb: #fff7ed; }
.atl-lem.atl-medio { --lc: #d97706; --lb: #fffbeb; }
.atl-lem.atl-baixo { --lc: #6d28d9; --lb: #faf5ff; }
.atl-lem.atl-ok    { --lc: #16a34a; --lb: #f0fdf4; }
.atl-lem-ic { font-size: 22px; flex: none; }
.atl-lem-tx { flex: 1; min-width: 0; }
.atl-lem-tx b { font-size: 14.5px; color: var(--text); }
.atl-lem-un { font-weight: 600; color: var(--text-soft); font-size: 12.5px; }
.atl-lem-sub { font-size: 12.8px; color: var(--text-soft); margin-top: 3px; }
.atl-lem-mk { color: var(--lc, #6d28d9); font-weight: 700; }
.atl-lido { flex: none; font-size: 13px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #16a34a, #15803d); padding: 8px 14px; border-radius: 9px; box-shadow: 0 4px 12px rgba(22,163,74,.28); }
.atl-lido:hover { filter: brightness(1.06); }
.atl-lem-ft { font-size: 11.5px; color: var(--text-soft); margin-top: 6px; }
.atl-lem-tag { display: inline-block; font-size: 10.5px; font-weight: 800; color: var(--lc, #6d28d9); background: color-mix(in srgb, var(--lc) 14%, #fff); border-radius: 999px; padding: 1px 8px; margin-left: 6px; vertical-align: middle; }
.atl-prazo-sub { font-size: 11px; color: var(--text-soft); margin-top: 3px; white-space: nowrap; }
/* modal: seção e lista de atos */
.atl-sec { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fbfcfe; }
.atl-grp { border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; margin-bottom: 9px; background: #fff; }
.atl-grp-h { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.atl-grp-rot { flex: 1; font-weight: 700; }
.atl-grp-val { flex: 0 0 150px; }
.atl-grp-refs { width: 100%; min-height: 56px; resize: vertical; line-height: 1.5; font-size: 13px; }
.atl-ultturma { font-size: 11.5px; color: var(--brand-dark); font-weight: 600; margin-top: 5px; }
.atl-turma { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.atl-turma .atl-tm-nome { flex: 1; }
.atl-turma .atl-tm-turno { flex: 0 0 110px; }
.atl-turma .atl-tm-ini, .atl-turma .atl-tm-fim { flex: 0 0 145px; }
@media (max-width: 560px) { .atl-turma { flex-wrap: wrap; } .atl-turma .atl-tm-nome, .atl-turma .atl-tm-turno, .atl-turma .atl-tm-ini, .atl-turma .atl-tm-fim { flex: 1 1 45%; } }
.atl-ato-x { flex: none; color: var(--danger); font-weight: 800; font-size: 13px; width: 30px; height: 30px; border-radius: 8px; }
.atl-ato-x:hover { background: #fef2f2; }
@media (max-width: 560px) { .atl-lem { flex-wrap: wrap; } .atl-grp-h { flex-wrap: wrap; } .atl-grp-val { flex: 1 1 100%; } }
.btn-add { font-size: 13px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); padding: 8px 14px; border-radius: 8px; }
.btn-add:hover { filter: brightness(1.05); }
.btn-ghost-add { font-size: 13px; font-weight: 700; color: var(--brand-dark); background: #fff; border: 1px solid var(--line); padding: 8px 14px; border-radius: 8px; }
.btn-ghost-add:hover { border-color: var(--brand); background: #fff7f2; }

/* Modal (cadastro em massa) */
.modal-ov { position: fixed; inset: 0; background: rgba(15,20,30,.5); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 480px; box-shadow: 0 20px 60px rgba(0,0,0,.3); overflow: hidden; }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-h h3 { font-size: 16px; }
.modal-x { font-size: 15px; color: var(--text-soft); width: 30px; height: 30px; border-radius: 7px; }
.modal-x:hover { background: var(--bg); }
.modal-sub { padding: 14px 20px 0; color: var(--text-soft); font-size: 13.5px; }
.massa-txt { display: block; width: calc(100% - 40px); margin: 12px 20px; min-height: 170px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; font-family: inherit; font-size: 14px; resize: vertical; }
.massa-txt:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(242,106,33,.12); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 12px 20px 18px; }

/* Cores por situação (linha inteira) */
.est-table tr.sit-aprov  td { background: #ecfdf5; }
.est-table tr.sit-reprov td { background: #fef2f2; }
.est-table tr.sit-campo  td { background: #fefce8; }
.est-table tr.sit-pend   td { background: #fff7ed; }
.est-table tr.sit-aprov  td:first-child { box-shadow: inset 4px 0 0 #16a34a; }
.est-table tr.sit-reprov td:first-child { box-shadow: inset 4px 0 0 #dc2626; }
.est-table tr.sit-campo  td:first-child { box-shadow: inset 4px 0 0 #ca8a04; }
.est-table tr.sit-pend   td:first-child { box-shadow: inset 4px 0 0 #f59e0b; }
.est-table tr.sit-desist { opacity: .45; }
.est-table tr.sit-desist td:first-child { box-shadow: inset 4px 0 0 #94a3b8; }
select.est-sit.sit-aprov  { color: #16a34a; border-color: #16a34a; }
select.est-sit.sit-reprov { color: #dc2626; border-color: #dc2626; }
select.est-sit.sit-campo  { color: #ca8a04; border-color: #ca8a04; }
select.est-sit.sit-pend   { color: #d97706; border-color: #f59e0b; }
select.est-sit.sit-desist { color: #64748b; border-color: #94a3b8; }
.badge-sit { display: inline-block; padding: 5px 11px; border-radius: 999px; font-weight: 700; font-size: 12px; }
.badge-sit.sit-aprov  { background: #dcfce7; color: #15803d; }
.badge-sit.sit-reprov { background: #fee2e2; color: #b91c1c; }
.badge-sit.sit-campo  { background: #fef9c3; color: #a16207; }
.badge-sit.sit-pend   { background: #ffedd5; color: #c2410c; }
.badge-sit.sit-desist { background: #e2e8f0; color: #475569; }

.folder-card { cursor: pointer; overflow: hidden; padding: 0; transition: transform .12s, box-shadow .12s, border-color .12s; }
.folder-card:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: 0 10px 26px rgba(16,24,40,.1); }
.course-cover { aspect-ratio: 2 / 1; background-size: cover; background-position: center; background-repeat: no-repeat; display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.course-body { padding: 16px 18px; }
.course-body-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.course-body h4 { font-size: 16px; }
.course-body p { color: var(--text-soft); font-size: 13.5px; }

/* ============================================================
   CRIAÇÃO DE HORÁRIOS
   ============================================================ */
.btn { font-size: 13px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #8b5cf6, #6d28d9); padding: 9px 15px; border-radius: 9px; border: none; cursor: pointer; transition: filter .15s, transform .05s; }
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn-ghost2 { font-size: 13px; font-weight: 700; color: #5b21b6; background: #fff; border: 1px solid var(--line); padding: 8px 13px; border-radius: 9px; cursor: pointer; transition: all .15s; }
.btn-ghost2:hover { border-color: #8b5cf6; background: #f5f3ff; }
.btn-xs { font-size: 12px; padding: 5px 10px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; background: #ede9fe; color: #5b21b6; padding: 2px 8px; border-radius: 999px; }
.chip-pref { background: #fff7ed; color: #9a3412; }
.chip a { cursor: pointer; font-weight: 900; opacity: .6; }
.chip a:hover { opacity: 1; }

.hor-dot { display: inline-block; width: 15px; height: 15px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); vertical-align: middle; }
.hor-inp { font: inherit; font-size: 13.5px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); width: 100%; }
.hor-inp:focus { outline: none; border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139,92,246,.15); }
.hor-inp-sm { padding: 5px 8px; font-size: 13px; }
.hor-num { width: 62px; text-align: center; }
.hor-x { border: none; background: #fef2f2; color: #dc2626; width: 30px; height: 30px; border-radius: 7px; cursor: pointer; font-weight: 800; }
.hor-x:hover { background: #fee2e2; }

/* professores */
.hor-profrow { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.hor-profmain { display: flex; align-items: center; gap: 10px; }
.hor-profmain input[type=color] { width: 40px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; padding: 2px; }
.hor-dispwrap { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.hor-dispturnos { display: flex; gap: 16px; flex-wrap: wrap; }
.hor-dispturno { display: flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 8px; padding: 5px 10px; }
.hor-dispturno b { color: #6d28d9; }
.hor-dispchk { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--text-soft); cursor: pointer; }
.hor-dispchk input { accent-color: #8b5cf6; }

/* config turma */
.hor-cfg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.hor-cfg-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: #40495a; }
.hor-online { display: flex; gap: 10px; padding-top: 5px; flex-wrap: wrap; }

/* tabela disciplinas */
.hor-disc { width: 100%; border-collapse: collapse; font-size: 13px; }
.hor-disc th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .3px; color: var(--text-soft); padding: 6px 8px; border-bottom: 2px solid var(--line); }
.hor-disc td { padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }

/* grade */
.hor-grade { border-collapse: collapse; width: 100%; min-width: 860px; table-layout: fixed; }
.hor-grade th, .hor-grade td { border: 1px solid #d7d3e0; overflow: hidden; }
/* nome da disciplina: texto que quebra p/ baixo; select transparente por cima p/ editar */
.hg-disccell { position: relative; min-height: 18px; }
.hg-discname { display: block; font-size: 11px; font-weight: 600; line-height: 1.15; white-space: normal; word-break: break-word; padding: 2px 3px; color: inherit; }
.hg-selover { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; border: none; }
.hg-corner { width: 96px; background: #a6a6a6; }
.hg-day { background: #d9d9d9; color: #1f2733; font-size: 12px; padding: 8px 6px; text-align: center; font-weight: 800; }
.hg-on { display: inline-block; background: #6d28d9; color: #fff; font-size: 9px; padding: 1px 5px; border-radius: 6px; vertical-align: middle; }
.hg-time { background: #d9d9d9; font-size: 11px; font-weight: 800; color: #1f2733; text-align: center; padding: 4px; line-height: 1.15; }
.hg-time span { display: block; font-weight: 600; color: #4b5563; }
.hg-cell { padding: 3px; vertical-align: top; height: 62px; }
.hg-cellwrap { display: flex; flex-direction: column; gap: 2px; position: relative; }
/* aviso de choque / sem professor: ⚠ amarelo grande e centralizado */
.hg-warn { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 42px; line-height: 1; color: #dc2626; opacity: 1; pointer-events: none; z-index: 3;
  text-shadow: 0 0 3px #fff, 0 0 6px #fff, 0 0 2px #fff, 0 1px 2px rgba(0,0,0,.45); }
.hg-cell .hor-celldisc, .hg-cell .hg-cellfoot { position: relative; z-index: 1; }
/* marcador de casal (revezar) no canto da célula */
.hg-casal { position: absolute; top: 1px; right: 2px; font-size: 14px; line-height: 1; z-index: 4; pointer-events: none;
  filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff); }
.hg-risc .hg-discname, .hg-risc .hg-prof { text-decoration: line-through; opacity: .6; }
.hor-celldisc { font-size: 11.5px; border: none; background: rgba(255,255,255,.55); border-radius: 5px; padding: 3px; width: 100%; color: #1f2733; font-weight: 600; cursor: pointer; }
.hor-celldisc:focus { outline: 1px solid #8b5cf6; }
.hg-cellfoot { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.hg-prof { font-size: 10.5px; font-weight: 700; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hg-noprof { font-style: italic; opacity: .6; }
.hg-icons { display: flex; gap: 3px; }
.hg-icons a { cursor: pointer; font-size: 11px; opacity: .75; }
.hg-icons a:hover { opacity: 1; }
.hor-cellprof { display: none; font-size: 11px; border: 1px solid var(--line); border-radius: 5px; padding: 2px; margin-top: 2px; width: 100%; }
.hor-cellprof.show { display: block; }
.hg-lock { outline: 2px solid #6d28d9; outline-offset: -2px; }
.hg-interval td { background: #d9d9d9; text-align: center; font-size: 11px; font-weight: 700; color: #4b5563; padding: 4px; }

/* histórico */
.hor-hist { list-style: none; font-size: 13px; max-height: 260px; overflow-y: auto; }
.hor-hist li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.hor-hist-t { color: #6d28d9; font-weight: 700; font-size: 12px; margin-right: 6px; }
.hor-hist-x { float: right; color: #dc2626; cursor: pointer; font-weight: 800; opacity: .55; margin-left: 8px; }
.hor-hist-x:hover { opacity: 1; }

/* choques + sugestões */
.hor-choques { list-style: none; font-size: 13px; margin-top: 8px; }
.hor-choques > li { padding: 9px 0; border-bottom: 1px dashed var(--line); }
.hor-sug { margin: 6px 0 2px 22px; font-size: 12.5px; color: var(--text-soft); }
.hor-sug ul { list-style: none; margin-top: 3px; }
.hor-sug li { padding: 1px 0; }
.hor-sug a { color: #6d28d9; cursor: pointer; font-weight: 600; }
.hor-sug a:hover { text-decoration: underline; }

/* toast */
.hor-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: #1f2733; color: #fff; padding: 11px 20px; border-radius: 10px; font-size: 13.5px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.25); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 9999; }
.hor-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.hor-cfg-grid { }
@media (max-width: 900px) { .hor-cfg-grid { grid-template-columns: 1fr; } }

.hor-dispcell { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; }
.hor-dispcell small { font-size: 10px; color: var(--text-soft); }
.hor-dispinp { width: 38px; text-align: center; font-size: 12px; font-weight: 600; padding: 3px 2px; border: 1px solid var(--line); border-radius: 6px; }
.hor-dispinp:focus { outline: none; border-color: #8b5cf6; box-shadow: 0 0 0 2px rgba(139,92,246,.2); }
.hor-dispturno { align-items: flex-start !important; }

.hg-drag { cursor: grab; }
.hg-drag:active { cursor: grabbing; }
.hg-cellfoot.hg-drag { cursor: move; border-radius: 4px; }
.hg-cellfoot.hg-drag:hover { background: rgba(255,255,255,.35); }
.hg-cell.dragover { outline: 3px dashed #6d28d9; outline-offset: -3px; }

@media print {
  .sidebar, .topbar, .hor-cfg, .card-h button, .btn, .btn-ghost2, .hg-icons, .hor-cellprof { display: none !important; }
  .hor-grade { min-width: 0; }
}
