:root {
    --bg: #171d25;
    --bg-soft: #171d25;
    --panel: rgba(24, 32, 43, 0.94);
    --line: rgba(158, 179, 202, 0.40);
    --line-soft: rgba(196, 214, 230, 0.20);
    --gold: #9db0c4;
    --gold-soft: #d8e3ee;
    --text: #eef3f8;
    --muted: #b6c4d2;
    --muted-strong: #d2dde8;
    --shadow: 0 18px 38px rgba(4, 8, 12, 0.45);
    --bg-radial-1: rgba(126, 150, 174, 0.26);
    --bg-radial-2: rgba(110, 132, 153, 0.22);
    --bg-linear-start: rgba(20, 28, 38, 0.97);
    --bg-linear-end: rgba(16, 23, 33, 0.95);
    --grid-line: rgba(255, 255, 255, 0.045);
    --blob-1: rgba(157, 176, 196, 0.18);
    --blob-2: rgba(120, 143, 168, 0.15);
    --blob-3: rgba(189, 204, 218, 0.12);
    --theme-toggle-bg: rgba(255, 255, 255, 0.03);
    --theme-toggle-border: var(--line-soft);
    --theme-toggle-text: var(--text);
    --surface-soft: rgba(255, 255, 255, 0.03);
    --surface-soft-2: rgba(255, 255, 255, 0.02);
    --ambient-opacity: 0.74;
}

