* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.55;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Escuro: fundo em cinza (#1a1a1a + leve gradiente), como body/container no advogacia dashboard.css */
html[data-theme='dark'],
html[data-theme='dark'] body {
    background-color: var(--bg);
}

html[data-theme='dark'] body {
    background-image: linear-gradient(180deg, #101010 0%, #1d1d1d 22%, var(--bg) 48%, #161616 100%);
    background-attachment: fixed;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--topbar-border);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.topbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.left-nav,
.right-nav,
.menu {
    display: flex;
    align-items: center;
    gap: 18px;
}

.brand {
    font-weight: 800;
    text-decoration: none;
    letter-spacing: 0.2px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.brand-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffd700;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.55));
}

.brand-icon__svg {
    display: block;
}

.brand-mark {
    display: inline-block;
}

.brand-mark--solid {
    color: #ffd700;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.55);
}

/* Topbar escuro: faixa escura, logo dourado sólido, filete dourado embaixo */
html[data-theme='dark'] .topbar {
    background: linear-gradient(180deg, #000000 0%, #101010 50%, #171717 100%);
    border-top: 1px solid rgba(139, 0, 0, 0.55);
    border-bottom: 2px solid var(--accent);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    backdrop-filter: none;
}

html[data-theme='dark'] .topbar .right-nav a,
html[data-theme='dark'] .topbar .menu a {
    color: rgba(255, 255, 255, 0.92);
}

html[data-theme='dark'] .topbar .menu a {
    color: rgba(255, 255, 255, 0.72);
}

html[data-theme='dark'] .topbar .right-nav a:hover,
html[data-theme='dark'] .topbar .menu a:hover {
    color: var(--accent);
    background: rgba(0, 0, 0, 0.38);
}

html[data-theme='dark'] .topbar .muted {
    color: rgba(255, 255, 255, 0.62);
}

html[data-theme='dark'] .topbar #theme-toggle,
html[data-theme='dark'] .topbar .mobile-menu-toggle {
    background: rgba(22, 22, 22, 0.98);
    border-color: rgba(255, 215, 0, 0.38);
    color: var(--accent);
}

html[data-theme='dark'] .topbar #theme-toggle:hover,
html[data-theme='dark'] .topbar .mobile-menu-toggle:hover {
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.55);
    color: var(--accent);
}

/*
 * Topbar clara: mesma faixa escura + dourado (muitas páginas abrem em data-theme="light").
 * Sem isso, só as regras [data-theme='dark'] aplicam e parece que "não mudou nada".
 */
html[data-theme='light'] .topbar {
    background: linear-gradient(180deg, #1c1c1c 0%, #262626 45%, #181818 100%);
    border-top: 1px solid rgba(139, 0, 0, 0.5);
    border-bottom: 2px solid var(--accent);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
    backdrop-filter: none;
}

html[data-theme='light'] .topbar .right-nav a,
html[data-theme='light'] .topbar .menu a {
    color: rgba(255, 255, 255, 0.92);
}

html[data-theme='light'] .topbar .menu a {
    color: rgba(255, 255, 255, 0.72);
}

html[data-theme='light'] .topbar .right-nav a:hover,
html[data-theme='light'] .topbar .menu a:hover {
    color: var(--accent);
    background: rgba(0, 0, 0, 0.35);
}

html[data-theme='light'] .topbar .muted {
    color: rgba(255, 255, 255, 0.65);
}

html[data-theme='light'] .topbar #theme-toggle,
html[data-theme='light'] .topbar .mobile-menu-toggle {
    background: rgba(30, 30, 30, 0.98);
    border-color: rgba(184, 134, 11, 0.55);
    color: var(--accent);
}

html[data-theme='light'] .topbar #theme-toggle:hover,
html[data-theme='light'] .topbar .mobile-menu-toggle:hover {
    border-color: var(--accent);
    background: rgba(0, 0, 0, 0.45);
}

.menu a,
.right-nav a {
    color: var(--topbar-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 8px;
    border-radius: 10px;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.menu a {
    font-weight: 500;
    color: var(--muted);
}

.menu a:hover,
.right-nav a:hover {
    color: var(--primary);
    background: var(--panel-bg);
    transform: translateY(-1px);
}

.container {
    max-width: 1280px;
    margin: 20px auto 36px;
    padding: 0 24px;
}

button {
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(0, 0, 0, 0)), var(--accent-gradient);
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 12px 18px;
    cursor: pointer;
    font-weight: 800;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

button:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: var(--shadow-md);
}

button:active {
    transform: translateY(0);
    filter: brightness(0.98);
}

#theme-toggle,
.dashboard-sidebar-theme-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 10px;
    background: var(--toggle-bg);
    color: var(--topbar-text);
    border: 1px solid var(--toggle-border);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    outline: none;
}

#theme-toggle:hover,
.dashboard-sidebar-theme-btn:hover {
    transform: scale(1.03);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

#theme-toggle:focus-visible,
.dashboard-sidebar-theme-btn:focus-visible {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--ring);
}

.theme-icon {
    display: inline-flex;
    line-height: 0;
}

.theme-icon svg {
    width: 21px;
    height: 21px;
    display: block;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mobile-menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid var(--toggle-border);
    background: var(--toggle-bg);
    color: var(--topbar-text);
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-direction: column;
}

.mobile-menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 99px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-menu-toggle.is-open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.mobile-menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.48);
    z-index: 34;
    display: none;
}

.mobile-menu-overlay.show {
    display: block;
}

.section-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.section-card:not(.hero) {
    box-shadow: var(--shadow-md);
}

.section-card.auth-card {
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    padding: 26px 28px 28px;
    box-shadow: var(--shadow-sm);
}

.section-card.auth-card.cadastro-escritorio-card {
    max-width: 560px;
}

.form-section-title {
    margin: 20px 0 0;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--muted);
}

.form-section-title:first-of-type {
    margin-top: 0;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 640px) {
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

.cep-field {
    max-width: 200px;
}

.uf-input {
    max-width: 88px;
    text-transform: uppercase;
}

.cadastro-lead {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 1.45;
}

.cadastro-caixa-acoes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.cadastro-escritorio-card .alert-success {
    margin-bottom: 16px;
}

.form-hint {
    margin: -4px 0 12px;
    font-size: 13px;
    line-height: 1.45;
}

.form-hint + .dynamic-list {
    margin-top: 0;
}

.dynamic-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dynamic-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
}

.dynamic-row-fields {
    display: grid;
    grid-template-columns: 1fr 160px;
    gap: 12px;
    flex: 1 1 240px;
    min-width: 0;
}

.contato-email-fields {
    grid-template-columns: 1fr 1fr 140px;
}

.processo-cliente-fields {
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 640px) {
    .dynamic-row-fields,
    .contato-email-fields,
    .processo-cliente-fields {
        grid-template-columns: 1fr;
    }

    .clientes-search-row {
        grid-template-columns: 1fr;
    }
}

.dynamic-actions {
    margin: 8px 0 4px;
}

