/* ==========================================================================
   RUKIA F10 — access.css
   --------------------------------------------------------------------------
   Camada de acesso/login institucional extraída em F10.4.3-B.

   Responsabilidade:
   - CP-01 — Acesso público institucional
   - Layout visual da tela de acesso
   - Hero institucional
   - Card/formulário de código de acesso
   - Responsividade própria do acesso

   NÃO contém:
   - Cliente Público autenticado
   - Grid operacional
   - KPIs
   - Modal
   - Importação
   - Toast
   - Regras JS

   Ordem recomendada no index.html:
   <link rel="stylesheet" href="./css/base.css" />
   <link rel="stylesheet" href="./css/access.css" />
   <link rel="stylesheet" href="./css/styles.css" />
   <link rel="stylesheet" href="./css/styles.cliente-publico-mobile.css" />
   ========================================================================== */

/* CP-01 — Acesso público institucional */

.access-screen {
  position: relative;
  isolation: isolate;
  display: grid;
  min-height: 100vh;
  padding: clamp(18px, 4vw, 42px);
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 18%, rgba(79, 70, 229, 0.18), transparent 28rem),
    radial-gradient(circle at 86% 22%, rgba(109, 40, 217, 0.16), transparent 30rem),
    radial-gradient(circle at 52% 92%, rgba(59, 130, 246, 0.13), transparent 34rem),
    linear-gradient(135deg, var(--bg-page) 0%, var(--bg-page-soft) 100%);
  place-items: center;
}

.access-screen::before,
.access-screen::after {
  position: absolute;
  z-index: -2;
  pointer-events: none;
  content: "";
}

.access-screen::before {
  inset: 0;
  background:
    linear-gradient(115deg, transparent 0 18%, rgba(79, 70, 229, 0.08) 18.15% 18.45%, transparent 18.6% 42%, rgba(109, 40, 217, 0.07) 42.1% 42.35%, transparent 42.5%),
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.58), transparent 18rem);
  opacity: 0.72;
}

.access-screen::after {
  top: -18%;
  right: -10%;
  width: min(620px, 68vw);
  height: min(620px, 68vw);
  background:
    repeating-linear-gradient(
      135deg,
      rgba(79, 70, 229, 0.10) 0 1px,
      transparent 1px 12px
    );
  border-radius: 999px;
  mask-image: radial-gradient(circle, rgba(0, 0, 0, 0.88), transparent 68%);
  transform: rotate(-10deg);
  opacity: 0.72;
}

html[data-theme="dark"] .access-screen {
  background:
    radial-gradient(circle at 14% 18%, rgba(129, 140, 248, 0.18), transparent 28rem),
    radial-gradient(circle at 86% 22%, rgba(167, 139, 250, 0.15), transparent 30rem),
    radial-gradient(circle at 52% 92%, rgba(59, 130, 246, 0.12), transparent 34rem),
    linear-gradient(135deg, #020617 0%, #050816 100%);
}

html[data-theme="dark"] .access-screen::before {
  background:
    linear-gradient(115deg, transparent 0 18%, rgba(129, 140, 248, 0.10) 18.15% 18.45%, transparent 18.6% 42%, rgba(167, 139, 250, 0.08) 42.1% 42.35%, transparent 42.5%),
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.05), transparent 18rem);
  opacity: 0.92;
}

.access-orb {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(6px);
  opacity: 0.72;
}

.access-orb--primary {
  bottom: 7%;
  left: 4%;
  width: min(340px, 42vw);
  height: min(340px, 42vw);
  background: radial-gradient(circle, rgba(79, 70, 229, 0.20), transparent 68%);
}

.access-orb--secondary {
  top: 16%;
  right: 8%;
  width: min(280px, 34vw);
  height: min(280px, 34vw);
  background: radial-gradient(circle, rgba(109, 40, 217, 0.18), transparent 66%);
}

.access-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.72fr);
  width: min(1120px, 100%);
  min-height: min(650px, calc(100vh - 56px));
  overflow: hidden;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 32px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(22px);
}

html[data-theme="dark"] .access-layout {
  background: rgba(3, 7, 18, 0.78);
  border-color: rgba(148, 163, 184, 0.16);
}

.access-hero,
.access-panel {
  position: relative;
  min-width: 0;
}

.access-hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(26px, 5vw, 56px);
  color: var(--text-inverted);
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.22), transparent 16rem),
    radial-gradient(circle at 78% 24%, rgba(255, 255, 255, 0.13), transparent 17rem),
    linear-gradient(135deg, #4f46e5 0%, #6d28d9 58%, #2563eb 100%);
}

.access-hero::before,
.access-hero::after {
  position: absolute;
  pointer-events: none;
  content: "";
}

