@import url("../includes/theme.css");

:root {
    --accent-color: #14b8a6;
    --accent-rgb: 20, 184, 166;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background:
        radial-gradient(circle at 10% 10%, rgba(20, 184, 166, 0.18), transparent 28%),
        radial-gradient(circle at 88% 18%, rgba(59, 130, 246, 0.16), transparent 30%),
        linear-gradient(135deg, #020617, #0f172a 48%, #111827);
    color: var(--text-main);
}

.btn-voltar {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 13px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.78);
    color: #e2e8f0;
    font-size: 0.88rem;
    font-weight: 900;
    text-decoration: none;
    backdrop-filter: blur(14px);
}

.login-shell {
    width: min(1040px, calc(100% - 28px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 72px 0 28px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
    gap: 22px;
    align-items: center;
}

.login-copy,
.login-box {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    box-shadow: 0 24px 70px rgba(2, 6, 23, 0.34);
}

.login-copy {
    padding: 28px;
    background: rgba(15, 23, 42, 0.52);
    backdrop-filter: blur(16px);
}

.login-eyebrow {
    display: inline-flex;
    color: #5eead4;
    font-size: 0.78rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-eyebrow.brand-eyebrow {
    align-items: center;
    gap: 6px;
}

.login-eyebrow.brand-eyebrow::after {
    content: "";
    flex: 0 0 auto;
    width: 32px;
    height: 22px;
    display: inline-block;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 30' fill='none'%3E%3Crect x='6' y='20' width='4' height='8' rx='1' fill='%23fbbf24'/%3E%3Crect x='14' y='16' width='4' height='12' rx='1' fill='%2384cc16'/%3E%3Crect x='22' y='12' width='4' height='16' rx='1' fill='%2322c55e'/%3E%3Cpath d='M12 11L27 4' stroke='%2322c55e' stroke-width='3' stroke-linecap='round'/%3E%3Cpath d='M22 3H28V9' stroke='%239bdc38' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    filter: drop-shadow(0 6px 12px rgba(34, 197, 94, 0.22));
}
.login-copy h1 {
    max-width: 680px;
    margin: 8px 0 10px;
    color: #f8fafc;
    font-size: clamp(2rem, 4vw, 3.45rem);
    line-height: 1.02;
    letter-spacing: 0;
}

.login-copy p {
    max-width: 560px;
    margin: 0;
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.5;
}

.login-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.login-benefits span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid rgba(94, 234, 212, 0.20);
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.10);
    color: #dffcf7;
    font-size: 0.84rem;
    font-weight: 850;
}

.login-box {
    display: grid;
    gap: 16px;
    padding: 22px;
    background:
        radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.16), transparent 38%),
        rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(18px);
}

.login-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
}

.login-card-title > span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(var(--accent-rgb), 0.16);
    font-size: 1.2rem;
}

.login-card-title small,
.renewal-header small,
.pix-login-box small {
    color: #94a3b8;
    font-size: 0.8rem;
}

.login-card-title h2 {
    margin: 1px 0 0;
    color: #f8fafc;
    font-size: 1.45rem;
    letter-spacing: 0;
}

.login-message {
    min-height: 20px;
    color: #fecaca;
    font-size: 0.84rem;
    font-weight: 800;
    text-align: center;
}

.login-message.ok {
    color: #86efac;
}

.login-inline-success {
    color: #86efac;
}

.forgot-password-link,
.login-secondary-link {
    display: inline-flex;
    justify-content: center;
    width: 100%;
    margin: -2px 0 12px;
    color: #67e8f9;
    font-size: 0.84rem;
    font-weight: 850;
    text-decoration: none;
}

.forgot-password-link:hover,
.login-secondary-link:hover {
    color: #a7f3d0;
    text-decoration: underline;
}

.login-secondary-link {
    margin: 0;
}

.recovery-shell {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
}

.recovery-empty {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid rgba(248, 113, 113, 0.24);
    border-radius: 8px;
    background: rgba(248, 113, 113, 0.08);
    text-align: center;
}

.recovery-empty strong {
    color: #fecaca;
}

.recovery-empty p {
    margin: 0;
    color: #cbd5e1;
    font-size: 0.9rem;
}

.input-group {
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
    text-align: left;
}

.input-group label {
    color: #cbd5e1;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

input,
textarea {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.64);
    color: #f8fafc;
    outline: none;
}

input {
    min-height: 42px;
    padding: 10px 12px;
    font-size: 1rem;
}

