@font-face {
  font-family: 'Open Sans';
  src: url('../assets/fonts/OpenSans-VariableFont_wdth\,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
}

@font-face {
  font-family: 'Open Sans';
  src: url('../assets/fonts/OpenSans-Italic-VariableFont_wdth\,wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: italic;
}

body.admin-body {
  font-family: 'Open Sans', sans-serif;
  margin: 0;
  background: #f2f6fb;
  color: #0f172a;
  overflow-x: hidden;
}

body.admin-auth {
  background: #0b4c9a;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.admin-auth-card {
  background: #ffffff;
  border-radius: 32px;
  padding: 36px 32px 40px;
  width: min(380px, 100%);
  text-align: center;
  box-shadow: 0 28px 50px rgba(11, 76, 154, 0.3);
  display: grid;
  gap: 18px;
}

.admin-auth-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: #e9f1ff;
  display: grid;
  place-items: center;
  margin: 0 auto;
  color: #0b4c9a;
}

.admin-auth-icon svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.admin-auth-title {
  margin: 0;
  text-transform: uppercase;
  font-size: 20px;
  font-weight: 900;
  color: #0b4c9a;
}

.admin-auth-subtitle {
  margin: -8px 0 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #9aa3b2;
  font-weight: 700;
}

.admin-auth-form {
  gap: 14px;
}

.admin-auth-form label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: #0b4c9a;
  font-weight: 800;
}

.admin-auth-form input {
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.12);
  text-align: center;
}

.admin-auth-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.admin-auth-cancel {
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 12px;
  color: #9aa3b2;
}

.admin-auth-submit {
  background: #f3c633;
  color: #0b4c9a;
  padding: 12px 28px;
  border-radius: 16px;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: 0 16px 24px rgba(243, 198, 51, 0.35);
  border: none;
  cursor: pointer;
}

.admin-header {
  background: #0b4c9a;
  color: #fff;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-header h1 {
  margin: 0;
  font-size: 20px;
}

.admin-header a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.admin-container {
  width: min(1100px, 100%);
  margin: 24px auto 80px;
  padding: 0 16px;
  display: grid;
  gap: 20px;
}

.admin-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.admin-card h2,
.admin-card h3 {
  margin: 0 0 12px;
  color: #0b4c9a;
}

.admin-subtitle {
  margin-top: 4px;
  color: #64748b;
}

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

.admin-form label {
  display: grid;
  gap: 6px;
  font-weight: 700;
  color: #1f3b63;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  border: 1px solid rgba(15, 23, 42, 0.2);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}

.admin-form textarea {
  min-height: 80px;
  resize: vertical;
}

.admin-form button,
.admin-btn {
  background: #0b4c9a;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 800;
  cursor: pointer;
}

.admin-btn-secondary {
  background: #e2e8f0;
  color: #0f172a;
}

.admin-alert {
  background: #fff7ed;
  border: 1px solid rgba(234, 88, 12, 0.25);
  padding: 10px 12px;
  border-radius: 10px;
  color: #9a3412;
  font-weight: 600;
}

.admin-alert-error {
  background: #fef2f2;
  border-color: rgba(220, 38, 38, 0.2);
  color: #b42318;
}

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

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  text-align: left;
  font-size: 13px;
}

.admin-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-readonly {
  opacity: 0.6;
  pointer-events: none;
}

.admin-inline input {
  flex: 1 1 160px;
}

.admin-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 720px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

:root {
  --portal-blue: #0b4c9a;
  --portal-blue-dark: #073b76;
  --portal-accent: #f3c633;
  --portal-green: #2ec35a;
  --portal-bg: #f2f6fb;
  --portal-muted: #64748b;
  --portal-shadow: 0 20px 36px rgba(15, 23, 42, 0.12);
}

.admin-body,
.admin-body * ,
.admin-body *::before,
.admin-body *::after {
  box-sizing: border-box;
}