.access-hero::before {
  right: -18%;
  bottom: -18%;
  width: min(540px, 72vw);
  height: min(540px, 72vw);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 42% 58% 47% 53%;
  box-shadow:
    inset 0 0 0 22px rgba(255, 255, 255, 0.045),
    inset 0 0 0 48px rgba(255, 255, 255, 0.035),
    inset 0 0 0 82px rgba(255, 255, 255, 0.026);
  opacity: 0.82;
  transform: rotate(-18deg);
}

.access-hero::after {
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.13) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.10) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(circle at 18% 20%, rgba(0, 0, 0, 0.55), transparent 36%), radial-gradient(circle at 86% 74%, rgba(0, 0, 0, 0.40), transparent 32%);
  opacity: 0.26;
}

.access-hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  max-width: 620px;
  gap: 24px;
}

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

.access-brand-mark {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.access-eyebrow,
.access-hero .eyebrow {
  color: rgba(255, 255, 255, 0.82);
}

.access-brand-name {
  margin: 0;
  color: rgba(255, 255, 255, 0.96);
  font-size: 15px;
  font-weight: 850;
  letter-spacing: -0.02em;
}

.access-secure-badge {
  display: inline-flex;
  width: fit-content;
  gap: 9px;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  color: rgba(255, 255, 255, 0.90);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 999px;
  backdrop-filter: blur(14px);
}

.access-secure-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.18);
}

.access-hero-copy h1 {
  max-width: 620px;
  margin: 0;
  color: #ffffff;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 0.98;
  letter-spacing: -0.065em;
}

.access-hero-copy p {
  max-width: 560px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.6;
}

.access-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.access-feature-card {
  min-width: 0;
  padding: 14px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  backdrop-filter: blur(14px);
}

.access-feature-index {
  display: inline-flex;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.access-feature-card strong,
.access-feature-card small {
  display: block;
}

.access-feature-card strong {
  color: #ffffff;
  font-size: 13px;
  line-height: 1.25;
}

.access-feature-card small {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  line-height: 1.4;
}

.access-hero-footnote {
  position: relative;
  z-index: 1;
  margin: 34px 0 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.access-panel {
  display: grid;
  align-items: center;
  padding: clamp(22px, 4vw, 46px);
  background:
    radial-gradient(circle at top right, var(--brand-soft), transparent 18rem),
    var(--bg-surface);
}

html[data-theme="dark"] .access-panel {
  background:
    radial-gradient(circle at top right, rgba(129, 140, 248, 0.13), transparent 18rem),
    rgba(11, 18, 32, 0.95);
}

.access-card {
  width: min(430px, 100%);
  margin: 0 auto;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.access-card-header {
  display: grid;
  gap: 8px;
}

.access-card-header h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.access-card-header p:not(.eyebrow) {
  max-width: 360px;
  margin: 0;
  color: var(--text-muted);
}

.access-form {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.access-code-input {
  min-height: 52px;
  padding: 11px 14px;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-align: center;
  border-radius: 15px;
}

.access-code-input::placeholder {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
}

.access-submit {
  min-height: 50px;
  margin-top: 2px;
  border-radius: 15px;
}

.access-support-panel {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 14px;
  color: var(--text-muted);
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.access-support-panel::before {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
  background: var(--brand-soft);
  border: 1px solid rgba(79, 70, 229, 0.14);
  border-radius: 999px;
  content: "✓";
  place-items: center;
}

.access-support-panel strong,
.access-support-panel span {
  display: block;
}

.access-support-panel strong {
  color: var(--text-strong);
  font-size: 13px;
}

.access-support-panel span {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.45;
}

.access-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 18px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
}

.access-meta p {
  margin: 0;
  font-size: 12px;
  font-weight: 750;
}

.profile-chip {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  min-height: 34px;
  padding: 7px 10px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  box-shadow: var(--shadow-xs);
  white-space: nowrap;
}

.profile-chip strong {
  color: var(--text-strong);
}

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

  .access-hero {
    min-height: 430px;
  }

  .access-panel {
    padding: 28px;
  }

  .access-card {
    width: min(620px, 100%);
  }
}

@media (max-width: 720px) {
  .access-screen {
    padding: 14px;
    align-items: stretch;
  }

  .access-layout {
    width: 100%;
    border-radius: 24px;
  }

  .access-hero {
    min-height: auto;
    padding: 28px 22px;
  }

  .access-feature-grid {
    grid-template-columns: 1fr;
  }

  .access-panel {
    padding: 24px 20px;
  }

  .access-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .access-meta .btn {
    width: 100%;
  }
}

@media (max-width: 460px) {
  .access-brand-lockup {
    align-items: flex-start;
  }

  .access-secure-badge {
    align-items: flex-start;
    white-space: normal;
  }

  .access-hero-copy h1 {
    font-size: clamp(30px, 14vw, 42px);
  }

  .access-card-header h2 {
    font-size: 30px;
  }
}
