    :root {
      --primary-color: #382854;
      --secondary-color: #F5007E;
    }

    /* ===== Reset & Base ===== */
    * { box-sizing: border-box; }

    body {
      background-color: var(--primary-color);
      min-height: 100vh;
      min-height: 100dvh;          /* dynamic viewport para mobile */
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: 'Source Sans Pro', sans-serif;
      margin: 0;
      padding: 10px;
    }

    /* ===== Container ===== */
    .login-container {
      width: 100%;
      max-width: 420px;
      padding: 10px;
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    /* ===== Card ===== */
    .login-card {
      width: 100%;
      background-color: rgba(255, 255, 255, 0.95);
      border-radius: 15px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
      overflow: hidden;
    }

    .login-header {
      background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
      padding: 30px 20px;
      align-items: center;
      color: white;
    }

    .login-logo {
      width: 80px;
      height: 80px;
      margin: 0 auto 15px;
      background-color: white;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }

    .login-logo img {
      width: 50px;
      height: 50px;
    }

    .login-title {
      font-size: 1.8rem;
      font-weight: bold;
      margin: 0;
    }

    .login-subtitle {
      font-size: 1rem;
      opacity: 0.9;
      margin: 5px 0 0;
    }

    /* ===== Body do formulário ===== */
    .login-body {
      padding: 28px;
    }

    .form-group {
      margin-bottom: 1.25rem;
    }

    .input-group {
      position: relative;
    }

    .input-group-text {
      background-color: var(--primary-color);
      border: 2px solid var(--primary-color);
      color: white;
      border-right: none;
    }

    .form-control {
      border: 2px solid #e0e0e0;
      border-left: none;
      padding: 10px 14px;
      font-size: 0.95rem;
      transition: all 0.3s ease;
    }

    .form-control:focus {
      border-color: var(--secondary-color);
      box-shadow: 0 0 0 0.2rem rgba(245, 0, 126, 0.25);
    }

    .form-control:focus + .input-group-text {
      border-color: var(--secondary-color);
    }

    /* ===== Botão ===== */
    .btn-login {
      background: linear-gradient(135deg, var(--secondary-color), #e0006e);
      border: none;
      color: white;
      padding: 11px 28px;
      font-size: 1.05rem;
      font-weight: 600;
      border-radius: 25px;
      width: 100%;
      transition: all 0.3s ease;
      box-shadow: 0 4px 15px rgba(245, 0, 126, 0.3);
    }

    .btn-login:hover {
      transform: translateY(-2px);
      box-shadow: 0 6px 20px rgba(245, 0, 126, 0.4);
      background: linear-gradient(135deg, #e0006e, var(--secondary-color));
    }

    .btn-login:active {
      transform: translateY(0);
    }

    /* ===== Opções ===== */
    .login-options {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 18px;
    }

    .remember-me {
      display: flex;
      align-items: center;
    }

    .remember-me input[type="checkbox"] {
      margin-right: 8px;
      accent-color: var(--secondary-color);
    }

    .forgot-password {
      color: var(--primary-color);
      text-decoration: none;
      font-size: 0.9rem;
    }

    .forgot-password:hover {
      color: var(--secondary-color);
      text-decoration: underline;
    }

    .register-link {
      text-align: center;
      margin-top: 18px;
      color: var(--primary-color);
    }

    .register-link a {
      color: var(--secondary-color);
      text-decoration: none;
      font-weight: 600;
    }

    .register-link a:hover {
      text-decoration: underline;
    }

    /* ===== Alerts genéricos ===== */
    .alert {
      border-radius: 10px;
      border: none;
      padding: 12px 15px;
      margin-bottom: 20px;
    }

    .alert-danger {
      background-color: rgba(245, 0, 126, 0.1);
      color: #a00;
      border-left: 4px solid var(--secondary-color);
    }

    .alert-success {
      background-color: rgba(56, 40, 84, 0.1);
      color: var(--primary-color);
      border-left: 4px solid var(--primary-color);
    }

    /* ===== Footer ===== */
    .footer {
      text-align: center;
      margin-top: 24px;
      color: rgba(255, 255, 255, 0.7);
      font-size: 0.85rem;
    }

    .footer a {
      color: white;
      text-decoration: none;
    }

    .footer a:hover {
      text-decoration: underline;
    }

    /* ===== Spinner ===== */
    .spinner-border {
      width: 1rem;
      height: 1rem;
      border-width: 0.15em;
    }

    /* ===== Logo da página de login ===== */
    .login-logo-img {
      width: 100%;
      max-width: 380px;
      height: auto;
      cursor: pointer;
      margin-bottom: 10px;
    }

    /* ===== Botão voltar (mobile) ===== */
    .back-button {
      position: absolute;
      top: 10px;
      left: 10px;
      width: 36px;
      height: 36px;
      font-size: 18px;
      color: #333;
      text-decoration: none;
      z-index: 1000;
      cursor: pointer;
      transition: color 0.3s ease;
      background-color: rgba(255, 255, 255, 0.9);
      border-radius: 50%;
      display: none;
      align-items: center;
      justify-content: center;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    .back-button:hover {
      color: #007bff;
      background-color: #fff;
    }

    .logo-link {
      display: inline-block;
      text-decoration: none;
      transition: transform 0.3s ease;
    }

    .logo-link:hover {
      transform: scale(0.98);
    }

    /* ===== Alertas de erro personalizados ===== */
    .login-alert {
      border-radius: 10px;
      padding: 14px 18px;
      margin-bottom: 16px;
      font-size: 14px;
      line-height: 1.4;
      display: flex;
      align-items: flex-start;
      gap: 10px;
      text-align: left;
      animation: slideDown 0.4s ease;
    }

    .login-alert i {
      font-size: 18px;
      margin-top: 2px;
      flex-shrink: 0;
    }

    .login-alert .alert-content {
      flex: 1;
    }

    .login-alert .alert-title {
      font-weight: 700;
      font-size: 14px;
      margin-bottom: 3px;
    }

    .login-alert .alert-text {
      margin-bottom: 6px;
    }

    .login-alert .alert-action a {
      font-weight: 600;
      text-decoration: underline;
    }

    .login-alert-danger {
      background: #fff0f0;
      border: 1px solid #f5c6cb;
      color: #721c24;
    }

    .login-alert-danger .alert-action a {
      color: #c0392b;
    }

    .login-alert-warning {
      background: #fff8e1;
      border: 1px solid #ffc107;
      color: #856404;
    }

    .login-alert-warning .alert-action a {
      color: #d68910;
    }

    .login-alert-system {
      background: #f0f0f0;
      border: 1px solid #ccc;
      color: #333;
    }

    @keyframes slideDown {
      from {
        opacity: 0;
        transform: translateY(-10px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }

    /* ===== Layout compacto com erro ===== */
    .has-error .login-logo-img {
      max-width: 260px;
      margin-bottom: 6px;
    }

    .has-error .login-body {
      padding: 18px 24px 20px;
    }

    .has-error .form-group {
      margin-bottom: 0.9rem;
    }

    .has-error .login-options {
      margin-bottom: 12px;
    }

    .has-error .register-link {
      margin-top: 12px;
    }

    .has-error .footer {
      margin-top: 14px;
    }

    /* =================================
       TABLET  (481px – 768px)
       ================================= */
    @media (max-width: 768px) {
      .login-container {
        max-width: 380px;
      }
      .login-body {
        padding: 24px 22px;
      }
      .back-button {
        display: flex !important;
      }
      .login-logo-img {
        max-width: 300px;
        margin-top: 40px;
      }
      .has-error .login-logo-img {
        max-width: 220px;
        margin-top: 38px;
      }
    }

    /* =================================
       MOBILE  (≤ 480px)
       ================================= */
    @media (max-width: 480px) {
      body {
        padding: 6px;
      }
      .login-container {
        max-width: 100%;
        padding: 6px;
      }
      .login-card {
        border-radius: 12px;
      }
      .login-body {
        padding: 20px 16px;
      }
      .login-logo-img {
        max-width: 240px;
        margin-top: 38px;
        margin-bottom: 6px;
      }
      .form-control {
        padding: 9px 12px;
        font-size: 0.9rem;
      }
      .form-group {
        margin-bottom: 1rem;
      }
      .btn-login {
        padding: 10px 20px;
        font-size: 1rem;
      }
      .login-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 14px;
      }
      .footer {
        margin-top: 18px;
        font-size: 0.78rem;
      }

      /* com erro em mobile */
      .has-error .login-logo-img {
        max-width: 180px;
        margin-top: 36px;
        margin-bottom: 4px;
      }
      .has-error .login-body {
        padding: 14px 16px 16px;
      }
      .has-error .login-alert {
        padding: 10px 12px;
        margin-bottom: 10px;
        font-size: 12px;
        gap: 8px;
      }
      .has-error .login-alert i {
        font-size: 16px;
      }
      .has-error .login-alert .alert-title {
        font-size: 13px;
      }
      .has-error .form-group {
        margin-bottom: 0.75rem;
      }
      .has-error .register-link {
        margin-top: 10px;
      }
      .has-error .footer {
        margin-top: 10px;
      }
    }

    /* =================================
       MOBILE PEQUENO  (≤ 360px)
       ================================= */
    @media (max-width: 360px) {
      .login-body {
        padding: 16px 12px;
      }
      .form-group {
        margin-bottom: 0.9rem;
      }
      .footer {
        font-size: 0.7rem;
      }
      .login-logo-img {
        max-width: 200px;
      }
      .has-error .login-logo-img {
        max-width: 160px;
      }
      .has-error .login-body {
        padding: 12px 12px 14px;
      }
    }