    body {
      background:
        radial-gradient(circle at 10% 10%, rgba(39, 158, 255, 0.15), transparent 30%),
        radial-gradient(circle at 90% 20%, rgba(20, 85, 178, 0.22), transparent 35%),
        linear-gradient(180deg, #06101f 0%, #030711 100%);
      min-height: 100vh;
      transition: background .25s ease, color .25s ease;
      position: relative;
      overflow-x: hidden;
      color: #f1f5f9;
    }

    body.auth-screen {
      overflow: hidden;
    }

    body::before {
      content: "";
      position: fixed;
      inset: 0;
      pointer-events: none;
      background:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
      background-size: 48px 48px;
      mask-image: radial-gradient(circle at 50% 20%, black 30%, transparent 75%);
      opacity: .55;
      z-index: 0;
    }

    body.light-mode::before {
      background:
        linear-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
      background-size: 48px 48px;
      mask-image: radial-gradient(circle at 50% 20%, black 38%, transparent 82%);
      opacity: .35;
    }

    .brand-logo {
      position: relative;
      overflow: hidden;
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 6px 16px rgba(2, 8, 23, 0.32);
    }
    .brand-logo::after {
      content: "";
      position: absolute;
      inset: 0;
      border-radius: inherit;
      background: linear-gradient(150deg, rgba(255, 255, 255, 0.18) 0%, transparent 55%);
      pointer-events: none;
    }
    .brand-logo-icon {
      filter: drop-shadow(0 1px 2px rgba(2, 8, 23, 0.35));
    }
    .brand-logo-icon path:last-child {
      stroke: #7dd3fc;
    }
    body.light-mode .brand-logo {
      border-color: rgba(11, 79, 143, 0.28) !important;
      background-color: rgba(15, 130, 242, 0.12) !important;
      box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.55),
        0 4px 12px rgba(15, 23, 42, 0.14);
    }
    body.light-mode .brand-logo::after {
      background: linear-gradient(150deg, rgba(255, 255, 255, 0.5) 0%, transparent 58%);
    }
    body.light-mode .brand-logo-icon {
      color: #0b4f8f !important;
      filter: none;
    }
    body.light-mode .brand-logo-icon path:last-child {
      stroke: #0369a1;
    }

    .glass {
      background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01)),
        rgba(12, 21, 39, 0.78);
      backdrop-filter: blur(14px);
      border: 1px solid rgba(255, 255, 255, 0.11);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 16px 38px rgba(2, 8, 23, .45);
    }

    .btn {
      transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
    }
    .btn:hover {
      transform: translateY(-1px);
    }

    /* Fallback: garante ocultação mesmo se utilitários do Tailwind falharem. */
    .hidden {
      display: none !important;
    }

    .btn-toggle-secret {
      position: absolute;
      right: 10px;
      top: 50%;
      transform: translateY(-50%);
      border: 1px solid rgba(148, 163, 184, 0.35);
      background: rgba(15, 23, 42, 0.35);
      color: #cbd5e1;
      border-radius: 8px;
      font-size: 11px;
      font-weight: 700;
      padding: 5px 9px;
      line-height: 1;
    }

    .field-secret {
      padding-right: 72px !important;
    }

    .modal-backdrop {
      position: fixed;
      inset: 0;
      z-index: 60;
      background: rgba(2, 6, 23, 0.65);
      backdrop-filter: blur(4px);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 16px;
    }

    .modal-card {
      width: 100%;
      max-width: 420px;
      border-radius: 16px;
      border: 1px solid rgba(148, 163, 184, 0.25);
      background: rgba(15, 23, 42, 0.95);
      box-shadow: 0 18px 45px rgba(2, 8, 23, 0.5);
      padding: 18px;
    }

    #pageShell {
      min-height: 100dvh;
      display: flex;
      flex-direction: column;
    }

    #mainGrid {
      flex: 1;
    }

    .main-auth {
      min-height: 0;
      height: 100%;
      align-content: center;
    }

    .auth-tabs {
      display: flex;
      gap: 8px;
      border-radius: 14px;
      border: 1px solid rgba(83, 188, 255, 0.35);
      padding: 6px;
      background: rgba(14, 31, 58, 0.58);
    }

    .auth-tab {
      flex: 1;
      border: 1px solid transparent;
      border-radius: 10px;
      padding: 10px 12px;
      font-size: 13px;
      font-weight: 700;
      color: #c9ddf5;
      background: transparent;
      transition: all .2s ease;
    }
    .auth-tab.active {
      background: linear-gradient(180deg, rgba(39, 158, 255, 0.35), rgba(16, 104, 220, 0.22));
      border-color: rgba(83, 188, 255, 0.55);
      color: #fff;
    }

    .auth-card {
      box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 20px 44px rgba(2, 8, 23, .5);
    }

    .auth-enter {
      animation: authEnter .32s cubic-bezier(.2,.8,.2,1);
      transform-origin: top center;
    }

    @keyframes authEnter {
      0% {
        opacity: 0;
        transform: translateY(12px) scale(.985);
      }
      100% {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    .auth-kicker {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      border-radius: 999px;
      border: 1px solid rgba(125, 211, 252, 0.35);
      background: rgba(14, 116, 144, 0.14);
      padding: 6px 11px;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: .06em;
      text-transform: uppercase;
      color: #dbeafe;
    }

    .auth-kicker-dot {
      width: 7px;
      height: 7px;
      border-radius: 999px;
      background: #22d3ee;
      box-shadow: 0 0 0 4px rgba(34, 211, 238, .15);
    }

    .auth-divider {
      margin-top: 12px;
      height: 1px;
      width: 100%;
      background: linear-gradient(90deg, rgba(125, 211, 252, .45), rgba(125, 211, 252, 0));
    }

    .auth-note {
      font-size: 12px;
      color: #94a3b8;
    }

    .status-pill {
      position: relative;
      overflow: hidden;
    }
    .status-pill::after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.14) 30%, transparent 60%);
      transform: translateX(-120%);
      animation: statusGlow 4s ease-in-out infinite;
    }
    @keyframes statusGlow {
      0%, 40% { transform: translateX(-120%); }
      60%, 100% { transform: translateX(120%); }
    }

    .scrollbar-thin::-webkit-scrollbar {
      width: 8px;
      height: 8px;
    }
    .scrollbar-thin::-webkit-scrollbar-thumb {
      background: rgba(83, 188, 255, 0.55);
      border-radius: 999px;
    }

    body.light-mode {
      background:
        radial-gradient(circle at 10% 10%, rgba(39, 158, 255, 0.22), transparent 34%),
        radial-gradient(circle at 90% 20%, rgba(20, 85, 178, 0.12), transparent 36%),
        linear-gradient(180deg, #f4f9ff 0%, #e8f2ff 100%);
      color: #0f172a;
    }
    body.light-mode .glass {
      background: rgba(255,255,255,.85);
      border-color: rgba(15,23,42,.16);
    }
    body.light-mode .text-white,
    body.light-mode .text-slate-100,
    body.light-mode .text-slate-200 {
      color: #0f172a !important;
    }
    /* Exceção: botões com texto branco devem permanecer brancos no tema claro. */
    body.light-mode button.text-white,
    body.light-mode .btn.text-white {
      color: #ffffff !important;
    }
    body.light-mode .text-slate-300,
    body.light-mode .text-slate-400,
    body.light-mode .text-slate-500 {
      color: #334155 !important;
    }
    body.light-mode .text-sky-100,
    body.light-mode .text-sky-200 {
      color: #0b4f8f !important;
    }
    body.light-mode .text-amber-100,
    body.light-mode .text-amber-200 {
      color: #92400e !important;
    }
    body.light-mode .text-rose-100 {
      color: #9f1239 !important;
    }
    body.light-mode .text-emerald-100 {
      color: #065f46 !important;
    }
    body.light-mode .bg-slate-900\/70,
    body.light-mode .bg-slate-900\/60,
    body.light-mode .bg-slate-900\/50,
    body.light-mode .bg-slate-900\/40,
    body.light-mode .bg-slate-950\/70,
    body.light-mode .bg-slate-900\/95,
    body.light-mode .bg-slate-800\/60 {
      background-color: rgba(255,255,255,.92) !important;
    }
    body.light-mode .border-slate-700,
    body.light-mode .border-slate-700\/70,
    body.light-mode .border-slate-600 {
      border-color: rgba(15,23,42,.26) !important;
    }
    body.light-mode .bg-sky-500\/10 {
      background-color: rgba(15,130,242,.14) !important;
    }
    body.light-mode .bg-amber-500\/10 {
      background-color: rgba(245,158,11,.16) !important;
    }
    body.light-mode .bg-rose-500\/10 {
      background-color: rgba(244,63,94,.16) !important;
    }
    body.light-mode .bg-emerald-500\/10 {
      background-color: rgba(16,185,129,.16) !important;
    }
    /* Mantém contraste dos botões principais no tema claro. */
    body.light-mode .bg-sky-600,
    body.light-mode .bg-sky-500,
    body.light-mode .bg-emerald-600,
    body.light-mode .bg-emerald-500,
    body.light-mode .bg-amber-600,
    body.light-mode .bg-amber-500 {
      color: #ffffff !important;
    }
    body.light-mode .btn-toggle-secret {
      background: rgba(255,255,255,.95);
      color: #1e293b;
      border-color: rgba(30, 41, 59, 0.3);
    }
    body.light-mode .modal-card {
      background: rgba(255,255,255,.97);
      border-color: rgba(15, 23, 42, 0.22);
      box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
    }
    body.light-mode input,
    body.light-mode select,
    body.light-mode textarea {
      color: #0f172a !important;
    }
    body.light-mode .auth-tabs {
      background: rgba(255,255,255,.78);
      border-color: rgba(11,79,143,.24);
    }
    body.light-mode .auth-tab {
      color: #1e293b;
    }
    body.light-mode .auth-tab.active {
      color: #fff;
      background: linear-gradient(180deg, rgba(15, 130, 242, .9), rgba(16, 104, 220, .9));
      border-color: rgba(11,79,143,.5);
    }
    body.light-mode .auth-kicker {
      color: #0f172a;
      background: rgba(14, 165, 233, .12);
      border-color: rgba(2, 132, 199, .35);
    }
    body.light-mode .auth-kicker-dot {
      background: #0284c7;
      box-shadow: 0 0 0 4px rgba(2, 132, 199, .14);
    }
    body.light-mode .auth-note {
      color: #334155;
    }

    @media (max-width: 1023px) {
      .main-auth {
        align-content: start;
        padding-top: 8px;
      }
    }
    @media (max-height: 760px) {
      body.auth-screen {
        overflow: auto;
      }
    }
    /* Evita zoom automático em foco de inputs no iOS (font-size < 16px). */
    @media (max-width: 768px) {
      input,
      select,
      textarea {
        font-size: 16px !important;
      }
    }
    @media (prefers-reduced-motion: reduce) {
      .auth-enter {
        animation: none !important;
      }
    }
