/*
 * Telas de autenticação do Admin NOVO (login e verificação por código).
 * Laranja da marca escurecido para o texto branco do botão passar no WCAG AA.
 */
:root {
    --brand: #c2561b;
    --brand-hover: #a94b17;
    --brand-ring: rgba(221, 109, 37, .25);
    --navy: #1a2948;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
}

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem 1rem;
    background: radial-gradient(circle at 15% 10%, #eef5ff 0, transparent 45%),
                radial-gradient(circle at 85% 90%, #fff1e8 0, transparent 40%),
                #e8f1fb;
    font-family: Montserrat, sans-serif;
}

.auth-main {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 50px -12px rgba(26, 41, 72, .22), 0 4px 12px rgba(26, 41, 72, .06);
    padding: 2.5rem;
}

@media (max-width: 480px) {
    .auth-card { padding: 1.75rem 1.5rem; }
}

.auth-logo {
    display: block;
    width: 170px;
    height: auto;
    margin: 0 auto 1.5rem;
}

.auth-title {
    color: var(--navy);
    font-weight: 700;
    font-size: 1.375rem;
    text-align: center;
    margin: 0 0 .35rem;
}

.auth-subtitle {
    color: var(--muted);
    font-size: .9rem;
    text-align: center;
    line-height: 1.5;
    margin: 0 0 1.75rem;
}

.auth-card .form-label {
    display: block;
    color: var(--ink);
    font-weight: 600;
    font-size: .85rem;
    margin-bottom: .4rem;
}

.auth-group {
    margin-bottom: 1.1rem;
}

.auth-field {
    position: relative;
}

.auth-field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1rem;
    pointer-events: none;
    z-index: 2;
}

.auth-card .auth-input {
    display: block;
    width: 100%;
    height: 48px;
    padding: 0 14px 0 42px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background-color: #fff;
    color: var(--ink);
    font-size: .95rem;
    transition: border-color .15s, box-shadow .15s;
}

.auth-card .auth-input.has-toggle {
    padding-right: 48px;
}

.auth-card .auth-input::placeholder {
    color: #9ca3af;
}

.auth-card .auth-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-ring);
}

.auth-field:focus-within .auth-field-icon {
    color: var(--brand);
}

.auth-card .auth-input:-webkit-autofill,
.auth-card .auth-input:-webkit-autofill:hover,
.auth-card .auth-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    -webkit-text-fill-color: var(--ink);
    caret-color: var(--ink);
}

.auth-toggle {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.auth-toggle:hover {
    color: var(--ink);
    background: #f3f4f6;
}

.auth-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--brand-ring);
}

.auth-code {
    text-align: center;
    letter-spacing: .5em;
    font-size: 1.4rem !important;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    padding-left: 14px !important;
}

.auth-help {
    display: flex;
    justify-content: flex-end;
    margin-top: .5rem;
}

.auth-link {
    color: var(--brand);
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
}

.auth-link:hover,
.auth-link:focus {
    color: var(--brand-hover);
    text-decoration: underline;
}

.auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    margin-top: 1.25rem;
    border: 0;
    border-radius: 10px;
    background-color: var(--brand);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color .15s, transform .05s;
}

.auth-btn:hover,
.auth-btn:focus {
    background-color: var(--brand-hover);
    color: #fff;
}

.auth-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--brand-ring);
}

.auth-btn:active {
    transform: translateY(1px);
}

.auth-btn:disabled {
    opacity: .75;
    cursor: wait;
}

.auth-btn-secondary {
    margin-top: .75rem;
    background: #fff;
    color: var(--ink);
    border: 1px solid var(--line);
    font-weight: 500;
    text-decoration: none;
}

.auth-btn-secondary:hover,
.auth-btn-secondary:focus {
    background: #f9fafb;
    color: var(--ink);
    border-color: #d1d5db;
    text-decoration: none;
}

.auth-spinner {
    width: 1rem;
    height: 1rem;
    margin-right: .5rem;
    border: 2px solid rgba(255, 255, 255, .5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: auth-spin .7s linear infinite;
}

@keyframes auth-spin {
    to { transform: rotate(360deg); }
}

/* Mensagens */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    margin-bottom: 1.25rem;
    padding: .8rem 1rem;
    border: 1px solid transparent;
    border-left-width: 4px;
    border-radius: 10px;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.45;
    text-align: left;
}

.auth-alert::before {
    font-family: FontAwesome;
    font-weight: normal;
    font-size: 1.1rem;
    line-height: 1.25;
    flex-shrink: 0;
}

.auth-alert-danger {
    background: #fef2f2;
    border-color: #fecaca;
    border-left-color: #dc2626;
    color: #991b1b;
}

.auth-alert-danger::before {
    content: "\f06a"; /* fa-exclamation-circle */
    color: #dc2626;
}

.auth-alert-success {
    background: #f0fdf4;
    border-color: #bbf7d0;
    border-left-color: #16a34a;
    color: #166534;
}

.auth-alert-success::before {
    content: "\f058"; /* fa-check-circle */
    color: #16a34a;
}

.auth-footer {
    margin-top: 1.5rem;
    color: #64748b;
    font-size: .8rem;
    text-align: center;
}

.auth-alert[hidden] {
    display: none;
}
