/* ==========================================================================
   Gateway — Auth & KYC design system
   Telas: login, kyc, pos-kyc (reutilizável em registro/reset)
   Padrão do painel: Geist, esmeralda #048d5f, cantos arredondados, claro/escuro (.dark)
   ========================================================================== */

:root {
    --bg: #f6f7f8;
    --surface: #ffffff;
    --surface-2: #f9fafb;
    --surface-3: #f3f4f6;
    --input-bg: #ffffff;
    --border: rgba(17, 24, 39, 0.08);
    --border-strong: rgba(17, 24, 39, 0.14);
    --text: #111827;
    --muted: #6b7280;
    --subtle: #9ca3af;

    --brand: #048d5f;
    --brand-hover: #037a52;
    --brand-ink: #047857;
    --brand-soft: #ecfdf5;
    --brand-soft-border: rgba(4, 141, 95, 0.22);
    --ring: rgba(4, 141, 95, 0.16);

    --danger: #dc2626;
    --danger-soft: #fef2f2;
    --danger-ring: rgba(220, 38, 38, 0.14);
    --warn: #b45309;
    --warn-soft: #fffbeb;
    --warn-border: rgba(180, 83, 9, 0.22);

    --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.04), 0 12px 32px -12px rgba(16, 24, 40, 0.10);
    --shadow-pop: 0 20px 50px -12px rgba(16, 24, 40, 0.25);
    --radius: 12px;
    --radius-lg: 18px;
}

.dark {
    --bg: #0b0b0d;
    --surface: #141416;
    --surface-2: #1a1a1d;
    --surface-3: #202024;
    --input-bg: #0f0f11;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.14);
    --text: #f4f4f5;
    --muted: #a1a1aa;
    --subtle: #71717a;

    --brand-ink: #34d399;
    --brand-soft: rgba(16, 185, 129, 0.10);
    --brand-soft-border: rgba(16, 185, 129, 0.28);
    --ring: rgba(16, 185, 129, 0.20);

    --danger: #f87171;
    --danger-soft: rgba(248, 113, 113, 0.10);
    --danger-ring: rgba(248, 113, 113, 0.20);
    --warn: #fbbf24;
    --warn-soft: rgba(251, 191, 36, 0.10);
    --warn-border: rgba(251, 191, 36, 0.28);

    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -16px rgba(0, 0, 0, 0.6);
    --shadow-pop: 0 24px 60px -12px rgba(0, 0, 0, 0.7);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light; }
html.dark { color-scheme: dark; }