.admin-dashboard {
  background: var(--portal-bg);
}

.portal-topbar {
  background: linear-gradient(120deg, var(--portal-blue) 0%, var(--portal-blue-dark) 100%);
  color: #fff;
  padding: 18px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.18);
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.portal-logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--portal-accent);
  color: var(--portal-blue);
  display: grid;
  place-items: center;
  font-size: 20px;
}

.portal-brand-text {
  display: grid;
  gap: 2px;
}

.portal-brand-text strong {
  font-size: 16px;
  letter-spacing: 0.02em;
}

.portal-brand-text span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.8;
}

.portal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.portal-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}

.portal-btn {
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 800;
  font-size: 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.portal-btn-primary {
  background: var(--portal-green);
  color: #fff;
}

.portal-btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.portal-btn-accent {
  background: var(--portal-accent);
  color: #163b67;
}

.portal-btn-ghost {
  background: #e9f8ef;
  color: #1c7c3e;
  font-size: 11px;
  width: 100%;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.portal-btn-ghost.is-active {
  background: #fdeeee;
  color: #d11a1a;
}

.portal-btn-small {
  padding: 6px 10px;
  font-size: 11px;
  border-radius: 8px;
}

.portal-layout {
  width: min(1280px, 100%);
  margin: 24px auto 80px;
  padding: 0 16px;
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: hidden;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}


.portal-sidebar {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.portal-status-card {
  background: #fff;
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--portal-shadow);
  display: grid;
  gap: 12px;
}

.portal-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.portal-status-label {
  font-size: 11px;
  color: var(--portal-blue);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
}

.portal-status-number {
  font-size: 28px;
  font-weight: 800;
  color: #0f2f5d;
}

.portal-status-value {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--portal-blue);
}

.portal-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.08);
}

.portal-status-dot.is-active {
  background: #22c55e;
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.12);
}

.portal-status-meta {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--portal-muted);
}

.portal-nav {
  display: grid;
  gap: 10px;
}

.portal-shortcuts {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.portal-nav-item {
  background: #fff;
  border-radius: 16px;
  padding: 14px 16px;
  font-weight: 700;
  color: #1f3b63;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: 0 12px 20px rgba(15, 23, 42, 0.08);
}

.portal-nav-item i {
  color: var(--portal-blue);
  font-size: 16px;
}

.portal-nav-item.is-active {
  background: var(--portal-blue);
  color: #fff;
}

.portal-nav-item.is-active i {
  color: #fff;
}

.portal-nav-arrow {
  opacity: 0.5;
}

.portal-help {
  background: #edf4ff;
  border-radius: 20px;
  padding: 16px;
  display: grid;
  gap: 8px;
  color: #1f3b63;
}

.portal-help-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--portal-blue);
}

.portal-help p {
  margin: 0;
  font-size: 12px;
  color: var(--portal-muted);
}


