/* Atlas TMS — Auth pages (AdminLTE + tech) */

:root {
    --auth-primary: #0d6efd;
    --auth-primary-dark: #0a58ca;
    --auth-surface: #ffffff;
    --auth-muted: #64748b;
    --auth-border: #e2e8f0;
    --auth-cover-base: #0b1220;
    --auth-accent: #38bdf8;
    --auth-accent-2: #818cf8;
    --auth-font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --auth-mono: 'JetBrains Mono', ui-monospace, monospace;
}

.login-page {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    font-family: var(--auth-font);
}

.auth-cover-layout {
    min-height: 100vh;
}

/* —— Painel esquerdo —— */
.auth-cover-panel {
    position: relative;
    min-height: 100vh;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    background: var(--auth-cover-base);
    background-image:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(13, 110, 253, 0.35), transparent 55%),
        radial-gradient(ellipse 60% 50% at 90% 80%, rgba(129, 140, 248, 0.25), transparent 50%),
        linear-gradient(160deg, #0b1220 0%, #0f172a 45%, #1e1b4b 100%);
}

.auth-cover-panel--image {
    background-image: var(--auth-cover-image);
    background-size: cover;
    background-position: center;
}

.auth-cover-panel--image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(11, 18, 32, 0.88) 0%, rgba(13, 110, 253, 0.55) 100%);
    z-index: 0;
}

.auth-cover-grid {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.35;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 20%, transparent 75%);
}

.auth-cover-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
    pointer-events: none;
    animation: authGlowPulse 8s ease-in-out infinite;
}

.auth-cover-glow--1 {
    width: 320px;
    height: 320px;
    top: 10%;
    right: 10%;
    background: rgba(56, 189, 248, 0.22);
}

.auth-cover-glow--2 {
    width: 280px;
    height: 280px;
    bottom: 15%;
    left: 5%;
    background: rgba(99, 102, 241, 0.18);
    animation-delay: -4s;
}

@keyframes authGlowPulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); }
}

.auth-cover-content {
    position: relative;
    z-index: 2;
    padding: 3rem 3.5rem 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 640px;
}

.auth-cover-footer {
    position: relative;
    z-index: 2;
    padding: 1.25rem 3.5rem 2rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.auth-cover-brand {
    color: rgba(255, 255, 255, 0.75);
    font-weight: 600;
}

.auth-cover-sep { opacity: 0.4; }

.auth-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    width: fit-content;
    margin-bottom: 1.75rem;
}

.auth-status-pill--sm {
    margin-bottom: 0;
    font-size: 0.68rem;
}

.auth-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.25);
    animation: authStatusBlink 2.5s ease-in-out infinite;
}

@keyframes authStatusBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

.auth-cover-headline {
    font-size: clamp(1.85rem, 3vw, 2.65rem);
    font-weight: 700;
    line-height: 1.15;
    color: #fff;
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
}

.auth-gradient-text {
    background: linear-gradient(90deg, #7dd3fc 0%, #a5b4fc 50%, #38bdf8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-cover-tagline {
    font-size: 1.05rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.72);
    margin: 0 0 2rem;
    max-width: 520px;
}

.auth-stat-row {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.75rem;
}

.auth-stat-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.auth-stat-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateX(4px);
}

.auth-stat-icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.5), rgba(56, 189, 248, 0.35));
    color: #fff;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.auth-stat-card strong {
    display: block;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
}

.auth-stat-card small {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    margin-top: 0.1rem;
}

.auth-tech-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.auth-tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 0.35rem;
    font-family: var(--auth-mono);
    font-size: 0.68rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-tech-badge i {
    font-size: 0.75rem;
    opacity: 0.85;
}

/* —— Lado do formulário —— */
.auth-form-side {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem 1.5rem;
    background: #f8fafc;
    overflow: hidden;
}

.auth-form-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.5;
    background-image: radial-gradient(circle at 1px 1px, #cbd5e1 1px, transparent 0);
    background-size: 24px 24px;
    mask-image: linear-gradient(180deg, transparent, #000 15%, #000 85%, transparent);
    pointer-events: none;
}

.auth-form-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
}

.auth-mobile-hero {
    text-align: center;
    margin-bottom: 1.25rem;
}

