/* ============================================================
   login-mobile.css · reconstrução fiel da Variação A (mobile)
   ============================================================
   IMPORTE este arquivo DEPOIS do login.css no template:
     <link rel="stylesheet" href="{% static 'css/login.css' %}">
     <link rel="stylesheet" href="{% static 'css/login-mobile.css' %}">

   Elementos que existem no HTML mas só devem aparecer no mobile
   estão marcados com a classe .mobile-only — por padrão ficam
   escondidos, e a media query os libera abaixo de 860px.
   ============================================================ */

/* ---------- default: esconde elementos mobile-only no desktop ---------- */
.mobile-only { display: none !important; }

/* ---------- tweaks para welcome com <em> (vale desktop também) ---------- */
.welcome em {
  font-style: normal;
  color: var(--fg-mute, #8a94a4);
  font-weight: 400;
}
html[data-theme="light"] .welcome em { color: #5a6472; }


/* ============================================================
   MOBILE — reconstrução da Variação A
   ============================================================ */
@media (max-width: 860px) {

  /* libera os elementos mobile-only */
  .mobile-only { display: flex !important; }

  /* ---------- reset do layout desktop ---------- */
  .vB {
    grid-template-columns: 1fr !important;
    min-height: 100vh;
  }
  .vB .left { display: none !important; }

  /* ---------- .right vira o painel A — DARK ---------- */
  html[data-theme="dark"] .vB .right,
  html:not([data-theme="light"]) .vB .right {
    position: relative;
    padding: 72px 22px 28px !important;
    justify-content: flex-start !important;
    background:
      radial-gradient(55% 40% at 50% 42%, oklch(0.72 0.18 145 / 0.32), transparent 65%),
      linear-gradient(180deg, #07080a 0%, #0b0d10 100%) !important;
  }
  html[data-theme="dark"] .vB .right::before,
  html:not([data-theme="light"]) .vB .right::before {
    content: "";
    position: absolute; inset: 0;
    background-image:
      radial-gradient(circle at 1px 1px, rgba(255,255,255,0.08) 1px, transparent 1.2px);
    background-size: 22px 22px;
    pointer-events: none;
    z-index: 0;
  }

  /* ---------- .right — LIGHT ---------- */
  html[data-theme="light"] .vB .right {
    position: relative;
    padding: 72px 22px 28px !important;
    justify-content: flex-start !important;
    background:
      radial-gradient(55% 40% at 50% 42%, oklch(0.55 0.17 146 / 0.18), transparent 65%),
      #f5f6f4 !important;
  }
  html[data-theme="light"] .vB .right::before {
    content: "";
    position: absolute; inset: 0;
    background-image:
      radial-gradient(circle at 1px 1px, rgba(10,14,20,0.08) 1px, transparent 1.2px);
    background-size: 22px 22px;
    pointer-events: none;
    z-index: 0;
  }

  /* o form e filhos precisam ficar acima do ::before */
  .vB .right > * { position: relative; z-index: 1; }

  /* ---------- chrome superior ---------- */
  .chrome { padding: 14px 18px !important; }
  .crumb .mono { font-size: 10.5px; }

  /* ---------- linha de marca (logo + pill OPERACIONAL) ---------- */
  .m-brand-row {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    max-width: 380px; width: 100%;
    margin: 0 auto 64px;
  }
  .m-brand-row .logo {
    width: 34px; height: 34px;
    flex-shrink: 0;
  }
  .m-brand-row .logo img {
    width: 100%; height: 100%;
    object-fit: contain;
    display: block;
  }
  .m-brand-row .status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    background: oklch(0.72 0.18 145 / 0.10);
    border: 1px solid oklch(0.72 0.18 145 / 0.22);
    font-family: 'JetBrains Mono', monospace;
    font-size: 9.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: oklch(0.82 0.20 148);
  }
  html[data-theme="light"] .m-brand-row .status-pill {
    color: oklch(0.42 0.15 146);
    background: oklch(0.55 0.17 146 / 0.08);
    border-color: oklch(0.55 0.17 146 / 0.22);
  }
  .m-brand-row .status-pill .pulse {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: oklch(0.72 0.18 145);
    box-shadow: 0 0 8px oklch(0.72 0.18 145 / 0.6);
    animation: mPulse 2.2s ease-in-out infinite;
  }
  @keyframes mPulse {
    0%, 100% { box-shadow: 0 0 0 0 oklch(0.72 0.18 145 / 0.5); }
    50%      { box-shadow: 0 0 0 6px oklch(0.72 0.18 145 / 0); }
  }

  /* ---------- container do form ---------- */
  .form-wrap {
    max-width: 380px; width: 100%;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  /* ---------- welcome menor no mobile ---------- */
  .welcome {
    font-size: 26px !important;
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin: 0 0 6px !important;
  }

  .subline {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10.5px !important;
    letter-spacing: 0.02em;
    color: #566070;
    margin: 0 0 36px !important;
  }
  html[data-theme="light"] .subline { color: #8a94a2; }
  .subline .tick { color: oklch(0.72 0.18 145); }
  html[data-theme="light"] .subline .tick { color: oklch(0.55 0.17 146); }

  /* ---------- inputs mobile ---------- */
  .field { margin-bottom: 18px; }
  .field label {
    font-size: 10.5px !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8a94a4;
    margin-bottom: 9px;
  }
  html[data-theme="light"] .field label { color: #5a6472; }

  .field .input {
    height: 50px;
    border-radius: 13px;
  }
  .field .input .ico { width: 44px; }
  .field .input input {
    font-size: 14.5px;
    letter-spacing: -0.005em;
  }

  /* ---------- row com chip RAG ---------- */
  .row-between { margin: 24px 0 28px !important; font-size: 12px; }
  .row-between .ai-chip { font-size: 10px; padding: 5px 10px 5px 8px; }

  /* ---------- botão primário mobile ---------- */
  .btn-primary {
    height: auto;
    padding: 16px;
    font-size: 15px;
    border-radius: 13px;
  }
  .btn-primary .kbd { display: none; }

  /* light mode: adiciona glow sutil ao botão no mobile */
  html[data-theme="light"] .btn-primary {
    box-shadow:
      0 1px 0 oklch(0.52 0.14 146 / 0.5) inset,
      0 10px 26px -10px oklch(0.42 0.14 146 / 0.55),
      0 0 0 0 oklch(0.55 0.17 146 / 0);
    transition: box-shadow 220ms ease;
  }
  html[data-theme="light"] .btn-primary:hover {
    box-shadow:
      0 1px 0 oklch(0.52 0.14 146 / 0.5) inset,
      0 14px 34px -10px oklch(0.42 0.14 146 / 0.7),
      0 0 0 4px oklch(0.55 0.17 146 / 0.10);
  }

  /* ---------- rodapé: centralizado, com chip RAG visível ---------- */
  .right-bottom {
    position: static !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    padding-top: 48px !important;
    border-top: none !important;
    font-size: 10px !important;
    color: #566070 !important;
  }
  html[data-theme="light"] .right-bottom { color: #8a94a2 !important; }

  .m-rag {
    display: inline-flex !important;
    align-items: center;
    gap: 7px;
    padding: 5px 10px 5px 8px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px;
    color: #8a94a4;
    font-family: 'JetBrains Mono', monospace;
  }
  html[data-theme="light"] .m-rag {
    background: rgba(10,14,20,0.035);
    border-color: rgba(10,14,20,0.08);
    color: #5a6472;
  }
  .m-rag .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: oklch(0.72 0.18 145);
    box-shadow: 0 0 8px oklch(0.72 0.18 145 / 0.6);
  }

  /* esconde o .right-top (TLS 1.3) no mobile — já vive no chrome */
  .right-top { display: none !important; }
}

@media (max-width: 380px) {
  .welcome { font-size: 24px !important; }
  .vB .right { padding: 64px 18px 24px !important; }
}
