/* Visual das telas de acesso — mesmo padrão do Sistema Jurídico (fundo azul-marinho, cartão branco) */
*, *::before, *::after { box-sizing: border-box; }

html { color-scheme: light; }

body.auth {
  margin: 0;
  min-height: 100vh;
  background-color: #1a1a2e;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 12px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: #212529;
}

.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.login-card.wide { max-width: 640px; }

.logo { text-align: center; font-size: 2.5rem; margin-bottom: 8px; line-height: 1.2; }
.login-card h2 { color: #1a1a2e; font-weight: 700; text-align: center; margin: 0 0 8px; font-size: 1.75rem; }
.login-card .subtitle { text-align: center; color: #888; margin: 0 0 24px; }
.login-card h3.section {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: .06em;
  color: #1a1a2e; margin: 24px 0 12px; padding-bottom: 6px; border-bottom: 1px solid #eee;
}

.mb-3 { margin-bottom: 1rem; }
.form-label { display: block; font-weight: 600; color: #444; margin-bottom: 0.4rem; }
.form-label .req { color: #dc3545; }
.form-label .opt { color: #6c757d; font-weight: 400; font-size: .8rem; }

.form-control {
  display: block; width: 100%;
  border-radius: 8px; padding: 10px 14px;
  border: 1px solid #ddd; background: #fff; color: #212529;
  font: inherit;
}
.form-control:focus { outline: none; border-color: #1a1a2e; box-shadow: 0 0 0 0.2rem rgba(26, 26, 46, 0.15); }
.form-control.invalid { border-color: #dc3545; }
.hint { display: block; font-size: .8rem; color: #6c757d; margin-top: 4px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) {
  .login-card { padding: 28px 20px; }
  .grid-2 { grid-template-columns: 1fr; }
}

.input-group { position: relative; }
.input-group .form-control { padding-right: 44px; }
.toggle-pass {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 6px 10px; font-size: 1.1rem; line-height: 1; color: #6c757d;
}
.toggle-pass:hover { color: #1a1a2e; }

.row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.form-check { display: flex; align-items: flex-start; gap: 8px; }
.form-check input { margin-top: 5px; accent-color: #1a1a2e; }
.form-check label { cursor: pointer; }
.radio-row { display: flex; gap: 20px; flex-wrap: wrap; padding-top: 6px; }
.radio-row label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.radio-row input { accent-color: #1a1a2e; }

.btn-login {
  display: block; width: 100%;
  background-color: #1a1a2e; color: #fff; border: none; border-radius: 8px;
  padding: 12px; font-size: 1rem; font-weight: 600; cursor: pointer; text-align: center; text-decoration: none;
}
.btn-login:hover { background-color: #16213e; }
.btn-login:disabled { opacity: .6; cursor: not-allowed; }
.btn-outline {
  display: block; width: 100%;
  background: #fff; color: #444; border: 1px solid #6c757d; border-radius: 8px;
  padding: 10px; font-size: .95rem; cursor: pointer;
}
.btn-outline:hover { background: #f1f3f5; }
.btn-danger { background-color: #dc3545; }
.btn-danger:hover { background-color: #bb2d3b; }

a { color: #0d6efd; }
a.muted, .small.muted { color: #6c757d; }
.small { font-size: .875rem; }
.center { text-align: center; }
.mt-2 { margin-top: .5rem; } .mt-3 { margin-top: 1rem; } .mb-0 { margin-bottom: 0; }
hr { border: 0; border-top: 1px solid #dee2e6; margin: 1rem 0; }

.alert { border-radius: 8px; padding: 12px 16px; margin-bottom: 1rem; font-size: .95rem; border: 1px solid transparent; }
.alert-danger { background: #f8d7da; color: #842029; border-color: #f5c2c7; }
.alert-success { background: #d1e7dd; color: #0f5132; border-color: #badbcc; }
.alert-warning { background: #fff3cd; color: #664d03; border-color: #ffecb5; }
.alert-info { background: #cff4fc; color: #055160; border-color: #b6effb; }
.alert ul { margin: 0; padding-left: 1.2rem; }
[hidden] { display: none !important; }

/* força da senha */
.strength { height: 6px; background: #e9ecef; border-radius: 3px; margin-top: 8px; overflow: hidden; }
.strength > span { display: block; height: 100%; width: 0; background: #dc3545; transition: width .2s, background .2s; }
.strength-label { font-size: .8rem; color: #6c757d; margin-top: 4px; min-height: 1.2em; }

/* campo de código */
.code-input { text-align: center; font-size: 1.8rem; letter-spacing: .5rem; font-weight: 700; }

/* modal de termos */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .6);
  display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50;
}
.modal {
  background: #212529; color: #f8f9fa; border: 1px solid #6c757d; border-radius: 12px;
  width: 100%; max-width: 760px; max-height: 90vh; display: flex; flex-direction: column;
}
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid #495057; }
.modal header h5 { margin: 0; font-size: 1.15rem; }
.modal .close { background: none; border: none; color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.modal .body { padding: 18px; overflow-y: auto; }
.modal .body h4 { margin: 1rem 0 .3rem; font-size: 1.05rem; }
.modal .body p, .modal .body li { color: #dee2e6; font-size: .95rem; }
.modal footer { padding: 12px 18px; border-top: 1px solid #495057; text-align: right; }
.modal footer button { background: #6c757d; color: #fff; border: none; border-radius: 6px; padding: 8px 16px; cursor: pointer; }

/* topo da área logada (conta) */
.account-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: .9rem; }
.badge { display: inline-block; font-size: .75rem; padding: 2px 8px; border-radius: 999px; background: #d1e7dd; color: #0f5132; font-weight: 600; }
.kv { color: #666; font-size: .85rem; }