.btn-add-line {
    font-weight: 800;
    padding: 8px 14px;
    min-height: auto;
}

.btn-icon-remove {
    flex: 0 0 auto;
    padding: 8px 12px;
    min-height: auto;
    font-size: 13px;
    font-weight: 600;
}

.req {
    color: var(--red, #a41425);
}

.auth-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 72px);
    padding-top: 28px;
    padding-bottom: 40px;
}

.auth-title {
    margin: 0 0 20px;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-field label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--text);
}

.form-field input {
    width: 100%;
    padding: 11px 12px;
    min-height: 46px;
    box-sizing: border-box;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    line-height: 1.35;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-field input.js-uppercase {
    text-transform: uppercase;
}

/* Cadastro de escritorio: forca exibicao em caixa alta */
.cadastro-escritorio-card input[type='text'],
.cadastro-escritorio-card input[type='email'],
.cadastro-escritorio-card input[type='tel'] {
    text-transform: uppercase !important;
}

.cadastro-escritorio-card input[type='text']::placeholder,
.cadastro-escritorio-card input[type='email']::placeholder,
.cadastro-escritorio-card input[type='tel']::placeholder {
    text-transform: uppercase;
}

.form-field input:focus {
    outline: none;
    border-color: var(--wine);
    box-shadow: 0 0 0 3px var(--ring);
}

.form-field select {
    width: 100%;
    padding: 11px 36px 11px 12px;
    min-height: 46px;
    box-sizing: border-box;
    border-radius: 10px;
    border: 1px solid var(--border);
    background-color: var(--card);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    line-height: 1.35;
    cursor: pointer;
    appearance: none;
    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='%236b7280' 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 10px center;
    background-size: 16px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-field select:focus {
    outline: none;
    border-color: var(--wine);
    box-shadow: 0 0 0 3px var(--ring);
}

html[data-theme='dark'] .form-field select {
    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='%23ffd700' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* Tema escuro: visual próximo ao “Sistema de Advocacia” — vinho, dourado, superfícies slate, formulários consistentes */
html[data-theme='dark'] .menu a:hover,
html[data-theme='dark'] .right-nav a:hover {
    color: var(--accent);
}

html[data-theme='dark'] .section-card:not(.auth-card) {
    border-color: var(--border);
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(255, 215, 0, 0.06);
}

/* Painel principal: cartão medium-gray (#2d2d2d) como .card no advogacia — vinho só leve no topo */
html[data-theme='dark'] .section-card.dashboard-panel {
    background: linear-gradient(180deg, #353535 0%, var(--card) 14%), var(--card);
}

html[data-theme='dark'] .form-field input,
html[data-theme='dark'] .form-field select,
html[data-theme='dark'] .form-field textarea {
    background: var(--surface-soft);
    border-color: var(--border);
    color: var(--text);
}

html[data-theme='dark'] .form-field input::placeholder,
html[data-theme='dark'] .form-field textarea::placeholder {
    color: var(--muted);
    opacity: 1;
}

html[data-theme='dark'] .form-field input:focus,
html[data-theme='dark'] .form-field select:focus,
html[data-theme='dark'] .form-field textarea:focus {
    border-color: rgba(255, 215, 0, 0.55);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.18);
}

html[data-theme='dark'] .form-field label {
    color: var(--text);
}

html[data-theme='dark'] .section-card:not(.auth-card) .form-section-title {
    margin-top: 26px;
    margin-bottom: 4px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 215, 0, 0.28);
    border-bottom: none;
    background: linear-gradient(95deg, rgba(139, 0, 0, 0.92) 0%, rgba(45, 45, 45, 0.55) 72%, rgba(45, 45, 45, 0.35) 100%);
    color: var(--accent);
    font-size: 12px;
    letter-spacing: 0.45px;
}

html[data-theme='dark'] .section-card:not(.auth-card) .form-section-title:first-of-type {
    margin-top: 0;
}

html[data-theme='dark'] input[type='radio'],
html[data-theme='dark'] input[type='checkbox'] {
    accent-color: var(--accent);
}

html[data-theme='dark'] .clientes-form-page .form-section-title {
    border-bottom: none;
}

html[data-theme='dark'] .clientes-form-page .form-field label {
    color: var(--text);
}

html[data-theme='dark'] .clientes-form-page .dynamic-row {
    background: linear-gradient(180deg, rgba(139, 0, 0, 0.12), transparent), var(--surface-soft);
    border: 1px solid rgba(51, 65, 85, 0.9);
    border-radius: 12px;
}

.auth-submit {
    width: 100%;
    margin-top: 4px;
    justify-content: center;
}

.auth-secondary-actions {
    margin-top: 14px;
    display: grid;
    gap: 8px;
}

.auth-secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--panel-bg);
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.auth-secondary-link:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.auth-secondary-hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--muted);
    text-align: center;
}

.alert-error,
.alert-info {
    margin: 0 0 16px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
}

.alert-error {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.22);
    color: var(--text);
}

.alert-success {
    margin: 0 0 16px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 600;
    background: rgba(22, 163, 74, 0.1);
    border: 1px solid rgba(22, 163, 74, 0.28);
    color: var(--text);
}

.alert-info {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    color: var(--muted);
}

.adm-intro {
    margin: 0 0 12px;
    line-height: 1.55;
}

.adm-note {
    margin: 0;
    font-size: 14px;
}

.hero {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 22px;
    align-items: stretch;
    padding: 26px;
    margin-top: 10px;
    background: var(--hero-bg);
    box-shadow: var(--shadow-lg);
}

.hero-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 8px;
}

.eyebrow {
    margin: 0;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.55px;
    color: var(--primary);
}

.hero-title {
    margin: 10px 0 0;
    max-width: 760px;
    font-size: clamp(34px, 3.6vw, 52px);
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}

.hero-copy {
    max-width: 760px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.55;
}

.hero-actions {
    margin-top: 18px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.slug-access {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.slug-access-label {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--muted);
}

.slug-access-hint {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--muted);
}

.slug-access-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
}

.slug-prefix {
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    min-height: 44px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    max-width: 100%;
    word-break: break-all;
}

