/* ============================================
   ESTILOS DA PÁGINA DE LOGIN
   Tema: Construção Civil Profissional
   ============================================ */

/* ============================================
   LOGIN — Split Layout Premium Dark
   Inspirado em design minimalista full-viewport
   ============================================ */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --brand:     #2563eb;
    --brand-mid: #1d4ed8;
    --brand-end: #3b82f6;
    --bg:        #0b1020;
    --bg-r:      #111827;
    --text:      #f0f0f0;
    --muted:     rgba(226, 232, 240, 0.78);
    --input-bg:  rgba(15, 23, 42, 0.55);
    --input-bd:  rgba(148, 163, 184, 0.36);
    --success:   #10d48e;
    --surface:   rgba(37, 99, 235, 0.08);
}

body {
    font-family: 'Manrope', 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    background: radial-gradient(circle at 18% 12%, rgba(37, 99, 235, 0.12) 0%, transparent 36%), var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

/* ===== TIPOGRAFIA: Fonte profissional para títulos ===== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700;800&display=swap');

/* ===== SPLIT GRID ===== */
.login-container {
    display: grid;
    grid-template-columns: 480px 1fr;
    min-height: 100vh;
    z-index: 1;
}
/* ===== LEFT PANEL — Formulário ===== */
.login-panel-left {
    background: linear-gradient(180deg, rgba(11, 16, 32, 0.97) 0%, rgba(11, 16, 32, 0.92) 100%);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    padding: 44px 56px;
    position: relative;
    z-index: 1;
    overflow-y: auto;
}

/* Brand strip top */
.login-top-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(96, 165, 250, 0.24);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.55), rgba(15, 23, 42, 0.38));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 28px rgba(2, 6, 23, 0.28);
    position: relative;
}

.login-top-brand::after {
    content: 'Ambiente profissional';
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: rgba(147, 197, 253, 0.95);
    background: rgba(37, 99, 235, 0.16);
    border: 1px solid rgba(96, 165, 250, 0.35);
    border-radius: 999px;
    padding: 4px 8px;
    white-space: nowrap;
}

.login-top-brand img {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    object-fit: contain;
    padding: 3px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.30);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.22);
}

.login-top-brand span {
    font-family: 'Poppins', 'Manrope', sans-serif;
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.2px;
    margin-right: auto;
}

/* Content area (headline + form) */
.login-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 0;
    position: relative;
}

.login-content::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(96, 165, 250, 0), rgba(96, 165, 250, 0.52), rgba(96, 165, 250, 0));
}

/* Headline inspirado na referência */
.login-hero {
    width: min(430px, 100%);
    margin: 0 auto 26px;
    text-align: center;
}

.login-headline {
    font-family: 'Sora', 'Manrope', 'Segoe UI', sans-serif;
    font-size: clamp(46px, 7vw, 84px);
    font-weight: 800;
    color: var(--text);
    line-height: 1.02;
    letter-spacing: -2px;
    margin-bottom: 12px;
}

.login-headline .accent {
    color: #60a5fa;
}

/* ===== ALERT ===== */
.alert {
    border-radius: 10px;
    border: none;
    padding: 12px 14px;
    margin-bottom: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    animation: shake 0.45s ease-in-out;
}

.alert-danger {
    background: rgba(255, 80, 80, 0.10);
    border: 1px solid rgba(255, 80, 80, 0.20);
    color: #ff8888;
}

.btn-close-white { filter: invert(1); }

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60%  { transform: translateX(-5px); }
    40%, 80%  { transform: translateX(5px); }
}

/* ===== FIELDS ===== */
.field-group {
    margin-bottom: 22px;
}

.field-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

.field-input {
    width: 100%;
    background: var(--input-bg);
    border: 1.5px solid var(--input-bd);
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 15px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.field-input::placeholder {
    color: rgba(203, 213, 225, 0.52);
    letter-spacing: 0.5px;
}

.field-input:hover:not(:focus) {
    border-color: rgba(147, 197, 253, 0.58);
    background: rgba(15, 23, 42, 0.75);
}

.field-input:focus {
    border-color: var(--brand);
    background: rgba(37, 99, 235, 0.10);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.24), 0 10px 24px rgba(37, 99, 235, 0.16);
}

/* Dark autofill — evita fundo branco do browser */
.field-input:-webkit-autofill,
.field-input:-webkit-autofill:hover,
.field-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px #141414 inset;
    -webkit-text-fill-color: var(--text);
    border-color: var(--brand);
}

.password-wrapper {
    position: relative;
}

.password-wrapper .field-input {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.30);
    color: rgba(226, 232, 240, 0.88);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.password-toggle:hover { color: var(--brand); }
.password-toggle:focus { outline: none; }

/* ===== BOTÃO ENTRAR ===== */
.btn-enter {
    width: 100%;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-mid) 60%, var(--brand-end) 100%);
    border: none;
    border-radius: 12px;
    padding: 15px 20px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.4px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.btn-enter::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.btn-enter:hover::before { transform: translateX(100%); }

