@charset "ISO-8859-1";
   /* ============================================================ */
    /* ✅ VARIÁVEIS DE SAFE AREA (Android injeta via JS)             */
    /* ============================================================ */
    :root {
      --safe-top: env(safe-area-inset-top, 0px);
      --safe-bottom: env(safe-area-inset-bottom, 0px);
      --safe-left: env(safe-area-inset-left, 0px);
      --safe-right: env(safe-area-inset-right, 0px);
    }

    /* ----- RESET & BASE ----- */
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
      -webkit-tap-highlight-color: transparent;
      -webkit-touch-callout: none;
    }

    html {
      -webkit-text-size-adjust: 100%;
      height: 100%;
    }

    body {
      background: linear-gradient(145deg, #f9f3ff 0%, #f0f7ff 100%);
      min-height: 100vh;
      min-height: 100dvh;
      display: flex;
      align-items: flex-start;                       /* ✅ alinha no topo */
      justify-content: center;
      padding: 16px;
      padding-top: max(16px, calc(var(--safe-top) + 10vh));   /* ✅ ~10% do topo */
      padding-bottom: max(16px, calc(var(--safe-bottom) + 16px));
      padding-left: max(16px, calc(var(--safe-left) + 16px));
      padding-right: max(16px, calc(var(--safe-right) + 16px));
      position: relative;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
    }

    /* ✅ Estado quando o teclado está aberto — reduz o deslocamento */
    body.keyboard-open {
      align-items: flex-start;
      padding-top: max(12px, calc(var(--safe-top) + 12px));
    }

    .login-container {
      width: 100%;
      max-width: 440px;
      animation: fadeInUp 0.5s ease;
    }

    @keyframes fadeInUp {
      from { opacity: 0; transform: translateY(30px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .login-card {
      background: rgba(255, 255, 255, 0.85);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border-radius: 48px;
      padding: 48px 36px 40px;
      box-shadow: 0 30px 80px rgba(0, 20, 40, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.5);
      transition: 0.3s;
    }

    .login-card:hover {
      box-shadow: 0 40px 100px rgba(244, 59, 107, 0.06);
    }

    .login-header {
      text-align: center;
      margin-bottom: 32px;
    }

    .login-header .logo {
      display: inline-flex;
      align-items: center;
      gap: 12px;
      font-size: 2rem;
      font-weight: 800;
      background: linear-gradient(135deg, #f43b6b, #ff6b8a);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      text-decoration: none;
      margin-bottom: 8px;
    }

    .login-header .logo i {
      background: linear-gradient(145deg, #f43b6b, #ff9a56);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
      font-size: 2.2rem;
    }

    .login-header h1 {
      font-size: 1.8rem;
      font-weight: 800;
      color: #072033;
      margin-top: 4px;
    }

    .login-header p {
      color: #4a6a84;
      font-size: 0.95rem;
      margin-top: 4px;
    }

    .form-group {
      margin-bottom: 20px;
    }

    .form-group label {
      display: block;
      font-weight: 600;
      font-size: 0.85rem;
      color: #1f405a;
      margin-bottom: 6px;
    }

    .form-group .input-wrapper {
      position: relative;
    }

    .form-group .input-wrapper i {
      position: absolute;
      left: 16px;
      top: 50%;
      transform: translateY(-50%);
      color: #9ab0c8;
      font-size: 1.1rem;
      transition: 0.2s;
      pointer-events: none;
    }

    .form-group .input-wrapper input {
      width: 100%;
      padding: 16px 16px 16px 48px;
      border: 2px solid #e2ebf5;
      border-radius: 20px;
      font-size: 16px; /* ✅ 16px evita zoom automático no iOS */
      transition: 0.25s;
      background: rgba(255, 255, 255, 0.6);
      backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
      outline: none;
      color: #0a1e2f;
      min-height: 52px;
    }

    .form-group .input-wrapper input:focus {
      border-color: #f43b6b;
      background: white;
      box-shadow: 0 0 0 4px rgba(244, 59, 107, 0.06);
    }

    .form-group .input-wrapper input:focus + i,
    .form-group .input-wrapper input:focus ~ i {
      color: #f43b6b;
    }

    .form-group .input-wrapper input::placeholder {
      color: #a0b8d0;
    }

    .form-group .input-wrapper .field-error {
      border-color: #f43b6b !important;
      background: #fff5f5 !important;
    }

    .form-group .input-wrapper .field-success {
      border-color: #25d366 !important;
    }

    .form-options {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin: 8px 0 24px;
      font-size: 0.9rem;
      flex-wrap: wrap;
      gap: 8px;
    }

    .form-options label {
      display: flex;
      align-items: center;
      gap: 8px;
      color: #1f405a;
      font-weight: 500;
      cursor: pointer;
      user-select: none;
      min-height: 44px;
    }

    .form-options label input[type="checkbox"] {
      width: 20px;
      height: 20px;
      accent-color: #f43b6b;
      cursor: pointer;
      flex-shrink: 0;
    }

    .form-options a {
      color: #f43b6b;
      text-decoration: none;
      font-weight: 600;
      transition: 0.2s;
      padding: 8px 0;
    }

    .form-options a:hover {
      text-decoration: underline;
    }

    .form-options a:active {
      opacity: 0.6;
    }

    .btn-login {
      width: 100%;
      padding: 16px;
      border: none;
      border-radius: 60px;
      background: linear-gradient(145deg, #f43b6b, #ff6b8a);
      color: white;
      font-weight: 700;
      font-size: 1.05rem;
      cursor: pointer;
      transition: 0.25s;
      box-shadow: 0 8px 28px rgba(244, 59, 107, 0.25);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      min-height: 54px;
      touch-action: manipulation;
    }

    .btn-login:hover {
      transform: scale(1.02);
      box-shadow: 0 12px 36px rgba(244, 59, 107, 0.35);
    }

    .btn-login:active {
      transform: scale(0.98);
    }

    .btn-login:disabled {
      opacity: 0.6;
      cursor: not-allowed;
      transform: none;
    }

    .register-link {
      text-align: center;
      margin-top: 22px;
      font-size: 0.95rem;
      color: #4a6a84;
    }

    .register-link a {
      color: #f43b6b;
      font-weight: 700;
      text-decoration: none;
      transition: 0.2s;
    }

    .register-link a:hover {
      text-decoration: underline;
    }

    .register-link a:active {
      opacity: 0.6;
    }

    .footer-links {
      display: flex;
      justify-content: center;
      gap: 24px;
      margin-top: 24px;
      font-size: 0.8rem;
      color: #8aa4bc;
    }

    .footer-links a {
      color: #8aa4bc;
      text-decoration: none;
      transition: 0.2s;
      padding: 6px 0;
    }

    .footer-links a:hover {
      color: #f43b6b;
    }

    .footer-links a:active {
      opacity: 0.6;
    }

    /* ----- BOTÃO FLUTUANTE PARA VOLTAR (TOPO ESQUERDO) ----- */
    .btn-float-home {
      position: fixed;
      top: max(20px, calc(var(--safe-top) + 20px));
      left: max(20px, calc(var(--safe-left) + 20px));
      width: 48px;
      height: 48px;
      border-radius: 50%;
      background: linear-gradient(145deg, #f43b6b, #ff6b8a);
      color: white;
      border: none;
      box-shadow: 0 8px 28px rgba(244, 59, 107, 0.30);
      cursor: pointer;
      font-size: 1.2rem;
      transition: 0.3s;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 1000;
      text-decoration: none;
      touch-action: manipulation;
    }

    .btn-float-home:hover {
      transform: scale(1.08) translateY(-3px);
      box-shadow: 0 12px 40px rgba(244, 59, 107, 0.45);
    }

    .btn-float-home:active {
      transform: scale(0.92);
    }

    .btn-float-home i {
      color: white;
    }

    /* ----- INDICADOR DE COOKIE SALVO ----- */
    .cookie-saved-indicator {
      display: none;
      align-items: center;
      gap: 6px;
      font-size: 0.7rem;
      color: #25d366;
      font-weight: 600;
      margin-top: 4px;
      padding-left: 4px;
    }

    .cookie-saved-indicator.show {
      display: inline-flex;
    }

    .cookie-saved-indicator i {
      font-size: 0.8rem;
    }

    /* ============================================================ */
    /* ----- ALERT MODAL ----- */
    .modal-overlay {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.65);
      z-index: 9999;
      justify-content: center;
      align-items: center;
      animation: fadeIn 0.3s ease;
      padding: 20px;
      padding-top: max(20px, calc(var(--safe-top) + 20px));
      padding-bottom: max(20px, calc(var(--safe-bottom) + 20px));
      padding-left: max(20px, calc(var(--safe-left) + 20px));
      padding-right: max(20px, calc(var(--safe-right) + 20px));
    }

    /* ✅ Blur só em telas grandes (desktop) */
    @media (min-width: 769px) {
      .modal-overlay {
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
      }
    }

    .modal-overlay.active {
      display: flex;
    }

    .alert-modal .modal-content {
      background: #ffffff;
      border-radius: 40px;
      padding: 40px 34px 34px;
      max-width: 440px;
      width: 100%;
      position: relative;
      box-shadow: 0 40px 100px rgba(0, 0, 0, 0.25);
      animation: slideUp 0.35s ease;
      text-align: center;
      max-height: 90vh;
      max-height: 90dvh;
      overflow-y: auto;
    }

    .alert-modal .modal-content .alert-icon {
      font-size: 4rem;
      margin-bottom: 12px;
      display: block;
    }

    .alert-modal .modal-content .alert-icon.success { color: #25d366; }
    .alert-modal .modal-content .alert-icon.error   { color: #f43b6b; }
    .alert-modal .modal-content .alert-icon.warning { color: #ff9a56; }
    .alert-modal .modal-content .alert-icon.info    { color: #2a7de1; }

    .alert-modal .modal-content h3 {
      font-size: 1.5rem;
      font-weight: 800;
      color: #072033;
      margin-bottom: 8px;
    }

    .alert-modal .modal-content p {
      color: #4a6a84;
      font-size: 0.95rem;
      margin-bottom: 24px;
      line-height: 1.6;
    }

    .alert-modal .modal-content .btn-alert {
      padding: 12px 40px;
      border: none;
      border-radius: 60px;
      font-weight: 700;
      font-size: 1rem;
      cursor: pointer;
      transition: 0.25s;
      background: linear-gradient(145deg, #f43b6b, #ff6b8a);
      color: white;
      box-shadow: 0 8px 24px rgba(244, 59, 107, 0.25);
      min-height: 48px;
      touch-action: manipulation;
    }

    .alert-modal .modal-content .btn-alert:hover {
      transform: scale(1.02);
      box-shadow: 0 12px 32px rgba(244, 59, 107, 0.35);
    }

    .alert-modal .modal-content .btn-alert:active {
      transform: scale(0.97);
    }

    .alert-modal .modal-content .btn-alert.success-btn {
      background: linear-gradient(145deg, #25d366, #128C7E);
      box-shadow: 0 8px 24px rgba(37, 211, 102, 0.25);
    }

    .alert-modal .modal-content .btn-alert.success-btn:hover {
      box-shadow: 0 12px 32px rgba(37, 211, 102, 0.35);
    }

    .alert-modal .modal-content .btn-alert.warning-btn {
      background: linear-gradient(145deg, #ff9a56, #f5a623);
      box-shadow: 0 8px 24px rgba(255, 154, 86, 0.25);
    }

    .alert-modal .modal-content .btn-alert.warning-btn:hover {
      box-shadow: 0 12px 32px rgba(255, 154, 86, 0.35);
    }

    .modal-close {
      position: absolute;
      top: 16px;
      right: 16px;
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: rgba(244, 59, 107, 0.08);
      border: 2px solid rgba(244, 59, 107, 0.15);
      color: #f43b6b;
      font-size: 1.4rem;
      cursor: pointer;
      transition: 0.25s;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 10;
      line-height: 1;
      touch-action: manipulation;
    }

    .modal-close:hover {
      background: linear-gradient(145deg, #f43b6b, #ff6b8a);
      color: white;
      transform: rotate(90deg) scale(1.05);
      box-shadow: 0 8px 24px rgba(244, 59, 107, 0.30);
      border-color: #f43b6b;
    }

    .modal-close:active {
      transform: scale(0.92) rotate(90deg);
    }

    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    @keyframes slideUp {
      from { transform: translateY(30px) scale(0.96); opacity: 0; }
      to { transform: translateY(0) scale(1); opacity: 1; }
    }

    /* ============================================================ */
    /* ----- RESPONSIVO MOBILE ----- */
    /* ============================================================ */
    @media (max-width: 768px) {
      /* ✅ Remove backdrop-filter em mobile — pesa no WebView Android */
      .login-card {
        background: #ffffff;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        box-shadow: 0 12px 40px rgba(0, 20, 40, 0.06);
        border: 1px solid #f0f4f8;
      }

      .form-group .input-wrapper input {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: #f8fbff;
      }
    }

    @media (max-width: 480px) {
      body {
        padding: 12px;
        padding-top: max(16px, calc(var(--safe-top) + 10vh));   /* ✅ ~10% do topo */
        padding-bottom: max(16px, calc(var(--safe-bottom) + 16px));
        padding-left: max(12px, calc(var(--safe-left) + 12px));
        padding-right: max(12px, calc(var(--safe-right) + 12px));
        align-items: flex-start;
      }

      .login-card {
        padding: 28px 22px 24px;
        border-radius: 28px;
      }

      .login-header { margin-bottom: 24px; }
      .login-header .logo { font-size: 1.6rem; }
      .login-header .logo i { font-size: 1.8rem; }
      .login-header h1 { font-size: 1.5rem; }
      .login-header p { font-size: 0.9rem; }

      .form-group { margin-bottom: 16px; }
      .form-group .input-wrapper input {
        padding: 14px 16px 14px 44px;
        font-size: 16px;
        border-radius: 16px;
        min-height: 52px;
      }
      .form-group .input-wrapper i { font-size: 1rem; left: 14px; }

      .form-options {
        flex-direction: row;
        justify-content: space-between;
        gap: 8px;
        font-size: 0.85rem;
      }

      .btn-login {
        padding: 15px;
        font-size: 1rem;
        min-height: 54px;
      }

      .register-link { font-size: 0.9rem; margin-top: 18px; }

      .footer-links {
        flex-wrap: wrap;
        gap: 12px 18px;
        font-size: 0.78rem;
      }

      .alert-modal .modal-content {
        padding: 28px 20px 22px;
        border-radius: 28px;
      }
      .alert-modal .modal-content .alert-icon {
        font-size: 3.2rem;
        margin-bottom: 8px;
      }
      .alert-modal .modal-content h3 { font-size: 1.2rem; }
      .alert-modal .modal-content p { font-size: 0.92rem; margin-bottom: 20px; }
      .alert-modal .modal-content .btn-alert {
        padding: 14px 24px;
        font-size: 1rem;
        width: 100%;
        min-height: 52px;
      }
      .modal-close {
        top: 12px; right: 12px;
        width: 40px; height: 40px;
        font-size: 1.1rem;
      }

      .btn-float-home {
        width: 44px;
        height: 44px;
        font-size: 1.05rem;
        top: max(12px, calc(var(--safe-top) + 12px));
        left: max(12px, calc(var(--safe-left) + 12px));
      }
    }

    @media (max-width: 380px) {
      .login-card { padding: 24px 16px 20px; border-radius: 24px; }
      .login-header h1 { font-size: 1.3rem; }
      .login-header .logo { font-size: 1.4rem; }
      .login-header .logo i { font-size: 1.6rem; }

      .form-options { font-size: 0.8rem; }
      .form-options label input[type="checkbox"] { width: 18px; height: 18px; }

      .alert-modal .modal-content { padding: 24px 18px 20px; border-radius: 24px; }
      .alert-modal .modal-content .alert-icon { font-size: 2.5rem; }
      .alert-modal .modal-content h3 { font-size: 1.1rem; }
    }

    /* ✅ Landscape em celular — sem o deslocamento de 10vh */
    @media (max-height: 500px) and (orientation: landscape) {
      body {
        align-items: flex-start;
        padding-top: max(12px, calc(var(--safe-top) + 12px));
      }
      .login-card { padding: 20px 24px; border-radius: 24px; }
      .login-header { margin-bottom: 14px; }
      .login-header .logo { font-size: 1.3rem; }
      .login-header h1 { font-size: 1.2rem; }
      .form-group { margin-bottom: 10px; }
      .form-group .input-wrapper input { min-height: 46px; padding: 12px 14px 12px 40px; }
      .form-options { margin: 4px 0 14px; }
    }

    /* ✅ Impressão */
    @media print {
      .btn-float-home, .modal-overlay { display: none !important; }
      body { background: white; }
      .login-card { box-shadow: none; border: 1px solid #ddd; }
    }