/* ==========================================================================
   CULTURA TRINACIONAL — Portal Institucional (/instituicao)
   Área separada do site público: login, painel de eventos, envio.
   ========================================================================== */

.inst-shell {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  flex-direction: column;
}

.inst-hero {
  padding: 28px 0 20px;
  background: radial-gradient(circle at 20% 0%, rgba(34,211,238,0.18), transparent 55%);
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
}
.inst-hero h1 { font-size: clamp(22px, 5.5vw, 30px); font-weight: 800; margin-bottom: 6px; }
.inst-hero p { color: var(--text-secondary); font-size: 14.5px; max-width: 520px; margin: 0 auto; }

.inst-card {
  max-width: 440px;
  margin: 28px auto;
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  width: calc(100% - 40px);
}

.inst-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 4px;
}
.inst-tabs button {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 14px;
  color: var(--text-secondary);
}
.inst-tabs button[aria-selected="true"] {
  background: var(--brand-gradient);
  color: #04121c;
}

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-secondary);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 14.5px;
  font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--border-glow);
  box-shadow: 0 0 0 3px rgba(34,211,238,0.12);
}
.field .hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.field.error input, .field.error select { border-color: #ef4444; }
.field .error-msg { font-size: 12px; color: #f87171; margin-top: 5px; display: none; }
.field.error .error-msg { display: block; }

.form-alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 16px;
  display: none;
}
.form-alert.show { display: block; }
.form-alert.error { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.4); color: #fca5a5; }
.form-alert.success { background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.4); color: #86efac; }

.btn-block { width: 100%; justify-content: center; }

.inst-note {
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 18px;
  line-height: 1.6;
}
.inst-note a { color: var(--brand-cyan); font-weight: 700; }

/* ==========================================================================
   Painel (dashboard)
   ========================================================================== */

.inst-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}
.inst-topbar h1 { font-size: 20px; font-weight: 800; }
.inst-topbar .user-email { font-size: 12.5px; color: var(--text-muted); }

.inst-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}
.inst-stat {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  text-align: center;
}
.inst-stat .num { font-size: 24px; font-weight: 800; color: var(--brand-cyan); }
.inst-stat .label { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.submission-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }

.submission-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}
.submission-card .title { font-weight: 700; font-size: 14.5px; margin-bottom: 4px; }
.submission-card .sub { font-size: 12.5px; color: var(--text-muted); }

.status-pill {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}
.status-pill[data-status="draft"] { background: rgba(148,163,184,0.18); color: #cbd5e1; }
.status-pill[data-status="documents_pending"],
.status-pill[data-status="signature_pending"] { background: rgba(250,204,21,0.16); color: #facc15; }
.status-pill[data-status="submitted"],
.status-pill[data-status="under_review"] { background: rgba(37,99,235,0.18); color: #60a5fa; }
.status-pill[data-status="changes_requested"] { background: rgba(249,115,22,0.18); color: #fb923c; }
.status-pill[data-status="approved"],
.status-pill[data-status="published"] { background: rgba(34,197,94,0.18); color: #4ade80; }
.status-pill[data-status="rejected"],
.status-pill[data-status="suspended"] { background: rgba(239,68,68,0.18); color: #f87171; }

/* ==========================================================================
   Formulário de novo evento — steps
   ========================================================================== */

.form-steps {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
}
.form-steps .step {
  flex: 1;
  height: 4px;
  border-radius: var(--radius-pill);
  background: var(--bg-card-hover);
}
.form-steps .step.active { background: var(--brand-gradient); }

.form-section-title {
  font-size: 16px;
  font-weight: 800;
  margin: 22px 0 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}
.form-section-title:first-child { border-top: none; padding-top: 0; margin-top: 0; }

.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; }

.upload-slot {
  border: 1.5px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}
.upload-slot:hover { border-color: var(--border-glow); }
.upload-slot.filled { border-style: solid; border-color: #22c55e; background: rgba(34,197,94,0.06); }
.upload-slot .label { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.upload-slot .status { font-size: 12px; color: var(--text-muted); }
.upload-slot input[type="file"] { display: none; }

.checklist { list-style: none; padding: 0; margin: 16px 0; }
.checklist li {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--text-secondary);
  padding: 6px 0;
}
.checklist li.done { color: #4ade80; }
.checklist li .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-muted); flex: none;
}
.checklist li.done .dot { background: #4ade80; }

.signature-box {
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  margin: 14px 0;
}
.signature-box p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 12px; }
.signature-box label { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; cursor: pointer; }
.signature-box input[type="checkbox"] { margin-top: 3px; }

.btn:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
