/* Tokens do ecossistema (Genera.DesignTokens, carregado antes deste arquivo nos
   três layouts): cores, raios e tema escuro — pelo sistema ou por data-theme no
   <html> (_ThemeInit/_ThemeToggle). Ver docs/CONTEXTO.md § Identidade visual.
   Tenants continuam sobrescrevendo --accent/--accent-soft via BrandingJson, num
   <style> do _Layout que vem depois dos dois arquivos.

   Aqui fica só o que é do IdP: as fontes e a sombra do cartão de login, maior e
   mais difusa que a dos tokens. */
:root {
    --card-shadow: 0 16px 48px rgba(27, 30, 36, .09);
    --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
    --body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --card-shadow: 0 16px 48px rgba(0, 0, 0, .45);
    }
}
:root[data-theme="dark"] {
    --card-shadow: 0 16px 48px rgba(0, 0, 0, .45);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100vh;
}

body {
    display: flex;
    flex-direction: column;
    background-color: var(--bg);
    background-image:
        radial-gradient(color-mix(in srgb, var(--text) 5%, transparent) 1px, transparent 1px),
        radial-gradient(760px 500px at 50% 34%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 70%),
        radial-gradient(1100px 700px at 88% 112%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 60%);
    background-size: 26px 26px, auto, auto;
    color: var(--text);
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
}

/* Seletor de tema (sol/lua) */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    transition: color .12s ease, background-color .12s ease;
}

.theme-toggle:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.theme-toggle svg {
    width: 17px;
    height: 17px;
}

.theme-toggle .icon-sun {
    display: none;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .icon-moon {
        display: none;
    }

    :root:not([data-theme="light"]) .theme-toggle .icon-sun {
        display: block;
    }
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
    display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
    display: block;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--on-accent);
    background: linear-gradient(160deg,
        color-mix(in srgb, var(--accent) 86%, #FFFFFF),
        color-mix(in srgb, var(--accent) 80%, #000000));
    box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 30%, transparent);
}

.brand-mark svg {
    width: 19px;
    height: 19px;
}

.brand-logo {
    height: 28px;
}

.brand-name {
    font-family: var(--display);
    font-weight: 700;
    font-size: 19px;
    letter-spacing: -0.01em;
}

.site-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 20px 28px;
    color: var(--muted);
    font-size: 13px;
}

.site-footer svg {
    width: 14px;
    height: 14px;
    color: var(--muted);
}

.site-footer strong {
    color: var(--text);
}

/* Cartão de autenticação */
.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--card-shadow);
    padding: 40px 36px 34px;
    animation: card-rise .45s ease both;
}

@keyframes card-rise {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-card {
        animation: none;
    }
}

.auth-card h1 {
    font-family: var(--display);
    font-weight: 700;
    font-size: 34px;
    line-height: 1.12;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
}

.auth-subtitle {
    color: var(--muted);
    font-size: 14.5px;
    margin: 0 0 24px;
}

.form-field {
    margin-bottom: 16px;
}

.form-field label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 6px;
}

.form-field input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: 15px;
    transition: border-color .12s ease, background-color .12s ease;
}

.form-field input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-color: var(--accent);
    background: var(--surface);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 14px;
    color: var(--muted);
}

.form-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 18px;
    border: none;
    border-radius: var(--r-md);
    background-color: var(--accent);
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0));
    color: var(--on-accent);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 32%, transparent);
    transition: filter .12s ease, transform .12s ease, box-shadow .12s ease;
}

a.btn:hover {
    text-decoration: none;
}

.btn:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 38%, transparent);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px color-mix(in srgb, var(--accent) 30%, transparent);
}

.btn:focus-visible {
    outline: 2px solid var(--text);
    outline-offset: 2px;
}

/* "Entrar com SSO da empresa", abaixo do formulário de senha. */
.auth-sso {
    margin-top: 12px;
}

.btn-secondary {
    background-color: var(--accent-soft);
    background-image: none;
    color: var(--accent);
    box-shadow: none;
}

.btn-secondary:hover,
.btn-secondary:active {
    box-shadow: none;
}