.auth-form-inner .login-logo {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-form-inner .login-logo a {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #0f172a;
}

.auth-form-inner .login-logo img {
    max-height: 52px;
}

.login-logo-mark {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
    background: linear-gradient(135deg, var(--auth-primary), #38bdf8);
    box-shadow: 0 8px 24px rgba(13, 110, 253, 0.28);
}

.login-logo-text {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.login-logo-text b,
.login-logo-text .text-primary {
    color: var(--auth-primary);
}

.auth-login-card {
    border: 1px solid var(--auth-border);
    border-radius: 1rem;
    background: var(--auth-surface);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 12px 40px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.auth-login-card::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, var(--auth-primary), var(--auth-accent), var(--auth-accent-2));
}

.auth-form-inner .login-card-body {
    padding: 1.75rem 1.65rem 1.5rem;
}

/* Cabeçalho do form (novo + legado login-box-msg) */
.auth-form-header,
.login-box-msg {
    margin: 0 0 1.5rem;
    text-align: left;
}

.auth-form-title,
.login-box-msg strong {
    display: block;
    margin: 0 0 0.25rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.auth-form-subtitle,
.login-box-msg {
    margin: 0;
    font-size: 0.9rem;
    color: var(--auth-muted);
    line-height: 1.45;
}

.login-box-msg {
    text-align: center;
}

/* Campos */
.auth-field-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.4rem;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    left: 0.9rem;
    color: #94a3b8;
    font-size: 0.85rem;
    pointer-events: none;
    z-index: 2;
}

.auth-input {
    padding: 0.65rem 0.9rem 0.65rem 2.5rem;
    border: 1px solid var(--auth-border);
    border-radius: 0.55rem;
    font-size: 0.9rem;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-input-sm {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    font-size: 0.85rem;
}

.auth-input:focus {
    border-color: var(--auth-primary);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.12);
}

.auth-password-toggle {
    position: absolute;
    right: 0.5rem;
    border: 0;
    background: transparent;
    color: #94a3b8;
    padding: 0.35rem 0.5rem;
    border-radius: 0.35rem;
    cursor: pointer;
    z-index: 2;
    line-height: 1;
}

.auth-password-toggle:hover {
    color: var(--auth-primary);
    background: #f1f5f9;
}

.auth-remember .form-check-label {
    font-size: 0.85rem;
    color: var(--auth-muted);
}

.auth-secure-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-family: var(--auth-mono);
    font-size: 0.68rem;
    font-weight: 500;
    color: #64748b;
    padding: 0.25rem 0.5rem;
    border-radius: 0.3rem;
    background: #f1f5f9;
    border: 1px solid var(--auth-border);
}

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

.auth-link-sm:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}

.auth-submit-btn {
    padding: 0.7rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 0.55rem;
    border: 0;
    background: linear-gradient(135deg, var(--auth-primary) 0%, #2563eb 100%);
    box-shadow: 0 4px 14px rgba(13, 110, 253, 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
    background: linear-gradient(135deg, var(--auth-primary-dark) 0%, #1d4ed8 100%);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: #94a3b8;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

.auth-alt-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.auth-alt-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.75rem 0.5rem;
    border-radius: 0.55rem;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--auth-muted);
    background: #f8fafc;
    border: 1px solid var(--auth-border);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.auth-alt-link i {
    font-size: 1rem;
    opacity: 0.8;
}

.auth-alt-link:hover {
    background: #fff;
    border-color: #cbd5e1;
    color: #334155;
}

.auth-alt-link--primary {
    color: var(--auth-primary);
    background: rgba(13, 110, 253, 0.06);
    border-color: rgba(13, 110, 253, 0.15);
}

.auth-alt-link--primary:hover {
    background: rgba(13, 110, 253, 0.1);
    color: var(--auth-primary-dark);
}

.auth-details {
    font-size: 0.8rem;
    color: var(--auth-muted);
}

.auth-details summary {
    cursor: pointer;
    text-align: center;
    list-style: none;
}

.auth-details summary::-webkit-details-marker { display: none; }

.auth-inline-btn {
    position: absolute;
    right: 0.35rem;
    border-radius: 0.4rem;
}

/* Legado: outras páginas auth */
.auth-form-inner .input-group-text {
    background: #f8fafc;
    border-color: var(--auth-border);
    color: #94a3b8;
    min-width: 2.75rem;
    justify-content: center;
}

.auth-form-inner .form-control {
    border-color: var(--auth-border);
    border-radius: 0.55rem;
}

.auth-footer-links {
    margin-top: 1.75rem;
    text-align: center;
    font-size: 0.78rem;
    color: #94a3b8;
}

.auth-footer-links a {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
}

.auth-footer-links a:hover {
    color: var(--auth-primary);
}

.auth-footer-dot { margin: 0 0.15rem; opacity: 0.5; }

.auth-footer-copy {
    margin-top: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.auth-version-badge {
    font-family: var(--auth-mono);
    font-size: 0.62rem;
    font-weight: 500;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    background: #e2e8f0;
    color: #475569;
}

.auth-mfa-option {
    border-radius: 0.55rem;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.auth-mfa-option:hover {
    background-color: #f8fafc;
}

body.login-page .atlas-cookie-banner {
    z-index: 1090;
}

@media (max-width: 991.98px) {
    .auth-form-side {
        min-height: auto;
        padding: 2.5rem 1.25rem 3rem;
    }
}