.btn-enter:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 44px rgba(37, 99, 235, 0.54), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-enter:active {
    transform: translateY(0);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

.btn-label,
.btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-loading { display: none; }

.btn-loading .spinner-border {
    width: 0.95rem;
    height: 0.95rem;
    border-width: 2px;
}

.btn-enter.is-loading .btn-label  { display: none; }
.btn-enter.is-loading .btn-loading { display: flex; }
.btn-enter.is-loading { opacity: 0.85; cursor: not-allowed; }

/* Nota segurança */
.login-meta {
    margin-top: 16px;
    text-align: center;
}

.login-meta small {
    font-size: 12px;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.login-meta small i { color: var(--success); }

/* Bloco de confianca e seguranca */
.security-trust {
    margin-top: 14px;
    padding: 12px 12px 10px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(15, 23, 42, 0.32));
    border: 1px solid rgba(96, 165, 250, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 10px 24px rgba(2, 6, 23, 0.28);
}

.security-trust-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: rgba(219, 234, 254, 0.98);
    font-size: 12px;
    letter-spacing: 0.2px;
}

.security-trust-head i {
    color: #38bdf8;
    font-size: 14px;
}

.security-trust-list {
    display: grid;
    gap: 6px;
}

.security-trust-list span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(191, 219, 254, 0.96);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.1px;
}

.security-trust-list i {
    color: rgba(147, 197, 253, 0.95);
    font-size: 13px;
}

/* ===== RODAPÉ ESQUERDO ===== */
.login-bottom {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.social-links {
    display: flex;
    gap: 12px;
    position: relative;
}

.social-links::after {
    content: '';
    position: absolute;
    top: 50%;
    left: calc(100% + 10px);
    width: 28px;
    height: 1px;
    transform: translateY(-50%);
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.55), rgba(148, 163, 184, 0));
}

.social-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.10);
    transition: all 0.25s ease;
}

.social-btn:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 14px 28px rgba(2, 6, 23, 0.5);
}

.social-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.45);
}

.social-btn-linkedin { background: linear-gradient(135deg, #0a66c2, #1877F2); }
.social-btn-github   { background: linear-gradient(135deg, #24292f, #3d444d); }

.creator-connect {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.creator-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: rgba(148, 163, 184, 0.92);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    font-weight: 700;
}

.creator-label i {
    font-size: 14px;
    color: rgba(96, 165, 250, 0.95);
}

.creator-tag {
    font-size: 13px;
    color: rgba(226, 232, 240, 0.96);
    letter-spacing: 0.2px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(96, 165, 250, 0.35);
    background: rgba(37, 99, 235, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 6px 18px rgba(2, 6, 23, 0.32);
}

/* ===== RIGHT PANEL — Visual da Marca ===== */
.login-panel-right {
    background:
        radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.35) 0%, transparent 45%),
        radial-gradient(ellipse at 80% 75%, rgba(14, 165, 233, 0.28) 0%, transparent 42%),
        linear-gradient(145deg, #0f172a 0%, #1e3a8a 38%, #1d4ed8 72%, #2563eb 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Efeito de divisória */
.login-panel-right::before {
    content: '';
    position: absolute;
    inset-block: 8%;
    left: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(147, 197, 253, 0.5), transparent);
}

/* Orbs de luz ambiente */
.right-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.right-glow-1 {
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 65%);
    top: -5%;
    left: 10%;
    animation: glow-drift 14s ease-in-out infinite alternate;
}

.right-glow-2 {
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 65%);
    bottom: 5%;
    right: 0%;
    animation: glow-drift 18s ease-in-out infinite alternate-reverse;
}

@keyframes glow-drift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(35px, -25px) scale(1.1); }
}

/* Grade de pontos */
.right-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}

/* Showcase da marca */
.brand-showcase {
    position: relative;
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    animation: fadeUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) both 0.2s;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.brand-logo-wrap {
    width: 172px;
    height: 172px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        0 0 0 8px rgba(255, 255, 255, 0.06),
        0 0 80px rgba(255, 255, 255, 0.15),
        0 24px 60px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.brand-logo-wrap:hover {
    transform: scale(1.04);
    box-shadow:
        0 0 0 10px rgba(255, 255, 255, 0.08),
        0 0 100px rgba(255, 255, 255, 0.22),
        0 32px 70px rgba(0, 0, 0, 0.4);
}

.brand-logo-wrap img {
    width: 88%;
    height: 88%;
    object-fit: contain;
    display: block;
    border-radius: 18px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.brand-name {
    font-family: 'Sora', 'Manrope', 'Segoe UI', sans-serif;
    font-size: 31px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
}

.brand-tagline {
    font-size: 15px;
    color: var(--muted);
    letter-spacing: 0.3px;
}

.brand-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 4px;
    width: min(620px, 95%);
}

.brand-pills span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.92);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
    backdrop-filter: blur(4px);
}

.brand-info-grid {
    width: min(560px, 92%);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 8px;
}

.info-card {
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    padding: 12px 12px 10px;
    text-align: left;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 24px rgba(0, 0, 0, 0.2);
}

.info-card h3 {
    margin: 0 0 8px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: rgba(226, 232, 240, 0.98);
    font-weight: 800;
    letter-spacing: 0.2px;
}