.auth-alt {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: var(--muted);
}

.auth-alt a,
.field-error a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.auth-alt a:hover {
    text-decoration: underline;
}

.field-error,
.validation-summary-errors {
    color: var(--bad-fg);
    font-size: 13.5px;
    margin-top: 4px;
}

.validation-summary-errors {
    background: var(--bad-bg);
    border-radius: var(--r-md);
    padding: 10px 14px;
    margin: 0 0 16px;
}

.validation-summary-errors ul {
    margin: 0;
    padding-left: 18px;
}

.validation-summary-valid {
    display: none;
}

.banner-success,
.banner-warning {
    border-radius: var(--r-md);
    padding: 10px 14px;
    margin: 0 0 16px;
    font-size: 14px;
}

.banner-success {
    background: var(--ok-bg);
    color: var(--ok-fg);
}

.banner-warning {
    background: var(--warn-bg);
    color: var(--warn-fg);
}

.inline-form {
    display: inline;
}

.role-form {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
}

.role-input {
    min-width: 110px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm, 6px);
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: 13.5px;
}

.role-input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-color: var(--accent);
}

.link-button {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
    text-decoration: underline;
}

/* Página de conta */
.account-card {
    max-width: 480px;
}

.account-section {
    border-top: 1px solid var(--border);
    margin-top: 24px;
    padding-top: 20px;
}

.account-section h2 {
    font-family: var(--display);
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 14px;
}

.account-section .btn {
    width: auto;
    min-width: 140px;
}

/* Consentimento e sessões */
.consent-scopes {
    margin: 0 0 20px;
    padding-left: 20px;
    line-height: 1.8;
}

.consent-actions {
    display: flex;
    gap: 12px;
}

.consent-actions .btn {
    width: auto;
    min-width: 120px;
}

.session-agent {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

/* MFA */
.code-input {
    letter-spacing: .2em;
    font-variant-numeric: tabular-nums;
}

.qr-container {
    display: flex;
    justify-content: center;
    background: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 16px;
    margin: 0 0 16px;
}

.qr-container svg {
    width: 180px;
    height: 180px;
}

.shared-key {
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: 14px;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: var(--r-md);
    padding: 10px 14px;
    text-align: center;
    word-break: break-all;
    margin: 0 0 20px;
}

.recovery-codes {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 0;
    margin: 0 0 20px;
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: 14px;
}

.recovery-codes li {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 8px 10px;
    text-align: center;
    margin: 0;
}

/* Dashboard */
.dash-body {
    display: block;
    background-image: none;
}

.dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.dash-tag {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 999px;
    padding: 2px 10px;
    margin-left: 6px;
    vertical-align: middle;
}

.dash-session {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 14px;
    color: var(--muted);
}

.dash-session > a {
    color: var(--muted);
    font-weight: 600;
    text-decoration: none;
}

.dash-session > a:hover {
    color: var(--accent);
}

.dash-shell {
    display: flex;
    min-height: calc(100vh - 62px);
}

.dash-nav {
    width: 210px;
    flex-shrink: 0;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-right: 1px solid var(--border);
}

.dash-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--r-md);
    color: var(--muted);
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 500;
}

.dash-nav a svg {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
}

.dash-nav a:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.dash-nav a.active {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.dash-main {
    flex: 1;
    padding: 28px 32px 48px;
    max-width: 960px;
}

.dash-main .auth-card {
    margin: 48px auto 0;
}

.dash-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: 30px;
    letter-spacing: -0.02em;
    margin: 0 0 20px;
}

.dash-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 22px 24px;
    margin-bottom: 20px;
}

.dash-card h2 {
    font-family: var(--display);
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 14px;
}

.dash-form-row {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.dash-form-row .form-field {
    flex: 1;
    min-width: 180px;
    margin-bottom: 0;
}

.dash-form-row .btn {
    width: auto;
    min-width: 110px;
}

.dash-card form .btn {
    width: auto;
    min-width: 130px;
}

.form-field select,
.form-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: 15px;
}

.form-field textarea:focus-visible,
.form-field select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.mono-area,
.mono-inline {
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: 13.5px;
}

