﻿@import url("../fonts/poppins/poppins.css");

:root {
    --ink: #102126;
    --muted: #5f737b;
    --line: #d7e3e6;
    --panel: #ffffff;
    --soft: #eef5f3;
    --teal: #11a7aa;
    --teal-dark: #0a6870;
    --gold: #f2b33d;
    --danger: #b42318;
    --warn: #9a5b12;
    --shadow: 0 24px 70px rgba(11, 35, 39, 0.18);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: #edf3f6;
    font-family: "Poppins", "Segoe UI", Arial, sans-serif;
}

a { color: inherit; }

.access-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 42px 20px;
    background: #eef4f4;
}

.brand-logo {
    display: block;
    width: min(230px, 64vw);
    height: auto;
}

.cbs-logo {
    display: block;
    width: min(220px, 100%);
    height: auto;
}

.auth-logo {
    margin: 0 auto;
}

.auth-logo-wrap {
    margin: 0 auto 24px;
    padding: 16px 20px;
    border-radius: 8px;
    background: linear-gradient(135deg, #030b15 0%, #0b1d33 100%);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.eyebrow {
    margin: 0 0 12px;
    color: #93ddd3;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.index-hero h1 {
    margin: 0;
    max-width: 760px;
    color: #ffffff;
    font-size: clamp(2.45rem, 5vw, 5.4rem);
    line-height: 1.02;
    font-weight: 700;
    letter-spacing: 0;
}

.index-hero p {
    max-width: 620px;
    margin: 22px 0 0;
    color: rgba(255,255,255,0.78);
    font-size: 1rem;
    line-height: 1.8;
}

.auth-panel {
    display: grid;
    align-items: center;
    width: 100%;
    padding: 0;
    background: transparent;
}

.auth-card {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(42, 65, 70, 0.16);
    padding: 34px;
}

.card-title {
    margin: 0;
    font-size: 1.75rem;
    line-height: 1.2;
    text-align: center;
}

.field {
    margin-top: 16px;
}

label {
    display: block;
    margin: 0 0 7px;
    font-size: 0.84rem;
    font-weight: 600;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    width: 100%;
    height: 48px;
    border: 1px solid #cbdade;
    border-radius: 6px;
    padding: 0 13px;
    background: #ffffff;
    color: var(--ink);
    font: inherit;
    font-size: 0.95rem;
    outline: none;
}

input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16);
}

input:disabled,
select:disabled,
textarea:disabled {
    background: #edf2f4;
    border-color: #d4dee2;
    color: #7d8f96;
    cursor: wait;
    opacity: 0.82;
}

input:disabled::placeholder {
    color: #9aabb2;
}

.auth-card:has(input:disabled) {
    box-shadow: 0 24px 70px rgba(42, 65, 70, 0.12);
}

.password-field {
    position: relative;
}

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

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    width: 34px;
    height: 34px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus {
    color: var(--teal-dark);
    background: #eef6ff;
    outline: none;
}

.password-toggle:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.password-toggle svg {
    width: 19px;
    height: 19px;
}

.password-strength {
    margin: 12px 0 4px;
}

.strength-track {
    height: 5px;
    border-radius: 999px;
    background: #dbe7eb;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: #94a3b8;
    transition: width 0.2s ease, background-color 0.2s ease;
}

