.sespg-login-wrap,
.sespg-shell,
.sespg-public,
.sespg-login-card {
  --sespg-blue: #1458a8;
  --sespg-blue-dark: #0c356a;
  --sespg-green: #0f766e;
  --sespg-teal: #005a52;
  --sespg-ink: #172033;
  --sespg-muted: #64748b;
  --sespg-line: #dbe3ee;
  --sespg-bg: #f5f7fb;
  --sespg-card: #ffffff;
  --sespg-danger: #c2410c;
  --sespg-ok: #15803d;
  --sespg-warn: #b45309;
  color: var(--sespg-ink);
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  letter-spacing: 0;
}

.sespg-shell *,
.sespg-public *,
.sespg-login-card * {
  box-sizing: border-box;
}

.sespg-shell {
  min-height: 100vh;
  margin: -16px;
  background: var(--sespg-bg);
}

.sespg-modal-lock {
  overflow: hidden !important;
}

.sespg-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  background: linear-gradient(90deg, var(--sespg-blue-dark), var(--sespg-teal));
  color: #fff;
  box-shadow: 0 12px 32px rgba(12, 53, 106, .22);
}

.sespg-brand,
.sespg-top-actions,
.sespg-body,
.sespg-row-actions,
.sespg-card-head,
.sespg-public-event,
.sespg-user-row {
  display: flex;
  align-items: center;
}

.sespg-brand {
  gap: 12px;
  min-width: 0;
}

.sespg-brand strong {
  display: block;
  font-size: 16px;
  line-height: 1.1;
}

.sespg-brand span {
  display: block;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  margin-top: 2px;
}

.sespg-crest,
.sespg-brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid rgba(255,255,255,.75);
  border-radius: 8px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-weight: 900;
  font-size: 14px;
}

.sespg-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  font-size: 13px;
  white-space: nowrap;
}

.sespg-user-chip {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-weight: 850;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sespg-menu-toggle {
  display: none;
  border: 1px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.1);
  color: #fff;
  border-radius: 8px;
  padding: 9px 12px;
  font-weight: 800;
}

.sespg-body {
  align-items: stretch;
}

.sespg-nav {
  width: 268px;
  flex: 0 0 268px;
  min-height: calc(100vh - 72px);
  background: #071f26;
  color: #d8eef0;
  padding: 18px 12px;
}

.sespg-nav-title {
  padding: 0 12px 12px;
  color: #90c4cc;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 900;
}

.sespg-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #e5f6f7;
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 760;
  font-size: 14px;
  margin-bottom: 4px;
}

.sespg-nav a span {
  width: 32px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.sespg-nav a:hover,
.sespg-nav a.active {
  background: #0f766e;
  color: #fff;
}

.sespg-main {
  width: calc(100% - 268px);
  padding: 22px;
}

.sespg-page-actions,
.sespg-action-strip {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin;
}

.sespg-page-actions {
  min-width: max-content;
}

.sespg-action-strip {
  justify-content: flex-start;
  margin-bottom: 18px;
  padding: 12px;
  border: 1px solid var(--sespg-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(15, 35, 72, .05);
}

.sespg-action-strip form {
  display: flex;
  align-items: stretch;
  flex: 0 0 auto;
  margin: 0;
}

.sespg-page-actions .sespg-btn,
.sespg-action-strip .sespg-btn,
.sespg-action-strip form .sespg-btn {
  flex: 0 0 auto;
  min-height: 42px;
  height: 42px;
  white-space: nowrap;
}

.sespg-hero,
.sespg-page-head,
.sespg-tiradentes-hero,
.sespg-public-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff, #eaf6f4);
  border: 1px solid var(--sespg-line);
  margin-bottom: 18px;
}

.sespg-hero h1,
.sespg-page-head h1,
.sespg-tiradentes-hero h1,
.sespg-public-hero h1 {
  margin: 4px 0 8px;
  color: var(--sespg-blue-dark);
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: 0;
  font-family: inherit !important;
  font-weight: 900;
}

.sespg-hero p,
.sespg-page-head p,
.sespg-tiradentes-hero p,
.sespg-public-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--sespg-muted);
  font-size: 15px;
  line-height: 1.55;
}