body.gw {
    margin: 0;
    min-height: 100vh;
    font-family: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
body.gw a { color: inherit; text-decoration: none; }
body.gw h1, body.gw h2, body.gw h3, body.gw p { margin: 0; }
body.gw button { font-family: inherit; }
[hidden] { display: none !important; }

.gw-ic { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 2; }
.gw-ic-sm { width: 15px; height: 15px; flex-shrink: 0; stroke-width: 2; }
.gw-ic-lg { width: 22px; height: 22px; flex-shrink: 0; stroke-width: 1.9; }

/* --------------------------------------------------------------------------
   Marca (Brand::logo renderiza classes utilitárias; aqui garantimos o estilo)
   -------------------------------------------------------------------------- */
.brand-logo { display: inline-flex; align-items: center; gap: 0.5rem; }
.brand-logo img { width: auto; }
.brand-logo img.h-7 { height: 1.75rem; }
.brand-logo img.h-8 { height: 2rem; }
.brand-logo img.h-10 { height: 2.5rem; }
.brand-logo img.hidden { display: none; }
.dark .brand-logo img.dark\:hidden { display: none; }
.dark .brand-logo img.dark\:block { display: block; }
.gw-brand-name { font-weight: 650; letter-spacing: -0.02em; font-size: 1.2rem; color: var(--text); }
.gw-on-dark { color: #fff; }

/* --------------------------------------------------------------------------
   Controles base
   -------------------------------------------------------------------------- */
.gw-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gw-label { font-size: 13px; font-weight: 500; color: var(--text); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gw-label .gw-req { color: var(--danger); margin-left: 2px; }
.gw-label .gw-opt { font-weight: 400; color: var(--subtle); font-size: 12px; }
.gw-input-wrap { position: relative; }

.gw-input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    font: inherit;
    font-size: 14px;
    color: var(--text);
    background: var(--input-bg);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.gw-input::placeholder { color: var(--subtle); }
.gw-input:hover { border-color: rgba(4, 141, 95, 0.45); }
.gw-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
.gw-input.has-icon { padding-left: 42px; }
.gw-input.has-prefix { padding-left: 40px; }
.gw-input.has-action { padding-right: 46px; }
textarea.gw-input { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
select.gw-input {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 38px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.gw-icon-left, .gw-prefix {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    color: var(--subtle); pointer-events: none; display: flex; align-items: center;
}
.gw-prefix { font-size: 13px; font-weight: 500; }
.gw-input-wrap:focus-within .gw-icon-left { color: var(--brand); }
.gw-icon-btn {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
    border: 0; background: transparent; color: var(--subtle); border-radius: 9px; cursor: pointer;
    transition: color .15s ease, background-color .15s ease;
}
.gw-icon-btn:hover { color: var(--text); background: var(--surface-3); }
.gw-icon-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }

.gw-hint { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; min-height: 0; }
.gw-error { display: none; align-items: center; gap: 6px; font-size: 12px; color: var(--danger); font-weight: 500; }
.gw-field.is-invalid .gw-input { border-color: var(--danger); box-shadow: 0 0 0 4px var(--danger-ring); }
.gw-field.is-invalid .gw-error { display: flex; }
.gw-field.is-invalid .gw-hint { display: none; }
.gw-field.is-valid .gw-input { border-color: rgba(4, 141, 95, 0.55); }
.gw-counter { font-variant-numeric: tabular-nums; font-size: 12px; color: var(--subtle); margin-left: auto; }
.gw-counter.is-near { color: var(--warn); }

.gw-caps { display: none; align-items: center; gap: 6px; font-size: 12px; color: var(--warn); font-weight: 500; }
.gw-caps.is-on { display: flex; }

/* Checkbox */
.gw-check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-size: 13px; color: var(--muted); }
.gw-check input {
    appearance: none; -webkit-appearance: none;
    width: 18px; height: 18px; margin: 0; flex-shrink: 0;
    border: 1.5px solid var(--border-strong); border-radius: 6px;
    background: var(--input-bg); cursor: pointer; display: grid; place-content: center;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.gw-check input:hover { border-color: var(--brand); }
.gw-check input:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ring); border-color: var(--brand); }
.gw-check input:checked { background: var(--brand); border-color: var(--brand); }
.gw-check input:checked::after {
    content: ""; width: 10px; height: 10px; background: #fff;
    clip-path: polygon(14% 44%, 0 59%, 40% 100%, 100% 22%, 86% 8%, 40% 70%);
}

/* Botões */
.gw-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 46px; padding: 0 20px; font-size: 14px; font-weight: 600; letter-spacing: -0.005em;
    border: 1px solid transparent; border-radius: var(--radius); cursor: pointer; text-decoration: none; white-space: nowrap;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .1s ease, opacity .15s ease;
}
.gw-btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ring); }
.gw-btn:active:not([disabled]) { transform: translateY(1px); }
.gw-btn[disabled] { opacity: .55; cursor: not-allowed; }
.gw-btn-primary { color: #fff; background: var(--brand); box-shadow: 0 1px 2px rgba(4, 141, 95, .35), inset 0 1px 0 rgba(255, 255, 255, .14); }
.gw-btn-primary:hover:not([disabled]) { background: var(--brand-hover); }
.gw-btn-ghost { color: var(--text); background: transparent; border-color: var(--border-strong); }
.gw-btn-ghost:hover:not([disabled]) { background: var(--surface-3); }
.gw-btn-soft { color: var(--brand-ink); background: var(--brand-soft); border-color: var(--brand-soft-border); }
.gw-btn-soft:hover:not([disabled]) { background: var(--brand-soft); border-color: var(--brand); }
.gw-btn-block { width: 100%; }
.gw-btn-sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }

.gw-link { color: var(--brand-ink); font-weight: 600; text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; font-size: inherit; }
.gw-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.gw-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

.gw-spinner {
    width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: gw-spin .7s linear infinite;
}
.gw-spinner.is-brand { border-color: var(--brand-soft-border); border-top-color: var(--brand); }
@keyframes gw-spin { to { transform: rotate(360deg); } }

.gw-theme-btn {
    width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    color: var(--muted); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; cursor: pointer;
    transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}
.gw-theme-btn:hover { color: var(--text); background: var(--surface-3); }
.gw-theme-btn:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--ring); }
.gw-theme-btn .gw-sun { display: none; }
.dark .gw-theme-btn .gw-sun { display: block; }
.dark .gw-theme-btn .gw-moon { display: none; }