.info-card h3 i {
    color: rgba(96, 165, 250, 0.96);
}

.info-card ul {
    margin: 0;
    padding-left: 16px;
    display: grid;
    gap: 6px;
}

.info-card li {
    font-size: 12px;
    color: rgba(191, 219, 254, 0.94);
    line-height: 1.35;
}

.info-card-highlight {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.14);
}

.brand-metrics {
    width: min(560px, 92%);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
}

.metric-item {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(6px);
    padding: 10px 12px;
    display: grid;
    gap: 2px;
}

.metric-item strong {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.98);
    letter-spacing: 0.2px;
}

.metric-item span {
    font-size: 11px;
    color: rgba(186, 230, 253, 0.9);
}

/* ===== DESKTOP COMPACT ===== */
@media (min-width: 961px) {
    .login-panel-left {
        padding: 20px 32px 18px;
        overflow-y: hidden;
    }

    .login-top-brand {
        padding: 8px 10px;
        border-radius: 12px;
    }

    .login-top-brand img {
        width: 42px;
        height: 42px;
    }

    .login-top-brand span {
        font-size: 15px;
    }

    .login-top-brand::after {
        font-size: 9px;
        padding: 3px 7px;
    }

    .login-content {
        justify-content: flex-start;
        padding: 16px 0 8px;
    }

    .login-hero {
        margin: 0 auto 12px;
    }

    .login-headline {
        font-size: clamp(42px, 5.3vw, 64px);
        margin-bottom: 8px;
    }

    .field-group {
        margin-bottom: 14px;
    }

    .field-label {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .field-input {
        padding: 11px 14px;
        font-size: 14px;
    }

    .btn-enter {
        padding: 12px 16px;
        font-size: 14px;
        margin-top: 4px;
    }

    .login-meta {
        margin-top: 10px;
    }

    .security-trust {
        margin-top: 10px;
        padding: 10px 10px 8px;
    }

    .security-trust-list {
        gap: 4px;
    }

    .security-trust-list span {
        font-size: 11px;
    }

    .login-bottom {
        margin-top: 10px;
        padding-top: 12px;
    }

    .social-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .creator-tag {
        font-size: 12px;
        padding: 5px 10px;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 960px) {
    .login-container { grid-template-columns: 1fr; }
    .login-panel-right { display: none; }
    .login-panel-left {
        min-height: 100vh;
        padding: calc(env(safe-area-inset-top, 0px) + 42px) 26px 30px;
        background:
            radial-gradient(circle at 15% 10%, rgba(37, 99, 235, 0.20) 0%, transparent 35%),
            linear-gradient(180deg, rgba(11, 16, 32, 0.98) 0%, rgba(11, 16, 32, 0.94) 100%);
    }
    .login-top-brand {
        margin-top: 8px;
        padding: 10px 12px;
        border-radius: 16px;
    }
    .login-content {
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(148, 163, 184, 0.20);
        box-shadow: 0 24px 50px rgba(2, 6, 23, 0.45);
        border-radius: 18px;
        padding: 24px 18px;
        margin-top: 18px;
    }
    .login-bottom {
        margin-top: 16px;
        padding-top: 14px;
        align-items: center;
    }
    .login-headline { font-size: 56px; }
    .login-top-brand img {
        width: 58px;
        height: 58px;
        border-radius: 14px;
    }
    .login-top-brand span {
        font-size: 18px;
    }
    .login-top-brand::after {
        font-size: 9px;
        padding: 4px 7px;
    }
}

@media (max-width: 500px) {
    .login-panel-left {
        padding: calc(env(safe-area-inset-top, 0px) + 36px) 16px 24px;
    }
    .login-content {
        border-radius: 16px;
        padding: 20px 14px;
        margin-top: 16px;
    }
    .login-hero { margin-bottom: 20px; }
    .login-headline { font-size: 48px; margin-bottom: 10px; }
    .login-top-brand img {
        width: 62px;
        height: 62px;
        border-radius: 16px;
    }
    .login-top-brand span {
        font-size: 20px;
    }
    .login-top-brand::after {
        display: none;
    }
    .field-input { font-size: 16px; } /* Evitar zoom iOS */
    .btn-enter {
        border-radius: 14px;
        font-size: 16px;
        padding: 15px 18px;
    }
    .security-trust {
        margin-top: 12px;
        padding: 11px 10px 9px;
        border-radius: 11px;
    }
    .security-trust-head {
        font-size: 11px;
    }
    .security-trust-list span {
        font-size: 11px;
    }
    .login-bottom {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .social-links {
        justify-content: center;
    }
    .social-links::after {
        display: none;
    }
    .creator-connect {
        align-items: center;
    }
    .creator-label {
        font-size: 10px;
    }
    .creator-tag {
        font-size: 12px;
        width: fit-content;
    }
}

@media (max-height: 700px) {
    .login-panel-left { padding-top: 24px; padding-bottom: 24px; }
    .login-content { padding: 20px 0; }
    .login-headline {
        margin-bottom: 24px;
        font-size: 47px;
    }
}

.hidden { display: none !important; }