.sespg-eyebrow {
  color: var(--sespg-green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.sespg-hero-panel {
  min-width: 180px;
  border: 1px solid var(--sespg-line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  align-self: stretch;
  display: grid;
  align-content: center;
}

.sespg-hero-panel strong,
.sespg-hero-panel span {
  display: block;
}

.sespg-hero-panel span {
  color: var(--sespg-blue);
  font-size: 28px;
  font-weight: 900;
}

.sespg-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.sespg-kpi {
  min-height: 126px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--sespg-line);
  border-radius: 8px;
}

.sespg-kpi span,
.sespg-kpi small {
  display: block;
  color: var(--sespg-muted);
}

.sespg-kpi span {
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.sespg-kpi strong {
  display: block;
  margin: 10px 0 5px;
  color: var(--sespg-blue-dark);
  font-size: 32px;
  line-height: 1;
}

.sespg-two-col,
.sespg-workspace,
.sespg-three-col,
.sespg-report-grid {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.sespg-two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sespg-two-col.compact {
  margin-top: 18px;
}

.sespg-workspace {
  grid-template-columns: minmax(360px, 430px) minmax(0, 1fr);
  align-items: start;
}

.sespg-three-col {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sespg-report-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sespg-card {
  background: #fff;
  border: 1px solid var(--sespg-line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 12px 32px rgba(15, 35, 72, .06);
}

.sespg-card h2,
.sespg-card h3 {
  margin: 0 0 14px;
  color: var(--sespg-blue-dark);
  letter-spacing: 0;
  font-family: inherit !important;
}

.sespg-card h2 {
  font-size: 19px;
}

.sespg-card h3 {
  font-size: 15px;
}

.sespg-card p {
  color: var(--sespg-muted);
  line-height: 1.55;
}

.sespg-card-head {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.sespg-card-head h2 {
  margin: 0;
}

.sespg-card-hint {
  color: var(--sespg-muted);
  font-size: 12px;
  font-weight: 800;
}

.sespg-board-card {
  padding: 18px;
}

.sespg-card-head a {
  color: var(--sespg-blue);
  font-weight: 800;
  text-decoration: none;
  font-size: 13px;
}

.sespg-form {
  display: grid;
  gap: 12px;
}

.sespg-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sespg-form label,
.sespg-field {
  display: grid;
  gap: 6px;
  color: var(--sespg-ink);
  font-size: 13px;
  font-weight: 760;
}

.sespg-form label span,
.sespg-field span {
  color: var(--sespg-muted);
  font-size: 12px;
  font-weight: 850;
}

.sespg-form input,
.sespg-form select,
.sespg-form textarea,
.sespg-public-form input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cfd9e8;
  border-radius: 8px;
  background: #fff;
  color: var(--sespg-ink);
  padding: 9px 11px;
  font: inherit;
}

.sespg-form textarea {
  resize: vertical;
}

.sespg-form input:focus,
.sespg-form select:focus,
.sespg-form textarea:focus,
.sespg-public-form input:focus {
  outline: 2px solid rgba(20, 88, 168, .18);
  border-color: var(--sespg-blue);
}

.sespg-form-section {
  border-top: 1px solid var(--sespg-line);
  padding-top: 14px;
}

.sespg-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.sespg-checkline {
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 0;
}

.sespg-checkline input {
  width: auto;
  min-height: auto;
}

.sespg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border: 1px solid var(--sespg-line);
  border-radius: 8px;
  background: #fff;
  color: var(--sespg-blue-dark);
  padding: 9px 13px;
  text-decoration: none !important;
  font-weight: 850;
  font-size: 13px;
  cursor: pointer;
}

.sespg-btn.primary {
  border-color: var(--sespg-blue);
  background: var(--sespg-blue);
  color: #fff;
}

.sespg-btn.light {
  background: #edf5ff;
  color: var(--sespg-blue-dark);
  border-color: #c9ddf4;
}

.sespg-btn.ghost {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.28);
  color: #fff;
}

.sespg-btn.danger {
  background: #fff3ed;
  border-color: #fed7aa;
  color: var(--sespg-danger);
}

.sespg-btn.tiny {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 12px;
}

.sespg-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.sespg-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.sespg-table th,
.sespg-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--sespg-line);
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

.sespg-table th {
  color: var(--sespg-muted);
  font-size: 11px;
  text-transform: uppercase;
}

.sespg-table strong,
.sespg-table small {
  display: block;
}

.sespg-table small {
  margin-top: 3px;
  color: var(--sespg-muted);
}

.sespg-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 850;
}

.sespg-status.concluido,
.sespg-status.concluida {
  background: #dcfce7;
  color: #166534;
}

.sespg-status.atrasado,
.overdue {
  color: #b91c1c;
}

.sespg-status.aguardando_documento,
.sespg-status.aguardando_setor,
.sespg-status.bloqueada {
  background: #fef3c7;
  color: #92400e;
}

.sespg-status.em_licitacao,
.sespg-status.contratado {
  background: #e0f2fe;
  color: #075985;
}

.sespg-empty {
  padding: 18px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: var(--sespg-muted);
  background: #f8fafc;
}

.sespg-notice {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
  font-weight: 800;
}

.sespg-sector-list,
.sespg-mini-list,
.sespg-event-list,
.sespg-user-list {
  display: grid;
  gap: 10px;
}

.sespg-sector-list article,
.sespg-mini-list article,
.sespg-event-list article,
.sespg-local-grid article {
  border: 1px solid var(--sespg-line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.sespg-sector-list article {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sespg-sector-list article > span {
  width: 12px;
  height: 42px;
  border-radius: 8px;
  flex: 0 0 auto;
}

.sespg-sector-list strong,
.sespg-sector-list small,
.sespg-mini-list strong,
.sespg-mini-list span,
.sespg-event-list strong,
.sespg-event-list span,
.sespg-event-list small,
.sespg-local-grid strong,
.sespg-local-grid span,
.sespg-local-grid small {
  display: block;
}

.sespg-sector-list small,
.sespg-mini-list span,
.sespg-event-list span,
.sespg-event-list small,
.sespg-local-grid span,
.sespg-local-grid small {
  color: var(--sespg-muted);
  font-size: 12px;
  margin-top: 3px;
}

.sespg-sector-list.editable article {
  justify-content: space-between;
}

.sespg-event-list article {
  justify-content: space-between;
  gap: 12px;
}

.sespg-event-list em {
  font-style: normal;
  color: var(--sespg-green);
  font-weight: 850;
}

.sespg-local-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.sespg-kanban {
  display: grid;
  grid-template-columns: repeat(5, minmax(220px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.sespg-kanban section {
  min-width: 220px;
  background: #f8fafc;
  border: 1px solid var(--sespg-line);
  border-radius: 8px;
  padding: 10px;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.sespg-kanban section.drop-target {
  border-color: var(--sespg-green);
  background: #ecfdf5;
  transform: translateY(-2px);
}

.sespg-kanban h3 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--sespg-blue-dark);
}

.sespg-kanban h3 span {
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e2e8f0;
  color: #334155;
}

.sespg-task-card {
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid var(--sespg-line);
  border-left: 5px solid var(--sespg-blue);
  border-radius: 8px;
  background: #fff;
  cursor: grab;
  touch-action: manipulation;
  box-shadow: 0 8px 20px rgba(15, 35, 72, .05);
}

.sespg-task-card.dragging {
  opacity: .58;
  cursor: grabbing;
  transform: rotate(1deg);
}

.sespg-task-card.alta {
  border-left-color: var(--sespg-warn);
}

.sespg-task-card.critica {
  border-left-color: #b91c1c;
}

.sespg-task-card span,
.sespg-task-card small {
  color: var(--sespg-muted);
  font-size: 12px;
}

.sespg-mobile-move {
  display: none;
  gap: 5px;
  font-size: 12px;
}

.sespg-mobile-move span {
  font-weight: 850;
  color: var(--sespg-muted);
}

.sespg-mobile-move select {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--sespg-line);
  border-radius: 8px;
  background: #fff;
  color: var(--sespg-ink);
  padding: 6px 8px;
  font: inherit;
}

.sespg-row-actions {
  gap: 6px;
  flex-wrap: wrap;
}

.sespg-detail {
  margin-top: 18px;
}

.sespg-tiradentes-hero {
  background:
    linear-gradient(135deg, rgba(20,88,168,.92), rgba(0,90,82,.9)),
    linear-gradient(45deg, #1458a8, #0f766e);
  color: #fff;
  align-items: center;
}

.sespg-tiradentes-hero h1,
.sespg-tiradentes-hero p,
.sespg-tiradentes-hero .sespg-eyebrow {
  color: #fff;
}

.sespg-tiradentes-hero p {
  color: rgba(255,255,255,.86);
}

.sespg-progress-ring {
  width: 152px;
  height: 152px;
  border: 8px solid rgba(255,255,255,.24);
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  flex: 0 0 auto;
  background: rgba(255,255,255,.08);
}

.sespg-progress-ring strong,
.sespg-progress-ring span {
  display: block;
}

.sespg-progress-ring strong {
  font-size: 34px;
  line-height: 1;
}

.sespg-progress-ring span {
  max-width: 92px;
  color: rgba(255,255,255,.82);
  font-size: 12px;
  font-weight: 800;
}

.sespg-user-row {
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--sespg-line);
  border-radius: 8px;
  background: #fff;
}

.sespg-user-row > div {
  min-width: 180px;
}

.sespg-user-row strong,
.sespg-user-row span {
  display: block;
}

.sespg-user-row span {
  color: var(--sespg-muted);
  font-size: 12px;
}

.sespg-user-row select {
  width: 180px;
  min-height: 36px;
  border: 1px solid var(--sespg-line);
  border-radius: 8px;
}

.sespg-login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(20, 88, 168, .92), rgba(0, 90, 82, .88)),
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.24), transparent 32%),
    #0c356a;
}

.sespg-login-card {
  max-width: 560px;
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 28px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--sespg-line);
  box-shadow: 0 18px 50px rgba(15, 35, 72, .12);
  text-align: center;
}

.sespg-login-card .sespg-brand-mark {
  margin: 0 auto 14px;
  background: var(--sespg-blue);
}

.sespg-login-card h2 {
  color: var(--sespg-blue-dark);
  margin: 0 0 10px;
}

.sespg-login-card p {
  color: var(--sespg-muted);
  line-height: 1.55;
}

.sespg-login-card form {
  display: grid;
  gap: 12px;
  margin-top: 20px;
  text-align: left;
}

.sespg-login-card form p {
  margin: 0;
}

.sespg-login-card label {
  display: grid;
  gap: 6px;
  color: var(--sespg-blue-dark);
  font-size: 13px;
  font-weight: 850;
}

.sespg-login-card input[type="text"],
.sespg-login-card input[type="password"] {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cfd9e8;
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
}

.sespg-login-card .login-remember label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sespg-login-card input[type="submit"] {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--sespg-blue);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.sespg-chart-card {
  min-height: 290px;
}

.sespg-bar-chart {
  display: grid;
  gap: 13px;
}

.sespg-bar-row {
  display: grid;
  gap: 7px;
}

.sespg-bar-row div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sespg-bar-row strong {
  font-size: 13px;
}

.sespg-bar-row span {
  color: var(--sespg-blue-dark);
  font-weight: 900;
}

.sespg-bar-row em {
  height: 12px;
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: #e8eef7;
}

.sespg-bar-row i {
  height: 100%;
  display: block;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--sespg-blue), var(--sespg-green));
}