.portal-content {
  display: grid;
  gap: 20px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.portal-alert {
  background: #fff7ed;
  border: 1px solid rgba(234, 88, 12, 0.25);
  padding: 12px 14px;
  border-radius: 14px;
  color: #9a3412;
  font-weight: 600;
}

.portal-alert-danger {
  background: #fef2f2;
  border-color: rgba(220, 38, 38, 0.2);
  color: #b42318;
}

.portal-card {
  background: #fff;
  border-radius: 32px;
  padding: 28px;
  box-shadow: var(--portal-shadow);
  box-sizing: border-box;
  max-width: 100%;
  width: 100%;
}

.portal-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.portal-card-header h2 {
  margin: 0;
  color: var(--portal-blue);
  text-transform: uppercase;
  font-size: 20px;
  font-weight: 900;
}

.portal-card-underline {
  display: block;
  width: 120px;
  height: 4px;
  border-radius: 999px;
  background: var(--portal-accent);
  margin-top: 8px;
}

.portal-card-header-row {
  align-items: center;
}

.portal-badge {
  background: #e8f1ff;
  color: var(--portal-blue);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 999px;
}

.portal-form {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.portal-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}

.portal-field {
  display: grid;
  gap: 6px;
  font-weight: 700;
  color: #1f3b63;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  min-width: 0;
  max-width: 100%;
}

.portal-field input,
.portal-field textarea,
.portal-field select {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  text-transform: none;
  color: #0f172a;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  line-height: 1.2;
  min-height: 40px;
}

.portal-field textarea {
  min-height: 120px;
  resize: vertical;
}

.portal-time-range {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.portal-time-sep {
  font-size: 12px;
  color: #6b7280;
  text-transform: none;
}

.portal-list-field {
  display: grid;
  gap: 10px;
  text-transform: none;
}

.portal-list-input {
  display: flex;
  gap: 8px;
  align-items: center;
}

.portal-list-input input {
  flex: 1;
}

.portal-list-items {
  display: grid;
  gap: 8px;
}

.portal-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e1e7f0;
  background: #f9fbff;
  font-size: 13px;
  text-transform: none;
}

.portal-list-remove {
  border: none;
  background: transparent;
  color: #0b4a8a;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease;
}

.portal-list-remove:hover {
  background: #e3edff;
  color: #083568;
}

.portal-list-hidden {
  display: none;
}

.portal-field.portal-check {
  grid-auto-flow: column;
  align-items: center;
  justify-content: start;
  gap: 10px;
}

.portal-field.portal-check input {
  width: auto;
  margin: 0;
}

.vagas-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 10px;
}

.vagas-preview figure {
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: #6b7280;
}

.vagas-preview img {
  width: 120px;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
  background: #fff;
}

.portal-benefits-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.portal-benefit-toggle {
  border: 1px solid #e1e7f0;
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 8px;
  align-content: start;
  cursor: pointer;
  background: #f9fbff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.portal-benefit-toggle input {
  accent-color: #0b4a8a;
}

.portal-benefit-toggle:hover {
  border-color: #0b6db5;
  box-shadow: 0 10px 18px rgba(11, 74, 138, 0.08);
  transform: translateY(-1px);
}

.portal-benefit-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #e9f2ff;
  color: #0b4a8a;
  font-size: 18px;
}

.portal-benefit-label {
  font-weight: 600;
  color: #0f1f3a;
}

.portal-table-note {
  margin: 12px 0 0;
  color: #6b7280;
  font-size: 12px;
}

.portal-table-note-danger {
  color: #b42318;
}

.portal-table-note-info {
  color: #1f3b63;
}

.portal-table-note.is-hidden {
  display: none;
}

.portal-period-status {
  margin: 12px 0 0;
  background: #fff;
  border-radius: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  display: grid;
  gap: 8px;
}

.portal-period-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #1f3b63;
  font-weight: 600;
}

.portal-period-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.portal-period-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #f1f5f9;
  overflow: hidden;
}

.portal-period-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #f3c633, #f59e0b);
  width: 0%;
  transition: width 0.2s ease;
}

.portal-add-benefit {
  margin-top: 16px;
  align-self: flex-start;
  padding: 8px 16px;
  font-size: 12px;
  width: fit-content;
}

.portal-icon-field {
  display: grid;
  gap: 10px;
  position: relative;
}

.portal-logo-picker {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  padding: 8px 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  color: #0f172a;
}

.portal-logo-picker.is-disabled,
.portal-logo-picker:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f1f5f9;
}

.portal-logo-label {
  font-weight: 600;
  color: #1f3b63;
  text-align: left;
}

.portal-logo-lock-note {
  display: block;
  margin-top: 8px;
  color: #b45309;
  font-size: 12px;
}

.portal-logo-panel {
  position: relative;
  margin-top: 10px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 10px;
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.12);
}

.portal-logo-preview {
  margin-top: 10px;
  border: 1px dashed rgba(15, 23, 42, 0.18);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
}

