/* =============================================================================
   LOGIN / CRIAR CONTA — versão refinada
   ============================================================================= */

:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;

  --accent: #f97316;
  --accent-dark: #ea580c;

  --radius: 14px;
  --transition: .22s ease;
}

/* =========================================
   FUNDO
   ========================================= */
body.login-page {
    min-height: 100vh;
    background: radial-gradient(
        circle at top,
        #e9eef5,
        #ffffff 70%
    );
}



/* =========================================
   CONTAINER
   ========================================= */
.page {
    min-height: calc(100vh - 160px); /* header + footer */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* =========================================
   CARD
   ========================================= */
.login-card {
    width: 100%;
    max-width: 420px;

    background: #ffffff;
    padding: 40px 34px;
    border-radius: 18px;

    border: 1px solid #e6eaf0;
    box-shadow: 0 20px 60px rgba(0,0,0,0.10);

    transition: all .25s ease;
}

.login-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 50px rgba(0,0,0,0.12);
}

.login-card:focus-within {
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

/* =========================================
   LABELS
   ========================================= */
.login-card label {
    font-size: 14px;
    font-weight: 600;
    margin-top: 12px;
    margin-bottom: 2px;
    display: block;
    color: #222;
}

/* =========================================
   INPUTS (CORRIGIDO PROBLEMA DA SENHA)
   ========================================= */
.login-card input {
    width: 100%;
    padding: 16px 18px;
    font-size: 15px;
    border-radius: 12px;
    border: 1px solid #dfe3ea;
    background: #f9fafb;
    transition: all .2s ease;
    margin-bottom: 14px;
}

.login-card input:focus {
    border-color: var(--cor-primaria-azul);
    box-shadow: 0 0 0 4px rgba(0,45,98,0.12);
    background: #ffffff;
    outline: none;
}

.login-card input.readonly {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #475569;
  cursor: not-allowed;
}

/* =========================================
   SELECT (ASSUNTO / CATEGORIA)
   ========================================= */
.login-card select {
  width: 100%;
  padding: 16px 18px;
  font-size: 15px;
  border-radius: 12px;
  border: 1px solid #dfe3ea;
  background: #f9fafb;
  transition: all .2s ease;
  margin-bottom: 14px;

  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24'%3E%3Cpath fill='%2364748b' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 14px;
  cursor: pointer;
}

.login-card select:focus {
  border-color: var(--cor-primaria-azul);
  box-shadow: 0 0 0 4px rgba(0,45,98,0.12);
  background-color: #fff;
  outline: none;
}

/* =========================================
   TEXTAREA (MENSAGEM)
   ========================================= */
.login-card textarea {
  width: 100%;
  min-height: 140px;              /* mais espaço p/ escrever */
  padding: 16px 18px;
  font-size: 15px;
  line-height: 1.5;

  border-radius: 14px;
  border: 1px solid #dfe3ea;
  background: #f9fafb;

  resize: vertical;               /* permite só crescer altura */
  transition: all .2s ease;
  font-family: inherit;
}

/* Foco */
.login-card textarea:focus {
  background: #ffffff;
  border-color: var(--cor-primaria-azul);
  box-shadow: 0 0 0 4px rgba(0,45,98,0.12);
  outline: none;
}

/* Hover sutil */
.login-card textarea:hover {
  border-color: #cfd5df;
}

/* Placeholder mais elegante */
.login-card textarea::placeholder {
  color: #94a3b8;
}

/* Estado inválido (HTML5) */
.login-card textarea:invalid {
  border-color: #f3c0c0;
}


.login-card label[for="mensagem"] {
  margin-top: 18px;
}


/* =========================================
   LINK ESQUECI
   ========================================= */
.link-esqueci {
    display: block;
    text-align: right;
    margin-top: 4px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cor-primaria-azul);
    text-decoration: none;
}

.link-esqueci:hover {
    color: var(--cor-secundaria-laranja);
}

/* =========================================
   BOTÃO
   ========================================= */
.actions button {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: none;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    color: #fff;

    background: linear-gradient(135deg, #002D62, #0a4ea3);
    box-shadow: 0 6px 18px rgba(0,45,98,0.25);
    transition: all .2s ease;
}

.actions button:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #FF7F00, #ff9a2f);
    box-shadow: 0 10px 28px rgba(0,45,98,0.35);
}

/* =========================================
   MENSAGENS
   ========================================= */
#msg .error, 
#msg .success {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 0.95rem;
    animation: fadeIn .25s ease;
}

#msg .error {
    background: #fde8e8;
    border: 1px solid #f3c0c0;
    color: #7d1f1f;
}

#msg .success {
    background: #e6f6e8;
    border: 1px solid #cfe9cc;
    color: #2f6b31;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =========================================
   HERO (AJUSTADO)
   ========================================= */
body.login-page section.hero {
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border);
    padding: 50px 40px 20px;
    text-align: left;
}

.hero h1 {
    font-size: 34px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
}

.hero p {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 500px;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    margin-top: 60px !important;
    padding: 25px 5% !important;
    background: var(--cor-primaria-azul) !important;
    color: #e5e7eb !important;
    text-align: center !important;
    font-size: 0.9rem !important;
}

.login-title {
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4px;
}

.login-sub {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* ================= MODAL ================= */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  pointer-events: none;
  transition: all .25s ease;

  z-index: 9999;
}

.modal.active {
  opacity: 1;
  pointer-events: auto;
}

/* BOX */
.modal-box {
  width: 100%;
  max-width: 420px;

  background: #ffffff;
  padding: 36px 30px;
  border-radius: 16px;

  box-shadow: 0 20px 60px rgba(0,0,0,0.15);

  transform: translateY(20px) scale(0.98);
  transition: all .25s ease;
}

.modal.active .modal-box {
  transform: translateY(0) scale(1);
}

/* BOTÃO FECHAR */
.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;

  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #555;
}

.modal-close:hover {
  color: #000;
}

/* FOOTER */
.modal-footer {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
}


.login-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 4px;
}

.login-icon img {
  width: 80px;      /* ajuste conforme o PNG */
  height: 80px;
  object-fit: contain;
  opacity: 0.9;     /* opcional */
}


.login-footer {
  text-align: center;
  margin-top: 10px;
  font-size: 14px;
}

.code-input {
  width: 72px !important;
  height: 48px;
  color: #374151;

  padding: 0 !important;
  margin: 0 !important;

  font-family: monospace;
  font-size: 20px !important;
  font-weight: 600;

  text-align: center;
  text-transform: uppercase;

  box-sizing: border-box;
  min-width: 0;

  line-height: 48px; /* ajuda renderização vertical */
}


.login-card .code-input:focus {
  color: var(--cor-primaria-azul);
}


.code-group {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.code-sep {
  opacity: 0.5;
  font-weight: 600;
}

.actions {
  margin-top: 24px;
}

.btn-primary {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background .2s ease, transform .12s ease, box-shadow .12s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
}

.login-footer {
  margin-top: 10px;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}

.login-footer a {
  margin-left: 4px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.login-footer a:hover {
  text-decoration: underline;
}