:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --text: #122033;
  --muted: #627086;
  --primary: #1b57a3;
  --primary-dark: #0d1b3f;
  --border: #d8e3f2;
  --success: #dff4e6;
  --success-text: #17653a;
  --error: #fde5e5;
  --error-text: #8d2020;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 270px;
  background: linear-gradient(180deg, var(--primary-dark), var(--primary));
  color: white;
  padding: 24px;
}
.brand { display: flex; gap: 14px; align-items: center; margin-bottom: 28px; }
.brand-centered { justify-content: center; margin-bottom: 20px; }
.brand-badge {
  width: 48px; height: 48px; border-radius: 14px; background: white;
  color: var(--primary); font-weight: 800; display: grid; place-items: center;
}
.brand h1 { margin: 0; font-size: 24px; }
.brand p { margin: 2px 0 0; opacity: .8; font-size: 13px; }
.side-nav { display: grid; gap: 8px; }
.side-nav a {
  padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.06);
}
.side-nav a:hover { background: rgba(255,255,255,.16); }
.content-area { flex: 1; padding: 26px; }
.content-full { display: flex; align-items: center; justify-content: center; }
.topbar {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 18px; padding: 18px 20px;
}
.topbar span, .topbar-meta { color: var(--muted); font-size: 14px; display: flex; gap: 14px; }
.flash-wrap { display: grid; gap: 10px; margin-bottom: 18px; }
.flash { border-radius: 14px; padding: 14px 16px; font-size: 14px; }
.flash.success { background: var(--success); color: var(--success-text); }
.flash.error { background: var(--error); color: var(--error-text); }
.page-header {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 20px;
  margin-bottom: 20px;
}
.page-header h2 { margin: 0 0 6px; font-size: 28px; }
.page-header p { margin: 0; color: var(--muted); }
.cards-grid, .panel-grid { display: grid; gap: 18px; }
.cards-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.panel-grid.two-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel-grid.three-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.module-card, .panel, .login-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 22px; padding: 22px;
  box-shadow: 0 10px 24px rgba(13, 27, 63, 0.05);
}
.module-icon { font-size: 34px; margin-bottom: 12px; }
.module-card h3, .panel h3 { margin-top: 0; }
.module-card p, .panel p, li { color: var(--muted); line-height: 1.45; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 12px; padding: 10px 14px; border: none; cursor: pointer; font-weight: 700;
}
.btn-primary { background: var(--primary); color: white; }
.btn-secondary { background: #e8f0fb; color: var(--primary); }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-danger { background: #b42318; color: white; }
.form-grid { display: grid; gap: 14px; }
.form-grid.compact { gap: 12px; }
label { display: grid; gap: 8px; font-weight: 700; font-size: 14px; }
input, select, textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 14px; font-size: 14px; background: white; color: var(--text);
}
textarea { resize: vertical; }
fieldset {
  border: 1px solid var(--border); border-radius: 14px; padding: 14px;
}
legend { padding: 0 8px; font-weight: 700; }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.checkbox-grid.small { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.check-item, .inline-check {
  display: flex; gap: 10px; align-items: center; font-weight: 500;
}
.check-item input, .inline-check input { width: auto; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--border); padding: 14px 10px; vertical-align: top; text-align: left; }
.login-page { width: 100%; display: flex; justify-content: center; }
.login-card { width: 100%; max-width: 460px; }
.note-box { margin-top: 16px; background: #f2f6fc; border-radius: 14px; padding: 14px; color: var(--muted); }
.simple-list, .question-list, .report-list { display: grid; gap: 14px; }
.simple-list-row, .question-row, .report-card, .question-card {
  border: 1px solid var(--border); border-radius: 16px; padding: 16px; background: #fbfdff;
}
.simple-list-row, .question-row { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.choice-group { display: grid; gap: 10px; margin-top: 10px; }
.choice-option { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.choice-option input { width: auto; }
.comments-box { display: grid; gap: 10px; margin-top: 12px; }
.comment-item { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.publish-form { margin-top: 16px; display: grid; gap: 8px; }
.inline-note { font-size: 13px; color: var(--muted); }
@media (max-width: 1000px) {
  .app-shell { flex-direction: column; }
  .sidebar { width: 100%; }
  .panel-grid.two-cols, .panel-grid.three-cols { grid-template-columns: 1fr; }
  .page-header, .simple-list-row, .question-row, .topbar { flex-direction: column; align-items: stretch; }
}

.block-row { display:block; }
.full-width { width:100%; }
.align-start { align-items:flex-start; }

/* ---------------- ARTICULAÇÃO INTERDISCIPLINAR ---------------- */
.compact-form { align-items: start; }
.large-form { gap: 18px; }
.span-2 { grid-column: span 2; }
.inline-group { display: flex; gap: 12px; flex-wrap: wrap; }
.question-editor {
  border: 1px solid var(--border); border-radius: 18px; padding: 16px; margin-bottom: 16px; background: #fbfdff;
}
.question-editor h4 { margin-top: 0; margin-bottom: 12px; color: var(--primary); }
.question-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.question-grid .span-2 { grid-column: span 2; }
.stack-actions { display: grid; gap: 8px; }
.stats-grid article.panel p { font-size: 28px; font-weight: 800; margin: 8px 0 0; color: var(--primary-dark); }
.report-block { padding: 14px 0; border-bottom: 1px solid var(--border); }
.report-block:last-child { border-bottom: none; }
.report-table { margin-top: 10px; max-width: 420px; }
.report-table th { background: #eef4fb; }
.chart-image { width: 100%; max-width: 920px; border-radius: 16px; border: 1px solid var(--border); }
.muted { color: var(--muted); }
@media (max-width: 1000px) {
  .span-2 { grid-column: span 1; }
  .question-grid { grid-template-columns: 1fr; }
}


.compact-panel-action {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.section-divider {
  margin: 1.25rem 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid #d9e3f2;
}

.section-divider h4 {
  margin: 0;
  color: #163e77;
}

.compact-question {
  margin-bottom: 0.85rem;
}


.report-table-horizontal{width:100%;border-collapse:collapse;margin:.5rem 0 1rem 0;}
.report-table-horizontal th,.report-table-horizontal td{border:1px solid #111;padding:.55rem;text-align:center;}
.report-header-suprema{text-align:center;}
.suprema-report-logo{max-width:320px;width:100%;height:auto;display:block;margin:0 auto 1rem auto;}
.suprema-meta-table{width:100%;border-collapse:collapse;margin:0 auto 1rem auto;}
.suprema-meta-table td{border:1px solid #111;padding:.35rem .55rem;color:#d01010;font-weight:500;text-align:left;}
.inline-edit-form{min-width:340px;}

.report-table-horizontal.dynamic th, .report-table-horizontal.dynamic td { min-width: 120px; text-align:center; }
.three-cols { grid-template-columns: repeat(3, minmax(0,1fr)); }


.full-width-panel { margin-bottom: 18px; }
.articulation-center-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 420px));
  justify-content: center;
  gap: 20px;
  margin-bottom: 18px;
}
.articulation-bottom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 420px));
  justify-content: center;
  gap: 20px;
  margin-bottom: 18px;
}
.articulation-square-card {
  min-height: 190px;
}
.articulation-square-card h3 {
  min-height: 64px;
}
.bottom-card {
  min-height: 170px;
}
.two-col-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 1000px) {
  .articulation-center-grid, .articulation-bottom-grid, .two-col-form {
    grid-template-columns: 1fr;
  }
}


.network-box, .network-panel { background: #f2f6fc; }
.network-grid { display:grid; gap:12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
code { word-break: break-all; }
.questionnaire-form .question-card, .panel form .panel { width: 100%; }
.btn { min-height: 44px; }
@media (max-width: 768px) {
  .content-area { padding: 14px; }
  .login-card, .module-card, .panel { padding: 16px; border-radius: 18px; }
  input, select, textarea, .btn { font-size: 16px; }
  .sidebar { padding: 16px; }
}


/* Avaliação Docente V15 */
.docente-hero { align-items: flex-start; gap: 18px; }
.eyebrow { display:inline-block; font-size:.78rem; font-weight:700; color:#2563eb; letter-spacing:.04em; text-transform:uppercase; margin-bottom:4px; }
.docente-filter-panel { border:1px solid rgba(37,99,235,.12); }
.docente-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items:end; }
.filter-actions { display:flex; gap:10px; align-items:end; flex-wrap:wrap; }
.six-cols { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.docente-stats-grid .stat-panel small { display:block; color:#64748b; margin-top:4px; font-size:.78rem; }
.docente-analytics-grid { align-items: stretch; }
.card-title { display:flex; justify-content:space-between; gap:14px; align-items:flex-start; margin-bottom:12px; }
.card-title h3 { margin:0; }
.card-title p { margin:3px 0 0; color:#64748b; }
.badge-soft { display:inline-flex; align-items:center; border-radius:999px; padding:4px 9px; background:#eff6ff; color:#1d4ed8; font-size:.78rem; font-weight:700; white-space:nowrap; }
.ai-summary { font-size:1rem; line-height:1.6; background:linear-gradient(135deg,#f8fbff,#eef6ff); border:1px solid #dbeafe; border-radius:16px; padding:14px; color:#0f172a; }
.insight-list { margin:8px 0 14px 18px; padding:0; color:#334155; }
.insight-list li { margin:7px 0; }
.keyword-cloud { display:flex; flex-wrap:wrap; gap:8px; }
.keyword-cloud span { padding:6px 10px; border-radius:999px; background:#f1f5f9; color:#334155; font-size:.85rem; }
.keyword-cloud b { color:#1d4ed8; }
.docente-table td:first-child { font-weight:600; }
.docente-question-card { border-left:4px solid #2563eb; }
.progress-line { height:9px; background:#e2e8f0; border-radius:999px; overflow:hidden; margin:10px 0 6px; }
.progress-line span { display:block; height:100%; background:linear-gradient(90deg,#1d4ed8,#38bdf8); border-radius:999px; min-width:2px; }
@media (max-width: 1100px) { .six-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } .docente-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .six-cols, .docente-filters { grid-template-columns: 1fr; } .card-title { flex-direction:column; } }


/* HOTFIX DOCENTE LAYOUT V17 */
.content-area {
  max-width: 100%;
  overflow-x: hidden;
}
.panel,
.panel-grid,
.docente-analytics-grid,
.docente-stats-grid,
.simple-list-row {
  min-width: 0;
}
.docente-stats-grid .stat-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 112px;
  overflow: hidden;
}
.docente-stats-grid .stat-panel .stat-label {
  display: block;
  color: #475569;
  font-size: .88rem;
  line-height: 1.2;
  white-space: normal;
}
.docente-stats-grid .stat-panel strong {
  display: block;
  color: var(--primary-dark);
  font-size: clamp(1.75rem, 2.3vw, 2.45rem);
  line-height: 1;
  letter-spacing: -.04em;
  margin: 2px 0;
}
.docente-stats-grid .stat-panel small {
  display: block;
  color: #64748b;
  margin-top: 2px;
  font-size: .78rem;
  line-height: 1.25;
}
.docente-analytics-grid > .panel {
  overflow: hidden;
  position: relative;
}
.full-chart,
.docente-analytics-grid img.full-chart,
.panel img.full-chart {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  margin: 8px auto 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}
.mini-table,
.docente-table {
  width: 100%;
  table-layout: fixed;
}
.mini-table th,
.mini-table td,
.docente-table th,
.docente-table td {
  overflow-wrap: anywhere;
  word-break: normal;
}
.docente-table th:nth-child(2),
.docente-table td:nth-child(2),
.docente-table th:nth-child(3),
.docente-table td:nth-child(3) {
  width: 86px;
}
.insight-panel {
  overflow-wrap: anywhere;
}
@media (max-width: 1280px) {
  .six-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 980px) {
  .panel-grid.two-cols,
  .docente-analytics-grid {
    grid-template-columns: 1fr;
  }
  .full-chart,
  .docente-analytics-grid img.full-chart,
  .panel img.full-chart {
    max-height: 360px;
  }
}
@media (max-width: 720px) {
  .six-cols,
  .docente-filters {
    grid-template-columns: 1fr;
  }
  .docente-stats-grid .stat-panel {
    min-height: 96px;
  }
}


/* HOTFIX DOCENTE LAYOUT V18 */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}
.content-area, main, .dashboard-content {
  max-width: 100%;
  overflow-x: hidden !important;
}
.panel-grid,
.docente-analytics-grid,
.docente-stats-grid {
  min-width: 0 !important;
  width: 100%;
}
.docente-analytics-grid {
  align-items: start;
}
.docente-analytics-grid > .panel,
.panel.docente-card,
.panel.insight-panel {
  min-width: 0 !important;
  overflow: hidden !important;
}
.docente-chart-wrap {
  width: 100% !important;
  max-width: 100% !important;
  height: 300px !important;
  max-height: 300px !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #ffffff !important;
  border: 1px solid var(--border, #d8e3f2) !important;
  border-radius: 18px !important;
  margin: 12px 0 18px !important;
  padding: 10px !important;
  box-sizing: border-box !important;
}
.docente-chart-img,
img.docente-chart-img,
img.full-chart,
.panel img.full-chart,
.docente-analytics-grid img.full-chart {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  max-height: 280px !important;
  object-fit: contain !important;
  object-position: center center !important;
  margin: 0 auto !important;
  border: 0 !important;
  background: transparent !important;
}
.docente-stats-grid .stat-panel {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 6px !important;
  min-height: 112px !important;
  overflow: hidden !important;
}
.docente-stats-grid .stat-panel .stat-label,
.docente-stats-grid .stat-panel small,
.docente-stats-grid .stat-panel strong {
  display: block !important;
  line-height: 1.15 !important;
  white-space: normal !important;
}
.docente-stats-grid .stat-panel strong {
  font-size: clamp(1.85rem, 2.2vw, 2.6rem) !important;
  letter-spacing: -.04em !important;
}
.mini-table, .docente-table {
  width: 100% !important;
  table-layout: fixed !important;
}
.mini-table th, .mini-table td, .docente-table th, .docente-table td {
  overflow-wrap: anywhere !important;
}
@media (max-width: 1180px) {
  .panel-grid.two-cols,
  .docente-analytics-grid {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 760px) {
  .docente-chart-wrap {
    height: 240px !important;
    max-height: 240px !important;
  }
  .docente-chart-img,
  img.docente-chart-img,
  img.full-chart {
    max-height: 220px !important;
  }
}

/* institucional-v20 */
.institucional-hero,
.institucional-filter-panel,
.institucional-analytics-grid,
.institucional-stats-grid { max-width: 100%; }
.institucional-stats-grid .stat-card strong { display: block; margin: 6px 0 2px; }
.chart-frame { width: 100%; max-width: 100%; overflow: hidden; border-radius: 16px; background: #fff; }
.chart-frame img,
.responsive-chart { display: block !important; width: 100% !important; max-width: 100% !important; height: auto !important; object-fit: contain !important; }
.star-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 12px; margin-top: 14px; }
.star-summary div { border: 1px solid #dbe7f7; border-radius: 14px; padding: 12px; background: #f8fbff; }
.star-summary strong { display: block; font-size: 1.5rem; }
.comment-list { display: grid; gap: 12px; }
.comment-list blockquote { margin: 0; padding: 14px 16px; border-left: 4px solid #0bbfa6; background: #f8fbff; border-radius: 12px; color: #304765; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list span { border: 1px solid #cfe0f5; border-radius: 999px; padding: 6px 10px; background: #f4f8ff; }
.tag-list small { opacity: .7; }
.status-pill.danger { color: #8a1f1f; background: #ffecec; border-color: #ffd0d0; }
@media (max-width: 900px) {
  .institucional-analytics-grid,
  .institucional-stats-grid { grid-template-columns: 1fr !important; }
  .institucional-filters { grid-template-columns: 1fr !important; }
}
/* Vectra V25 - Relatórios Premium */
.report-premium-note,
.pdf-premium-note {
  border: 1px solid rgba(0, 191, 166, .22);
  background: linear-gradient(135deg, rgba(0, 191, 166, .08), rgba(13, 27, 42, .035));
  border-radius: 18px;
  padding: 16px 18px;
  color: #0d1b2a;
  margin: 12px 0 18px;
}
.report-premium-note strong,
.pdf-premium-note strong { color: #075f57; }
@media print { .no-print { display: none !important; } }