/* Alertas inline */
.gw-alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid; font-size: 13px; line-height: 1.5; }
.gw-alert strong { font-weight: 600; display: block; margin-bottom: 1px; }
.gw-alert-danger { background: var(--danger-soft); border-color: var(--danger-ring); color: var(--danger); }
.gw-alert-warn { background: var(--warn-soft); border-color: var(--warn-border); color: var(--warn); }
.gw-alert-info { background: var(--brand-soft); border-color: var(--brand-soft-border); color: var(--brand-ink); }
.gw-alert p { color: var(--muted); }

/* Toasts */
.gw-toasts {
    position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 200;
    display: flex; flex-direction: column; gap: 10px; width: min(420px, calc(100vw - 32px)); pointer-events: none;
}
.gw-toast {
    pointer-events: auto; display: flex; align-items: flex-start; gap: 12px; padding: 14px 14px 14px 16px;
    background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; box-shadow: var(--shadow-pop);
    animation: gw-toast-in .28s cubic-bezier(.16, 1, .3, 1);
}
.gw-toast.is-leaving { opacity: 0; transform: translateY(-8px); transition: opacity .22s ease, transform .22s ease; }
.gw-toast-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.gw-toast.t-success .gw-toast-ic { background: var(--brand-soft); color: var(--brand-ink); }
.gw-toast.t-error .gw-toast-ic { background: var(--danger-soft); color: var(--danger); }
.gw-toast.t-warning .gw-toast-ic { background: var(--warn-soft); color: var(--warn); }
.gw-toast.t-info .gw-toast-ic { background: var(--surface-3); color: var(--muted); }
.gw-toast-body { flex: 1; min-width: 0; padding-top: 1px; }
.gw-toast-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.gw-toast-msg { font-size: 12.5px; color: var(--muted); margin-top: 2px; word-wrap: break-word; }
.gw-toast-x { width: 26px; height: 26px; display: grid; place-items: center; border: 0; background: transparent; color: var(--subtle); border-radius: 8px; cursor: pointer; flex-shrink: 0; }
.gw-toast-x:hover { background: var(--surface-3); color: var(--text); }
@keyframes gw-toast-in { from { opacity: 0; transform: translateY(-12px) scale(.98); } to { opacity: 1; transform: none; } }

/* Modal */
.gw-modal { position: fixed; inset: 0; z-index: 150; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(8, 10, 12, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; transition: opacity .2s ease; }
.gw-modal.is-open { opacity: 1; }
.gw-dialog {
    width: 100%; max-width: 440px; padding: 28px; background: var(--surface); border: 1px solid var(--border-strong);
    border-radius: 20px; box-shadow: var(--shadow-pop); transform: translateY(10px) scale(.98); transition: transform .25s cubic-bezier(.16, 1, .3, 1);
    position: relative;
}
.gw-modal.is-open .gw-dialog { transform: none; }
.gw-dialog-x { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: transparent; color: var(--subtle); border-radius: 10px; cursor: pointer; }
.gw-dialog-x:hover { background: var(--surface-3); color: var(--text); }
.gw-dialog-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); border: 1px solid var(--brand-soft-border); margin-bottom: 16px; }
.gw-dialog h2 { font-size: 20px; font-weight: 650; letter-spacing: -0.02em; }
.gw-dialog > p { margin-top: 6px; color: var(--muted); font-size: 13.5px; }

.gw-suggest { position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow-pop); }
.gw-suggest li { padding: 9px 12px; font-size: 13px; border-radius: 8px; cursor: pointer; color: var(--text); }
.gw-suggest li:hover, .gw-suggest li.is-active { background: var(--brand-soft); color: var(--brand-ink); }

/* ==========================================================================
   LOGIN — layout dividido
   ========================================================================== */
.gw-login { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; overflow: hidden; }

/* Tela de login: sem barras de rolagem visíveis (a rolagem continua funcionando em telas muito baixas) */
html:has(body.gw-login-page) { overflow-x: hidden; scrollbar-width: none; -ms-overflow-style: none; }
html:has(body.gw-login-page)::-webkit-scrollbar,
body.gw-login-page::-webkit-scrollbar { display: none; width: 0; height: 0; }
body.gw-login-page { overflow-x: hidden; scrollbar-width: none; -ms-overflow-style: none; }

