/* ============================================================
   Telas de autenticacao (login interno e Portal do Contador).
   Extraido de login.html sem alteracoes visuais: editar aqui
   reflete em todas as telas de acesso.
   ============================================================ */

:root {
    --hero-line: #1d2a59;
    --hero-ring: rgba(27, 50, 108, 0.7);
    --card-border: #2a3d77;
    --card-bg: rgba(17, 26, 61, 0.78);
    --field-border: #2a3a70;
    --field-bg: rgba(11, 18, 49, 0.72);
    --text-primary: #f0f4ff;
    --text-soft: #d9e6ff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --brand: #1369f5;
    --brand-hover: #2578ff;
    --info: #14e0d1;
    --success: #22c55e;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    background: #070c23;
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.auth-shell {
    display: flex;
    min-height: 100vh;
    overflow: hidden;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.auth-brand__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.auth-brand__word {
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, #1369f5, #14e0d1, #6cf3a6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-brand--mobile {
    display: none;
}

.auth-brand--mobile .auth-brand__icon {
    width: 36px;
    height: 36px;
}

.auth-brand--mobile .auth-brand__word {
    font-size: 1.15rem;
}

/* ---------- painel decorativo ---------- */
.auth-hero {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    border-right: 1px solid var(--hero-line);
    overflow: hidden;
}

.auth-hero__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 48% 46%, rgba(19, 105, 245, 0.28), transparent 36%),
        radial-gradient(circle at 18% 12%, rgba(20, 224, 209, 0.14), transparent 30%),
        linear-gradient(135deg, #071027 0%, #0b1231 48%, #071029 100%);
}

.auth-hero__ring {
    position: absolute;
    left: 15%;
    top: 17%;
    height: 64%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border: 1px solid var(--hero-ring);
}

.auth-hero__ring--inner {
    left: 29%;
    top: 31%;
    height: 36%;
}

.auth-hero__dots {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 14rem;
    width: 14rem;
    background-image: radial-gradient(circle, rgba(20, 224, 209, 0.18) 1px, transparent 1px);
    background-size: 18px 18px;
    opacity: 0.35;
}

.auth-hero__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 44px 48px;
}

.auth-hero__tagline {
    margin: 10px 0 0 70px;
    color: var(--text-soft);
    font-size: 0.95rem;
}

.auth-hero__stage {
    position: relative;
    flex: 1 1 auto;
    margin-top: 24px;
}

.auth-hero__illustration {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 92%;
    max-height: 560px;
    object-fit: contain;
    filter: drop-shadow(0 28px 40px rgba(0, 0, 0, 0.45));
}

.auth-card {
    position: absolute;
    width: 168px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    backdrop-filter: blur(6px);
    box-shadow: 0 20px 45px rgba(6, 12, 35, 0.55);
}

.auth-card--licencas {
    left: 0;
    top: 8%;
}

.auth-card--clientes {
    right: 0;
    top: 24%;
}

.auth-card__title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: var(--text-primary);
    font-size: 0.8125rem;
    font-weight: 600;
}

.auth-card__title i {
    color: var(--info);
}

.auth-card__value {
    display: block;
    margin-top: 8px;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.auth-card__hint {
    margin: 2px 0 0;
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* ---------- painel do formulário ---------- */
.auth-form-side {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.auth-form-side__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 45%, rgba(19, 105, 245, 0.17), transparent 36%),
        linear-gradient(135deg, #070b20 0%, #0a1232 100%);
}

.auth-form {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 420px;
}

.auth-form__title {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 700;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-field label {
    color: var(--text-soft);
    font-size: 0.875rem;
    font-weight: 600;
}

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

.auth-field__control > i {
    position: absolute;
    left: 18px;
    color: rgba(217, 230, 255, 0.7);
    font-size: 1rem;
    pointer-events: none;
}

.auth-field__control input {
    width: 100%;
    height: 56px;
    padding: 0 18px 0 46px;
    border-radius: 12px;
    border: 1px solid var(--field-border);
    background: var(--field-bg);
    color: var(--text-primary);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.15s ease;
}

.auth-field__control input::placeholder {
    color: var(--text-muted);
}

.auth-field__control input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(19, 105, 245, 0.22);
}

.auth-field__control input[type="password"],
.auth-field__control input[data-has-toggle] {
    padding-right: 46px;
}

.auth-field__toggle {
    position: absolute;
    right: 16px;
    border: none;
    background: transparent;
    color: rgba(217, 230, 255, 0.7);
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

.auth-field__toggle:hover {
    color: var(--text-primary);
}

.auth-submit {
    height: 58px;
    border: none;
    border-radius: 12px;
    background: var(--brand);
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 600;
    box-shadow: 0 20px 45px rgba(19, 105, 245, 0.2);
    transition: opacity 0.15s ease;
}

.auth-submit:hover:not(:disabled) {
    opacity: 0.9;
}

.auth-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.auth-submit:focus-visible,
.auth-field__toggle:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

#msg {
    margin: 0;
}

@media (max-width: 991.98px) {
    .auth-hero {
        display: none;
    }

    .auth-brand--mobile {
        display: inline-flex;
        margin-bottom: 4px;
    }

    .auth-form-side {
        padding: 32px 20px;
    }
}

@media (max-width: 420px) {
    .auth-form__title {
        font-size: 1.5rem;
    }
}