.dash-uris {
    white-space: pre-line;
    font-size: 12.5px;
}

.table-scroll {
    overflow-x: auto;
}

.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.dash-table th {
    text-align: left;
    font-size: 12px;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    padding: 8px 12px;
    border-bottom: 2px solid var(--border);
}

.dash-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.dash-table tr:last-child td {
    border-bottom: none;
}

.pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.pill-ok {
    background: var(--ok-bg);
    color: var(--ok-fg);
}

.pill-warn {
    background: var(--warn-bg);
    color: var(--warn-fg);
}

.pill-danger {
    background: var(--bad-bg);
    color: var(--bad-fg);
}

.pill-info {
    background: var(--accent-soft);
    color: var(--accent);
}

.pill-off {
    background: var(--bg);
    color: var(--muted);
    border: 1px solid var(--border);
}

.secret-box {
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: 13px;
    background: var(--bg);
    border: 1px dashed var(--accent);
    border-radius: var(--r-md);
    padding: 10px 14px;
    margin-top: 8px;
    word-break: break-all;
    user-select: all;
}

.dash-stats {
    display: flex;
    gap: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.dash-stat {
    flex: 1;
    min-width: 140px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: var(--muted);
    font-size: 13.5px;
}

.dash-stat-num {
    font-family: var(--display);
    font-weight: 700;
    font-size: 28px;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.dash-hint {
    color: var(--muted);
    font-size: 14px;
    margin: 0 0 8px;
}

.webhook-events {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

/* Pares rótulo/valor (dados do SP para colar no IdP, dados do IdP). */
.dash-dl {
    display: grid;
    gap: 6px;
    margin: 0 0 16px;
}

.dash-dl dt {
    margin-top: 8px;
    font-weight: 600;
}

.dash-dl dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.webhook-events .form-check {
    margin-bottom: 0;
}

.dash-table .pill + .pill {
    margin-left: 6px;
}

.dash-pager {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 14px;
    font-size: 14px;
    color: var(--muted);
}

.dash-pager a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.link-danger {
    color: var(--bad-fg);
}

/* Página inicial simples */
.home-card {
    text-align: center;
    max-width: 440px;
}

.home-card .btn {
    width: auto;
    min-width: 180px;
    margin-top: 8px;
}

/* Landing comercial (host da plataforma, visitante deslogado) */
html {
    scroll-behavior: smooth;
}

.landing {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.landing .btn {
    width: auto;
}

.landing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 56px;
}

.landing-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 14.5px;
    font-weight: 500;
}

.landing-nav a {
    color: var(--muted);
    text-decoration: none;
}

.landing-nav a:hover {
    color: var(--accent);
}

.landing-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.landing-signin {
    color: var(--muted);
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 500;
    white-space: nowrap;
}

.landing-signin:hover {
    color: var(--accent);
}

.btn-ghost {
    background: var(--surface);
    background-image: none;
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: none;
}

.btn-ghost:hover,
.btn-ghost:active {
    box-shadow: none;
}

.landing-hero {
    display: flex;
    align-items: center;
    gap: 64px;
    padding: 64px 96px 72px;
}

.hero-copy {
    flex: 1.15;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.hero-badge {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
}

.hero-badge svg {
    width: 14px;
    height: 14px;
}

.hero-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: 58px;
    line-height: 1.05;
    letter-spacing: -0.025em;
    margin: 0;
}

.hero-lede {
    font-size: 18px;
    line-height: 1.6;
    color: var(--muted);
    margin: 0;
    max-width: 540px;
}

.hero-ctas {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 6px;
}

.hero-proof {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--muted);
}

.hero-proof svg {
    width: 15px;
    height: 15px;
    color: var(--ok-fg);
    flex-shrink: 0;
}

.hero-visual {
    flex: 0.85;
    min-width: 0;
    display: flex;
    justify-content: center;
}

.hero-card {
    width: min(360px, 100%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--card-shadow);
    padding: 32px 30px 28px;
    display: flex;
    flex-direction: column;
}

.hero-card-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 18px;
    font-family: var(--display);
    font-weight: 700;
    font-size: 15px;
}