.gw-hero {
    position: relative; overflow: hidden; color: #fff; padding: 44px 56px;
    display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
    background: linear-gradient(158deg, #04503c 0%, #023226 52%, #011912 100%);
    isolation: isolate;
}
.gw-hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
    background-image: linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 20%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 80% 70% at 30% 20%, #000 20%, transparent 75%);
}
.gw-hero::after {
    content: ""; position: absolute; z-index: -1; width: 620px; height: 620px; right: -220px; bottom: -260px; border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, .34) 0%, rgba(16, 185, 129, 0) 68%);
}
.gw-hero-body { max-width: 520px; }
.gw-eyebrow {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; font-size: 12px; font-weight: 500;
    color: #a7f3d0; background: rgba(16, 185, 129, .12); border: 1px solid rgba(110, 231, 183, .25); border-radius: 999px;
}
.gw-eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: gw-ping 2s ease-out infinite; }
@keyframes gw-ping { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .55); } 80%, 100% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); } }
.gw-hero h1 { margin-top: 22px; font-size: clamp(2rem, 3.4vw, 3rem); line-height: 1.08; font-weight: 600; letter-spacing: -0.035em; }
.gw-hero h1 em { font-style: normal; color: #6ee7b7; }
.gw-hero-lead { margin-top: 16px; font-size: 16px; line-height: 1.6; color: rgba(255, 255, 255, .68); max-width: 460px; }
.gw-features { margin: 36px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 20px; }
.gw-features li { display: flex !important; gap: 14px !important; align-items: center !important; }
.gw-feat-ic {
    width: 40px !important; height: 40px !important; min-width: 40px !important; max-width: 40px !important;
    border-radius: 12px !important; flex-shrink: 0 !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    color: #6ee7b7 !important; background: rgba(255, 255, 255, .08) !important; border: 1px solid rgba(255, 255, 255, .12) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14) !important;
    box-sizing: border-box !important; padding: 0 !important; margin: 0 !important;
}
.gw-feat-ic svg,
.gw-feat-ic .gw-ic,
.gw-feat-ic [data-lucide] {
    width: 20px !important; height: 20px !important; min-width: 20px !important; min-height: 20px !important;
    stroke-width: 2.2 !important; display: block !important; margin: 0 auto !important;
    color: #6ee7b7 !important; flex-shrink: 0 !important;
}
.gw-features strong { display: block; font-size: 14px; font-weight: 600; color: #fff; line-height: 1.35; letter-spacing: -0.01em; }
.gw-features span { display: block; margin-top: 2px; font-size: 13px; line-height: 1.45; color: rgba(255, 255, 255, .65); }

.gw-hero-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.gw-pay-card {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px; max-width: 330px; width: 100%;
    background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: gw-float 6s ease-in-out infinite;
}
.gw-pay-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(16, 185, 129, .2); color: #6ee7b7; flex-shrink: 0; }
.gw-pay-title { font-size: 13px; font-weight: 600; color: #fff; }
.gw-pay-sub { font-size: 12px; color: rgba(255, 255, 255, .55); }
.gw-pay-amt { margin-left: auto; font-size: 14px; font-weight: 600; color: #6ee7b7; font-variant-numeric: tabular-nums; }
@keyframes gw-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.gw-hero-copy { font-size: 12px; color: rgba(255, 255, 255, .42); }

.gw-auth-side { position: relative; display: flex; flex-direction: column; padding: 22px 32px; background: var(--surface); overflow: hidden; }
.gw-auth-side::before {
    content: ""; position: absolute; top: -140px; right: -140px; width: 420px; height: 420px; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, rgba(4, 141, 95, .10) 0%, rgba(4, 141, 95, 0) 70%);
}
.gw-auth-top { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 40px; }
.gw-mobile-brand { display: none; }
.gw-auth-main { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; padding: 28px 0; }
.gw-auth-card { width: 100%; max-width: 400px; }
.gw-auth-card h2 { font-size: 28px; font-weight: 650; letter-spacing: -0.03em; line-height: 1.15; }
.gw-auth-sub { margin-top: 8px; color: var(--muted); font-size: 14.5px; }
.gw-form { margin-top: 30px; display: grid; gap: 18px; }
.gw-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gw-divider { display: flex; align-items: center; gap: 14px; margin: 26px 0 0; color: var(--subtle); font-size: 12px; }
.gw-divider::before, .gw-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.gw-foot-note { margin-top: 18px; text-align: center; color: var(--muted); font-size: 13.5px; }
.gw-secure { position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--subtle); padding-top: 8px; }

/* ==========================================================================
   KYC — shell, stepper, formulário e dropzones
   ========================================================================== */
.gw-topbar {
    position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 28px; background: color-mix(in srgb, var(--bg) 88%, transparent);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
}
.gw-topbar-actions { display: flex; align-items: center; gap: 10px; }
.gw-shell { width: 100%; max-width: 1440px; margin: 0 auto; padding: 28px 32px 56px; flex: 1; }
.gw-page-head { margin-bottom: 22px; }
.gw-page-head h1 { font-size: 28px; font-weight: 650; letter-spacing: -0.03em; line-height: 1.15; }
.gw-page-head p { margin-top: 6px; color: var(--muted); font-size: 14.5px; max-width: 760px; }
.gw-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; font-size: 12px; font-weight: 600; color: var(--brand-ink); background: var(--brand-soft); border: 1px solid var(--brand-soft-border); border-radius: 999px; margin-bottom: 12px; }

.gw-kyc-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 28px; align-items: stretch; }