.slug-input-field {
    flex: 1 1 140px;
    min-width: 0;
    align-self: flex-start;
    min-height: 44px;
    padding: 11px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.slug-input-field:focus {
    outline: none;
    border-color: var(--wine);
    box-shadow: 0 0 0 3px var(--ring);
}

.slug-access-row .btn-cta-wine {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0 18px;
    background-image: none !important;
    background-color: var(--wine) !important;
    border-color: var(--wine) !important;
    color: #fff;
    white-space: nowrap;
}

@media (max-width: 520px) {
    .slug-access-row {
        flex-direction: column;
        align-items: stretch;
    }

    .slug-prefix {
        font-size: 12px;
    }

    .slug-input-field {
        width: 100%;
        flex: 0 0 auto;
    }

    .slug-access-row .btn-cta-wine {
        width: 100%;
        justify-content: center;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid transparent;
    text-decoration: none;
    font-weight: 800;
    padding: 12px 18px;
    min-height: 44px;
    font-size: 14px;
    line-height: 1;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, filter 0.15s ease;
}

.btn-primary {
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(0, 0, 0, 0)), var(--accent-gradient);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
    filter: brightness(0.98);
}

/* Landing: só "Criar escritorio gratis" e "Iniciar agora" — duas tonalidades de vinho (normal + hover) */
.btn.btn-primary.btn-cta-wine {
    background-image: none;
    background-color: var(--wine);
    color: #fff;
    border-color: var(--wine);
    filter: none;
}

.btn.btn-primary.btn-cta-wine:hover {
    background-color: #8f1733;
    border-color: #8f1733;
    filter: none;
}

.btn.btn-primary.btn-cta-wine:active {
    background-color: #751228;
}

html[data-theme='dark'] .btn.btn-primary.btn-cta-wine {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

html[data-theme='dark'] .btn.btn-primary.btn-cta-wine:hover {
    background-color: var(--primary-soft);
    border-color: var(--primary-soft);
}

html[data-theme='dark'] .btn.btn-primary.btn-cta-wine:active {
    filter: brightness(0.92);
}

/* CTA secundario para fluxo de contratos */
.btn.btn-primary.btn-cta-contract {
    background-image: none;
    background-color: #2f5ea8;
    border-color: #2f5ea8;
    color: #fff;
    filter: none;
}

.btn.btn-primary.btn-cta-contract:hover {
    background-color: #295392;
    border-color: #295392;
    filter: none;
}

.btn.btn-primary.btn-cta-contract:active {
    background-color: #21457a;
}

html[data-theme='dark'] .btn.btn-primary.btn-cta-contract {
    background-color: #4d76b6;
    border-color: #4369a4;
}

html[data-theme='dark'] .btn.btn-primary.btn-cta-contract:hover {
    background-color: #40659e;
    border-color: #3a5c90;
}

html[data-theme='dark'] .btn.btn-primary.btn-cta-contract:active {
    background-color: #375686;
}

.btn-ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--border);
}

.btn-ghost:hover {
    transform: translateY(-1px);
    border-color: var(--primary);
    background: var(--panel-bg);
}

.btn-uppercase {
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.locacoes-recent-panel {
    margin-top: 14px;
}

.locacoes-kpi-grid {
    margin-top: 14px;
}

.locacoes-index-page .dashboard-panel-head h1 {
    color: #ffd700;
}

.locacoes-kpi-grid .dashboard-kpi-card {
    min-height: 116px;
}

.locacoes-kpi-grid .dashboard-meta-label {
    margin-bottom: 8px;
}

.locacoes-actions-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.locacoes-list-shell {
    margin-top: 8px;
}

.locacoes-list-shell .clientes-table th,
.locacoes-list-shell .clientes-table td {
    vertical-align: middle;
}

.locacoes-list-shell .locacoes-contrato-link {
    color: inherit;
    text-decoration: none;
    font-weight: 700;
}

.locacoes-list-shell .locacoes-contrato-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.locacoes-list-shell .locacoes-contrato-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.locacoes-vencimentos-list {
    margin-top: 8px;
    display: grid;
    gap: 10px;
}

.locacoes-vencimento-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel-bg);
}

.locacoes-vencimento-item .dashboard-meta-helper {
    margin-top: 2px;
}

.locacoes-vencimento-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid var(--border);
    white-space: nowrap;
}

.locacoes-vencimento-badge.is-safe {
    color: #166534;
    border-color: #16a34a66;
    background: #16a34a1f;
}

.locacoes-vencimento-badge.is-warning {
    color: #92400e;
    border-color: #d9770666;
    background: #d9770624;
}

.locacoes-vencimento-badge.is-critical,
.locacoes-vencimento-badge.is-overdue {
    color: #991b1b;
    border-color: #dc262666;
    background: #dc262624;
}

.portal-locacoes-kpi-grid {
    margin-bottom: 12px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.portal-faixa-cards {
    margin-top: 6px;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.portal-faixa-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--panel-bg);
    padding: 12px;
    text-decoration: none;
    color: var(--text);
    display: grid;
    gap: 5px;
}

.portal-faixa-card:hover {
    border-color: #2563eb55;
    background: #2563eb0f;
}