textarea {
    min-height: 86px;
    resize: vertical;
    padding: 10px;
    font-size: 0.82rem;
}

input::placeholder {
    color: #64748b;
}

input:focus,
textarea:focus {
    border-color: rgba(var(--accent-rgb), 0.62);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.13);
}

button {
    width: 100%;
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 10px 12px;
    background: linear-gradient(135deg, #5eead4, #38bdf8);
    color: #020617;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 950;
    transition: 0.2s;
}

button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(var(--accent-rgb), 0.22);
}

button:disabled {
    cursor: wait;
    opacity: 0.68;
    transform: none;
}

.hidden {
    display: none !important;
}

.renewal-panel {
    display: grid;
    gap: 12px;
    padding: 13px;
    border: 1px solid rgba(251, 191, 36, 0.28);
    border-radius: 8px;
    background: rgba(251, 191, 36, 0.08);
}

.renewal-header {
    display: grid;
    gap: 4px;
}

.renewal-header span {
    color: #fde68a;
    font-size: 0.78rem;
    font-weight: 950;
    text-transform: uppercase;
}

.renewal-header strong {
    color: #f8fafc;
    font-size: 1rem;
}

.pix-login-box {
    display: grid;
    gap: 10px;
}

.pix-login-box img {
    width: min(210px, 100%);
    aspect-ratio: 1;
    justify-self: center;
    border-radius: 8px;
    background: #ffffff;
    padding: 8px;
}

.pix-login-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.pix-login-actions button {
    min-height: 38px;
    background: rgba(15, 23, 42, 0.82);
    border-color: rgba(148, 163, 184, 0.24);
    color: #e2e8f0;
}

html[data-theme="light"] body {
    background:
        radial-gradient(circle at 10% 10%, rgba(20, 184, 166, 0.14), transparent 28%),
        radial-gradient(circle at 88% 18%, rgba(59, 130, 246, 0.12), transparent 30%),
        #eef4f8;
}

html[data-theme="light"] .login-copy,
html[data-theme="light"] .login-box {
    background: rgba(255, 255, 255, 0.92);
}

html[data-theme="light"] .login-copy h1,
html[data-theme="light"] .login-card-title h2,
html[data-theme="light"] .renewal-header strong {
    color: #0f172a;
}

html[data-theme="light"] .login-copy p,
html[data-theme="light"] .input-group label {
    color: #475569;
}

html[data-theme="light"] input,
html[data-theme="light"] textarea {
    background: #f8fafc;
    color: #0f172a;
}

html[data-theme="light"] .forgot-password-link,
html[data-theme="light"] .login-secondary-link {
    color: #0369a1;
}

html[data-theme="light"] .recovery-empty p {
    color: #475569;
}

@media (max-width: 860px) {
    .login-shell {
        grid-template-columns: 1fr;
        gap: 12px;
        padding-top: 64px;
    }

    .login-copy {
        padding: 18px;
    }

    .login-copy h1 {
        font-size: 1.9rem;
    }
}

@media (max-width: 520px) {
    .btn-voltar {
        top: 10px;
        left: 10px;
    }

    .login-shell {
        width: calc(100% - 18px);
        padding-top: 56px;
    }

    .login-copy,
    .login-box {
        padding: 14px;
        border-radius: 8px;
    }

    .login-benefits {
        gap: 6px;
    }

    .pix-login-actions {
        grid-template-columns: 1fr;
    }
}

@media (orientation: landscape) and (max-height: 560px) and (max-width: 1024px) {
    .btn-voltar {
        top: 8px;
        left: 8px;
        min-height: 30px;
        padding: 6px 10px;
        font-size: 0.78rem;
    }

    .login-shell {
        width: calc(100% - 18px);
        min-height: auto;
        padding: 44px 0 8px;
        grid-template-columns: minmax(0, 0.95fr) minmax(300px, 0.75fr);
        gap: 10px;
    }

    .login-copy,
    .login-box {
        padding: 12px;
    }

    .login-copy h1 {
        font-size: 1.35rem;
        line-height: 1.1;
    }

    .login-copy p,
    .login-benefits span,
    .input-group label,
    .login-message,
    button {
        font-size: 0.78rem;
    }

    input,
    button {
        min-height: 34px;
        padding: 7px 9px;
    }

    .input-group {
        margin-bottom: 7px;
    }

    .pix-login-box img {
        width: 132px;
    }
}