@media (min-width: 1600px) {
    .gw-shell { max-width: 1560px; padding: 36px 48px 64px; }
    .gw-kyc-grid { grid-template-columns: 350px minmax(0, 1fr); gap: 32px; }
}

.gw-steps-card { position: sticky; top: 84px; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); display: flex; flex-direction: column; }
.gw-progress-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.gw-progress-top strong { font-size: 13px; font-weight: 600; }
.gw-progress-top span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gw-bar { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.gw-bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #10b981, var(--brand)); transition: width .45s cubic-bezier(.16, 1, .3, 1); }

.gw-steps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 4px; }
.gw-step-item { position: relative; }
.gw-step-btn { width: 100%; display: flex; gap: 14px; align-items: flex-start; text-align: left; padding: 10px; border: 0; background: transparent; border-radius: 12px; cursor: default; color: inherit; transition: background-color .15s ease; }
.gw-step-item.is-done .gw-step-btn { cursor: pointer; }
.gw-step-item.is-done .gw-step-btn:hover { background: var(--surface-2); }
.gw-step-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.gw-step-dot {
    position: relative; width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center;
    font-size: 13px; font-weight: 600; color: var(--subtle); background: var(--surface-2); border: 1.5px solid var(--border-strong);
    transition: all .25s ease;
}
.gw-step-item:not(:last-child) .gw-step-btn::after { content: ""; position: absolute; left: 25px; top: 46px; bottom: -6px; width: 2px; background: var(--border-strong); border-radius: 2px; }
.gw-step-item.is-done:not(:last-child) .gw-step-btn::after { background: var(--brand); }
.gw-step-item.is-active .gw-step-dot { color: var(--brand-ink); background: var(--brand-soft); border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
.gw-step-item.is-done .gw-step-dot { color: #fff; background: var(--brand); border-color: var(--brand); }
.gw-step-dot .gw-n { display: block; }
.gw-step-dot .gw-ok { display: none; }
.gw-step-item.is-done .gw-n { display: none; }
.gw-step-item.is-done .gw-ok { display: block; }
.gw-step-text { padding-top: 1px; min-width: 0; }
.gw-step-text strong { display: block; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.gw-step-text span { display: block; font-size: 12px; color: var(--subtle); margin-top: 1px; }
.gw-step-item.is-active .gw-step-text strong, .gw-step-item.is-done .gw-step-text strong { color: var(--text); }

.gw-trust { margin-top: 20px; padding: 14px 16px; display: flex; gap: 12px; font-size: 12.5px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; }
.gw-trust svg { color: var(--brand-ink); margin-top: 1px; flex-shrink: 0; }
.gw-trust strong { display: block; color: var(--text); font-size: 13px; font-weight: 600; margin-bottom: 2px; }

.gw-trust-sub { margin-top: 10px; display: grid; gap: 8px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; }
.gw-trust-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-weight: 500; }
.gw-trust-item svg { color: var(--brand-ink); flex-shrink: 0; }

.gw-mobile-progress { display: none; padding: 16px; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-card); }

.gw-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); overflow: hidden; display: flex; flex-direction: column; min-height: 480px; }
.gw-card-head { display: flex; align-items: center; gap: 16px; padding: 24px 30px; border-bottom: 1px solid var(--border); }
.gw-card-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; color: var(--brand-ink); background: var(--brand-soft); border: 1px solid var(--brand-soft-border); }
.gw-card-head h2 { font-size: 19px; font-weight: 650; letter-spacing: -0.02em; }
.gw-card-head p { margin-top: 2px; color: var(--muted); font-size: 13.5px; }
.gw-card-tag { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--muted); padding: 5px 11px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; white-space: nowrap; }
.gw-card-body { padding: 28px 30px; flex: 1; }
.gw-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 30px; background: var(--surface-2); border-top: 1px solid var(--border); margin-top: auto; }
.gw-card-foot .gw-foot-meta { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }

