@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&family=Open+Sans:wght@300;400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Roboto, 'Open Sans', sans-serif;
}

body {
    background: #f7f7f7;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
}

/* ── Container e card ─────────────────────────── */

.container {
    width: 100%;
    max-width: 270px;
}

@media (min-width: 576px) {
    .container { max-width: 270px; }
}

@media (min-width: 768px) {
    .container { max-width: 360px; }
}

@media (min-width: 992px) {
    .container { max-width: 480px; }
}

@media (min-width: 1200px) {
    .container { max-width: 570px; }
}

.card {
    background: #ffffff;
    border-radius: 5px;
    box-shadow: 0 10px 34px -15px rgba(0, 0, 0, 0.24);
    overflow: hidden;
}

/* ── Área do logo ─────────────────────────────── */

.card-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 2rem 1.5rem;
}

.card-logo img {
    max-width: 200px;
    height: auto;
}

/* ── Área do formulário ───────────────────────── */

.form-wrap {
    padding: 1.25rem 2rem 2rem;
}

/* ── Chip de contexto OAuth2 ──────────────────── */

.client-context {
    text-align: center;
    margin-bottom: 1.25rem;
}

.client-context span {
    display: inline-block;
    background: #fff5f2;
    color: #ff5722;
    border: 1px solid #ffccbc;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 500;
}

/* ── Grupos de campo ──────────────────────────── */

.form-group {
    margin-bottom: 1rem;
    position: relative;
}

.form-group label {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #334155;
}

.form-group input {
    width: 100%;
    height: 48px;
    background: #ffffff;
    color: #334155;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid #e7eaec;
    padding: 0 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: none;
}

.form-group input:focus {
    border-color: #ff5722;
    box-shadow: 0 0 0 2px rgba(255, 87, 34, 0.12);
}

.form-group input::placeholder {
    color: #bbb;
    font-weight: 400;
}

/* ── Campo senha com toggle ───────────────────── */

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 44px;
}

.toggle-senha {
    position: absolute;
    right: 0;
    top: 0;
    width: 44px;
    height: 48px;
    background: none;
    border: none;
    cursor: pointer;
    color: #bbb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    padding: 0;
}

.toggle-senha:hover {
    color: #666;
}

/* ── Info auxiliar (recuperação de senha) ─────── */

.info-text {
    margin-bottom: 1rem;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

/* ── Botão principal ──────────────────────────── */

.btn-submit {
    width: 100%;
    height: 48px;
    background: #ff5722;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    letter-spacing: 0.3px;
}

.btn-submit:hover {
    background: #e64a19;
}

.btn-submit:disabled {
    background: #ffab91;
    cursor: not-allowed;
}

/* ── Spinner de loading (substitui o botão no submit) ── */

.spinner-wrap {
    display: none;
    justify-content: center;
    align-items: center;
    height: 48px;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 4px solid rgba(255, 87, 34, 0.2);
    border-top-color: #ff5722;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Links do formulário ──────────────────────── */

.form-links {
    text-align: center;
    margin-top: 1rem;
    font-size: 16px;
    line-height: 24px;
}

.form-links a {
    display: block;
    color: #2c3f50;
    text-decoration: none;
    font-style: italic;
    font-weight: 700;
    line-height: 2;
}

.form-links a:hover {
    color: #1a252f;
    text-decoration: underline;
}

/* ── Mensagem de erro ─────────────────────────── */

.error-msg {
    background: #fff5f2;
    color: #c0392b;
    border: 1px solid #ffccbc;
    border-radius: 5px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 1rem;
}

/* ── Título de tela (nova senha etc.) ─────────── */

.screen-title {
    font-size: 16px;
    font-weight: 600;
    color: #334155;
    text-align: center;
    margin-bottom: 1.25rem;
}

/* ── Conteúdo de mensagem (confirmação) ───────── */

.message-content {
    text-align: center;
    padding: 0.5rem 0;
}

.message-icon {
    font-size: 36px;
    color: #ff5722;
    margin-bottom: 1rem;
}

.message-content p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}