.sespg-wide-card {
  min-height: 100%;
}

.sespg-sector-grid,
.sespg-race-list {
  display: grid;
  gap: 10px;
}

.sespg-sector-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sespg-sector-grid article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--sespg-line);
  border-left: 6px solid var(--sector-color, var(--sespg-blue));
  border-radius: 8px;
  background: #fff;
}

.sespg-sector-grid strong,
.sespg-sector-grid small,
.sespg-race-pill strong,
.sespg-race-pill span {
  display: block;
}

.sespg-sector-grid small,
.sespg-race-pill span {
  margin-top: 3px;
  color: var(--sespg-muted);
  font-size: 12px;
}

.sespg-race-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--sespg-line);
  border-radius: 8px;
  background: #fff;
  color: var(--sespg-ink);
  text-decoration: none !important;
}

.sespg-race-pill.active {
  border-color: var(--sespg-green);
  background: #ecfdf5;
}

.sespg-hero.sector {
  border-top: 5px solid var(--sector-color, var(--sespg-blue));
}

.sespg-inline-action {
  margin-top: 12px;
}

.sespg-modal[hidden] {
  display: none !important;
}

.sespg-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 24px;
}

.sespg-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 25, 39, .56);
  backdrop-filter: blur(6px);
}

.sespg-modal-panel {
  position: relative;
  width: min(980px, 100%);
  max-height: min(88vh, 900px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0, 20, 45, .32);
}

