/* Portal Ow Mãe — Apple-like + paleta manual / degradê hub */
:root {
  --gold: #e8b41a;
  --gold-soft: rgba(232, 180, 26, 0.12);
  --purple: #9d5a86;
  --purple-deep: #6b3a5c;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --font-ui: "Arial Narrow", Arial, "Nimbus Sans Narrow", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--text);
  letter-spacing: -0.011em;
  line-height: 1.45;
}

.portal-login {
  min-height: 100vh;
  min-height: 100dvh;
  background-color: #f3e8ee;
  background-image: linear-gradient(90deg, #f3e8ee 0%, #f0eaf0 25%, #eef3f7 60%, #eff6f9 100%);
  display: flex;
  flex-direction: column;
  padding: clamp(1.25rem, 4vw, 2rem);
  padding-bottom: 0;
}

.portal-login__wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding-bottom: clamp(1.25rem, 4vw, 2rem);
}

.portal-login__shell {
  width: 100%;
  max-width: 400px;
}

.portal-login__card {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 12px 40px rgba(60, 45, 75, 0.12);
  padding: clamp(1.5rem, 4vw, 2rem);
}

.portal-login__header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.portal-login__title {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
      color: var(--purple-deep);
}

.portal-login__subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.portal-login__hint {
  margin: 1.25rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}

.portal-login__aux {
  margin: 1rem 0 0;
  text-align: center;
}
.portal-login__forgot {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--purple-deep);
  text-decoration: none;
  border-bottom: 1px solid rgba(107, 58, 92, 0.35);
  padding-bottom: 1px;
}
.portal-login__forgot:hover {
  color: var(--purple);
  border-bottom-color: var(--purple);
}

.portal-forgot__body {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text);
}
.portal-forgot__body p { margin: 0 0 0.85rem; }
.portal-forgot__note {
  font-size: 0.82rem;
  color: var(--muted);
}

/* Rodapé — logo + data/hora + ID (tela de acesso) */
.portal-login__footer {
  flex-shrink: 0;
  width: 100%;
  margin-top: auto;
  padding: clamp(0.75rem, 2.5vw, 1.1rem) clamp(1rem, 3vw, 1.5rem);
  padding-bottom: calc(clamp(0.75rem, 2.5vw, 1.1rem) + env(safe-area-inset-bottom, 0px));
  background: #f5f5f7;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  text-align: center;
}
.portal-login__footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}
.portal-login__footer-logo {
  height: clamp(32px, 6vw, 44px);
  width: auto;
  max-width: min(140px, 55vw);
  object-fit: contain;
}
.portal-login__footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.portal-login__footer-sep {
  opacity: 0.65;
}
.portal-login__footer-id strong {
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.portal-login__copy-strong {
  margin: 0.35rem 0 0.2rem;
  font-size: clamp(0.76rem, 1.95dvh, 0.92rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.38;
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}
.portal-login__copy-muted {
  margin: 0;
  font-size: clamp(0.72rem, 1.85dvh, 0.88rem);
  color: var(--muted);
  line-height: 1.38;
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}

.portal-flash {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}
.portal-flash__item {
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}
.portal-flash__item--danger { background: rgba(192, 57, 43, 0.1); color: #c0392b; }
.portal-flash__item--success { background: rgba(39, 174, 96, 0.12); color: #1e8449; }
.portal-flash__item--info { background: rgba(52, 152, 219, 0.12); color: #1f618d; }

.portal-field {
  margin-bottom: 0.95rem;
}
.portal-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.portal-input {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  transition: box-shadow 0.2s var(--ease), border-color 0.2s;
}
.portal-input:focus {
  outline: none;
  border-color: rgba(157, 90, 134, 0.45);
  box-shadow: 0 0 0 3px rgba(157, 90, 134, 0.15);
}
.portal-field__err {
  display: block;
  font-size: 0.72rem;
  color: #c0392b;
  margin-top: 0.25rem;
}
.portal-field__hint {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.35rem;
}

.portal-field--submit { margin-top: 1.15rem; }
.portal-btn {
  font: inherit;
  cursor: pointer;
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.portal-btn--primary {
  width: 100%;
  color: #fff;
  background: linear-gradient(180deg, #7d3f68 0%, #6b3a5c 100%);
  box-shadow: 0 4px 24px rgba(107, 58, 92, 0.28);
}
.portal-btn--primary:hover { filter: brightness(1.05); }
.portal-btn--primary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* Layout admin */
.portal-admin {
  min-height: 100vh;
  background-color: #f3e8ee;
  background-image: linear-gradient(90deg, #f3e8ee 0%, #f0eaf0 25%, #eef3f7 60%, #eff6f9 100%);
  font-family: var(--font-ui);
  color: var(--text);
}
.portal-admin__bar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0.65rem clamp(1rem, 3vw, 1.5rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.portal-admin__bar a {
  color: var(--purple-deep);
  font-weight: 600;
  text-decoration: none;
  margin-right: 0.75rem;
}
.portal-admin__bar a:hover { text-decoration: underline; }
.portal-admin__wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 1.75rem);
}
.portal-admin h1 {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--purple-deep);
}
.portal-table-wrap {
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 32px rgba(60, 45, 75, 0.08);
}
.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.portal-table th,
.portal-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  vertical-align: top;
}
.portal-table th {
  background: rgba(243, 238, 247, 0.9);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.portal-table tr:last-child td { border-bottom: none; }

.portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.portal-btn--ghost {
  background: #fff;
  color: var(--purple-deep);
  border: 1px solid rgba(107, 58, 92, 0.35);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.9rem;
  font-size: 0.875rem;
}
.portal-btn--ghost:hover { background: rgba(107, 58, 92, 0.04); }

.portal-form-grid {
  max-width: 520px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 1.25rem;
  box-shadow: 0 8px 32px rgba(60, 45, 75, 0.08);
}
.portal-form-grid .portal-field {
  margin-bottom: 1rem;
}
.portal-form-grid select[multiple] {
  min-height: 8rem;
  width: 100%;
  max-width: 100%;
      border-radius: 12px;
      padding: 0.5rem;
      border: 1px solid rgba(0, 0, 0, 0.1);
  font: inherit;
  font-size: 0.875rem;
}

.portal-pagination {
  margin-top: 1rem;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.portal-logo-thumb {
  max-height: 40px;
  max-width: 120px;
  object-fit: contain;
  vertical-align: middle;
}

.portal-muted {
  color: var(--muted);
}

.portal-audit-filters {
  margin-top: 0.75rem;
  padding: 1rem 1.15rem;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 24px rgba(60, 45, 75, 0.06);
}
.portal-audit-filters__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.85rem 1rem;
  align-items: end;
}
.portal-audit-filters__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-top: 1rem;
  align-items: center;
}

/* NDA (aceite obrigatório) */
.portal-login__shell--nda {
  max-width: min(56rem, 100%);
}
.portal-nda__notice {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 0.85rem;
  line-height: 1.45;
  padding: 0.65rem 0.85rem;
  background: rgba(0, 113, 227, 0.06);
  border-left: 3px solid #0071e3;
  border-radius: 8px;
}
.portal-nda__frame-wrap {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  min-height: 280px;
}
.portal-nda__frame {
  width: 100%;
  height: min(52vh, 480px);
  border: 0;
  display: block;
  vertical-align: top;
}
.portal-nda__form {
  margin-top: 1rem;
}
.portal-nda__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.portal-btn.portal-btn--danger {
  background: #b00020;
  color: #fff;
  border-color: rgba(0, 0, 0, 0.12);
}
.portal-btn.portal-btn--danger:hover {
  background: #8e001a;
  filter: none;
}