.strength-bar.s1 { width: 20%; background: #dc2626; }
.strength-bar.s2 { width: 40%; background: #d97706; }
.strength-bar.s3 { width: 60%; background: #2563eb; }
.strength-bar.s4 { width: 80%; background: #0f766e; }
.strength-bar.s5 { width: 100%; background: #16a34a; }

.strength-label {
    margin-top: 7px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    text-align: right;
}

/* O atributo hidden precisa vencer o display explicito dos grupos de reset
   (ex.: .password-rules usa display:grid). Sem isto, esconder via JS/markup
   nao surtia efeito no box de requisitos quando o link e invalido/reutilizado. */
[data-reset-content][hidden] {
    display: none !important;
}

.password-rules {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px 12px;
    margin: 12px 0 4px;
    padding: 12px;
    border: 1px solid #d7e3e6;
    border-radius: 6px;
    background: #f8fbfb;
}

.password-rules span {
    color: #73858c;
    font-size: 0.76rem;
}

.password-rules span.ok {
    color: #0f766e;
    font-weight: 600;
}

#rule_symbol {
    grid-column: 1 / -1;
}

.message {
    min-height: 39px;
    margin: 14px 0 18px;
    padding: 9px 14px;
    border: 1px solid #bcd6ff;
    border-radius: 5px;
    background: #eef6ff;
    color: #0b55d9;
    font-size: 0.88rem;
    line-height: 1.5;
    display: flex;
    align-items: center;
}

.message.error {
    border-color: #ffc9c4;
    background: #fff2f1;
    color: var(--danger);
}

.message.info { color: #0b55d9; }

.message.success {
    border-color: #a9dec6;
    background: #effaf4;
    color: #087443;
}

.message.warn {
    border-color: #f5d69c;
    background: #fff8ea;
    color: var(--warn);
}

.reset-loader {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    margin: 14px 0 18px;
    padding: 12px 14px;
    border: 1px solid #bcd6ff;
    border-radius: 6px;
    background: #eef6ff;
    color: #0b55d9;
    font-size: 0.88rem;
    font-weight: 600;
}

.reset-loader[hidden] {
    display: none;
}

.loader-ring {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(11, 85, 217, 0.2);
    border-top-color: #0b55d9;
    border-radius: 50%;
    animation: access-spin 0.8s linear infinite;
}

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

.actions {
    margin-top: 18px;
}

.btn-primary,
.btn-secondary {
    appearance: none;
    -webkit-appearance: none;
    display: inline-grid;
    grid-auto-flow: column;
    grid-auto-columns: auto;
    align-items: center;
    justify-content: center;
    column-gap: 9px;
    min-height: 52px;
    border-radius: 6px;
    padding: 0 20px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 500;
    line-height: normal;
    letter-spacing: 0.015em;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    vertical-align: middle;
}

.btn-primary {
    width: 100%;
    background: var(--teal);
    color: #ffffff;
}

.btn-primary:hover { background: var(--teal-dark); }
.btn-primary:disabled { background: #8aa6a3; cursor: wait; }

.btn-icon {
    width: 21px;
    height: 21px;
    display: block;
    fill: currentColor;
}

.btn-icon,
.btn-label {
    min-width: 0;
    height: 21px;
    display: grid;
    align-items: center;
    justify-items: center;
    box-sizing: border-box;
}

.btn-label {
    font: inherit;
    font-weight: 500;
    letter-spacing: 0.015em;
    white-space: nowrap;
    margin: 0;
}

.btn-secondary {
    border-color: rgba(255,255,255,0.36);
    color: #ffffff;
}

.form-links {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.86rem;
}

.form-links a {
    color: var(--teal-dark);
    text-decoration: none;
    font-weight: 600;
}

.form-links a:focus,
.form-links a:hover { text-decoration: underline; }

.index-page {
    min-height: 100vh;
    color: #ffffff;
    background:
        radial-gradient(circle at 78% 18%, rgba(242, 179, 61, 0.2), transparent 30%),
        linear-gradient(135deg, rgba(4, 22, 37, 0.96), rgba(9, 72, 82, 0.88));
}

.index-shell {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: 30px clamp(20px, 5vw, 72px);
}

.index-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.index-hero {
    align-self: center;
    max-width: 840px;
    padding: 8vh 0;
}

.hero-product {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
    gap: clamp(20px, 5vw, 64px);
    align-items: center;
}

.robot-figure {
    justify-self: center;
    width: min(330px, 70vw);
    filter: drop-shadow(0 30px 40px rgba(0,0,0,0.35));
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.hero-actions .btn-primary {
    width: auto;
    min-width: 160px;
}

.index-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 20px;
}

.strip-item strong {
    display: block;
    color: #ffffff;
    margin-bottom: 4px;
}

.strip-item span {
    color: rgba(255,255,255,0.7);
    font-size: 0.86rem;
}

@media (max-width: 860px) {
    .auth-panel { padding: 24px; }
    .auth-card { padding: 26px; }
    .index-strip { grid-template-columns: 1fr; }
    .hero-product { grid-template-columns: 1fr; }
    .robot-figure { width: min(270px, 70vw); }
}

@media (max-width: 460px) {
    .auth-panel { padding: 0; }
    .auth-card {
        border-radius: 0;
        border-left: 0;
        border-right: 0;
        box-shadow: none;
        padding: 28px 22px;
    }
    .form-links a { display: inline-block; margin-top: 10px; }
}

/* Key Bar unified access model: default/recover/reset share the same shell. */
:root {
    color-scheme: dark;
    --kbr-bg: #070707;
    --kbr-field: rgba(255, 255, 255, 0.075);
    --kbr-line: rgba(255, 255, 255, 0.14);
    --kbr-line-strong: rgba(255, 255, 255, 0.28);
    --kbr-text: #fff7ef;
    --kbr-muted: #c8bdb3;
    --kbr-amber: #f0b35a;
    --kbr-green: #45d483;
    --kbr-danger: #ff8a7c;
    --kbr-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
}

body {
    color: var(--kbr-text);
    background:
        linear-gradient(115deg, rgba(122, 60, 255, 0.22), transparent 33%),
        radial-gradient(circle at 72% 18%, rgba(255, 77, 61, 0.28), transparent 31%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.86)),
        #070707;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 78%);
}

.access-page {
    display: block;
    padding: 0;
    background: transparent;
}

.access-shell {
    position: relative;
    width: min(1180px, calc(100% - 40px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 28px 0 34px;
    display: flex;
    flex-direction: column;
    gap: 42px;
}

.access-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.access-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.access-brand img {
    width: 176px;
    max-height: 68px;
    object-fit: contain;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.5));
}

.access-status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid var(--kbr-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    color: var(--kbr-muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.access-status::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--kbr-green);
    box-shadow: 0 0 18px rgba(69, 212, 131, 0.8);
}

.access-hero {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.78fr);
    align-items: center;
    gap: 42px;
}

.access-copy { max-width: 760px; }

.access-eyebrow {
    margin: 0 0 18px;
    color: var(--kbr-amber);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.access-copy h1 {
    margin: 0;
    max-width: 760px;
    color: var(--kbr-text);
    font-size: clamp(46px, 7vw, 94px);
    line-height: 0.91;
    letter-spacing: 0;
    text-transform: uppercase;
}

.access-lede {
    max-width: 680px;
    margin: 24px 0 0;
    color: var(--kbr-muted);
    font-size: clamp(18px, 2.1vw, 23px);
    line-height: 1.45;
}

.access-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.access-metric {
    min-height: 110px;
    padding: 16px;
    border: 1px solid var(--kbr-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.055);
}

.access-metric strong {
    display: block;
    color: var(--kbr-text);
    font-size: 22px;
}

.access-metric span {
    display: block;
    margin-top: 7px;
    color: var(--kbr-muted);
    font-size: 13px;
    line-height: 1.35;
}

.auth-panel {
    width: 100%;
    max-width: 460px;
    justify-self: end;
    padding: 0;
}

.auth-card {
    width: 100%;
    max-width: none;
    border: 1px solid var(--kbr-line);
    border-radius: 12px;
    background: rgba(7, 7, 7, 0.72);
    box-shadow: var(--kbr-shadow);
    backdrop-filter: blur(20px);
    padding: 30px;
}

.auth-view[hidden] { display: none !important; }

.card-title {
    color: var(--kbr-text);
    font-size: 28px;
    text-align: left;
}

input[type="email"],
input[type="password"],
input[type="text"] {
    height: 52px;
    border-color: var(--kbr-line-strong);
    border-radius: 8px;
    background: var(--kbr-field);
    color: var(--kbr-text);
}

input:focus {
    border-color: var(--kbr-amber);
    box-shadow: 0 0 0 3px rgba(240, 179, 90, 0.18);
}

.password-toggle {
    color: var(--kbr-amber);
    border-radius: 6px;
}

.password-toggle:hover,
.password-toggle:focus {
    color: var(--kbr-amber);
    background: rgba(255, 255, 255, 0.08);
}

.message,
.reset-loader {
    min-height: 48px;
    margin: 24px 0 20px;
    border-color: rgba(240, 179, 90, 0.26);
    border-radius: 8px;
    background: rgba(240, 179, 90, 0.12);
    color: #f8dca9;
    font-weight: 700;
}

.message.error {
    border-color: rgba(255, 138, 124, 0.4);
    background: rgba(255, 77, 61, 0.12);
    color: var(--kbr-danger);
}

.message.success {
    border-color: rgba(69, 212, 131, 0.35);
    background: rgba(69, 212, 131, 0.12);
    color: #adf0c9;
}

.message.warn {
    border-color: rgba(240, 179, 90, 0.46);
    background: rgba(240, 179, 90, 0.16);
    color: #ffd99a;
}

.strength-track,
.password-rules {
    background: rgba(255, 255, 255, 0.055);
    border-color: var(--kbr-line);
}

.strength-label,
.password-rules span,
.form-links,
.form-links a {
    color: var(--kbr-muted);
}

.password-rules span.ok {
    color: #adf0c9;
}

.btn-primary,
.btn-secondary {
    min-height: 54px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: linear-gradient(135deg, var(--kbr-amber), #ffdf92);
    color: #120906;
    font-weight: 900;
    box-shadow: 0 14px 35px rgba(240, 179, 90, 0.25);
}

.btn-primary:hover,
.btn-secondary:hover {
    filter: brightness(1.04);
    background: linear-gradient(135deg, var(--kbr-amber), #ffdf92);
}

@media (max-width: 1023px) {
    .access-shell {
        width: min(100% - 28px, 680px);
        gap: 24px;
        padding-bottom: 24px;
    }

    .access-hero {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 24px;
    }

    .auth-panel {
        justify-self: stretch;
        max-width: none;
    }

    .access-lede,
    .access-metrics {
        display: none;
    }
}

@media (max-width: 540px) {
    .access-shell {
        width: min(100% - 24px, 430px);
        padding-top: 18px;
        gap: 20px;
    }

    .access-topbar {
        flex-direction: row;
        align-items: center;
    }

    .access-brand img {
        width: 150px;
        max-height: 58px;
    }

    .access-status {
        min-height: 34px;
        padding: 7px 10px;
        font-size: 11px;
        white-space: normal;
    }

    .access-eyebrow {
        margin-bottom: 12px;
        font-size: 11px;
        letter-spacing: 0.12em;
    }

    .access-copy h1 {
        font-size: clamp(36px, 13vw, 48px);
        line-height: 0.95;
    }

    .auth-card {
        border-radius: 12px;
        border-left: 1px solid var(--kbr-line);
        border-right: 1px solid var(--kbr-line);
        box-shadow: var(--kbr-shadow);
        padding: 22px;
    }
}