.portal-logo-preview img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  display: none;
}

.portal-logo-preview.is-active {
  color: #1f3b63;
}

.portal-logo-search input {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
}

.portal-logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.portal-logo-option {
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #ffffff;
  border-radius: 14px;
  padding: 6px;
  display: grid;
  gap: 6px;
  justify-items: center;
  align-content: center;
  min-height: 92px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
}

.portal-logo-option img {
  width: 64px;
  height: 44px;
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
}

.portal-logo-option span {
  font-size: 10px;
  text-align: center;
  color: #1f3b63;
  font-weight: 600;
  line-height: 1.2;
}

.portal-benefit-field {
  position: relative;
  display: grid;
  gap: 8px;
}

.portal-benefit-picker {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  padding: 8px 10px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  color: #0f172a;
}

.portal-benefit-label {
  font-weight: 600;
  color: #1f3b63;
  text-align: left;
}

.portal-benefit-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 12;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  padding: 12px;
  width: min(360px, 90vw);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.12);
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
}

.portal-benefit-panel.is-top {
  top: auto;
  bottom: calc(100% + 8px);
}

.portal-benefit-panel small {
  color: #64748b;
  font-size: 11px;
}

.portal-benefit-search input {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
}

.portal-benefit-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.portal-benefit-types {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.portal-benefit-tag {
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #f8fafc;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  color: #1f3b63;
}

.portal-benefit-type {
  font-weight: 700;
}

.portal-benefit-tag.is-active {
  background: #0b4c9a;
  color: #fff;
  border-color: transparent;
}

.portal-benefit-groups {
  display: grid;
  gap: 12px;
  max-height: 240px;
  overflow: auto;
  padding-right: 4px;
}

.portal-benefit-custom {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.portal-benefit-custom input {
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
}

.portal-benefit-custom button {
  border: none;
  background: #0b4c9a;
  color: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.portal-benefit-group h4 {
  margin: 0 0 6px;
  font-size: 12px;
  color: #0b4a8a;
}

.portal-benefit-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.portal-benefit-option {
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #f8fafc;
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
  color: #0f172a;
}

.portal-benefit-option.is-hidden,
.portal-benefit-group.is-hidden {
  display: none;
}

.portal-icon-preview {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #edf3ff;
  color: #0b4a8a;
}

.portal-icon-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  padding: 6px 10px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  color: #0f172a;
  width: fit-content;
}

.portal-icon-button i.bi-caret-down-fill {
  font-size: 12px;
  color: #64748b;
}

.portal-icon-label {
  font-weight: 600;
  color: #1f3b63;
}

.portal-icon-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 10;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  padding: 12px;
  width: min(280px, 90vw);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.12);
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
}

.portal-icon-panel.is-top {
  top: auto;
  bottom: calc(100% + 8px);
}

.portal-icon-panel small {
  color: #64748b;
  font-size: 11px;
}

.portal-icon-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.portal-icon-option {
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #f8fafc;
  border-radius: 10px;
  height: 34px;
  width: 34px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #0b4a8a;
}

.portal-icon-option i {
  font-size: 16px;
}

.portal-icon-custom {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.portal-icon-custom input {
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
}

.portal-icon-custom button {
  border: none;
  background: #0b4c9a;
  color: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.portal-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.portal-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.portal-switch-track {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #d7dee9;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.portal-switch-track::after {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 4px 8px rgba(15, 23, 42, 0.12);
}

.portal-switch input:checked + .portal-switch-track {
  background: #0b6db5;
}

.portal-switch input:checked + .portal-switch-track::after {
  transform: translateX(20px);
}

.portal-field-full {
  grid-column: 1 / -1;
}

.portal-form-box {
  background: #f5f9ff;
  border-radius: 22px;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
  min-width: 0;
  max-width: 100%;
}

.portal-form-box > div {
  grid-column: 1 / -1;
}

.portal-form-box h3 {
  margin: 0;
  font-size: 16px;
  color: var(--portal-blue);
}

.portal-form-box p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--portal-muted);
}