.hero-card-brand .brand-mark {
    width: 26px;
    height: 26px;
    border-radius: var(--r-sm);
    box-shadow: none;
}

.hero-card-brand .brand-mark svg {
    width: 15px;
    height: 15px;
}

.hero-card-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: 24px;
    letter-spacing: -0.02em;
    margin: 0 0 4px;
}

.hero-card-host {
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 18px;
}

.hero-card-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hero-card-field {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg);
    font-size: 13.5px;
    color: var(--muted);
}

.hero-card-field.focus {
    border: 2px solid var(--accent);
    background: var(--surface);
    color: var(--text);
    letter-spacing: 0.22em;
}

.hero-card .btn {
    width: 100%;
    margin-top: 16px;
    padding: 11px;
    font-size: 14px;
}

.hero-card-footer {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11.5px;
    color: var(--muted);
}

.hero-card-footer svg {
    width: 11px;
    height: 11px;
}

.hero-card-footer strong {
    color: var(--text);
}

.landing-section {
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 64px 96px;
}

.landing-section.alt {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-head {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 640px;
}

.section-eyebrow {
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--accent);
}

.section-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: 36px;
    letter-spacing: -0.02em;
    margin: 0;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.landing-section.alt .feature-card,
.landing-section.alt .hero-card {
    background: var(--bg);
}

.feature-card svg {
    width: 22px;
    height: 22px;
    color: var(--accent);
}

.feature-title {
    font-family: var(--display);
    font-weight: 600;
    font-size: 17px;
}

.feature-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--muted);
}

.steps-row {
    display: flex;
    gap: 48px;
    align-items: flex-start;
}

.steps {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.step {
    display: flex;
    gap: 16px;
}

.step-num {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-family: var(--display);
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.step-title {
    font-family: var(--display);
    font-weight: 600;
    font-size: 17px;
}

.step-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--muted);
}

