  body {
    display: flex;
    flex-direction: column;
  }

  .page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
  }

  .card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.08);
  }

  .brand {
    text-align: center;
    margin-bottom: 2rem;
  }

  .logo {
    font-family: var( --font-brand );
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--accent);
    letter-spacing: -.02em;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .4rem;
  }
  .logo span { color: #006DB5; }
  /* O logotipo completo: aqui ele está sozinho, sem o nome escrito ao lado. Com
     220px a linha DIÁRIO OFICIAL LEOPOLDENSE ainda se lê; com 260px o cartão
     crescia 69px em relação ao do brasão e o login passava a rolar. */
  .marca-login { width: 260px; max-width: 100%; height: auto; display: block; margin: 0 auto .4rem; }
  /* O logotipo da tela Configurações, de qualquer proporção: cabe na mesma largura e
     numa altura que não faz o cartão rolar. O do Scripta, com 260 px, tem 75 de altura. */
  .marca-login.marca-personalizada { width: auto; max-width: min(260px, 100%); max-height: 96px; }

  .brand p {
    font-size: .82rem;
    color: var(--muted);
  }

  h2 {
    font-family: var( --font-brand );
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--text);
  }

  .field {
    margin-bottom: 1rem;
  }

  label {
    display: block;
    font-size: .8rem;
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-bottom: .4rem;
  }

  input[type=text],
  input[type=password] {
    width: 100%;
    padding: .75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var( --font-base );
    font-size: .95rem;
    color: var(--text);
    background: var(--bg);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
  }
  input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(26,63,111,.1);
    background: var( --surface );
  }

  .btn-entrar {
    width: 100%;
    padding: .85rem;
    background: var(--accent);
    color: var( --color-white );
    border: none;
    border-radius: var(--radius);
    font-family: var( --font-base );
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 1.25rem;
    transition: background .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
  }
  .btn-entrar:hover:not(:disabled) { background: #14305a; }
  .btn-entrar:disabled { opacity: .6; cursor: not-allowed; }

  .spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: var( --color-white );
    border-radius: 50%;
    animation: spin .6s linear infinite;
    display: none;
  }
  @keyframes spin { to { transform: rotate(360deg); } }

  .alerta {
    padding: .75rem 1rem;
    border-radius: var(--radius);
    font-size: .875rem;
    margin-top: 1rem;
    display: none;
  }
  .alerta-erro  { background: #FDECEA; color: #B71C1C; border: 1px solid #FFCDD2; }
  .alerta-ok    { background: #E8F5EC; color: #1B7A3E; border: 1px solid #C8E6C9; }
  .alerta-info  { background: #E3F0FF; color: #1E4E8C; border: 1px solid #BBDEFB; margin: 0 0 1rem; }

  .link-publico {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
    font-size: .82rem;
    color: var(--muted);
    text-decoration: none;
    transition: color .15s;
  }
  .link-publico:hover { color: var(--accent); }

  footer {
    border-top: 1px solid var(--border);
    padding: 1rem 2rem;
    text-align: center;
    font-size: .78rem;
    color: var(--muted);
    line-height: 1.8;
  }

  /* Tela baixa: notebook de 1366x768 (sobram ~657px sob a barra do navegador) ou
     1920x1080 com o Windows a 125% (~730px). O login rolava nelas desde antes do
     logotipo novo; aqui ele cabe inteiro, com o mesmo conteúdo, só mais junto. */
  @media (max-height: 860px) {
    .page { padding: 1rem; }
    .card { padding: 1.5rem 2.25rem; }
    .brand { margin-bottom: 1rem; }
    .marca-login { width: 220px; margin-bottom: .2rem; }
    .marca-login.marca-personalizada { width: auto; max-height: 80px; }
    h2 { margin-bottom: .9rem; }
    .field { margin-bottom: .7rem; }
    label { margin-bottom: .25rem; }
    .btn-entrar { margin-top: .9rem; padding: .7rem; }
    .ux-inline-025 { margin-top: .7rem; }
    .link-publico { margin-top: .7rem; }
    .credito-login { margin-top: 1rem; padding-top: 1rem; }
    .credito-login img { height: 40px; }
    footer { padding: .5rem 2rem; line-height: 1.5; }
  }