.portal-map-preview {
  width: 100%;
  min-height: 220px;
  border-radius: 20px;
  overflow: hidden;
  background: #e2e8f0;
  display: grid;
  place-items: center;
  color: var(--portal-muted);
}

.portal-map-preview iframe {
  width: 100%;
  height: 220px;
  border: 0;
}

.portal-form-actions {
  display: flex;
  justify-content: flex-end;
}

.portal-upload {
  background: var(--portal-blue);
  color: #fff;
  border-radius: 24px;
  padding: 24px;
  display: grid;
  gap: 16px;
}

.portal-upload h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
}

.portal-upload p {
  margin: 4px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.portal-form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.portal-filter {
  margin: 12px 0 18px;
}

.portal-filter-actions {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  flex-wrap: nowrap;
}

.portal-form-inline input,
.portal-form-inline select {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  min-width: 180px;
}

.portal-table {
  width: 100%;
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  display: block;
  scrollbar-gutter: stable;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.portal-table.portal-table-benefits {
  overflow: visible;
}

.portal-table table {
  width: 100%;
  border-collapse: collapse;
}

.portal-table th,
.portal-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  text-align: left;
  font-size: 13px;
}

.portal-table input[type="text"],
.portal-table input[type="number"] {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  padding: 8px 10px;
  font-size: 12px;
}

.portal-table input.is-invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}

.portal-table-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.portal-btn.action-btn {
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
}

.portal-check-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.portal-info-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #fff;
  color: #0b4c9a;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.portal-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.portal-btn.action-btn i {
  font-size: 14px;
}

.portal-btn.action-btn.edit {
  background: #e8f1ff;
  color: #0b4a8a;
}

.portal-btn.action-btn.toggle {
  background: #fff7db;
  color: #8a5a00;
}

.portal-btn.action-btn.delete {
  background: #ffecec;
  color: #b42318;
}

.portal-subcard {
  margin-top: 18px;
  background: #f8fafc;
  border-radius: 20px;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.portal-subcard h3 {
  margin: 0;
  color: var(--portal-blue);
}

.is-hidden {
  display: none !important;
}

.admin-stats {
  background: #f2f6fb;
  color: #0f172a;
}

.stats-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
}

.stats-sidebar {
  background: #0b4c9a;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.stats-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}

.stats-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #f3c633;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: #0b4c9a;
}

.stats-brand strong {
  display: block;
  font-size: 16px;
}

.stats-brand span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.7);
}

.stats-nav {
  display: grid;
  gap: 10px;
}

.stats-shortcuts {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}


.stats-shortcut {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #ffffff;
  color: #0b4a8a;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.stats-shortcut i {
  font-size: 16px;
}

.stats-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.stats-nav-item.is-active {
  background: #ffffff;
  color: #0b4c9a;
}

.stats-logout {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  box-sizing: border-box;
}

.stats-content {
  padding: 32px;
}

.stats-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.stats-header h1 {
  margin: 0;
  text-transform: uppercase;
  color: #0b4c9a;
}

.stats-header p {
  margin: 6px 0 0;
  color: #64748b;
}