/* Terminal: cores fixas, independentes do tema (é um terminal). */
.code-panel {
    flex: 1.1;
    background: #101216;
    border-radius: var(--r-xl);
    padding: 24px 26px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.code-panel-dots {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.code-panel-dots span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.code-panel pre {
    margin: 0;
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: 13px;
    line-height: 1.7;
    color: #EDEEF1;
    white-space: pre;
    overflow-x: auto;
}

.code-comment { color: #9BA1AD; }
.code-string { color: #A7B2FF; }
.code-ok { color: #57C690; }

.operate-row {
    display: flex;
    align-items: center;
    gap: 64px;
}

.operate-copy {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.operate-lede {
    margin: 0;
    font-size: 15.5px;
    line-height: 1.6;
    color: var(--muted);
    max-width: 480px;
}

.operate-checks {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14.5px;
}

.operate-checks div {
    display: flex;
    align-items: center;
    gap: 9px;
}

.operate-checks svg {
    width: 15px;
    height: 15px;
    color: var(--ok-fg);
    flex-shrink: 0;
}

.operate-card {
    flex: 1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--card-shadow);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mini-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.mini-stat {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    color: var(--muted);
}

.mini-stat strong {
    font-family: var(--display);
    font-weight: 700;
    font-size: 24px;
    color: var(--text);
}

.mini-list {
    display: flex;
    flex-direction: column;
}

.mini-list-head {
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 2px 4px 6px;
}

.mini-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 4px;
    border-bottom: 1px solid var(--border);
    font-size: 13.5px;
}

.mini-row:last-child {
    border-bottom: none;
}

.mini-row strong {
    font-weight: 600;
}

/* Banda de CTA: elemento de marca fixo, igual nos dois temas. */
.landing-cta {
    padding: 24px 96px 72px;
}

.cta-band {
    border-radius: 24px;
    background: linear-gradient(150deg, #2237B8, #2743D8 55%, #3552E3);
    padding: 56px 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    box-shadow: 0 20px 56px rgba(39, 67, 216, .35);
}

.cta-band h2 {
    font-family: var(--display);
    font-weight: 700;
    font-size: 34px;
    letter-spacing: -0.02em;
    margin: 0 0 8px;
    color: #FFFFFF;
}

.cta-band p {
    margin: 0;
    font-size: 15.5px;
    color: #DDE3FF;
}

.cta-band .btn {
    background: #FFFFFF;
    background-image: none;
    color: #2743D8;
    flex-shrink: 0;
    padding: 14px 30px;
    font-size: 15.5px;
    box-shadow: 0 6px 18px rgba(16, 18, 22, .25);
}

.landing-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding: 28px 56px 36px;
    border-top: 1px solid var(--border);
    font-size: 13.5px;
    color: var(--muted);
}

.landing-footer-brand {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    max-width: 100%;
}

.landing-footer-brand svg {
    width: 16px;
    height: 16px;
    color: var(--muted);
}

.landing-footer-brand strong {
    color: var(--text);
}

.landing-footer-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 24px;
}

.landing-footer-links a {
    color: var(--muted);
    text-decoration: none;
}

.landing-footer-links a:hover {
    color: var(--accent);
}

/* Documentação pública (/docs) */
.docs-prose {
    max-width: 800px;
    font-size: 15px;
    line-height: 1.65;
    /* Nomes longos de pacote e namespace (Microsoft.AspNetCore.Authentication…)
       não têm onde quebrar e empurravam a página inteira em tela estreita. */
    overflow-wrap: break-word;
}

.docs-lede {
    font-size: 16.5px;
    color: var(--muted);
    margin: 0 0 8px;
}

.docs-prose h2 {
    font-family: var(--display);
    font-weight: 600;
    font-size: 21px;
    letter-spacing: -0.01em;
    margin: 32px 0 10px;
}

.docs-prose p {
    margin: 0 0 14px;
}

.docs-prose ul {
    margin: 0 0 14px;
    padding-left: 22px;
}

.docs-prose li {
    margin-bottom: 6px;
}

.docs-prose a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.docs-prose a:hover {
    text-decoration: underline;
}

.docs-prose code {
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: 0.9em;
    overflow-wrap: anywhere;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 5px;
    padding: 1px 6px;
}

.docs-prose .dash-table code {
    white-space: nowrap;
}

.docs-prose .table-scroll {
    margin: 0 0 14px;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
}

.docs-prose .dash-table td {
    font-size: 13.5px;
}

.code-panel.block {
    flex: none;
    margin: 0 0 14px;
    padding: 18px 20px;
}

.code-panel.block pre {
    white-space: pre-wrap;
    word-break: break-word;
}

.docs-callout {
    background: var(--accent-soft);
    color: var(--text);
    border-radius: var(--r-md);
    padding: 14px 18px;
    font-size: 14px;
    line-height: 1.55;
    margin: 20px 0 14px;
}

.docs-callout strong {
    color: var(--accent);
}

/* Signup self-service (/dashboard/signup) */
.signup-shell {
    display: flex;
    align-items: flex-start;
    gap: 48px;
    margin-top: 40px;
}

.signup-shell .auth-card {
    margin: 0;
}

.signup-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.signup-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: 34px;
    letter-spacing: -0.02em;
    margin: 0;
}

.signup-lede {
    margin: 0;
    font-size: 15px;
    color: var(--muted);
}

.signup-preview {
    align-self: flex-start;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 999px;
    padding: 6px 14px;
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: 13px;
    font-weight: 600;
}

.signup-steps {
    gap: 16px;
    margin-top: 6px;
}

/* Login do dashboard: tipos de chave */
.key-types {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.key-type {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.key-type p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--muted);
}

.key-type strong {
    color: var(--text);
}

.mono-chip {
    flex-shrink: 0;
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: 12.5px;
    font-weight: 600;
    background: var(--accent-soft);
    color: var(--accent);
    border-radius: 999px;
    padding: 3px 12px;
    white-space: nowrap;
}

.signup-card {
    width: 420px;
    flex-shrink: 0;
}

.signup-card-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: 24px;
    letter-spacing: -0.02em;
    margin: 0 0 6px;
}

.slug-group {
    display: flex;
}

.slug-group input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    min-width: 0;
}

.slug-suffix {
    display: flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-left: none;
    border-radius: 0 var(--r-md) var(--r-md) 0;
    background: var(--accent-soft);
    color: var(--accent);
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: 12.5px;
    white-space: nowrap;
}

.signup-sent .sent-icon {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: var(--ok-bg);
    color: var(--ok-fg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.sent-icon svg {
    width: 22px;
    height: 22px;
}

@media (max-width: 900px) {
    .signup-shell {
        flex-direction: column;
        gap: 32px;
        margin-top: 16px;
    }

    .signup-card {
        width: 100%;
    }
}

@media (max-width: 960px) {
    .landing-header {
        padding: 18px 24px;
    }

    .landing-nav {
        display: none;
    }

    .landing-hero {
        flex-direction: column;
        gap: 40px;
        padding: 40px 24px 48px;
    }

    .hero-title {
        font-size: 40px;
    }

    .landing-section {
        padding: 48px 24px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .steps-row,
    .operate-row {
        flex-direction: column;
        gap: 32px;
    }

    .code-panel,
    .operate-card {
        width: 100%;
        box-sizing: border-box;
    }

    .landing-cta {
        padding: 16px 24px 48px;
    }

    .cta-band {
        flex-direction: column;
        text-align: center;
        padding: 40px 28px;
    }

    .landing-footer {
        flex-direction: column;
        padding: 24px;
    }
}

/* Abaixo de 860px a casca de duas colunas (dashboard e docs) não cabe: a
   navegação lateral de 210px empurrava o conteúdo para fora da tela. Vira uma
   faixa rolável no topo, e o conteúdo passa a ocupar a largura inteira. */
@media (max-width: 860px) {
    .dash-shell {
        flex-direction: column;
        min-height: 0;
    }

    .dash-nav {
        width: 100%;
        flex-direction: row;
        gap: 6px;
        padding: 12px 16px;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .dash-nav a {
        white-space: nowrap;
    }

    .dash-main {
        max-width: 100%;
        padding: 24px 20px 40px;
    }

    .dash-header {
        padding: 14px 20px;
    }
}

/* Telas estreitas: o header não cabe numa linha só com marca + ações.
   Quebra em duas — marca em cima, ações centradas embaixo. */
@media (max-width: 640px) {
    .landing-header {
        flex-wrap: wrap;
        justify-content: center;
        gap: 14px;
        padding: 16px 20px;
    }

    .landing-actions {
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .landing-actions .btn {
        padding: 10px 14px;
        font-size: 14px;
    }

    .landing-signin {
        font-size: 14px;
    }
}

/* Celular estreito (iPhone SE e afins). O conteúdo já cabe pelas regras acima;
   aqui só se ajusta o respiro e se dá rolagem própria às tabelas das docs, que
   têm colunas de largura fixa e não encolhem. */
@media (max-width: 480px) {
    .dash-main {
        padding: 20px 16px 36px;
    }

    /* O link de entrar fica numa linha só dele: sem isso a quebra do header
       sai desalinhada, com um botão sobrando em cada linha. */
    .landing-signin {
        width: 100%;
        text-align: center;
    }

    .landing-actions .btn {
        padding: 9px 13px;
        font-size: 13.5px;
    }

    /* Header de docs/dashboard: "Genera ID" quebrava no meio e os links da
       direita empilhavam letra a letra. */
    .dash-header {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 10px;
        padding: 12px 16px;
    }

    .brand-name {
        white-space: nowrap;
        font-size: 17px;
    }

    .dash-session {
        gap: 10px;
        font-size: 13.5px;
    }

    .dash-session a {
        white-space: nowrap;
    }

    .landing-hero {
        padding: 32px 20px 40px;
    }

    .landing-section,
    .landing-cta {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Tabelas (docs e dashboard) têm colunas que não encolhem: em vez de
       empurrar a página, elas rolam sozinhas. */
    .dash-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* ===== White-label do tenant (TenantBranding) ===== */

/* Faixa do topo: accent em 3/4 e a segunda cor no resto (o gradiente vem inline). */
.brand-bar {
    height: 6px;
}

/* Rodapé próprio do tenant, no lugar de "Protegido por Genera ID". */
.site-footer-lines {
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    text-align: center;
}

.auth-card-logo {
    display: block;
    width: 150px;
    max-width: 100%;
    margin: 0 auto 20px;
    border-radius: 12px;
}

.auth-card:has(.auth-card-logo) > h1,
.auth-card:has(.auth-card-logo) > .auth-subtitle {
    text-align: center;
}

/* Senha com o botão Mostrar/Ocultar dentro do campo. */
.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 84px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    padding: 4px 6px;
    border: 0;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.password-toggle:hover {
    color: var(--text);
}

.password-toggle:focus-visible {
    outline: 2px solid var(--accent);
    border-radius: 6px;
}

.auth-support {
    line-height: 2;
}

.auth-support strong {
    color: var(--accent);
}

.security-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
    padding: 10px 12px;
    border-radius: var(--r-md);
    background: rgba(148, 194, 24, .12);
    color: #4E6B07;
    font-size: 13px;
    font-weight: 600;
}

:root[data-theme="dark"] .security-badge {
    color: #B7DC5A;
}

.privacy-link-wrap {
    text-align: center;
}

.privacy-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    border: 0;
    background: none;
    color: var(--accent);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.privacy-link svg {
    width: 15px;
    height: 15px;
}

/* Popup de segurança e privacidade (<dialog> nativo: Esc e foco já vêm do navegador). */
.privacy-dialog {
    width: min(520px, calc(100% - 24px));
    max-height: 88vh;
    padding: 26px 24px 28px;
    border: 0;
    border-radius: 20px;
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--card-shadow);
}

.privacy-dialog::backdrop {
    background: rgba(15, 30, 50, .55);
}

.privacy-dialog-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.privacy-dialog-top h2 {
    margin: 0;
    font-size: 20px;
}

.privacy-dialog-shield {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--accent);
    color: #FFFFFF;
}

.privacy-dialog-shield svg {
    width: 24px;
    height: 24px;
}

.privacy-intro {
    margin: 10px 0 18px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.privacy-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid var(--border);
}

.privacy-item-icon {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--accent) 10%, transparent);
    color: var(--accent);
}

.privacy-item h3 {
    margin: 0 0 3px;
    font-size: 15px;
}

.privacy-item p {
    margin: 0;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.5;
}

.privacy-links {
    margin: 16px 0 18px;
    padding: 12px;
    border-radius: var(--r-md);
    background: var(--bg);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.privacy-links a,
.privacy-links strong {
    color: var(--accent);
    font-weight: 600;
}

.privacy-dialog .btn {
    width: 100%;
}

/* Layout compacto do white-label: com faixa e logo no cartão, a tela de login
   cabe numa janela comum de notebook sem barra de rolagem. */
body:has(.brand-bar) .site-header {
    padding: 14px 28px;
}

body:has(.brand-bar) .site-main {
    padding: 8px 24px;
}

body:has(.brand-bar) .site-footer {
    padding: 10px 28px 14px;
}

.auth-card:has(.auth-card-logo) {
    padding: 28px 32px 24px;
}

.auth-card .auth-card-logo {
    width: 120px;
    margin-bottom: 14px;
}

.auth-card:has(.auth-card-logo) h1 {
    font-size: 28px;
    margin-bottom: 4px;
}

.auth-card:has(.auth-card-logo) .auth-subtitle {
    margin-bottom: 16px;
}

.auth-card:has(.auth-card-logo) .form-field {
    margin-bottom: 12px;
}

.auth-card:has(.auth-card-logo) .form-check {
    margin-bottom: 14px;
}

.auth-card:has(.auth-card-logo) .auth-alt {
    margin-top: 12px;
}

.auth-card:has(.auth-card-logo) .auth-support {
    line-height: 1.7;
}

.auth-card:has(.auth-card-logo) .security-badge {
    margin-top: 14px;
    padding: 8px 12px;
}

.auth-card:has(.auth-card-logo) .privacy-link {
    margin-top: 8px;
}