.gw-grid { display: grid; gap: 20px; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.gw-c-6 { grid-column: span 6; } .gw-c-4 { grid-column: span 4; } .gw-c-3 { grid-column: span 3; }
.gw-c-2 { grid-column: span 2; } .gw-c-1 { grid-column: span 1; }

.gw-step-pane { display: none; }
.gw-step-pane.is-active { display: block; animation: gw-pane-in .35s cubic-bezier(.16, 1, .3, 1); }
@keyframes gw-pane-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.gw-cep-spin { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); display: none; }
.gw-cep-spin.is-on { display: block; }

/* Dropzones */
.gw-drops { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.gw-drop {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px;
    min-height: 230px; padding: 22px; cursor: pointer; background: var(--surface-2); border: 2px dashed var(--border-strong);
    border-radius: 16px; transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.gw-drop:hover { border-color: var(--brand); background: var(--brand-soft); }
.gw-drop:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
.gw-drop.is-over { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 4px var(--ring); }
.gw-drop.is-invalid { border-color: var(--danger); background: var(--danger-soft); }
.gw-drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.gw-drop-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: var(--brand-ink); background: var(--surface); border: 1px solid var(--border-strong); margin-bottom: 6px; transition: transform .2s ease; }
.gw-drop:hover .gw-drop-ic { transform: translateY(-2px); }
.gw-drop-title { font-size: 14px; font-weight: 600; }
.gw-drop-sub { font-size: 12.5px; color: var(--muted); }
.gw-drop-sub b { color: var(--brand-ink); font-weight: 600; }
.gw-drop-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.gw-drop-preview { display: none; width: 100%; }
.gw-drop.has-file { border-style: solid; border-color: var(--brand-soft-border); background: var(--surface); padding: 14px; }
.gw-drop.has-file .gw-drop-empty { display: none; }
.gw-drop.has-file .gw-drop-preview { display: block; }
.gw-drop-img { width: 100%; height: 150px; object-fit: cover; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--border); display: block; }
.gw-drop-meta { display: flex; align-items: center; gap: 10px; margin-top: 12px; text-align: left; }
.gw-drop-meta .gw-file-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); flex-shrink: 0; }
.gw-drop-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gw-drop-size { font-size: 12px; color: var(--muted); }
.gw-drop-info { min-width: 0; flex: 1; }
.gw-drop-clear { position: relative; z-index: 2; width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); border-radius: 10px; cursor: pointer; flex-shrink: 0; }
.gw-drop-clear:hover { color: var(--danger); border-color: var(--danger); }

.gw-tips { margin-top: 22px; padding: 18px 20px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; }
.gw-tips h3 { font-size: 13px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.gw-tips ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 22px; }
.gw-tips li { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; color: var(--muted); }
.gw-tips li svg { color: var(--brand-ink); margin-top: 2px; }