.stats-trend {
  color: #16a34a;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.stats-cards {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}

.stats-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.stats-card {
  background: #ffffff;
  padding: 20px;
  border-radius: 18px;
  display: grid;
  gap: 8px;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

.stats-card i {
  font-size: 20px;
  color: #0b4c9a;
}

.stats-card h3 {
  margin: 0;
  font-size: 28px;
  color: #0f172a;
}

.stats-card span {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  color: #94a3b8;
}

.stats-alert {
  margin-top: 20px;
  background: #fff7ed;
  border: 1px solid rgba(234, 88, 12, 0.25);
  color: #9a3412;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 600;
}

.stats-panel {
  margin-top: 28px;
  background: #ffffff;
  border-radius: 24px;
  padding: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.stats-panel-chart,
.stats-panel-list {
  margin-top: 0;
}

.stats-filter {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.stats-filter label {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: #64748b;
}

.stats-filter input[type="date"] {
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 10px;
  padding: 8px 10px;
  font-family: inherit;
}

.stats-filter-btn {
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #ffffff;
  color: #0b4c9a;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.stats-filter-btn.is-active {
  background: #0b4c9a;
  color: #ffffff;
}

.stats-filter-apply {
  border: none;
  background: #0b4c9a;
  color: #ffffff;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 10px;
  cursor: pointer;
}

.stats-panel header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #0b4c9a;
}

.stats-panel header h2 {
  margin: 0;
  text-transform: uppercase;
}

.stats-panel header span {
  color: #64748b;
  font-size: 12px;
}

.stats-chart {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  height: 180px;
}

.stats-chart-bar {
  display: grid;
  gap: 8px;
  align-items: end;
  justify-items: center;
  height: 100%;
}

.stats-chart-bar span {
  width: 100%;
  max-width: 28px;
  background: #0b4c9a;
  border-radius: 10px 10px 6px 6px;
  min-height: 10px;
  transition: height 0.3s ease;
}

.stats-chart-bar small {
  font-size: 11px;
  color: #64748b;
}

.stats-pages {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.stats-pages li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  color: #1f3b63;
}

.stats-pages li strong {
  color: #0b4c9a;
}

.stats-pages-empty {
  text-align: center;
  color: #94a3b8;
  padding: 18px 0;
}

.stats-table {
  margin-top: 16px;
  background: #f8fafc;
  border-radius: 16px;
  overflow: hidden;
}

.stats-actions-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.stats-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #e2e8f0;
  color: #1f3b63;
}

.stats-badge-warn {
  background: #fff7ed;
  color: #9a3412;
}

.stats-table table {
  width: 100%;
  border-collapse: collapse;
}

.stats-table th,
.stats-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  text-align: left;
  font-size: 13px;
}

.stats-form {
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.stats-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.stats-form form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stats-form input,
.stats-form select {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.15);
  color: #0f172a;
  padding: 10px 12px;
  border-radius: 10px;
}

.stats-btn {
  background: #0b4c9a;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
}

.stats-btn-danger {
  background: #ef4444;
}

.stats-section.is-hidden {
  display: none;
}

@media (max-width: 980px) {
  .stats-layout {
    grid-template-columns: 1fr;
  }

  .stats-sidebar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .stats-logout {
    margin-top: 0;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .stats-sidebar {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 12px;
  }

  .stats-brand {
    justify-content: flex-start;
  }

  .stats-nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .stats-nav-item {
    white-space: nowrap;
    padding: 10px 12px;
    font-size: 12px;
  }

  .stats-shortcuts {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-top: 4px;
  }

  .stats-shortcut {
    white-space: nowrap;
  }

  .stats-logout {
    width: 100%;
    justify-content: center;
  }

  .stats-content {
    padding: 20px 16px 32px;
  }

  .stats-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .stats-header h1 {
    font-size: 20px;
  }

  .stats-filter {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    align-items: end;
  }

  .stats-filter label,
  .stats-filter-btn,
  .stats-filter-apply {
    width: 100%;
  }

  .stats-filter input[type="date"] {
    width: 100%;
    box-sizing: border-box;
  }

  .stats-chart {
    gap: 6px;
    height: 160px;
  }

  .stats-table {
    overflow-x: auto;
  }

  .stats-table table {
    min-width: 520px;
  }

  #users .stats-table,
  #logs .stats-table {
    background: transparent;
    overflow: visible;
    border-radius: 0;
  }

  #users .stats-table table,
  #logs .stats-table table {
    min-width: 0;
    width: 100%;
  }

  #users .stats-table thead,
  #logs .stats-table thead {
    display: none;
  }

  #users .stats-table tbody,
  #logs .stats-table tbody {
    display: grid;
    gap: 10px;
  }

  #users .stats-table tr,
  #logs .stats-table tr {
    display: grid;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    padding: 10px;
  }

  #users .stats-table td,
  #logs .stats-table td {
    display: grid;
    grid-template-columns: minmax(96px, 34%) 1fr;
    gap: 8px;
    padding: 0;
    border: 0;
    font-size: 12px;
    word-break: break-word;
  }

  #users .stats-table td::before,
  #logs .stats-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #0b4c9a;
  }

  #users .stats-actions-row {
    justify-content: flex-start;
  }

  #users .stats-actions-row form {
    width: 100%;
  }

  #users .stats-actions-row .stats-btn {
    width: 100%;
  }
}