.portal-faixa-card.is-2m {
    border-color: #f59e0b3d;
    background: linear-gradient(180deg, #f59e0b10, transparent), var(--panel-bg);
}

.portal-faixa-card.is-6m {
    border-color: #2563eb3d;
    background: linear-gradient(180deg, #2563eb10, transparent), var(--panel-bg);
}

.portal-faixa-card.is-9m {
    border-color: #7c3aed3d;
    background: linear-gradient(180deg, #7c3aed10, transparent), var(--panel-bg);
}

.portal-faixa-card.is-danger {
    border-color: #dc26263d;
    background: linear-gradient(180deg, #dc262610, transparent), var(--panel-bg);
}

.portal-faixa-card.is-clear {
    border-color: #64748b40;
    background: linear-gradient(180deg, #64748b10, transparent), var(--panel-bg);
}

.portal-faixa-card.is-rascunho {
    border-color: #0ea5e940;
    background: linear-gradient(180deg, #0ea5e910, transparent), var(--panel-bg);
}

.portal-faixa-card.is-sem-vencimento {
    border-color: #f9731640;
    background: linear-gradient(180deg, #f9731610, transparent), var(--panel-bg);
}

.portal-faixa-card.is-active {
    border-color: #d4a01766;
    background: #d4a01714;
    box-shadow: inset 0 0 0 1px #d4a01726;
}

.portal-faixa-card.is-danger:hover {
    border-color: #dc262655;
    background: #dc262612;
}

.portal-faixa-card.is-danger.is-active {
    border-color: #dc262666;
    background: #dc26261a;
}

.portal-faixa-card.is-clear:hover {
    border-color: #64748b55;
    background: #64748b12;
}

.portal-faixa-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--muted);
}

.portal-faixa-value {
    font-size: 24px;
    line-height: 1;
}

.portal-faixa-hint {
    font-size: 12px;
    color: var(--muted);
}

.portal-locacoes-filter {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel-bg);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.portal-locacoes-filter label {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.portal-locacoes-filter select {
    min-width: 260px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 10px;
}

.portal-locacoes-filter input[type='text'] {
    min-width: 260px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
}

.portal-locacoes-filter-btn {
    min-height: 36px;
    padding-inline: 16px;
}

.portal-locacoes-list-shell {
    margin-top: 10px;
}

.portal-locacoes-page .clientes-table td {
    vertical-align: middle;
}

.portal-locacoes-page .clientes-table td:last-child {
    width: 72px;
    text-align: center;
}

.portal-locacoes-empty {
    text-align: center !important;
    color: var(--muted);
    font-weight: 600;
    padding-block: 20px !important;
    background: var(--panel-bg);
}

.portal-locacoes-empty-link {
    margin-left: 8px;
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.portal-locacoes-quick-filter {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.portal-locacoes-quick-filter .btn {
    min-height: 34px;
    padding: 8px 12px;
}

.portal-locacoes-quick-filter .btn.is-active {
    border-color: #d4a01766;
    color: #8a5a00;
    background: #d4a0171a;
}

.portal-pagination {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.portal-pagination-info {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}

.portal-contato-box {
    margin-top: 14px;
}

.portal-contato-actions {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.portal-contato-actions .btn {
    min-height: 34px;
}

html[data-theme='dark'] .portal-locacoes-filter {
    background: #1a1a1a;
    border-color: #334155;
}

html[data-theme='dark'] .portal-faixa-card {
    background: #1a1a1a;
    border-color: #334155;
}

html[data-theme='dark'] .portal-faixa-card.is-2m {
    border-color: #f59e0b55;
    background: linear-gradient(180deg, #f59e0b20, transparent), #1a1a1a;
}

html[data-theme='dark'] .portal-faixa-card.is-6m {
    border-color: #3b82f655;
    background: linear-gradient(180deg, #3b82f620, transparent), #1a1a1a;
}

html[data-theme='dark'] .portal-faixa-card.is-9m {
    border-color: #8b5cf655;
    background: linear-gradient(180deg, #8b5cf620, transparent), #1a1a1a;
}

html[data-theme='dark'] .portal-faixa-card.is-danger {
    border-color: #ef444455;
    background: linear-gradient(180deg, #ef444420, transparent), #1a1a1a;
}

html[data-theme='dark'] .portal-faixa-card.is-clear {
    border-color: #94a3b855;
    background: linear-gradient(180deg, #94a3b818, transparent), #1a1a1a;
}

html[data-theme='dark'] .portal-faixa-card.is-rascunho {
    border-color: #22d3ee55;
    background: linear-gradient(180deg, #22d3ee20, transparent), #1a1a1a;
}

html[data-theme='dark'] .portal-faixa-card.is-sem-vencimento {
    border-color: #fb923c55;
    background: linear-gradient(180deg, #fb923c20, transparent), #1a1a1a;
}

html[data-theme='dark'] .portal-faixa-card:hover {
    border-color: #3b82f655;
    background: #1d4ed821;
}

html[data-theme='dark'] .portal-faixa-card.is-active {
    border-color: #ffd70066;
    background: #ffd70014;
    box-shadow: inset 0 0 0 1px #ffd70024;
}

html[data-theme='dark'] .portal-faixa-card.is-danger.is-active {
    border-color: #ef444466;
    background: #ef444418;
}

html[data-theme='dark'] .portal-faixa-hint {
    color: #cbd5e1;
}

html[data-theme='dark'] .portal-locacoes-filter input[type='text'] {
    background: #1a1a1a;
    border-color: #334155;
    color: #f8fafc;
}

html[data-theme='dark'] .portal-locacoes-page .clientes-table th {
    background: #1a1a1a;
}

html[data-theme='dark'] .portal-locacoes-quick-filter .btn.is-active {
    border-color: #ffd70066;
    color: #ffd700;
    background: #ffd7001c;
}

html[data-theme='dark'] .portal-pagination-info {
    color: #cbd5e1;
}

.portal-locacoes-contrato-page .dashboard-kpi-value {
    font-size: 20px;
}

.portal-locacoes-contrato-page {
    border-color: #1f293766;
    background: linear-gradient(180deg, #8b000008, transparent 120px), var(--card);
}

.portal-locacoes-contrato-page .dashboard-inline-section {
    margin-top: 16px;
    padding-top: 16px;
}

.portal-contrato-head h1 {
    color: #8b0000;
    letter-spacing: 0.4px;
}

.portal-contrato-head p strong {
    color: var(--text);
}

.portal-contrato-kpi {
    position: relative;
    overflow: hidden;
    border-width: 1px;
}

.portal-contrato-kpi::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #64748b;
}

.portal-contrato-kpi .dashboard-kpi-value {
    font-size: clamp(22px, 2vw, 30px);
}

.portal-contrato-kpi.is-status {
    background: linear-gradient(180deg, #2563eb12, transparent 70%), var(--panel-bg);
}

.portal-contrato-kpi.is-status::before {
    background: #2563eb;
}

.portal-contrato-kpi.is-tipo {
    background: linear-gradient(180deg, #7c3aed12, transparent 70%), var(--panel-bg);
}

.portal-contrato-kpi.is-tipo::before {
    background: #7c3aed;
}

.portal-contrato-kpi.is-periodo {
    background: linear-gradient(180deg, #d9770612, transparent 70%), var(--panel-bg);
}

.portal-contrato-kpi.is-periodo::before {
    background: #d97706;
}

.portal-contrato-kpi.is-aluguel {
    background: linear-gradient(180deg, #16a34a12, transparent 70%), var(--panel-bg);
}

.portal-contrato-kpi.is-aluguel::before {
    background: #16a34a;
}

.portal-contrato-parte {
    border-width: 1px;
}

.portal-contrato-parte.is-locador {
    background: linear-gradient(180deg, #2563eb10, transparent), var(--panel-bg);
    border-color: #2563eb33;
}

.portal-contrato-parte.is-locatario {
    background: linear-gradient(180deg, #0ea5e910, transparent), var(--panel-bg);
    border-color: #0ea5e933;
}

.portal-contrato-parte.is-fiador {
    background: linear-gradient(180deg, #9333ea10, transparent), var(--panel-bg);
    border-color: #9333ea33;
}

.portal-contrato-tip {
    margin-bottom: 12px;
}

.portal-contrato-back-btn {
    border-color: #8b000055;
    color: #8b0000;
}

.portal-contrato-code-link {
    color: inherit;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.portal-contrato-code-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.portal-contrato-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: var(--panel-bg);
    color: var(--text);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
}

.portal-contrato-action-btn:hover {
    border-color: #2563eb66;
    color: #1d4ed8;
    background: #2563eb14;
}

.portal-login-help {
    margin-top: 14px;
    border-top: 1px solid var(--border);
    padding-top: 14px;
}

html[data-theme='dark'] .portal-locacoes-contrato-page {
    border-color: #334155;
    background: linear-gradient(180deg, #ffd70010, transparent 140px), #1a1a1a;
}

html[data-theme='dark'] .portal-contrato-head h1 {
    color: #ffd700;
}

html[data-theme='dark'] .portal-contrato-head p {
    color: #cbd5e1;
}

html[data-theme='dark'] .portal-contrato-kpi {
    border-color: #334155;
}

html[data-theme='dark'] .portal-contrato-parte {
    border-color: #334155;
}

html[data-theme='dark'] .portal-contrato-parte .dashboard-meta-value {
    color: #f8fafc;
}

html[data-theme='dark'] .portal-contrato-back-btn {
    color: #f8fafc;
    border-color: #475569;
    background: #1a1a1a;
}

html[data-theme='dark'] .portal-login-help {
    border-top-color: #334155;
}

html[data-theme='dark'] .portal-contrato-action-btn:hover {
    border-color: #3b82f666;
    color: #93c5fd;
    background: #3b82f620;
}

.locacoes-rel-contratos-list {
    display: grid;
    gap: 10px;
    margin-top: 6px;
}

.locacoes-rel-contrato-item {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    background: var(--panel-bg);
}

.locacoes-rel-contrato-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.locacoes-rel-contrato-code {
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.1px;
}

.locacoes-rel-contrato-code:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.locacoes-rel-contrato-code:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.locacoes-rel-badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid var(--border);
    white-space: nowrap;
}

.locacoes-rel-badge.is-status {
    color: #166534;
    border-color: #16a34a66;
    background: #16a34a1f;
}

.locacoes-rel-badge.is-type {
    color: #1d4ed8;
    border-color: #3b82f666;
    background: #3b82f61f;
}

.locacoes-recent-panel .col-aluguel {
    text-align: right;
    white-space: nowrap;
}

.locacoes-recent-panel .locacoes-aluguel-link {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--panel-bg);
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.locacoes-recent-panel .locacoes-aluguel-link:hover {
    border-color: var(--primary);
    background: var(--card);
}

.locacoes-recent-panel .locacoes-aluguel-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (max-width: 1040px) {
    .locacoes-actions-grid {
        grid-template-columns: 1fr;
    }

    .locacoes-vencimento-item {
        flex-direction: column;
        align-items: flex-start;
    }
}

.trial-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel-bg);
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.trial-tag {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.45px;
    color: var(--primary);
}

.trial-title {
    margin: 0 0 10px;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 800;
    color: var(--text);
}

.trial-card ul {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: grid;
    gap: 8px;
}

.trial-card li {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
    position: relative;
    padding-left: 14px;
}

.trial-card li::before {
    content: '-';
    position: absolute;
    left: 0;
    color: var(--muted);
}

.trial-note {
    background: var(--trial-note-bg);
    border: 1px solid var(--trial-note-border);
    color: var(--text);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
    font-weight: 700;
}

.env-status {
    margin-top: 10px;
    color: var(--muted);
    font-size: 12px;
}

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

.info-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 20px 22px 22px;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 16px;
    bottom: 16px;
    width: 3px;
    border-radius: 999px;
    background: var(--accent-gradient);
    opacity: 0.85;
}

.info-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.feature-title {
    margin: 0;
    font-size: clamp(20px, 1.9vw, 24px);
    line-height: 1.12;
    font-weight: 800;
    color: var(--text);
}

.info-card p:not(.feature-title) {
    color: var(--muted);
    line-height: 1.45;
    font-size: 15px;
    max-width: 52ch;
}

html[data-theme='dark'] .info-card p:not(.feature-title) {
    color: var(--muted);
}

.steps {
    margin-top: 18px;
    padding: 22px;
}

.section-title {
    margin: 0 0 14px;
    font-size: clamp(30px, 3vw, 40px);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: -0.015em;
    color: var(--text);
}

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

.step-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    min-height: 118px;
    background: var(--panel-bg);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.step-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.step-tag {
    margin: 0;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.2px;
    color: var(--wine);
}

html[data-theme='dark'] .step-tag {
    color: var(--primary);
}

.step-card p:not(.step-tag) {
    color: var(--muted);
    line-height: 1.45;
    font-size: 15px;
    max-width: 52ch;
}

html[data-theme='dark'] .step-card p:not(.step-tag) {
    color: var(--muted);
}

.cta {
    margin-top: 18px;
    padding: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.cta .section-title {
    margin-bottom: 8px;
}

.cta p {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.45;
    max-width: 720px;
}

.cta .btn-primary {
    padding: 14px 22px;
    min-height: 48px;
    font-size: 15px;
}

.dashboard-panel {
    padding: 22px;
}

.dashboard-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

/* Dashboard: paleta vinho + dourado, menos branco “seco” no claro e mais calor no escuro */
.dashboard-shell .dashboard-sidebar {
    background: linear-gradient(165deg, rgba(139, 0, 0, 0.08) 0%, var(--panel-bg) 38%, var(--panel-bg) 100%);
    box-shadow: var(--shadow-md);
}

html[data-theme='dark'] .dashboard-shell .dashboard-sidebar {
    background: linear-gradient(185deg, #000000 0%, rgba(139, 0, 0, 0.9) 32%, var(--sidebar) 65%, var(--sidebar) 100%);
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(255, 215, 0, 0.14);
}

html[data-theme='dark'] .dashboard-shell .dashboard-sidebar-nav a {
    color: rgba(248, 250, 252, 0.92);
}

html[data-theme='dark'] .dashboard-shell .dashboard-sidebar-nav a:hover {
    border-color: rgba(255, 215, 0, 0.45);
    background: rgba(15, 23, 42, 0.35);
    color: var(--accent);
}

html[data-theme='dark'] .dashboard-shell .dashboard-sidebar-nav a.is-active {
    border-color: rgba(255, 215, 0, 0.65);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.14), rgba(139, 0, 0, 0.35));
    color: var(--accent);
}

html[data-theme='dark'] .dashboard-shell .dashboard-sidebar-title {
    color: rgba(255, 215, 0, 0.78);
}

.dashboard-shell .dashboard-sidebar-subtitle {
    color: var(--wine);
    opacity: 1;
}

html[data-theme='dark'] .dashboard-shell .dashboard-sidebar-subtitle {
    color: var(--gold);
    opacity: 0.95;
}

.dashboard-shell .section-card.dashboard-panel {
    background: linear-gradient(185deg, rgba(184, 134, 11, 0.09) 0%, var(--card) 24%, var(--card) 100%);
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(139, 0, 0, 0.06);
}

html[data-theme='dark'] .dashboard-shell .section-card.dashboard-panel {
    background: linear-gradient(180deg, #333333 0%, var(--card) 16%), var(--card);
    box-shadow: var(--shadow-md), 0 0 0 1px var(--border);
}

.dashboard-shell .dashboard-panel-head h1 {
    color: var(--wine);
}

html[data-theme='dark'] .dashboard-shell .dashboard-panel-head h1 {
    color: #fff8dc;
}

.dashboard-shell .dashboard-kpi-card {
    border-left: 3px solid var(--wine);
    background: linear-gradient(155deg, rgba(184, 134, 11, 0.1) 0%, var(--panel-bg) 48%, var(--panel-bg) 100%);
}

html[data-theme='dark'] .dashboard-shell .dashboard-kpi-card {
    border: 1px solid var(--border);
    border-left: 3px solid var(--gold);
    background: linear-gradient(135deg, #0a0a0a 0%, rgba(139, 0, 0, 0.88) 100%);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.35);
}

.dashboard-shell .dashboard-kpi-value {
    color: var(--wine);
}

html[data-theme='dark'] .dashboard-shell .dashboard-kpi-value {
    color: var(--gold);
}

.dashboard-shell .dashboard-meta-card,
.dashboard-shell .dashboard-limit-card {
    background: linear-gradient(180deg, rgba(139, 0, 0, 0.03) 0%, var(--panel-bg) 35%, var(--panel-bg) 100%);
}

html[data-theme='dark'] .dashboard-shell .dashboard-meta-card,
html[data-theme='dark'] .dashboard-shell .dashboard-limit-card {
    background: linear-gradient(180deg, #323232 0%, var(--card) 18%), var(--card);
    border: 1px solid var(--border);
}

.dashboard-shell .dashboard-actions-grid .btn-ghost:hover {
    border-color: rgba(139, 0, 0, 0.45);
    background: linear-gradient(180deg, rgba(184, 134, 11, 0.14), rgba(139, 0, 0, 0.05));
}

html[data-theme='dark'] .dashboard-shell .dashboard-actions-grid .btn-ghost:hover {
    border-color: rgba(184, 134, 11, 0.45);
    background: rgba(184, 134, 11, 0.1);
}

/* Tema claro: dourado um pouco mais visível (pontos fixos — dashboard) */
html[data-theme='light'] .dashboard-shell .section-card.dashboard-panel {
    background: linear-gradient(195deg, rgba(184, 134, 11, 0.14) 0%, var(--card) 26%, var(--card) 100%);
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(184, 134, 11, 0.2);
}

html[data-theme='light'] .dashboard-shell .dashboard-sidebar-subtitle {
    color: var(--wine);
    padding-bottom: 5px;
    margin-bottom: 7px;
    border-bottom: 2px solid rgba(184, 134, 11, 0.65);
    width: fit-content;
    max-width: 100%;
}

html[data-theme='light'] .dashboard-shell .dashboard-sidebar-nav a.is-active {
    border-color: rgba(184, 134, 11, 0.9);
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.22), rgba(139, 0, 0, 0.07));
    color: var(--wine);
    box-shadow: 0 1px 0 rgba(184, 134, 11, 0.35);
}

html[data-theme='light'] .dashboard-shell .dashboard-panel-head h1 {
    color: var(--wine);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    html[data-theme='light'] .dashboard-shell .dashboard-panel-head h1 {
        color: transparent;
        background: linear-gradient(118deg, var(--wine) 0%, var(--wine) 42%, #7a5a12 78%, var(--gold) 100%);
        -webkit-background-clip: text;
        background-clip: text;
    }
}

html[data-theme='light'] .dashboard-shell .dashboard-kpi-card {
    border-left-width: 4px;
    border-left-color: var(--gold);
    box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(184, 134, 11, 0.25);
}

html[data-theme='light'] .dashboard-shell .dashboard-kpi-value {
    color: var(--wine);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    html[data-theme='light'] .dashboard-shell .dashboard-kpi-value {
        color: transparent;
        background: linear-gradient(120deg, var(--wine) 0%, #6d1528 52%, #8a6a18 82%, #b8922a 100%);
        -webkit-background-clip: text;
        background-clip: text;
    }
}

html[data-theme='light'] .dashboard-shell .dashboard-inline-section > .dashboard-meta-label {
    border-left: 3px solid var(--gold);
    padding-left: 10px;
    margin-left: 0;
    color: var(--wine);
}

html[data-theme='light'] body:has(.dashboard-shell) .topbar .topbar-trial-clock.trial-state-normal {
    border-color: rgba(184, 134, 11, 0.65);
    background: rgba(0, 0, 0, 0.35);
    color: #f8fafc;
}

.dashboard-sidebar {
    position: sticky;
    top: 86px;
    padding: 14px;
    background: var(--panel-bg);
}

.dashboard-sidebar-title {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--muted);
}

.dashboard-sidebar-group + .dashboard-sidebar-group {
    margin-top: 12px;
}

.dashboard-sidebar-subtitle {
    margin: 0 0 6px;
    padding: 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.25px;
    text-transform: uppercase;
    color: var(--muted);
    opacity: 0.9;
}

.dashboard-sidebar-nav {
    display: grid;
    gap: 6px;
}

.dashboard-sidebar-nav a {
    display: block;
    padding: 10px 11px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text);
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 14px;
    transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.dashboard-sidebar-nav a:hover {
    border-color: var(--primary);
    background: var(--panel-bg);
    transform: translateY(-1px);
}

.dashboard-sidebar-nav a.is-active {
    border-color: var(--primary);
    background: var(--panel-bg);
}

.dashboard-sidebar-account-mobile {
    display: none;
}

.dashboard-sidebar-user {
    margin: 0 0 8px;
    font-weight: 700;
    font-size: 14px;
}

.menu-pill-disabled {
    display: grid;
    gap: 1px;
    padding: 10px 11px;
    border-radius: 10px;
    border: 1px dashed var(--border);
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
    cursor: not-allowed;
    opacity: 0.92;
}

.menu-pill-disabled small {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

.dashboard-panel-head p {
    margin: 0 0 8px;
}

.topbar-trial-clock {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--panel-bg);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.topbar-trial-clock.trial-state-normal {
    border-color: #16a34a55;
    color: #166534;
}

.topbar-trial-clock.trial-state-warning {
    border-color: #d9770655;
    color: #92400e;
}

.topbar-trial-clock.trial-state-critical {
    border-color: #dc262655;
    color: #991b1b;
}

.topbar-trial-clock.trial-state-expired {
    border-color: #6b728055;
    color: #374151;
}

.dashboard-meta-grid {
    margin-top: 18px;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.dashboard-kpi-grid {
    margin-top: 14px;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-kpi-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    background: var(--panel-bg);
}

.dashboard-kpi-value {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text);
}

.dashboard-meta-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    background: var(--panel-bg);
}

.dashboard-meta-label {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--muted);
}

.dashboard-meta-value {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.dashboard-meta-helper {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--muted);
}

.trial-card-highlight {
    position: relative;
    overflow: hidden;
}

.trial-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.trial-state-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.25px;
    text-transform: uppercase;
    border: 1px solid var(--border);
    color: var(--muted);
    background: var(--panel-bg);
}

.billing-state-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.25px;
    text-transform: uppercase;
    border: 1px solid var(--border);
    color: var(--muted);
    background: var(--panel-bg);
}

.billing-state-trial {
    color: #92400e;
    border-color: #d9770666;
    background: #d9770624;
}

.billing-state-active {
    color: #166534;
    border-color: #16a34a66;
    background: #16a34a1f;
}

.billing-state-late {
    color: #991b1b;
    border-color: #dc262666;
    background: #dc262624;
}

.billing-state-suspended,
.billing-state-cancelled {
    color: #374151;
    border-color: #6b728066;
    background: #6b72801f;
}

.plan-card-highlight {
    border-color: #2563eb44;
}

.trial-countdown {
    line-height: 1.25;
}

.plan-status-row {
    margin-top: 12px;
}

.trial-actions {
    margin-top: 12px;
}

.trial-actions .btn {
    width: 100%;
}

.trial-state-normal {
    border-color: #16a34a55;
}

.trial-state-normal .trial-state-badge {
    color: #166534;
    border-color: #16a34a66;
    background: #16a34a1f;
}

.trial-state-warning {
    border-color: #d9770655;
    box-shadow: inset 0 0 0 1px #d9770626;
}

.trial-state-warning .trial-state-badge {
    color: #92400e;
    border-color: #d9770666;
    background: #d9770624;
}

.trial-state-critical {
    border-color: #dc262655;
    box-shadow: inset 0 0 0 1px #dc26263d;
}

.trial-state-critical .trial-state-badge {
    color: #991b1b;
    border-color: #dc262666;
    background: #dc262624;
}

.trial-state-expired {
    border-color: #6b728055;
}

.trial-state-expired .trial-state-badge {
    color: #374151;
    border-color: #6b728066;
    background: #6b72801f;
}

.dashboard-inline-section {
    margin-top: 14px;
    border-top: 1px solid var(--border);
    padding-top: 14px;
}

.dashboard-quick-actions {
    margin-top: 16px;
}

.dashboard-actions-grid {
    margin-top: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-actions-grid .btn {
    width: 100%;
}

.dashboard-limit-section {
    margin-top: 16px;
}

.dashboard-limit-grid {
    margin-top: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-limit-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    background: var(--panel-bg);
}

.dashboard-limit-card .dashboard-meta-value {
    font-size: 20px;
}

.clientes-list-shell {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--card);
}

.clientes-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(90deg, #660000, #8b0000);
}

.clientes-list-title {
    margin: 0;
    color: #f8f9fb;
    font-weight: 800;
}

.clientes-export-actions {
    display: flex;
    gap: 8px;
}

.clientes-export-actions .btn {
    min-height: 34px;
    padding: 8px 12px;
    color: #fff;
    border-color: #ffffff3d;
}

.clientes-search-row {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(220px, 1fr) auto;
    align-items: start;
}

.clientes-search-row .btn {
    margin-top: 30px;
}

.clientes-table-wrap {
    overflow-x: auto;
}

.clientes-table {
    width: 100%;
    border-collapse: collapse;
}

.clientes-table th,
.clientes-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
    font-size: 14px;
}

.clientes-table th {
    font-size: 13px;
    font-weight: 800;
    color: var(--muted);
    background: var(--panel-bg);
}

.clientes-subline {
    margin-top: 3px;
    font-size: 13px;
    color: var(--muted);
}

.clientes-table a.processo-numero-link,
.clientes-table a.cliente-nome-link {
    color: inherit;
    text-decoration: none;
}

.clientes-table a.processo-numero-link:hover,
.clientes-table a.cliente-nome-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.clientes-table a.processo-numero-link:focus-visible,
.clientes-table a.cliente-nome-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

.clientes-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid var(--border);
}

.clientes-status-pill.status-ok {
    color: #166534;
    background: #16a34a1f;
    border-color: #16a34a66;
}

.clientes-status-pill.status-off {
    color: #9a3412;
    background: #ea580c1a;
    border-color: #ea580c52;
}

.clientes-action-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.action-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--panel-bg);
    color: var(--text);
    text-decoration: none;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.action-inline-form {
    margin: 0;
}

.action-icon-btn.action-view {
    color: #8b0000;
    border-color: #8b000066;
    background: #8b000014;
}

.action-icon-btn.action-edit {
    color: #a16207;
    border-color: #f59e0b66;
    background: #f59e0b14;
}

.action-icon-btn.action-process {
    color: #0e7490;
    border-color: #06b6d466;
    background: #06b6d414;
}

.action-icon-btn.action-toggle {
    color: #b91c1c;
    border-color: #ef444466;
    background: #ef444414;
}

.action-icon-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.action-icon-btn.is-disabled,
.btn.is-disabled {
    opacity: 0.55;
    pointer-events: none;
    cursor: not-allowed;
    filter: grayscale(0.15);
}

.clientes-view-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.clientes-view-name {
    margin: 6px 0 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.clientes-view-grid {
    margin-top: 12px;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.clientes-view-head h1 {
    margin: 0;
    color: #8b0000;
}

.clientes-view-grid .dashboard-meta-label {
    color: #8b0000;
    letter-spacing: 0.5px;
}

.clientes-view-grid .dashboard-meta-helper {
    color: #4b5563;
}

.clientes-list-page .dashboard-panel-head h1,
.clientes-form-page .dashboard-panel-head h1 {
    margin-bottom: 6px;
    color: #8b0000;
}

.clientes-list-page .dashboard-panel-head p,
.clientes-form-page .dashboard-panel-head p {
    color: #4b5563;
}

.clientes-list-page .dashboard-meta-label,
.clientes-form-page .form-section-title {
    color: #8b0000;
    letter-spacing: 0.5px;
}

.clientes-list-page .dashboard-meta-helper,
.clientes-form-page .dashboard-meta-helper {
    color: #4b5563;
}

.clientes-form-page .form-section-title {
    margin-top: 24px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

.clientes-form-page .form-field label {
    color: #374151;
}

.clientes-form-page .dynamic-row {
    background: linear-gradient(180deg, #8b000005, transparent), var(--card);
}

.clientes-list-page .clientes-table th {
    color: #8b0000;
}

html[data-theme='dark'] .clientes-view-head h1,
html[data-theme='dark'] .clientes-view-grid .dashboard-meta-label {
    color: #ffd700;
}

html[data-theme='dark'] .clientes-view-grid .dashboard-meta-helper {
    color: #cbd5e1;
}

html[data-theme='dark'] .clientes-list-page .dashboard-panel-head h1,
html[data-theme='dark'] .clientes-form-page .dashboard-panel-head h1 {
    color: #ffd700;
}

html[data-theme='dark'] .clientes-list-page .dashboard-panel-head p,
html[data-theme='dark'] .clientes-form-page .dashboard-panel-head p,
html[data-theme='dark'] .clientes-list-page .dashboard-meta-helper,
html[data-theme='dark'] .clientes-form-page .dashboard-meta-helper {
    color: #cbd5e1;
}

html[data-theme='dark'] .clientes-list-page .dashboard-meta-label,
html[data-theme='dark'] .clientes-form-page .form-section-title,
html[data-theme='dark'] .clientes-list-page .clientes-table th {
    color: #ffd700;
}

html[data-theme='dark'] .clientes-form-page .form-field label {
    color: #dbe3ef;
}

.limit-status-blocked {
    border-color: #dc262655;
    box-shadow: inset 0 0 0 1px #dc262626;
}

.limit-status-ok {
    border-color: #16a34a40;
}

@media (max-width: 1040px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .dashboard-shell {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        position: static;
    }

    .dashboard-sidebar-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .benefits,
    .dashboard-kpi-grid,
    .dashboard-limit-grid,
    .dashboard-actions-grid,
    .clientes-view-grid,
    .dashboard-meta-grid,
    .steps-grid {
        grid-template-columns: 1fr;
    }

    .cta {
        flex-direction: column;
        align-items: flex-start;
    }

    .cta .btn-primary {
        width: 100%;
    }
}

@media (max-width: 760px) {
    .topbar-inner {
        padding: 10px 16px;
        position: relative;
        flex-wrap: wrap;
    }

    .menu {
        display: none;
    }

    .container {
        padding: 0 12px;
    }

    .hero,
    .steps,
    .cta {
        padding: 16px;
    }

    .dashboard-sidebar-nav {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        display: block;
        position: fixed;
        top: 66px;
        left: -110%;
        width: min(88vw, 320px);
        max-height: calc(100vh - 76px);
        overflow-y: auto;
        z-index: 40;
        transition: left 0.22s ease;
    }

    .dashboard-sidebar.is-open-mobile {
        left: 10px;
    }

    .mobile-menu-toggle {
        display: inline-flex;
        order: 2;
    }

    .right-nav {
        display: none;
        width: 100%;
        order: 3;
        position: fixed;
        top: 66px;
        right: 10px;
        width: min(88vw, 360px);
        max-height: calc(100vh - 76px);
        overflow-y: auto;
        padding: 10px;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: var(--card);
        box-shadow: var(--shadow-lg);
        gap: 8px;
        flex-direction: column;
        align-items: stretch;
        z-index: 41;
    }

    .right-nav.is-open {
        display: flex;
    }

    .topbar-trial-clock {
        order: 0;
        width: 100%;
        justify-content: center;
        margin-top: 2px;
    }

    .right-nav a {
        font-size: 13px;
        width: 100%;
        display: block;
    }

    .right-nav #theme-toggle {
        width: 100%;
        justify-content: flex-start;
        padding-left: 12px;
    }

    .dashboard-sidebar-account-mobile {
        display: block;
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid var(--border);
    }

    .dashboard-sidebar-account-mobile .topbar-trial-clock {
        display: inline-flex;
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
        margin-top: 0;
        margin-bottom: 6px;
    }

    .dashboard-sidebar .dashboard-sidebar-theme-btn {
        width: 100%;
        justify-content: flex-start;
        padding-left: 12px;
        margin-top: 8px;
    }

    body.mobile-menu-open {
        overflow: hidden;
    }

    /*
     * O overlay do menu mobile fica no <body> com z-index 34.
     * O <header class="topbar"> tem z-index 10, entao o dropdown (.right-nav) fica "por baixo"
     * do overlay e nao recebe toque/clique (parece que botoes dentro do menu nao funcionam).
     * Ao abrir o menu, elevamos o header inteiro acima do overlay.
     */
    body.mobile-menu-open .topbar {
        z-index: 50;
    }
}

/* Documentos juridicos */
.form-field--align-end {
    align-self: end;
}

.docs-textarea {
    width: 100%;
    min-height: 220px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

.docs-preview-sheet {
    font-family: 'Times New Roman', serif;
    font-size: 1rem;
    line-height: 1.6;
    background: #fff;
    color: #111;
    border: 1px solid #d5d9df;
    border-radius: 8px;
    padding: 30px 36px;
    min-height: 420px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    white-space: pre-wrap;
}

.docs-preview-sheet h2 {
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 24px;
    text-decoration: underline;
}

.docs-preview-sheet p {
    text-align: justify;
    margin: 0 0 12px;
}

.docs-preview-sheet .docs-centered {
    text-align: center;
}

.docs-preview-sheet .docs-city-date {
    text-align: left;
    padding-left: 16px;
    margin-top: 18px !important;
    margin-bottom: 4px !important;
}

.docs-preview-sheet .assinatura {
    margin-top: 0 !important;
    text-align: center;
    white-space: normal;
}

.docs-preview-sheet .assinatura .linha {
    border-top: 1px solid #000;
    width: 320px;
    margin: 0 auto 4px;
}

.docs-preview-sheet .assinatura .assinatura-nome,
.docs-preview-sheet .assinatura .assinatura-papel {
    text-align: center !important;
    margin: 0;
    line-height: 1.25;
}

.docs-preview-sheet .assinatura .assinatura-nome {
    margin-top: 0;
}

.docs-preview-sheet .assinatura .assinatura-papel {
    margin-top: 2px;
}

.docs-preview-sheet .assinatura .nome {
    text-align: center !important;
    margin: 0;
}

.docs-builder-form {
    display: grid;
    grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
    gap: 16px 20px;
    align-items: start;
}

.docs-builder-left {
    grid-column: 1;
}

.docs-builder-preview {
    grid-column: 2;
    grid-row: 1 / span 20;
    position: sticky;
    top: 86px;
}

.docs-builder-preview .dashboard-meta-label {
    margin-bottom: 8px;
}

.docs-view-meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px 20px;
    margin: 16px 0 8px;
}

.docs-view-meta dt {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--muted);
}

.docs-view-meta dd {
    margin: 2px 0 0;
}

.docs-view-body {
    white-space: pre-wrap;
    padding: 16px;
    border-radius: 10px;
    background: var(--surface-soft);
    border: 1px solid var(--border);
    line-height: 1.55;
}

.docs-view-body--muted {
    background: var(--panel-bg);
    font-size: 0.95rem;
}

.docs-autofill-panel {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-soft);
}

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

.docs-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.docs-type-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    border-radius: 10px;
    padding: 12px;
    color: var(--text);
    transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.docs-type-card strong {
    font-size: 0.95rem;
}

.docs-type-card span {
    font-size: 0.75rem;
    color: var(--muted);
    letter-spacing: 0.02em;
}

.docs-type-card:hover {
    transform: translateY(-1px);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* Alternancia visual dos cards de tipos de documento */
.docs-type-grid .docs-type-card:nth-child(4n + 1) {
    background: linear-gradient(135deg, #24262c 0%, #1f2127 100%);
}

.docs-type-grid .docs-type-card:nth-child(4n + 2) {
    background: linear-gradient(135deg, #1f252e 0%, #1b2028 100%);
}

.docs-type-grid .docs-type-card:nth-child(4n + 3) {
    background: linear-gradient(135deg, #2a2424 0%, #211d1d 100%);
}

.docs-type-grid .docs-type-card:nth-child(4n + 4) {
    background: linear-gradient(135deg, #232a24 0%, #1d231f 100%);
}

html[data-theme='light'] .docs-type-grid .docs-type-card:nth-child(4n + 1) {
    background: linear-gradient(135deg, #f9f3f3 0%, #f4ecec 100%);
}

html[data-theme='light'] .docs-type-grid .docs-type-card:nth-child(4n + 2) {
    background: linear-gradient(135deg, #f3f7fb 0%, #edf2f8 100%);
}

html[data-theme='light'] .docs-type-grid .docs-type-card:nth-child(4n + 3) {
    background: linear-gradient(135deg, #f7f4fb 0%, #f1edf8 100%);
}

html[data-theme='light'] .docs-type-grid .docs-type-card:nth-child(4n + 4) {
    background: linear-gradient(135deg, #f4faf4 0%, #edf6ed 100%);
}

@media (max-width: 900px) {
    .form-grid-3 {
        grid-template-columns: 1fr;
    }

    .docs-builder-form {
        display: block;
    }

    .docs-builder-preview {
        position: static;
        margin-top: 14px;
    }
}