.gw-overlay { position: fixed; inset: 0; z-index: 180; display: flex; align-items: center; justify-content: center; background: rgba(8, 10, 12, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.gw-overlay-card { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 32px 40px; text-align: center; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 20px; box-shadow: var(--shadow-pop); }
.gw-overlay-card .gw-spinner { width: 34px; height: 34px; border-width: 3px; }
.gw-overlay-card strong { font-size: 15px; font-weight: 600; }
.gw-overlay-card span { font-size: 13px; color: var(--muted); }

/* ==========================================================================
   PÓS-KYC — status da análise
   ========================================================================== */
.gw-status-wrap { max-width: 760px; margin: 0 auto; padding: 44px 24px 72px; }
.gw-status-card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-card); overflow: hidden; }
.gw-status-hero { position: relative; padding: 40px 32px 30px; text-align: center; border-bottom: 1px solid var(--border); background: radial-gradient(ellipse 70% 100% at 50% 0%, var(--brand-soft), transparent 70%); }
.gw-status-icon { position: relative; width: 84px; height: 84px; margin: 0 auto 22px; border-radius: 50%; display: grid; place-items: center; color: var(--brand-ink); background: var(--brand-soft); border: 1px solid var(--brand-soft-border); }
.gw-status-icon::before, .gw-status-icon::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--brand); opacity: 0; animation: gw-ring 2.6s ease-out infinite; }
.gw-status-icon::after { animation-delay: 1.3s; }
@keyframes gw-ring { 0% { transform: scale(1); opacity: .45; } 100% { transform: scale(1.7); opacity: 0; } }
.gw-status-icon svg { width: 36px; height: 36px; stroke-width: 1.7; }
.gw-status-hero h1 { font-size: 26px; font-weight: 650; letter-spacing: -0.03em; }
.gw-status-hero p { margin: 10px auto 0; max-width: 480px; color: var(--muted); font-size: 14.5px; }
.gw-status-card.is-approved .gw-status-icon::before, .gw-status-card.is-approved .gw-status-icon::after { animation: none; opacity: 0; }
.gw-status-card.is-approved .gw-status-icon { color: #fff; background: var(--brand); border-color: var(--brand); }

.gw-meta { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--border); }
.gw-meta > div { padding: 18px 22px; border-right: 1px solid var(--border); }
.gw-meta > div:last-child { border-right: 0; }
.gw-meta dt { font-size: 12px; color: var(--muted); margin: 0; }
.gw-meta dd { margin: 4px 0 0; font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; }