@media (max-width: 1024px) {
  .portal-layout {
    grid-template-columns: 1fr;
  }

  .portal-topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .portal-topbar {
    padding: 14px 16px;
    gap: 12px;
  }

  .portal-brand {
    align-items: flex-start;
  }

  .portal-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .portal-btn {
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 11px;
    max-width: 100%;
  }

  .portal-layout {
    margin: 16px auto 40px;
    padding: 0 12px;
  }

  .portal-sidebar {
    gap: 12px;
  }

  .portal-status-card {
    padding: 14px;
    max-width: 100%;
  }

  .portal-nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .portal-nav-item {
    white-space: normal;
    padding: 10px 12px;
    font-size: 12px;
    width: 100%;
    box-sizing: border-box;
    justify-content: flex-start;
    gap: 10px;
    line-height: 1.2;
  }

  .portal-nav-arrow {
    display: none;
  }

  .portal-shortcuts {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 0;
  }

  .portal-form-grid,
  .portal-form-box {
    grid-template-columns: 1fr;
  }

  .portal-field {
    gap: 4px;
  }

  .portal-field input,
  .portal-field textarea,
  .portal-field select {
    padding: 10px 12px;
    font-size: 13px;
    min-height: 36px;
  }

  .portal-form-actions {
    justify-content: stretch;
  }

  .portal-form-actions .portal-btn {
    width: 100%;
  }

  .portal-form-inline input,
  .portal-form-inline select {
    width: 100%;
    min-width: 0;
  }

  .portal-card {
    padding: 16px;
    max-width: calc(100vw - 24px);
  }

  .portal-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .portal-upload {
    padding: 18px;
  }

  .portal-table {
    overflow-x: auto;
  }

  #lista.portal-card .portal-table {
    overflow-x: auto;
    padding-bottom: 6px;
  }

  #lista.portal-card .portal-table table {
    min-width: 780px;
  }

  #lista.portal-card .portal-table::-webkit-scrollbar {
    height: 8px;
  }

  #lista.portal-card .portal-table::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 999px;
  }

  #lista.portal-card .portal-table::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 999px;
  }

  .portal-table table {
    table-layout: auto;
    width: max-content;
    min-width: 720px;
  }

  .portal-table th,
  .portal-table td {
    white-space: nowrap;
  }

  .portal-table input[type="text"],
  .portal-table input[type="number"],
  .portal-table select {
    min-width: 120px;
  }
}

.scroll-top-btn {
  position: fixed;
  left: 50%;
  bottom: 30px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 2px solid rgba(17, 24, 39, 0.85);
  background: rgba(255, 255, 255, 0.35);
  color: #0b57a2;
  display: grid;
  place-items: center;
  font-size: 20px;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  backdrop-filter: blur(6px);
  z-index: 1500;
  cursor: pointer;
}

.scroll-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.scroll-top-btn:hover,
.scroll-top-btn:active {
  background: #f2c94c;
  border-color: #f2c94c;
  color: #0b57a2;
}

.scroll-top-btn:focus-visible {
  outline: 2px solid #005fa9;
  outline-offset: 2px;
}