.sespg-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--sespg-line);
  background: linear-gradient(135deg, #fff, #eef7f5);
}

.sespg-modal-head h2 {
  margin: 0;
  color: var(--sespg-blue-dark);
  font-family: inherit !important;
  font-size: 20px;
}

.sespg-modal-close {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--sespg-line);
  border-radius: 8px;
  background: #fff;
  color: var(--sespg-blue-dark);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.sespg-modal-content {
  overflow: auto;
  padding: 20px;
}

.sespg-modal-content .sespg-form {
  max-width: none;
}

.sespg-public {
  background: var(--sespg-bg);
  padding: 18px;
  border-radius: 8px;
}

.sespg-public-hero {
  background: linear-gradient(135deg, var(--sespg-blue), var(--sespg-teal));
  color: #fff;
  align-items: center;
}

.sespg-public-hero .sespg-crest {
  width: 82px;
  height: 82px;
  font-size: 20px;
}

.sespg-public-hero h1,
.sespg-public-hero p {
  color: #fff;
}

.sespg-public-event {
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 18px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--sespg-line);
}

.sespg-public-event h2 {
  margin: 4px 0 8px;
  color: var(--sespg-blue-dark);
}

.sespg-public-event p {
  color: var(--sespg-muted);
}

.sespg-public-event span {
  color: var(--sespg-green);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 900;
}