.gw-timeline { list-style: none; margin: 0; padding: 28px 32px 8px; }
.gw-tl-item { position: relative; display: flex; gap: 18px; padding-bottom: 26px; }
.gw-tl-item:not(:last-child)::before { content: ""; position: absolute; left: 17px; top: 38px; bottom: 2px; width: 2px; background: var(--border-strong); border-radius: 2px; }
.gw-tl-item.is-done:not(:last-child)::before { background: var(--brand); }
.gw-tl-dot { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; color: var(--subtle); background: var(--surface-2); border: 1.5px solid var(--border-strong); }
.gw-tl-item.is-done .gw-tl-dot { color: #fff; background: var(--brand); border-color: var(--brand); }
.gw-tl-item.is-active .gw-tl-dot { color: var(--brand-ink); background: var(--brand-soft); border-color: var(--brand); box-shadow: 0 0 0 5px var(--ring); animation: gw-pulse 2s ease-in-out infinite; }
@keyframes gw-pulse { 0%, 100% { box-shadow: 0 0 0 4px var(--ring); } 50% { box-shadow: 0 0 0 8px rgba(4, 141, 95, 0.05); } }
.gw-tl-item h3 { font-size: 14.5px; font-weight: 600; padding-top: 6px; }
.gw-tl-item.is-pending h3 { color: var(--muted); }
.gw-tl-item p { margin-top: 3px; font-size: 13px; color: var(--muted); }

.gw-status-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 18px 32px; background: var(--surface-2); border-top: 1px solid var(--border); }
.gw-live { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--muted); }
.gw-live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); animation: gw-ping 2s ease-out infinite; }
.gw-live.is-checking .gw-live-dot { background: var(--warn); }
.gw-status-actions { display: flex; align-items: center; gap: 10px; }
.gw-next { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gw-next > div { display: flex; gap: 14px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; font-size: 13px; color: var(--muted); }
.gw-next strong { display: block; color: var(--text); font-size: 13.5px; font-weight: 600; margin-bottom: 2px; }
.gw-next svg { color: var(--brand-ink); margin-top: 2px; }

/* ==========================================================================
   Responsivo
   ========================================================================== */
@media (max-width: 1023px) {
    .gw-login { grid-template-columns: 1fr; }
    .gw-hero { display: none; }
    .gw-mobile-brand { display: inline-flex; }
    .gw-auth-side { padding: 18px 20px; min-height: 100vh; }
    .gw-kyc-grid { grid-template-columns: 1fr; }
    .gw-steps-card { display: none; }
    .gw-mobile-progress { display: block; }
}
@media (max-width: 640px) {
    .gw-topbar { padding: 12px 16px; }
    .gw-shell { padding: 22px 16px 48px; }
    .gw-page-head h1 { font-size: 24px; }
    .gw-card-head { padding: 18px; gap: 12px; flex-wrap: wrap; }
    .gw-card-tag { display: none; }
    .gw-card-body { padding: 18px; }
    .gw-card-foot { padding: 14px 18px; }
    .gw-grid { gap: 16px; }
    .gw-c-4, .gw-c-3, .gw-c-2 { grid-column: span 6; }
    .gw-c-1 { grid-column: span 3; }
    .gw-drops { grid-template-columns: 1fr; }
    .gw-tips ul { grid-template-columns: 1fr; }
    .gw-meta { grid-template-columns: 1fr; }
    .gw-meta > div { border-right: 0; border-bottom: 1px solid var(--border); }
    .gw-meta > div:last-child { border-bottom: 0; }
    .gw-next { grid-template-columns: 1fr; }
    .gw-status-hero { padding: 32px 20px 24px; }
    .gw-timeline { padding: 22px 20px 4px; }
    .gw-status-foot { padding: 16px 20px; }
    .gw-card-foot .gw-foot-meta { display: none; }
    .gw-card-foot .gw-btn { flex: 1; }
}
/* ==========================================================================
   REGISTRO
   ========================================================================== */
.gw-auth-card.is-wide { max-width: 480px; }
.gw-auth-card.is-wide .gw-form { margin-top: 24px; gap: 16px; }
.gw-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gw-form-grid .gw-field { min-width: 0; }

.gw-strength { margin-top: 2px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.gw-strength-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 12px; color: var(--muted); }
.gw-strength-label { font-weight: 600; color: var(--subtle); }
.gw-strength[data-level="1"] .gw-strength-label { color: var(--danger); }
.gw-strength[data-level="2"] .gw-strength-label { color: #d97706; }
.gw-strength[data-level="3"] .gw-strength-label { color: #65a30d; }
.gw-strength[data-level="4"] .gw-strength-label { color: var(--brand-ink); }
.gw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.gw-meter i { height: 5px; border-radius: 999px; background: var(--surface-3); transition: background-color .25s ease; }
.gw-strength[data-level="1"] .gw-meter i:nth-child(-n+1) { background: var(--danger); }
.gw-strength[data-level="2"] .gw-meter i:nth-child(-n+2) { background: #f59e0b; }
.gw-strength[data-level="3"] .gw-meter i:nth-child(-n+3) { background: #84cc16; }
.gw-strength[data-level="4"] .gw-meter i:nth-child(-n+4) { background: var(--brand); }
.gw-rules { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.gw-rules li { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--subtle); transition: color .15s ease; }
.gw-rules li svg { width: 14px; height: 14px; flex-shrink: 0; stroke-width: 2.4; opacity: .55; }
.gw-rules li.is-ok { color: var(--brand-ink); }
.gw-rules li.is-ok svg { opacity: 1; }
.gw-terms-wrap .gw-check { align-items: flex-start; line-height: 1.5; }
.gw-terms-wrap .gw-check input { margin-top: 1px; }
.gw-terms-wrap.is-invalid .gw-check input { border-color: var(--danger); box-shadow: 0 0 0 4px var(--danger-ring); }
.gw-terms-wrap .gw-error { margin-top: 6px; }
.gw-terms-wrap.is-invalid .gw-error { display: flex; }
@media (max-width: 560px) {
    .gw-form-grid { grid-template-columns: 1fr; }
    .gw-rules { grid-template-columns: 1fr; }
}

/* KYC — estados e utilitários */
.gw-status-card.is-rejected .gw-status-hero { background: radial-gradient(ellipse 70% 100% at 50% 0%, var(--danger-soft), transparent 70%); }
.gw-status-card.is-rejected .gw-status-icon { color: var(--danger); background: var(--danger-soft); border-color: var(--danger-ring); }
.gw-status-card.is-rejected .gw-status-icon::before, .gw-status-card.is-rejected .gw-status-icon::after { border-color: var(--danger); animation: none; opacity: 0; }
.gw-tl-item.is-failed .gw-tl-dot { color: #fff; background: var(--danger); border-color: var(--danger); }
.gw-user-chip { display: inline-flex; align-items: center; gap: 8px; padding: 0 12px 0 6px; height: 40px; font-size: 13px; color: var(--muted); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; max-width: 220px; }
.gw-user-chip b { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gw-user-avatar { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--brand-ink); background: var(--brand-soft); border: 1px solid var(--brand-soft-border); flex-shrink: 0; }
.gw-logout { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; font-size: 13px; font-weight: 500; color: var(--muted); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; text-decoration: none; transition: color .15s ease, border-color .15s ease, background-color .15s ease; }
.gw-logout:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }
.gw-kyc-alert { margin-bottom: 20px; }
@media (max-width: 640px) { .gw-user-chip { display: none; } .gw-logout span { display: none; } .gw-logout { padding: 0; width: 40px; justify-content: center; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