:root[data-theme="light"] {
    --bg: #d4dde8;
    --bg-soft: #e1e8f0;
    --panel: rgba(246, 248, 251, 0.94);
    --line: rgba(58, 86, 117, 0.30);
    --line-soft: rgba(70, 103, 138, 0.18);
    --gold: #2d66b3;
    --gold-soft: #173f74;
    --text: #14263b;
    --muted: #3b5370;
    --muted-strong: #2a4461;
    --shadow: 0 14px 30px rgba(30, 52, 77, 0.14);
    --bg-radial-1: rgba(96, 131, 173, 0.28);
    --bg-radial-2: rgba(121, 152, 189, 0.22);
    --bg-linear-start: rgba(217, 228, 240, 0.98);
    --bg-linear-end: rgba(208, 221, 235, 0.98);
    --grid-line: rgba(40, 73, 109, 0.08);
    --blob-1: rgba(86, 127, 176, 0.22);
    --blob-2: rgba(101, 143, 191, 0.18);
    --blob-3: rgba(130, 167, 206, 0.14);
    --theme-toggle-bg: rgba(246, 248, 251, 0.94);
    --theme-toggle-border: rgba(53, 86, 121, 0.26);
    --theme-toggle-text: #16345a;
    --surface-soft: rgba(29, 66, 110, 0.062);
    --surface-soft-2: rgba(29, 66, 110, 0.043);
    --ambient-opacity: 0.6;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

:root {
    color-scheme: dark;
}

:root[data-theme="light"] {
    color-scheme: light;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
    isolation: isolate;
    overflow-x: hidden;
    font-family: "Manrope", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, var(--bg-radial-1), transparent 34%),
        radial-gradient(circle at bottom left, var(--bg-radial-2), transparent 36%),
        linear-gradient(180deg, var(--bg-linear-start) 0%, var(--bg-linear-end) 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 88px 88px;
    background-position: 0 0, 0 0;
    -webkit-mask-image: radial-gradient(circle at center, black 42%, transparent 92%);
    mask-image: radial-gradient(circle at center, black 42%, transparent 92%);
    z-index: 0;
    animation: gridDrift 70s linear infinite;
}

body::after {
    content: "";
    position: fixed;
    inset: -18vmax;
    pointer-events: none;
    z-index: 0;
    background:
      radial-gradient(40vmax 40vmax at 20% 20%, var(--blob-1), transparent 65%),
      radial-gradient(34vmax 34vmax at 75% 30%, var(--blob-2), transparent 68%),
      radial-gradient(28vmax 28vmax at 50% 82%, var(--blob-3), transparent 72%);
    filter: blur(12px);
    opacity: var(--ambient-opacity);
    animation: ambientFloat 26s ease-in-out infinite alternate;
}

@keyframes gridDrift {
    0% {
        background-position: 0 0, 0 0;
    }
    100% {
        background-position: 88px 0, 0 88px;
    }
}

@keyframes ambientFloat {
    0% {
        transform: translate3d(-1.4%, -0.9%, 0) scale(1);
    }
    100% {
        transform: translate3d(1.8%, 1.3%, 0) scale(1.03);
    }
}

.page-shell,
.app-shell,
.workspace-shell,
.workspace-modal {
    position: relative;
    z-index: 1;
}

a {
    color: inherit;
}

.page-shell {
    width: min(1240px, calc(100% - 48px));
    margin: 0 auto;
    padding-bottom: 56px;
}

.app-shell {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    width: min(1360px, calc(100% - 40px));
    margin: 24px auto;
}

.topbar,
.app-sidebar,
.glass-card,
.feature-card,
.price-card,
.summary-card,
.metric-card,
.timeline-card,
.upload-card,
.support-box,
.auth-panel,
.checkout-card,
.term-card,
.content-panel,
.integration-card {
    border: 1px solid var(--line-soft);
    background: var(--panel);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

[hidden] {
    display: none !important;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

pre,
code,
.notice-box,
.flash {
    overflow-wrap: anywhere;
    word-break: break-word;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .topbar,
    .app-sidebar,
    .glass-card,
    .feature-card,
    .price-card,
    .summary-card,
    .metric-card,
    .timeline-card,
    .upload-card,
    .support-box,
    .auth-panel,
    .checkout-card,
    .term-card,
    .content-panel,
    .integration-card {
        background: rgba(20, 28, 38, 0.96);
    }

    :root[data-theme="light"] .topbar,
    :root[data-theme="light"] .app-sidebar,
    :root[data-theme="light"] .glass-card,
    :root[data-theme="light"] .feature-card,
    :root[data-theme="light"] .price-card,
    :root[data-theme="light"] .summary-card,
    :root[data-theme="light"] .metric-card,
    :root[data-theme="light"] .timeline-card,
    :root[data-theme="light"] .upload-card,
    :root[data-theme="light"] .support-box,
    :root[data-theme="light"] .auth-panel,
    :root[data-theme="light"] .checkout-card,
    :root[data-theme="light"] .term-card,
    :root[data-theme="light"] .content-panel,
    :root[data-theme="light"] .integration-card {
        background: rgba(246, 248, 251, 0.98);
    }
}

.topbar {
    position: sticky;
    top: 18px;
    z-index: 30;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 16px;
    margin-top: 18px;
    padding: 16px 20px;
    border-radius: 24px;
}

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

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: linear-gradient(145deg, rgba(159, 180, 203, 0.28), rgba(159, 180, 203, 0.06));
    color: var(--gold-soft);
    font-family: "Plus Jakarta Sans", "Manrope", sans-serif;
    font-size: 1.34rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.brand-copy {
    display: grid;
    gap: 4px;
}

.brand-copy strong,
.app-logo strong {
    font-family: "Plus Jakarta Sans", "Manrope", sans-serif;
    font-size: 1.42rem;
    letter-spacing: 0.01em;
}

.brand-copy small,
.nav a,
.hero-text,
.feature-card p,
.plan-description,
.plan-list li,
.support-box p,
.comparison-table td,
.comparison-table th,
.muted,
.support-mini a {
    color: var(--muted);
}

.nav,
.nav-actions,
.hero-actions,
.support-actions,
.payment-options,
.form-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    border-radius: 999px;
    border: 1px solid var(--theme-toggle-border);
    background: var(--theme-toggle-bg);
    color: var(--theme-toggle-text);
    padding: 0 14px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
}

.theme-toggle-icon {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid var(--line-soft);
    font-size: 0.8rem;
}

.theme-toggle-label {
    font-size: 0.85rem;
    letter-spacing: 0.02em;
}

.theme-toggle-corner {
    position: static;
    justify-self: end;
    align-self: center;
    min-height: 36px;
    padding: 0 10px;
    gap: 6px;
    border-radius: 999px;
}

.theme-toggle-corner .theme-toggle-icon {
    width: 18px;
    height: 18px;
    font-size: 0.72rem;
}

.theme-toggle-corner .theme-toggle-label {
    font-size: 0.76rem;
    letter-spacing: 0.01em;
}

.nav {
    justify-content: center;
    gap: 18px;
    flex-wrap: nowrap;
}

.topbar .nav a {
    white-space: nowrap;
    font-size: 0.92rem;
}

.topbar .nav-actions {
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 8px;
}

.topbar .primary-button,
.topbar .secondary-button,
.topbar .ghost-button {
    min-height: 42px;
    padding: 0 14px;
    font-size: 0.86rem;
}

.nav a,
.app-nav a,
.support-link,
.ghost-link {
    text-decoration: none;
}

.eyebrow,
.card-label,
.plan-kicker,
.app-section-label {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    color: var(--gold);
}

.primary-button,
.secondary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    border: 0;
    cursor: pointer;
    transition: transform 180ms ease, opacity 180ms ease;
}

.primary-button {
    color: #0c131d;
    background: linear-gradient(135deg, #9aafc5 0%, #d4dfeb 100%);
}

.secondary-button,
.ghost-button {
    color: var(--text);
    background: var(--surface-soft);
    border: 1px solid var(--line-soft);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover {
    transform: translateY(-1px);
}

.secondary-button.is-soft-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.secondary-button.is-soft-disabled:hover {
    transform: none;
}

[data-central-indexing-app] [data-central-indexing-lot-create]:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

[data-central-indexing-app] [data-central-indexing-lot-create]:disabled:hover {
    transform: none;
}

button[data-file-trigger],
#btn-escolher-arquivo-acervo {
    min-height: 56px;
    padding: 10px 22px;
    line-height: 1.2;
}

.studio-file-field .form-actions,
.file-grid .form-actions {
    margin-top: 8px;
    margin-bottom: 8px;
}

.block-button {
    width: 100%;
}

.hero {
    padding: 84px 0 48px;
}

.hero-grid,
.story-layout,
.pricing-grid,
.feature-grid,
.summary-grid,
.auth-layout,
.checkout-layout,
.keyword-grid,
.file-grid,
.split-grid,
.stats-grid {
    display: grid;
    gap: 22px;
}

.hero-grid {
    grid-template-columns: 1.18fr 0.82fr;
    align-items: center;
}

.hero h1,
.section-heading h2,
.page-title,
.auth-copy h1,
.checkout-card h1,
.term-card h1,
.support-box h2 {
    margin: 0;
    font-family: "Plus Jakarta Sans", "Manrope", sans-serif;
    line-height: 1.06;
    letter-spacing: -0.02em;
}

.hero h1 {
    font-size: clamp(2.25rem, 4.2vw, 3.8rem);
}

.hero-text {
    max-width: 700px;
    margin-top: 22px;
    font-size: 1.05rem;
    line-height: 1.8;
}

.trial-note {
    margin: 10px 0 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.hero-metrics {
    list-style: none;
    padding: 0;
    margin: 34px 0 0;
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, 1fr);
}

.hero-metrics li,
.summary-card,
.metric-card,
.timeline-card,
.upload-card,
.checkout-card,
.term-card,
.integration-card {
    padding: 22px;
    border-radius: 24px;
}

.hero-metrics strong,
.metric-card strong {
    display: block;
    margin-bottom: 6px;
    color: var(--gold-soft);
}

.glass-card,
.feature-card,
.price-card,
.auth-panel,
.content-panel {
    padding: 28px;
    border-radius: 28px;
}

.quote-text {
    font-size: 1.2rem;
    line-height: 1.75;
    color: var(--muted-strong);
}

.section {
    padding: 54px 0;
}

.section-heading {
    max-width: 940px;
    margin-bottom: 28px;
}

.section-heading.narrow {
    max-width: 760px;
}

.section-heading h2 {
    font-size: clamp(1.95rem, 3.2vw, 3.05rem);
}

.feature-grid {
    grid-template-columns: repeat(3, 1fr);
}

.deliveries-rotator {
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 28px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.deliveries-track {
    display: flex;
    width: max-content;
    animation: deliveriesLoop 44s linear infinite;
}

.deliveries-rotator:hover .deliveries-track {
    animation-play-state: paused;
}

.deliveries-group {
    display: flex;
    gap: 16px;
    padding: 16px;
}

.delivery-chip {
    width: 320px;
    min-height: 168px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--line-soft);
    background: var(--surface-soft);
    display: grid;
    gap: 10px;
}

.delivery-chip h3 {
    margin: 0;
    color: var(--gold-soft);
    font-size: 1rem;
    line-height: 1.35;
}

.delivery-chip p {
    margin: 0;
    color: var(--muted-strong);
    line-height: 1.6;
    font-size: 0.93rem;
}

@keyframes deliveriesLoop {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.feature-index {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--gold);
    font-family: "Plus Jakarta Sans", "Manrope", sans-serif;
    font-size: 1.8rem;
}

.story-layout {
    grid-template-columns: 1.2fr 0.8fr;
}

.bullet-list,
.plan-list {
    list-style: none;
    padding: 0;
    margin: 22px 0 0;
    display: grid;
    gap: 12px;
}

.bullet-list li,
.plan-list li {
    position: relative;
    padding: 12px 14px 12px 40px;
    border-radius: 16px;
    background: var(--surface-soft);
}

.bullet-list li::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 16px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #b98e3c, #f1dfae);
}

.comparison-table-wrap {
    overflow-x: auto;
    border-radius: 28px;
    border: 1px solid var(--line-soft);
    background: var(--panel);
    box-shadow: var(--shadow);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 860px;
}

.comparison-table th,
.comparison-table td,
.data-table th,
.data-table td {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-align: left;
}

.comparison-table thead th,
.data-table th {
    color: var(--gold-soft);
    background: var(--surface-soft-2);
}

.pricing-grid {
    grid-template-columns: repeat(2, 1fr);
}

.trial-cta {
    margin-top: 20px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid var(--line-soft);
    background: var(--surface-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.trial-cta p {
    margin: 0;
    color: var(--muted-strong);
}

.price-card.featured {
    position: relative;
    overflow: hidden;
    border-color: var(--line);
    background: linear-gradient(180deg, rgba(139, 161, 186, 0.10), rgba(18, 25, 36, 0.86));
}

.price-card.featured::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #82a9d3 0%, #d4e3f4 100%);
}

:root[data-theme="light"] .price-card.featured {
    border-color: rgba(61, 99, 141, 0.30);
    background: linear-gradient(180deg, rgba(119, 157, 204, 0.19), rgba(243, 247, 252, 0.97));
}

:root[data-theme="light"] .price-card.featured::before {
    background: linear-gradient(90deg, #1f5fb3 0%, #4b89d8 50%, #9fc4ec 100%);
}

:root[data-theme="light"] .price-card.featured .plan-kicker {
    color: #1f4f88;
}

:root[data-theme="light"] .price-card.featured h3,
:root[data-theme="light"] .price-card.featured .plan-price {
    color: #102946;
}

:root[data-theme="light"] .price-card.featured .plan-description,
:root[data-theme="light"] .price-card.featured .plan-list li {
    color: #234361;
}

:root[data-theme="light"] .primary-button {
    color: #f4f9ff;
    background: linear-gradient(135deg, #1f5fb3 0%, #3a76c5 100%);
}

:root[data-theme="light"] .secondary-button,
:root[data-theme="light"] .ghost-button {
    color: #1a3a60;
    background: rgba(255, 255, 255, 0.55);
    border-color: rgba(63, 100, 139, 0.26);
}

.plan-description {
    min-height: 88px;
    line-height: 1.75;
}

.support-box {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 34px;
    border-radius: 32px;
}

.auth-layout,
.checkout-layout {
    grid-template-columns: 0.95fr 1.05fr;
    align-items: stretch;
    padding-top: 44px;
}

.checkout-layout {
    grid-template-columns: 1.1fr 0.9fr;
}

.onboarding-progress {
    margin-top: 22px;
    padding: 20px 22px;
    border-radius: 22px;
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.025);
}

.progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.progress-head strong {
    color: var(--gold-soft);
    font-size: 0.9rem;
}

.progress-track {
    margin-top: 12px;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.progress-track span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(135deg, #8ca1b8 0%, #d4dfeb 100%);
}

.progress-steps {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--line-soft);
    background: var(--surface-soft-2);
}

.step-index {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--line-soft);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.step-label {
    font-size: 0.84rem;
    color: var(--muted);
}

.progress-step.is-current {
    border-color: var(--line);
    background: rgba(138, 158, 180, 0.12);
}

.progress-step.is-current .step-index {
    color: #0e141d;
    border-color: rgba(255, 255, 255, 0);
    background: linear-gradient(135deg, #9aafc5 0%, #d4dfeb 100%);
}

.progress-step.is-current .step-label {
    color: var(--text);
}

.progress-step.is-done .step-index {
    color: #0e141d;
    border-color: rgba(255, 255, 255, 0);
    background: #b8c9db;
}

.progress-step.is-done .step-label {
    color: var(--muted-strong);
}

.billing-grid,
.split-grid,
.file-grid,
.keyword-grid,
.summary-grid {
    grid-template-columns: repeat(2, 1fr);
}

.app-sidebar {
    padding: 24px;
    border-radius: 28px;
    position: sticky;
    top: 24px;
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.theme-toggle-sidebar {
    width: 100%;
    justify-content: center;
}

.app-logo {
    display: grid;
    gap: 6px;
}

.app-logo span {
    font-family: "Plus Jakarta Sans", "Manrope", sans-serif;
    font-size: 2.1rem;
    color: var(--gold-soft);
}

.app-logo small {
    color: var(--muted);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.credit-chip {
    border: 1px solid var(--line-soft);
    background: var(--surface-soft);
    border-radius: 14px;
    padding: 10px 12px;
    display: grid;
    gap: 4px;
}

.credit-chip strong {
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}

.credit-chip span {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.app-nav {
    display: grid;
    gap: 8px;
}

.app-subnav {
    margin: -2px 0 4px 12px;
    padding-left: 10px;
    border-left: 1px solid var(--line-soft);
    display: grid;
    gap: 6px;
}

.app-subnav a {
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 0.82rem;
    line-height: 1.25;
    color: var(--muted);
    text-decoration: none;
    background: transparent;
}

.app-subnav .is-locked {
    display: block;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 0.82rem;
    line-height: 1.25;
    color: var(--muted);
    background: transparent;
    cursor: not-allowed;
    opacity: 0.76;
}

.app-subnav-lock {
    margin-right: 6px;
}

.app-subnav a.is-active {
    color: var(--text);
    background: var(--surface-soft);
    border: 1px solid var(--line-soft);
}

.app-subnav-group {
    display: grid;
    gap: 6px;
}

button.app-subnav-group-title {
    width: 100%;
    border: 0;
    border-radius: 10px;
    padding: 8px 10px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
    text-transform: uppercase;
    cursor: pointer;
}

button.app-subnav-group-title::after {
    content: "+";
    float: right;
}

.app-subnav-group.is-open button.app-subnav-group-title::after {
    content: "-";
}

button.app-subnav-group-title:hover,
button.app-subnav-group-title:focus-visible {
    color: var(--text);
    background: var(--surface-soft);
    outline: none;
}

.app-subnav-group-items {
    display: grid;
    gap: 6px;
}

.app-subnav-group-items[hidden] {
    display: none;
}

.app-nav a {
    padding: 14px 16px;
    border-radius: 16px;
    color: var(--muted-strong);
    background: var(--surface-soft-2);
}

.app-nav a.active {
    color: #111317;
    background: linear-gradient(135deg, #b98e3c 0%, #f1dfae 100%);
}

:root[data-theme="light"] .app-nav a.active {
    color: #ffffff;
    background: linear-gradient(135deg, #7896b5 0%, #5f7fa2 100%);
}

.app-main {
    display: grid;
    gap: 20px;
    width: 100%;
    min-width: 0;
}

.app-main > section,
.app-main > .workspace-shell,
.app-main > .content-panel {
    width: 100%;
    min-width: 0;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.status-pill,
.status-chip,
.keyword-pill {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(195, 155, 72, 0.09);
    border: 1px solid var(--line);
    color: var(--gold-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.stats-grid {
    grid-template-columns: repeat(4, 1fr);
}

.metric-card strong {
    font-size: 2rem;
    margin-top: 10px;
    font-family: "Plus Jakarta Sans", "Manrope", sans-serif;
}

.metric-card--compact {
    padding: 18px;
}

.metric-card--compact strong {
    font-size: 1.35rem;
    margin-top: 6px;
}

.timeline-list,
.stack-sm {
    display: grid;
    gap: 12px;
}

.timeline-item,
.notice-box,
.info-strip,
.payment-card {
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--surface-soft);
    border: 1px solid var(--line-soft);
}

.litigation-v3-counter {
    display: grid;
    gap: 6px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.litigation-v3-counter p {
    margin: 0;
}

.litigation-v3-counter.is-success {
    border-color: rgba(72, 178, 132, 0.45);
    background: rgba(72, 178, 132, 0.10);
}

.litigation-v3-counter.is-warning {
    border-color: rgba(213, 167, 76, 0.5);
    background: rgba(213, 167, 76, 0.12);
}

.litigation-v3-counter.is-error {
    border-color: rgba(216, 94, 94, 0.5);
    background: rgba(216, 94, 94, 0.12);
}

.content-panel,
.auth-panel {
    min-height: 100%;
}

.support-mini {
    display: grid;
    gap: 10px;
}

.ghost-link,
.support-link {
    color: var(--gold-soft);
}

.password-recovery-links {
    display: grid;
    justify-items: start;
    gap: 10px;
    margin-top: 16px;
}

.password-recovery-links .support-link {
    display: inline-flex;
    align-items: center;
    line-height: 1.35;
    white-space: nowrap;
}

.auth-form,
.checkout-form,
.app-form,
.term-form {
    display: grid;
    gap: 14px;
}

label {
    display: grid;
    gap: 8px;
    font-size: 0.94rem;
    color: var(--muted-strong);
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    background: var(--surface-soft);
    color: var(--text);
    padding: 14px 16px;
    font: inherit;
}

select {
    -webkit-appearance: none;
    appearance: none;
    padding-right: 42px;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--muted-strong) 50%),
        linear-gradient(135deg, var(--muted-strong) 50%, transparent 50%);
    background-position:
        calc(100% - 20px) calc(50% - 2px),
        calc(100% - 14px) calc(50% - 2px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

select option,
select optgroup {
    background-color: #1a2431;
    color: #eef3f8;
}

:root[data-theme="light"] select option,
:root[data-theme="light"] select optgroup {
    background-color: #f2f6fa;
    color: #14263b;
}

textarea {
    resize: vertical;
}

.payment-card {
    gap: 10px;
}

.payment-card span {
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
}

.payment-card input[type="radio"],
.checkbox-row input[type="checkbox"] {
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 0;
    padding: 0;
    align-self: center;
    accent-color: var(--gold);
}

.payment-detail-panel {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--line-soft);
    background: var(--surface-soft-2);
}

.checkbox-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    line-height: 1.45;
}

.term-card {
    max-width: 980px;
    margin: 44px auto 0;
}

.term-sections {
    display: grid;
    gap: 18px;
    margin-top: 22px;
}

.term-section {
    padding: 18px;
    border-radius: 18px;
    background: var(--surface-soft-2);
    border: 1px solid var(--line-soft);
}

.flash {
    margin-top: 20px;
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid var(--line-soft);
}

.flash-success {
    color: #cde7c3;
    background: rgba(110, 160, 120, 0.14);
}

:root[data-theme="light"] .flash-success {
    color: #245f31;
    background: rgba(111, 169, 123, 0.22);
}

.flash-error {
    color: #f0c0c0;
    background: rgba(150, 70, 70, 0.14);
}

:root[data-theme="light"] .flash-error {
    color: #8a2f2f;
    background: rgba(205, 120, 120, 0.22);
}

.spacer-top {
    margin-top: 18px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-list span {
    padding: 10px 12px;
    border-radius: 999px;
    background: var(--surface-soft);
    border: 1px solid var(--line-soft);
    color: var(--muted-strong);
}

.inline-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-shell {
    display: grid;
    gap: 14px;
}

.chat-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.chat-chip {
    border: 1px solid var(--line-soft);
    background: var(--surface-soft);
    color: var(--muted-strong);
    border-radius: 999px;
    padding: 8px 14px;
    font: inherit;
    cursor: pointer;
}

.chat-chip:hover {
    border-color: var(--line);
}

.chat-thread {
    min-height: 300px;
    max-height: 420px;
    overflow: auto;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    background: var(--surface-soft-2);
    display: grid;
    gap: 12px;
}

.chat-row {
    display: flex;
}

.chat-row.is-user {
    justify-content: flex-end;
}

.chat-row.is-bot {
    justify-content: flex-start;
}

.chat-bubble {
    max-width: min(680px, 90%);
    border-radius: 16px;
    padding: 12px 14px;
    border: 1px solid var(--line-soft);
}

.chat-bubble.user {
    background: linear-gradient(135deg, #9aafc5 0%, #d4dfeb 100%);
    color: #0c131d;
}

.chat-bubble.bot {
    background: var(--surface-soft);
    color: var(--text);
}

.chat-bubble p {
    margin: 8px 0 0;
    line-height: 1.6;
}

.chat-meta {
    font-size: 0.78rem;
    opacity: 0.8;
}

.chat-form {
    display: grid;
    grid-template-columns: 220px 1fr auto;
    gap: 10px;
}

.workspace-shell {
    width: 100%;
    min-width: 0;
}

.workspace-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 20px;
    padding: 16px 18px;
    border-radius: 22px;
    border: 1px solid var(--line-soft);
    background: var(--panel);
}

.workspace-header-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.workspace-layout-version {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold-soft);
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(157, 176, 196, 0.14);
}

.workspace-client {
    font-size: 0.9rem;
    color: var(--muted-strong);
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    padding: 10px 14px;
    background: var(--surface-soft);
}

.workspace-split {
    margin-top: 18px;
    display: grid;
    grid-template-columns: minmax(320px, 38%) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.workspace-split--single {
    grid-template-columns: minmax(0, 1fr);
}

.workspace-panel {
    border: 1px solid var(--line-soft);
    border-radius: 22px;
    background: var(--panel);
    padding: 24px;
}

.workspace-panel-head {
    margin-bottom: 56px;
}

.workspace-panel-head .page-title {
    font-size: clamp(1.5rem, 2.1vw, 2rem);
}

.workspace-panel p,
.workspace-panel li,
.workspace-panel label,
.workspace-panel td,
.workspace-panel th {
    line-height: 1.6;
}

.dropzone {
    border: 2px dashed var(--line);
    border-radius: 18px;
    min-height: 230px;
    padding: 24px 20px;
    display: grid;
    place-items: center;
    text-align: center;
    gap: 10px;
    background: linear-gradient(180deg, var(--surface-soft), var(--surface-soft-2));
    box-shadow: inset 0 0 0 1px rgba(157, 176, 196, 0.12);
    cursor: pointer;
}

.dropzone.is-dragging {
    border-color: var(--gold-soft);
    background: rgba(157, 176, 196, 0.12);
}

.dropzone-icon {
    font-size: 2.2rem;
    line-height: 1;
    color: var(--gold-soft);
}

.dropzone-title {
    margin: 0;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
}

.dropzone-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted-strong);
    font-size: 0.8rem;
}

.dropzone-file {
    font-size: 0.88rem;
    color: var(--muted-strong);
}

.upload-feedback {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--line-soft);
    background: var(--surface-soft-2);
}

.upload-feedback.is-success {
    border-color: rgba(121, 173, 131, 0.52);
    background: rgba(121, 173, 131, 0.14);
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: var(--gold-soft);
    animation: spin 1s linear infinite;
}

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

.acervo-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(180px, 220px) minmax(180px, 220px) auto;
    gap: 14px;
    margin-bottom: 16px;
    align-items: center;
}

.quick-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.toolbar-actions {
    display: flex;
    justify-content: flex-end;
}

.quick-filter {
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted-strong);
    padding: 8px 12px;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
}

.quick-filter.is-active {
    background: rgba(157, 176, 196, 0.18);
    border-color: var(--line);
    color: var(--text);
}

.studio-flow-tabs {
    gap: 8px;
    max-width: 980px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--line-soft);
    background: var(--surface-soft-2);
}

.studio-flow-tabs .quick-filter {
    padding: 8px 12px;
    font-size: 0.86rem;
    line-height: 1.15;
}

.studio-header-panel {
    min-height: auto !important;
    height: auto;
    align-self: start;
    padding: 20px 24px 12px;
}

.studio-header-panel .page-header {
    margin-bottom: 8px;
}

.studio-header-panel .hero-text {
    margin: 8px 0 0;
    max-width: 920px;
    font-size: 1rem;
    line-height: 1.5;
}

.studio-header-panel .studio-flow-tabs {
    margin-top: 10px;
    padding: 10px 12px;
}

.studio-main {
    gap: 2px;
    align-items: start;
    align-content: start;
    grid-auto-rows: max-content;
}

.studio-main > .content-panel {
    min-height: 0 !important;
    height: auto;
}

.studio-workbench-panel {
    position: relative;
    z-index: 2;
    margin-top: 36px;
    min-height: max(760px, calc(100vh - 160px)) !important;
    display: grid;
    align-content: start;
}

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

.icon-action {
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    width: 34px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    background: var(--surface-soft);
    cursor: pointer;
}

.icon-action.revoke {
    border-color: rgba(219, 119, 119, 0.44);
    color: #f6c7c7;
}

.row-new {
    animation: pulseRow 1.8s ease;
}

@keyframes pulseRow {
    0% {
        background: rgba(121, 173, 131, 0.35);
    }
    100% {
        background: transparent;
    }
}

.workspace-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
}

.workspace-modal[hidden] {
    display: none;
}

.workspace-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.workspace-modal-card {
    position: relative;
    width: min(620px, calc(100% - 28px));
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    background: var(--panel);
    padding: 18px;
    z-index: 1;
}

.best-practice-modal-card {
    width: min(560px, calc(100% - 28px));
    padding: 22px;
}

.best-practice-modal-card .card-label {
    margin-bottom: 8px;
}

.best-practice-modal-card h2 {
    margin: 0 0 10px;
}

.best-practice-modal-card p {
    margin: 0;
}

.best-practice-modal-body {
    display: grid;
    gap: 12px;
}

.ocr-precheck-modal-card {
    width: min(680px, calc(100% - 28px));
}

.ocr-precheck-message,
.studio-message-preline {
    white-space: pre-line;
}

.ocr-precheck-actions {
    align-items: stretch;
}

.best-practice-dismiss {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 0.92rem;
}

.best-practice-dismiss input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.themes-content {
    max-height: 340px;
    overflow: auto;
}

.danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(226, 122, 122, 0.52);
    background: rgba(171, 66, 66, 0.24);
    color: #ffd9d9;
    padding: 0 18px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.studio-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 18px;
}

.studio-modules {
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    background: var(--panel);
    padding: 12px;
    display: grid;
    gap: 8px;
    align-content: start;
}

.studio-module-btn {
    text-align: left;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: var(--surface-soft-2);
    color: var(--text);
    padding: 10px 12px;
    cursor: pointer;
    font: inherit;
    display: grid;
    gap: 4px;
}

.studio-module-btn strong {
    font-size: 0.94rem;
}

.studio-module-btn small {
    color: var(--muted);
    line-height: 1.3;
}

.studio-module-btn.is-active {
    border-color: var(--line);
    background: rgba(157, 176, 196, 0.14);
}

.studio-workbench {
    min-height: 420px;
}

.studio-meta {
    display: grid;
    gap: 8px;
    margin-bottom: 56px;
}

.studio-disclaimers {
    display: grid;
    gap: 8px;
}

.studio-fields {
    display: grid;
    gap: 12px;
}

.chat-editor-setup {
    display: grid;
    gap: 12px;
}

.chat-editor-workspace {
    display: grid;
    gap: 12px;
}

.chat-editor-workspace.is-idle .chat-editor-surface {
    border-style: dashed;
}

.chat-editor-shell {
    position: relative;
}

.chat-editor-surface {
    min-height: 640px;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface-soft-2);
}

.chat-editor-surface .ql-toolbar.ql-snow {
    border: 0;
    border-bottom: 1px solid var(--line-soft);
    background: var(--surface-soft);
}

.chat-editor-surface .ql-container.ql-snow {
    border: 0;
    min-height: 576px;
    color: var(--text);
    font-size: 0.98rem;
}

.chat-editor-surface .ql-editor {
    min-height: 576px;
    line-height: 1.65;
}

.chat-editor-placeholder {
    min-height: 576px;
    display: grid;
    place-content: center;
    text-align: center;
    gap: 8px;
    padding: 28px;
    color: var(--muted-strong);
}

.chat-editor-placeholder strong {
    font-size: 1.04rem;
    color: var(--text);
}

.chat-editor-placeholder p {
    margin: 0;
}

.chat-floating-menu {
    position: absolute;
    z-index: 20;
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px;
    border-radius: 999px;
    border: 1px solid var(--line-soft);
    background: rgba(13, 20, 33, 0.94);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

[data-theme="light"] .chat-floating-menu {
    background: rgba(246, 247, 248, 0.96);
}

.chat-floating-menu .primary-button,
.chat-floating-menu .secondary-button {
    padding: 6px 12px;
    min-height: auto;
}

.studio-loading {
    margin-top: 12px;
}

.studio-result {
    margin-top: 12px;
    display: grid;
    gap: 10px;
}

.studio-result pre {
    overflow: auto;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--line-soft);
    background: rgba(0, 0, 0, 0.24);
}

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

.studio-diff-card {
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: var(--surface-soft-2);
    padding: 12px;
}

.studio-diff-card h4 {
    margin: 0 0 8px;
    font-size: 0.95rem;
}

.studio-diff-card pre {
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.65;
}

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

.testimonial-card {
    border: 1px solid var(--line-soft);
    border-radius: 22px;
    background: var(--surface-soft);
    padding: 24px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }

    body::before,
    body::after {
        animation: none !important;
    }

    .deliveries-track {
        animation: none !important;
    }
}

.testimonial-text {
    margin: 0;
    line-height: 1.75;
    color: var(--muted-strong);
}

.testimonial-author {
    margin: 16px 0 0;
    font-size: 0.92rem;
    color: var(--muted);
}

@media (max-width: 1180px) {
    .hero-grid,
    .story-layout,
    .feature-grid,
    .pricing-grid,
    .auth-layout,
    .checkout-layout,
    .summary-grid,
    .keyword-grid,
    .file-grid,
    .split-grid,
    .stats-grid,
    .billing-grid,
    .app-shell,
    .support-box {
        grid-template-columns: 1fr;
    }

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

    .hero-metrics {
        grid-template-columns: 1fr;
    }

    .topbar {
        position: static;
        display: grid;
        justify-content: stretch;
        padding-right: 22px;
    }

    .app-sidebar {
        position: static;
    }

    .chat-form {
        grid-template-columns: 1fr;
    }

    .progress-steps {
        grid-template-columns: 1fr 1fr;
    }

    .acervo-toolbar {
        grid-template-columns: 1fr;
    }

    .toolbar-actions {
        justify-content: flex-start;
    }

    .studio-layout {
        grid-template-columns: 1fr;
    }

    .studio-diff {
        grid-template-columns: 1fr;
    }

    .delivery-chip {
        width: 280px;
        min-height: 176px;
    }
}

@media (max-width: 760px) {
    .workspace-shell {
        min-width: 0;
        width: 100%;
    }

    .workspace-split {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 1180px) {
    .workspace-split {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }
}

@media (max-width: 760px) {
    .page-shell {
        width: min(100% - 28px, 1240px);
    }

    .app-shell {
        width: min(100% - 24px, 1360px);
        margin: 12px auto 24px;
    }

    .topbar,
    .glass-card,
    .feature-card,
    .price-card,
    .content-panel,
    .auth-panel,
    .checkout-card,
    .term-card,
    .app-sidebar {
        border-radius: 22px;
    }

    .progress-steps {
        grid-template-columns: 1fr;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 12mm;
    }

    html,
    body {
        background: #101720 !important;
        color: #eef3f8 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    body::before {
        display: none !important;
    }

    .page-shell,
    .landing-page {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
    }

    .topbar {
        position: static !important;
        margin-top: 0 !important;
    }

    .hero,
    .section {
        padding: 14mm 0 0 !important;
    }

    .hero-grid,
    .feature-grid,
    .pricing-grid,
    .story-layout,
    .testimonial-grid,
    .summary-grid {
        grid-template-columns: 1fr !important;
    }

    .hero-metrics {
        grid-template-columns: 1fr !important;
    }

    .topbar,
    .glass-card,
    .feature-card,
    .price-card,
    .comparison-table-wrap,
    .support-box,
    .testimonial-card,
    .summary-card,
    .content-panel,
    .auth-panel,
    .checkout-card,
    .term-card {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none !important;
    }

    .comparison-table {
        min-width: 0 !important;
        table-layout: fixed;
    }

    .comparison-table th,
    .comparison-table td {
        font-size: 10pt;
        line-height: 1.45;
        word-break: break-word;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .hero h1,
    .section-heading h2 {
        line-height: 1.1 !important;
    }

    .primary-button,
    .secondary-button,
    .ghost-button {
        border: 1px solid var(--line-soft) !important;
        text-decoration: none !important;
    }
}