.sespg-public-form {
  width: min(360px, 100%);
  display: grid;
  gap: 8px;
  flex: 0 0 auto;
}

.sespg-public-closed {
  align-self: center;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--sespg-muted);
  font-weight: 850;
}

@media (max-width: 1280px) {
  .sespg-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .sespg-report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sespg-sector-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .sespg-shell {
    margin: 0;
  }

  .sespg-menu-toggle {
    display: inline-flex;
  }

  .sespg-body {
    display: block;
  }

  .sespg-nav {
    display: none;
    position: fixed;
    left: 0;
    top: 72px;
    bottom: 0;
    z-index: 30;
    width: min(88vw, 310px);
    min-height: 0;
    overflow-y: auto;
    box-shadow: 18px 0 38px rgba(0,0,0,.25);
  }

  .sespg-nav.open {
    display: block;
  }

  .sespg-main {
    width: 100%;
    padding: 16px;
  }

  .sespg-page-actions,
  .sespg-action-strip {
    justify-content: flex-start;
    min-width: 0;
  }

  .sespg-page-actions .sespg-btn,
  .sespg-action-strip .sespg-btn,
  .sespg-action-strip form {
    flex: 0 0 auto;
  }

  .sespg-action-strip form .sespg-btn {
    width: auto;
  }

  .sespg-workspace,
  .sespg-two-col,
  .sespg-three-col {
    grid-template-columns: 1fr;
  }

  .sespg-kanban {
    grid-template-columns: 1fr;
    overflow-x: visible;
  }

  .sespg-kanban section {
    min-width: 0;
  }

  .sespg-mobile-move {
    display: grid;
  }

  .sespg-public-event {
    display: block;
  }

  .sespg-public-form {
    width: 100%;
    margin-top: 14px;
  }
}

@media (max-width: 720px) {
  .sespg-topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-height: auto;
    padding: 14px;
  }

  .sespg-menu-toggle {
    grid-column: 1;
    grid-row: 1;
    width: 62px;
    min-height: 42px;
    justify-content: center;
  }

  .sespg-brand {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .sespg-brand .sespg-crest {
    width: 48px;
    height: 48px;
  }

  .sespg-brand strong {
    font-size: 14px;
  }

  .sespg-brand span {
    font-size: 11px;
    line-height: 1.35;
  }

  .sespg-top-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    white-space: normal;
  }

  .sespg-top-actions .sespg-btn {
    flex: 0 0 auto;
    min-height: 42px;
    height: 42px;
    padding-inline: 12px;
  }

  .sespg-user-chip {
    flex: 0 1 110px;
    min-width: 72px;
    max-width: 110px;
    min-height: 42px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sespg-hero,
  .sespg-page-head,
  .sespg-tiradentes-hero,
  .sespg-public-hero {
    display: block;
    padding: 18px;
  }

  .sespg-page-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    margin-top: 14px;
    width: 100%;
    min-width: 0;
    overflow-x: auto;
  }

  .sespg-page-actions .sespg-btn,
  .sespg-page-actions a {
    width: auto;
    flex: 0 0 auto;
  }

  .sespg-action-strip {
    display: flex;
    flex-wrap: nowrap;
    padding: 10px;
    overflow-x: auto;
  }

  .sespg-hero h1,
  .sespg-page-head h1,
  .sespg-tiradentes-hero h1,
  .sespg-public-hero h1 {
    font-size: 24px;
  }

  .sespg-hero-panel,
  .sespg-progress-ring {
    margin-top: 14px;
  }

  .sespg-kpis,
  .sespg-form-grid,
  .sespg-report-grid,
  .sespg-local-grid,
  .sespg-sector-grid {
    grid-template-columns: 1fr;
  }

  .sespg-public,
  .sespg-login-wrap {
    padding: 12px;
  }

  .sespg-login-card {
    padding: 22px;
  }

  .sespg-sector-grid article,
  .sespg-race-pill {
    display: grid;
    grid-template-columns: 1fr;
  }

  .sespg-user-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .sespg-user-row select {
    width: 100%;
  }

  .sespg-modal {
    padding: 0;
    place-items: stretch;
  }

  .sespg-modal-panel {
    width: 100%;
    max-height: 100vh;
    min-height: 100vh;
    border-radius: 0;
    border: 0;
  }

  .sespg-modal-head {
    padding: 14px 16px;
  }

  .sespg-modal-content {
    padding: 16px;
  }

  .sespg-nav {
    top: 128px;
  }
}
