:root {
    --bg: #0b1220;
    --panel: rgba(18, 31, 53, 0.95);
    --panel-2: #17253c;
    --panel-3: #203454;
    --border: #243a59;
    --border-2: #2a486f;
    --text: #e8eef8;
    --muted: #9eb1cc;
    --muted-2: #c7d4e7;
    --blue: #2563eb;
    --blue-2: #1d4ed8;
    --orange: #d97706;
    --red: #dc2626;
    --green: #16a34a;
    --shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
}

/* Diretrizes de Acessibilidade e Tamanho de Fonte Avançado para Lojistas */
body {
    background-color: var(--bg);
    color: var(--text);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

.h-full { height: 100%; }
.min-h-full { min-height: 100%; }
.font-sans { font-family: Arial, Helvetica, sans-serif; }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.block { display: block; }
.hidden { display: none !important; }
.flex-col { flex-direction: column; }
.flex-grow { flex-grow: 1; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.max-w-md { max-width: 28rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-2 { margin-bottom: 8px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mt-3 { margin-top: 12px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-5 { padding-top: 20px; padding-bottom: 20px; }
.pt-4 { padding-top: 16px; }
.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.tracking-tight { letter-spacing: 0; }
.text-white { color: #fff; }
.text-\[var\(--blue\)\] { color: var(--blue); }
.text-\[var\(--muted\)\] { color: var(--muted); }
.text-\[var\(--text\)\] { color: var(--text); }
.bg-\[var\(--bg\)\] { background: var(--bg); }
.bg-\[var\(--blue\)\] { background: var(--blue); }
.bg-\[var\(--panel-2\)\] { background: var(--panel-2); }
.bg-\[var\(--red\)\] { background: var(--red); }
.bg-opacity-20 { opacity: 1; }
.border { border: 1px solid var(--border); }
.border-t { border-top: 1px solid var(--border); }
.border-\[var\(--border\)\] { border-color: var(--border); }
.border-\[var\(--red\)\] { border-color: var(--red); }
.border-\[var\(--green\)\] { border-color: var(--green); }
.rounded-lg { border-radius: 8px; }
.rounded-xl { border-radius: 8px; }
.rounded-2xl { border-radius: 8px; }
.shadow-md,
.shadow-\[var\(--shadow\)\] { box-shadow: var(--shadow); }
.transition-colors { transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease; }
.overflow-hidden { overflow: hidden; }
.self-end { align-self: end; }
.grid-cols-1 { grid-template-columns: 1fr; }
.gap-3 { gap: 12px; }
.space-y-1 > * + * { margin-top: 4px; }
.space-y-3 > * + * { margin-top: 12px; }
.space-y-4 > * + * { margin-top: 16px; }
.space-y-5 > * + * { margin-top: 20px; }
.space-y-6 > * + * { margin-top: 24px; }
.focus\:outline-none:focus { outline: none; }
.focus\:border-\[var\(--blue\)\]:focus { border-color: var(--blue); }
.hover\:bg-\[var\(--blue-2\)\]:hover { background: var(--blue-2); }
.active\:scale-\[0\.99\]:active { transform: scale(0.99); }

.app-topbar {
    align-items: center;
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    height: 72px;
    justify-content: space-between;
    left: 0;
    padding: 0 16px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 50;
}

.app-logo img {
    display: block;
    height: 56px;
    max-width: 250px;
    object-fit: contain;
}

.menu-toggle {
    align-items: center;
    background: var(--panel-2);
    border: 1px solid var(--border-2);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    height: 52px;
    justify-content: center;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
    width: 56px;
}

.menu-toggle:hover,
.menu-toggle:focus {
    background: var(--blue);
    border-color: var(--blue);
    outline: none;
    transform: translateY(-1px);
}

.app-logo {
    max-width: 1180px;
}

.app-main {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: flex-start;
    margin: 0 auto;
    max-width: 1180px;
    padding: 6px;
    width: 100%;
}

.app-main.with-topbar {
    padding-top: 85px;
}

.menu-toggle span {
    background: var(--text);
    border-radius: 999px;
    display: block;
    height: 3px;
    width: 26px;
}

.mobile-menu {
    background: var(--panel);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: grid;
    gap: 4px;
    left: 0;
    padding: 84px 16px 16px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 40;
}

.mobile-menu[hidden] {
    display: none;
}

.mobile-menu a {
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    display: block;
    font-size: 1.125rem;
    font-weight: 700;
    padding: 16px;
    text-decoration: none;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.mobile-menu a:hover,
.mobile-menu a:focus {
    background: var(--panel-2);
    border-color: var(--blue);
    outline: none;
}

.mobile-menu a.menu-disabled {
    color: rgba(232, 238, 248, 0.38);
    cursor: not-allowed;
    opacity: 0.7;
    pointer-events: none;
}

input, select, textarea, button {
    font-size: 1.125rem !important; /* text-lg nativo para facilitar leitura */
}

button,
input[type="button"],
input[type="submit"],
input[type="date"],
.btn-primary,
.btn-secondary,
.btn-danger,
.compact-link {
    cursor: pointer;
}

.field {
    display: grid;
    gap: 8px;
}

.field label {
    color: var(--text);
    font-size: 1.125rem;
    font-weight: 700;
}

.label-action {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    width: 100%;
}

.icon-camera-button {
    align-items: center;
    background: var(--blue);
    border: 1px solid var(--blue);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    height: 30px;
    justify-content: center;
    padding: 0;
    width: 34px;
}

.icon-camera-button svg {
    fill: none;
    height: 18px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
    width: 18px;
}

.field input,
.field select {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    padding: 16px;
    width: 100%;
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 86px !important;
}

.password-toggle {
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--blue);
    font-size: 0.95rem !important;
    font-weight: 800;
    height: 36px;
    padding: 0 10px;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
}

.btn-primary,
.btn-secondary,
.btn-orange,
.btn-danger {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    display: inline-flex;
    font-size: 1.25rem;
    font-weight: 800;
    justify-content: center;
    line-height: 1.1;
    min-height: 54px;
    padding: 18px;
    text-decoration: none;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
    width: 100%;
}

.btn-primary.fit,
.btn-secondary.fit,
.btn-orange.fit,
.btn-danger.fit {
    width: auto;
}

.btn-primary {
    background: var(--blue);
    color: #fff;
}

.btn-secondary {
    background: var(--panel-2);
    border: 1px solid var(--border-2);
    color: var(--text);
}

.btn-orange {
    background: var(--orange);
    color: #fff;
}

.btn-danger {
    background: var(--red);
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus,
.icon-camera-button:hover,
.icon-camera-button:focus {
    background: var(--blue-2);
    border-color: var(--blue);
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: #203454;
    border-color: var(--blue);
}

.btn-orange:hover,
.btn-orange:focus {
    filter: brightness(1.08);
}

.btn-danger:hover,
.btn-danger:focus {
    background: #b91c1c;
    border-color: #ef4444;
}

.btn-primary:focus,
.btn-secondary:focus,
.btn-orange:focus,
.btn-danger:focus,
.icon-camera-button:focus {
    outline: 2px solid rgba(78, 160, 255, 0.45);
    outline-offset: 2px;
}

.scan-actions {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr 1fr;
}

.scan-actions .btn-orange,
.scan-actions .btn-danger {
    font-size: 1rem !important;
    font-weight: 700;
    min-height: 46px;
    padding: 10px 8px;
    white-space: nowrap;
}

.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 20px;
}

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

.responsive-grid.cards {
    align-items: stretch;
}

.responsive-actions {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr;
}

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

.content-narrow {
    max-width: 760px;
}

.content-wide {
    max-width: 1180px;
}

.public-page {
    width: 100%;
}

.public-hero {
    display: grid;
    gap: 28px;
    min-height: calc(100vh - 12px);
    padding: 10px 0 28px;
}

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

.public-nav img {
    display: block;
    height: 58px;
    max-width: 260px;
    object-fit: contain;
}

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

.public-nav-actions a {
    border: 1px solid var(--border-2);
    border-radius: 8px;
    color: var(--text);
    font-weight: 800;
    padding: 10px 12px;
    text-decoration: none;
}

.public-nav-actions a:hover,
.public-nav-actions a:focus {
    background: var(--panel-2);
    border-color: var(--blue);
    outline: none;
}

.public-hero-grid {
    align-items: center;
    display: grid;
    gap: 24px;
}

.public-copy {
    display: grid;
    gap: 16px;
}

.public-kicker {
    color: var(--green);
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
}

.public-copy h1 {
    font-size: 2.45rem;
    line-height: 1.05;
    margin: 0;
}

.public-copy p {
    color: var(--muted);
    font-size: 1.18rem;
    line-height: 1.45;
    margin: 0;
}

.public-actions {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
}

.public-actions a {
    text-align: center;
}

.public-panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    padding: 12px;
}

.public-panel div {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: grid;
    gap: 4px;
    padding: 14px;
}

.public-panel span,
.public-panel small {
    color: var(--muted);
}

.public-panel strong {
    font-size: 1.35rem;
}

.public-features {
    display: grid;
    gap: 10px;
    padding-bottom: 22px;
}

.public-features article {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
}

.public-features h2 {
    font-size: 1.25rem;
    margin: 0 0 8px;
}

.public-features p {
    color: var(--muted);
    line-height: 1.4;
    margin: 0;
}

.landing-page {
    display: grid;
    gap: 18px;
    padding: 4px 0 26px;
    width: 100%;
}

.landing-hero {
    background: linear-gradient(135deg, rgba(14, 24, 42, 0.96), rgba(20, 41, 70, 0.96));
    border: 1px solid var(--border);
    border-radius: 8px;
    display: grid;
    gap: 26px;
    overflow: hidden;
    padding: 18px;
    position: relative;
}

.landing-nav {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.landing-nav img {
    display: block;
    height: 58px;
    max-width: 268px;
    object-fit: contain;
}

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

.landing-nav-actions a {
    align-items: center;
    border: 1px solid var(--border-2);
    border-radius: 8px;
    color: var(--text);
    display: inline-flex;
    font-weight: 800;
    justify-content: center;
    min-height: 46px;
    padding: 10px 12px;
    text-align: center;
    text-decoration: none;
}

.landing-nav-actions a:first-child {
    background: rgba(22, 163, 74, 0.16);
    border-color: rgba(22, 163, 74, 0.44);
    color: #d8ffe5;
}

.landing-nav-actions a:hover,
.landing-nav-actions a:focus {
    background: var(--panel-2);
    border-color: var(--blue);
    outline: none;
}

.landing-hero-grid,
.landing-two-cols,
.landing-plans,
.landing-signup {
    display: grid;
    gap: 18px;
}

.landing-copy,
.landing-section > div,
.landing-form {
    min-width: 0;
}

.landing-kicker,
.landing-eyebrow {
    color: #7dd3fc;
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 0;
    margin: 0;
    text-transform: uppercase;
}

.landing-copy h1 {
    font-size: 2.35rem;
    line-height: 1.04;
    margin: 8px 0 12px;
}

.landing-lead,
.landing-section p {
    color: var(--muted-2);
    font-size: 1.12rem;
    line-height: 1.48;
    margin: 0;
}

.landing-price {
    background: rgba(11, 18, 32, 0.64);
    border: 1px solid rgba(78, 160, 255, 0.34);
    border-radius: 8px;
    display: grid;
    gap: 3px;
    margin: 18px 0;
    padding: 14px;
}

.landing-price span,
.landing-price small {
    color: var(--muted);
    font-weight: 800;
}

.landing-price strong {
    color: #ffffff;
    font-size: 2rem;
    line-height: 1.05;
}

.landing-actions {
    display: grid;
    gap: 10px;
}

.landing-actions a {
    text-align: center;
}

.landing-demo,
.landing-strip,
.landing-section {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.landing-demo {
    align-self: center;
    display: grid;
    gap: 10px;
    padding: 14px;
}

.landing-demo-head,
.landing-demo-row {
    background: rgba(11, 18, 32, 0.68);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: grid;
    gap: 4px;
    padding: 14px;
}

.landing-demo-head span,
.landing-demo-row span {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 800;
}

.landing-demo-head small {
    color: var(--muted-2);
    line-height: 1.35;
}

.landing-demo-head strong {
    font-size: 1.35rem;
}

.landing-demo-row {
    grid-template-columns: minmax(0, 1fr) auto;
}

.landing-demo-row strong {
    border-radius: 999px;
    font-size: 0.9rem;
    padding: 4px 8px;
}

.landing-demo-row.ok strong {
    background: rgba(22, 163, 74, 0.18);
    color: #86efac;
}

.landing-demo-row.warning strong {
    background: rgba(217, 119, 6, 0.22);
    color: #fed7aa;
}

.landing-demo-row.danger strong {
    background: rgba(220, 38, 38, 0.24);
    color: #fecaca;
}

.landing-demo > p {
    color: var(--muted-2);
    line-height: 1.42;
    margin: 4px 2px 0;
}

.landing-strip {
    display: grid;
    gap: 10px;
    padding: 12px;
}

.landing-strip div {
    background: rgba(11, 18, 32, 0.42);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: grid;
    gap: 3px;
    padding: 12px;
}

.landing-strip strong {
    font-size: 1.05rem;
}

.landing-strip span {
    color: var(--muted);
    line-height: 1.35;
}

.landing-section {
    padding: 18px;
}

.landing-section h2 {
    font-size: 1.75rem;
    line-height: 1.12;
    margin: 6px 0 10px;
}

.landing-checks {
    display: grid;
    gap: 8px;
}

.landing-checks p {
    background: rgba(11, 18, 32, 0.48);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 12px 12px 38px;
    position: relative;
}

.landing-checks p::before {
    color: var(--green);
    content: "✓";
    font-weight: 900;
    left: 14px;
    position: absolute;
}

.landing-plan-card {
    background: rgba(11, 18, 32, 0.62);
    border: 1px solid rgba(22, 163, 74, 0.42);
    border-radius: 8px;
    display: grid;
    gap: 6px;
    padding: 16px;
}

.landing-plan-card span {
    color: var(--muted);
    font-weight: 900;
    text-transform: uppercase;
}

.landing-plan-card strong {
    color: #86efac;
    font-size: 2.35rem;
    line-height: 1;
}

.landing-signup {
    border-color: rgba(78, 160, 255, 0.36);
}

.landing-signup-box {
    background: rgba(11, 18, 32, 0.48);
    border: 1px solid var(--border);
    border-radius: 8px;
    min-width: 0;
    padding: 14px;
}

.landing-signup-box summary {
    align-items: center;
    background: var(--blue);
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    font-size: 1.08rem;
    font-weight: 900;
    justify-content: center;
    list-style: none;
    min-height: 52px;
    padding: 12px 16px;
    text-align: center;
}

.landing-signup-box summary::-webkit-details-marker {
    display: none;
}

.landing-signup-box[open] summary {
    background: rgba(78, 160, 255, 0.18);
    border: 1px solid rgba(78, 160, 255, 0.38);
    color: var(--text);
}

.landing-form {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.landing-form label {
    color: var(--text);
    display: grid;
    font-weight: 800;
    gap: 6px;
}

.landing-form input {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    min-height: 48px;
    padding: 10px 12px;
    width: 100%;
}

.landing-form input:focus {
    border-color: var(--blue);
    outline: none;
}

.landing-form > p {
    color: var(--muted);
    font-size: 0.95rem;
}

.landing-hp {
    height: 1px !important;
    left: -9999px;
    opacity: 0;
    position: absolute;
    width: 1px !important;
}

.landing-message {
    border-radius: 8px;
    font-weight: 800;
    line-height: 1.4;
    margin-top: 12px;
    padding: 12px;
}

.landing-message.error {
    background: rgba(220, 38, 38, 0.16);
    border: 1px solid var(--red);
}

.landing-message.success {
    background: rgba(22, 163, 74, 0.16);
    border: 1px solid var(--green);
}

.landing-message a {
    color: #93c5fd;
}

.page-title {
    display: grid;
    gap: 8px;
}

.page-title h1,
.page-title p {
    margin: 0;
}

.cadastro-validade {
    margin-top: -14px;
}

.validade-page {
    margin-top: -14px;
}

.import-page {
    margin-top: -14px;
}

.validade-page > div:first-child h1,
.validade-page > div:first-child p {
    margin: 0;
}

.validade-page > div:first-child {
    display: grid;
    gap: 8px;
}

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

.pagination-current {
    color: var(--muted);
    font-size: 1.125rem;
    font-weight: 700;
}

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

.metric-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    display: block;
    min-height: 92px;
    padding: 14px;
    text-decoration: none;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.metric-card:hover,
.metric-card:focus {
    background: var(--panel-2);
    border-color: var(--blue);
    outline: none;
    transform: translateY(-1px);
}

.metric-card span {
    color: var(--muted);
    display: block;
    font-size: 1rem;
    line-height: 1.2;
    margin-bottom: 8px;
}

.metric-card strong {
    display: block;
    font-size: 2rem;
    line-height: 1;
}

.compact-actions {
    display: grid;
    gap: 10px;
}

.compact-actions .btn-primary,
.compact-actions .btn-secondary {
    padding: 14px;
}

.compact-panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
}

.settings-toggle {
    align-items: flex-start;
    background: rgba(11, 18, 32, 0.48);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    display: grid;
    gap: 12px;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 14px;
}

.settings-toggle input {
    height: 22px;
    margin-top: 2px;
    width: 22px;
}

.settings-toggle strong,
.settings-toggle small {
    display: block;
}

.settings-toggle small {
    color: var(--muted);
    line-height: 1.35;
    margin-top: 3px;
}

.settings-note {
    background: rgba(217, 119, 6, 0.12);
    border: 1px solid rgba(217, 119, 6, 0.45);
    border-radius: 8px;
    padding: 14px;
}

.settings-note strong {
    display: block;
    margin-bottom: 4px;
}

.settings-note p {
    color: var(--muted-2);
    line-height: 1.45;
    margin: 0;
}

.finance-alert {
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--orange);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px;
}

.finance-alert.danger {
    border-color: var(--red);
}

.finance-alert strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 3px;
}

.finance-alert p {
    color: var(--muted);
    margin: 0;
}

.finance-page {
    margin-top: -14px;
}

.finance-hero {
    align-items: stretch;
    display: grid;
    gap: 14px;
}

.finance-eyebrow,
.finance-section-head span {
    color: var(--blue);
    display: block;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.finance-hero h1 {
    font-size: 2rem;
    line-height: 1.08;
    margin: 4px 0 8px;
}

.finance-hero p {
    color: var(--muted-2);
    font-size: 1.08rem;
    line-height: 1.45;
    margin: 0;
}

.finance-status-card,
.finance-payment-panel,
.finance-secondary-panel,
.finance-side-card,
.subscription-panel {
    background: linear-gradient(180deg, rgba(32, 52, 84, 0.98), rgba(18, 31, 53, 0.98));
    border: 1px solid var(--border-2);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.finance-status-card {
    display: grid;
    gap: 6px;
    padding: 16px;
}

.finance-status-card span {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
    text-transform: uppercase;
}

.finance-status-card strong {
    font-size: 1.22rem;
    line-height: 1.15;
}

.finance-status-card p {
    color: var(--muted-2);
    font-size: 0.98rem;
}

.subscription-page {
    max-width: 1180px;
}

.subscription-hero {
    align-items: stretch;
}

.subscription-summary {
    background: rgba(20, 184, 166, 0.12);
    border: 1px solid rgba(20, 184, 166, 0.38);
    border-radius: 8px;
    display: grid;
    gap: 6px;
    padding: 14px 16px;
}

.subscription-summary span,
.subscription-panel-head span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.subscription-summary strong {
    font-size: 1.2rem;
    line-height: 1.18;
}

.subscription-summary p {
    color: var(--muted-2);
    margin: 0;
}

.subscription-panel {
    padding: 16px;
}

.subscription-panel-head {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.subscription-panel-head h2 {
    font-size: 1.35rem;
    line-height: 1.15;
    margin: 3px 0 0;
}

.subscription-plans {
    display: grid;
    gap: 10px;
}

.subscription-plan-card {
    background: rgba(11, 18, 32, 0.64);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    padding: 14px;
    position: relative;
}

.subscription-plan-card.highlight {
    border-color: rgba(34, 197, 94, 0.55);
}

.plan-ribbon {
    align-self: start;
    background: rgba(34, 197, 94, 0.14);
    border: 1px solid rgba(34, 197, 94, 0.42);
    border-radius: 999px;
    color: var(--green);
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 900;
    justify-self: start;
    padding: 4px 8px;
    text-transform: uppercase;
}

.subscription-plan-card strong {
    display: block;
    font-size: 1.08rem;
    line-height: 1.2;
}

.subscription-plan-card p {
    color: var(--muted);
    line-height: 1.35;
    margin: 3px 0 0;
}

.subscription-price {
    display: grid;
    gap: 2px;
}

.subscription-price span {
    color: var(--muted);
    font-size: 0.88rem;
    text-decoration: line-through;
}

.subscription-price strong {
    color: var(--green);
    font-size: 1.65rem;
}

.subscription-plan-description {
    min-height: 38px;
}

.subscription-plan-card form,
.subscription-pending p {
    margin: 0;
}

.subscription-plan-card .btn-primary {
    min-height: 42px;
    padding: 9px 12px;
    width: 100%;
}

.subscription-pending {
    background: rgba(217, 119, 6, 0.12);
    border: 1px solid rgba(217, 119, 6, 0.45);
    border-radius: 8px;
    padding: 14px;
}

.subscription-pending strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.subscription-pending p {
    color: var(--muted-2);
}

.finance-status-card.ok {
    border-color: rgba(22, 163, 74, 0.45);
}

.finance-status-card.trial,
.finance-status-card.warning {
    border-color: rgba(217, 119, 6, 0.55);
}

.finance-status-card.danger {
    border-color: rgba(220, 38, 38, 0.65);
}

.finance-message {
    border-radius: 8px;
    padding: 14px 16px;
}

.finance-message p {
    font-size: 1.02rem;
    font-weight: 800;
    margin: 0;
}

.finance-message.error {
    background: rgba(220, 38, 38, 0.14);
    border: 1px solid var(--red);
}

.finance-message.success {
    background: rgba(22, 163, 74, 0.14);
    border: 1px solid var(--green);
}

.finance-message.warning {
    background: rgba(217, 119, 6, 0.14);
    border: 1px solid var(--orange);
}

.finance-layout {
    display: grid;
    gap: 14px;
}

.finance-primary,
.finance-side {
    display: grid;
    gap: 14px;
}

.finance-payment-panel,
.finance-secondary-panel,
.finance-side-card {
    padding: 16px;
}

.finance-section-head {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.finance-section-head h2 {
    font-size: 1.35rem;
    line-height: 1.15;
    margin: 3px 0 0;
}

.finance-empty-state {
    background: rgba(11, 18, 32, 0.58);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 18px;
}

.finance-empty-state strong {
    display: block;
    font-size: 1.14rem;
    margin-bottom: 4px;
}

.finance-empty-state p {
    color: var(--muted-2);
    line-height: 1.45;
    margin: 0;
}

.payment-summary {
    display: grid;
    gap: 10px;
}

.payment-summary div {
    background: rgba(11, 18, 32, 0.6);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: grid;
    gap: 5px;
    padding: 13px;
}

.payment-summary span {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 800;
}

.payment-summary strong {
    font-size: 1.12rem;
    line-height: 1.25;
}

.payment-summary div:first-child strong {
    color: #ffffff;
    font-size: 1.8rem;
}

.payment-pix-area {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.payment-qr {
    align-items: center;
    background: #ffffff;
    border-radius: 8px;
    color: #162238;
    display: flex;
    justify-content: center;
    min-height: 220px;
    padding: 14px;
    text-align: center;
}

.payment-qr img {
    display: block;
    max-width: 245px;
    width: 100%;
}

.payment-copy {
    display: grid;
    gap: 10px;
}

.payment-copy h3,
.proof-panel h3 {
    font-size: 1.2rem;
    margin: 0;
}

.payment-copy p,
.proof-panel p {
    color: var(--muted-2);
    line-height: 1.45;
    margin: 0;
}

.pix-copy-action {
    min-height: 58px;
}

.pix-code-details summary {
    color: var(--blue);
    cursor: pointer;
    font-weight: 800;
}

.pix-code-details p {
    background: rgba(11, 18, 32, 0.78);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted-2);
    font-size: 0.86rem;
    margin-top: 8px;
    padding: 10px;
    word-break: break-all;
}

.proof-panel {
    background: rgba(11, 18, 32, 0.42);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    margin-top: 14px;
    padding: 14px;
}

.finance-list,
.finance-history {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.finance-row,
.history-row {
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
}

.finance-row-head,
.history-row {
    align-items: flex-start;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.finance-row h3,
.finance-row p,
.history-row p {
    margin: 0;
}

.finance-row h3 {
    font-size: 1.1rem;
    line-height: 1.2;
}

.finance-row p,
.history-row p {
    color: var(--muted);
    line-height: 1.35;
}

.pix-client-box {
    align-items: center;
    border-top: 1px solid var(--border);
    display: grid;
    gap: 12px;
    grid-template-columns: 132px minmax(0, 1fr);
    margin-top: 12px;
    padding-top: 12px;
}

.pix-client-box img {
    background: #fff;
    border-radius: 8px;
    display: block;
    padding: 8px;
    width: 132px;
}

.pix-copy-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    font-size: 0.9rem !important;
    line-height: 1.35;
    padding: 10px;
    text-align: left;
    word-break: break-all;
}

.pix-copy-box.copied {
    border-color: var(--green);
    color: var(--green);
    font-weight: 800;
}

.finance-actions {
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    margin-top: 12px;
}

.finance-actions form {
    margin: 0;
}

.finance-actions .btn-primary,
.finance-actions .btn-secondary {
    min-height: 48px;
    padding: 10px 12px;
}

.proof-form {
    display: grid;
    gap: 8px;
}

.proof-form input[type="file"] {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted);
    padding: 10px;
    width: 100%;
}

.proof-status {
    color: var(--green) !important;
    font-weight: 700;
    margin-top: 10px !important;
}

.plan-current {
    align-items: center;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-top: 12px;
    padding: 12px;
}

.plan-current strong {
    display: block;
    font-size: 1.1rem;
    line-height: 1.2;
}

.plan-current p {
    color: var(--muted);
    margin: 3px 0 0;
}

.plan-picker {
    margin-top: 12px;
}

.plan-picker-open {
    background: rgba(11, 18, 32, 0.28);
    border: 1px solid rgba(59, 130, 246, 0.28);
    border-radius: 8px;
    padding: 12px;
}

.plan-picker-title {
    margin-bottom: 12px;
}

.plan-picker-title strong {
    display: block;
    font-size: 1.05rem;
}

.plan-picker-title p {
    color: var(--muted);
    margin: 4px 0 0;
}

.finance-plan-actions {
    display: grid;
    gap: 10px;
}

.plan-picker summary {
    align-items: center;
    background: var(--blue);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 1.1rem;
    font-weight: 800;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    width: min(100%, 260px);
}

.plan-picker summary::marker,
.plan-picker summary::-webkit-details-marker {
    display: none;
}

.plan-options {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.plan-picker-open .plan-options {
    margin-top: 0;
}

.plan-option {
    align-items: center;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px;
}

.plan-option strong {
    display: block;
    font-size: 1.05rem;
}

.plan-option p {
    color: var(--muted);
    margin: 2px 0 0;
}

.plan-price-line {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.plan-price-label {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.plan-price-old {
    color: var(--muted);
    font-size: 0.95rem;
    text-decoration: line-through;
}

.plan-price-new {
    color: var(--green);
    font-size: 1.18rem;
    font-weight: 800;
}

.plan-option form {
    margin: 0;
}

.import-help {
    display: grid;
    gap: 12px;
}

.import-help h2,
.import-help p {
    margin: 0;
}

.warning-list {
    display: grid;
    gap: 6px;
    margin-top: 10px;
}

.warning-list p {
    border-top: 1px solid var(--border);
    color: var(--muted);
    margin: 0;
    padding-top: 6px;
}

.compact-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.compact-row {
    align-items: center;
    border: 1px solid transparent;
    border-top-color: var(--border);
    border-radius: 8px;
    color: var(--text);
    cursor: pointer;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 10px;
    text-decoration: none;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.compact-row:visited,
.compact-row:hover,
.compact-row:focus {
    color: var(--text);
    text-decoration: none;
}

.compact-row h3,
.compact-row p {
    text-decoration: none;
}

.compact-row h3 {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 4px;
}

.compact-row p {
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.25;
    margin: 0;
    overflow-wrap: anywhere;
}

.compact-filter {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    padding: 14px;
}

.validity-search {
    position: relative;
}

.compact-row:hover,
.compact-row:focus {
    background: var(--panel-2);
    border-color: var(--blue);
    outline: none;
}

#reader-busca {
    grid-column: 1 / -1;
}

.autocomplete-wrap {
    position: relative;
}

.autocomplete-list {
    background: var(--panel-2);
    border: 1px solid var(--border-2);
    border-radius: 8px;
    box-shadow: var(--shadow);
    left: 0;
    max-height: 320px;
    overflow-y: auto;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 20;
}

.autocomplete-item {
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    display: block;
    padding: 10px 12px;
    text-align: left;
    width: 100%;
}

.autocomplete-item:last-child {
    border-bottom: 0;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background: var(--border);
}

.autocomplete-item strong {
    display: block;
    font-size: 1rem;
    line-height: 1.2;
}

.autocomplete-item span {
    color: var(--muted);
    display: block;
    font-size: 0.9rem;
    line-height: 1.25;
    margin-top: 2px;
}

.autocomplete-item mark {
    background: #facc15;
    border-radius: 3px;
    color: #111827;
    padding: 0 2px;
}

.compact-filter .field {
    gap: 6px;
}

.compact-filter .field label {
    font-size: 1rem;
}

.compact-filter .field select,
.compact-filter .field input {
    padding: 12px;
}

.compact-button {
    padding: 13px 16px;
}

.log-list {
    display: grid;
    gap: 8px;
}

.list-summary {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.3;
}

.validity-list {
    display: grid;
    gap: 6px;
}

.validity-row {
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 9px 12px;
}

.validity-main {
    min-width: 0;
}

.validity-title-line {
    align-items: center;
    display: flex;
    gap: 8px;
    min-width: 0;
}

.validity-main h2 {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 2px;
}

.validity-title-line h2 {
    margin-bottom: 0;
}

.catalog-image-button {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 6px;
    display: inline-flex;
    flex: 0 0 auto;
    height: 22px;
    justify-content: center;
    padding: 0;
    width: 22px;
}

.catalog-image-button::before {
    border: 2px solid currentColor;
    border-radius: 3px;
    content: "";
    display: block;
    height: 13px;
    width: 13px;
}

.catalog-image-button.has-image {
    background: rgba(22, 163, 74, 0.14);
    border-color: rgba(22, 163, 74, 0.46);
    color: var(--green);
}

.catalog-image-button.has-image:hover,
.catalog-image-button.has-image:focus {
    background: rgba(22, 163, 74, 0.24);
    border-color: var(--green);
    outline: none;
}

.catalog-image-button.no-image {
    background: rgba(226, 232, 240, 0.08);
    border-color: rgba(226, 232, 240, 0.24);
    color: var(--muted);
    cursor: default;
    opacity: 0.58;
}

.validity-main p {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.25;
    margin: 0;
    overflow-wrap: anywhere;
}

.validity-main strong {
    color: var(--text);
}

.image-modal {
    align-items: center;
    background: rgba(0, 0, 0, 0.72);
    bottom: 0;
    display: flex;
    justify-content: center;
    left: 0;
    padding: 18px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 100;
}

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

.image-modal-content {
    background: var(--panel);
    border: 1px solid var(--border-2);
    border-radius: 8px;
    box-shadow: var(--shadow);
    max-width: 520px;
    padding: 16px;
    position: relative;
    width: min(100%, 520px);
}

.image-modal-content h2 {
    font-size: 1.125rem;
    line-height: 1.25;
    margin: 0 42px 12px 0;
}

.image-modal-content img {
    background: #ffffff;
    border-radius: 8px;
    display: block;
    max-height: 70vh;
    object-fit: contain;
    padding: 10px;
    width: 100%;
}

.image-modal-close {
    align-items: center;
    background: var(--red);
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    display: flex;
    font-size: 0.95rem !important;
    font-weight: 800;
    height: 34px;
    justify-content: center;
    position: absolute;
    right: 12px;
    top: 12px;
    width: 34px;
}

.validity-actions {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: auto 74px 74px 74px;
    justify-content: end;
}

.validity-actions .badge {
    font-size: 0.72rem;
    padding: 4px 9px;
}

.validity-actions .compact-link {
    font-size: 0.76rem !important;
    min-width: 0;
    padding: 7px 5px;
    width: 74px;
}

.log-row {
    align-items: flex-start;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px 14px;
}

.log-main {
    min-width: 0;
}

.log-main h2 {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 4px;
}

.log-main p {
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.3;
    margin: 0;
    overflow-wrap: anywhere;
}

.log-meta {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 6px;
    white-space: nowrap;
}

.compact-link {
    font-size: 1rem;
    padding: 9px 12px;
}

.product-actions form {
    margin: 0;
}

.product-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    padding: 12px;
}

.clickable-card {
    cursor: default;
}

.clickable-card:hover,
.clickable-card:focus {
    border-color: var(--blue);
    outline: none;
}

.product-head {
    align-items: flex-start;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.product-title {
    min-width: 0;
}

.product-title h2 {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 3px;
}

.product-title p {
    color: var(--muted);
    font-size: 0.98rem;
    margin: 0;
    overflow-wrap: anywhere;
}

.product-info {
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 1rem;
    gap: 4px 14px;
    line-height: 1.35;
}

.product-info strong {
    color: var(--text);
}

.product-footer {
    border-top: 1px solid var(--border);
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 10px;
}

.product-footer.single {
    grid-template-columns: 1fr;
}

.product-footer.audit-action {
    display: flex;
    justify-content: center;
}

.product-footer.audit-action form {
    width: min(220px, 100%);
}

.product-footer form {
    margin: 0;
}

.product-footer .compact-link {
    justify-content: center;
    width: 100%;
}

.product-card .badge {
    align-self: start;
    white-space: nowrap;
}

.catalog-preview {
    align-items: center;
    background: var(--panel-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: grid;
    gap: 14px;
    grid-template-columns: 84px minmax(0, 1fr);
    padding: 14px;
}

.catalog-preview img {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    height: 84px;
    object-fit: contain;
    width: 84px;
}

.catalog-preview h2 {
    line-height: 1.15;
}

.suggestion-title {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.suggestion-title p {
    margin: 0;
}

.suggestion-title button {
    background: transparent;
    border: 1px solid var(--border-2);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.85rem !important;
    font-weight: 700;
    padding: 4px 10px;
    width: auto;
}

.status-ok { color: var(--green); }
.status-atencao { color: var(--orange); }
.status-vencido { color: var(--red); }

.badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.95rem;
    font-weight: 800;
    padding: 6px 12px;
    text-transform: uppercase;
}

.badge.mini {
    font-size: 0.85rem;
    justify-self: start;
    padding: 5px 10px;
    width: auto;
}

.client-dashboard {
    gap: 12px;
}

.client-heading {
    display: grid;
    gap: 2px;
}

.client-heading p,
.client-heading h1 {
    margin: 0;
}

.client-heading h1 {
    font-size: 1.5rem;
    line-height: 1.15;
}

.client-dashboard .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.client-dashboard .metric-card {
    min-height: 76px;
    padding: 10px;
}

.client-dashboard .metric-card span {
    font-size: 0.88rem;
    margin-bottom: 7px;
}

.client-dashboard .metric-card strong {
    font-size: 1.75rem;
}

.client-dashboard .compact-actions .btn-primary,
.client-dashboard .compact-actions .btn-secondary {
    padding: 13px;
}

.client-dashboard .compact-row {
    align-items: start;
    grid-template-columns: minmax(0, 1fr) auto;
}

.client-dashboard .compact-row h3 {
    font-size: 1rem;
}

.client-dashboard .compact-row p {
    font-size: 0.92rem;
}

.badge-ok {
    background: rgba(22, 163, 74, 0.16);
    color: var(--green);
}

.badge-atencao {
    background: rgba(217, 119, 6, 0.22);
    border: 1px solid var(--orange);
    color: #fff;
}

.badge-vencido {
    background: rgba(220, 38, 38, 0.28);
    border: 1px solid var(--red);
    color: #fff;
}

input::placeholder {
    color: var(--muted) !important;
    opacity: 0.7;
}

/* Evita zoom automático e quebra de layout no iOS Safari em telas menores */
@media screen and (max-width: 768px) {
    input, select, textarea { 
        font-size: 16px !important; 
    }
}

@media screen and (min-width: 768px) {
    .app-topbar {
        padding-left: 32px;
        padding-right: 32px;
    }

    .mobile-menu {
        left: auto;
        padding-top: 84px;
        width: 360px;
    }

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

    .responsive-grid.three {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .metric-grid.client {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .public-hero-grid {
        grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    }

    .public-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 560px;
    }

    .public-features {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .landing-hero {
        padding: 22px;
    }

    .landing-hero-grid,
    .landing-two-cols,
    .landing-plans,
    .landing-signup {
        grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
    }

    .landing-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .landing-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: 560px;
    }

    .landing-copy h1 {
        font-size: 3rem;
    }

    .compact-filter {
        align-items: end;
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
    }

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

    .finance-plan-actions {
        align-items: start;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .finance-hero {
        grid-template-columns: minmax(0, 1fr) 320px;
    }

    .account-current-page.finance-page {
        width: min(100%, 760px);
    }

    .account-current-page .finance-hero {
        grid-template-columns: 1fr;
    }

    .account-current-page .finance-status-card {
        padding: 18px;
    }

    .finance-layout {
        align-items: start;
        grid-template-columns: minmax(0, 1fr) 340px;
    }

    .finance-layout.no-open-charge {
        grid-template-columns: 1fr;
    }

    .finance-layout.no-open-charge .finance-primary {
        display: none;
    }

    .finance-layout.no-open-charge .finance-side {
        display: block;
    }

    .finance-layout.no-open-charge .finance-side-card {
        display: grid;
        gap: 14px;
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .finance-layout.no-open-charge .finance-side-card .finance-section-head,
    .finance-layout.no-open-charge .finance-side-card .plan-current,
    .finance-layout.no-open-charge .finance-side-card .finance-plan-actions,
    .finance-layout.no-open-charge .finance-side-card .plan-picker {
        margin: 0;
    }

    .finance-layout.no-open-charge .finance-side-card .plan-current {
        background: rgba(11, 18, 32, 0.48);
        padding: 16px;
    }

    .finance-layout.no-open-charge .finance-side-card .plan-picker summary {
        width: 100%;
    }

    .account-current-page .finance-history {
        grid-template-columns: 1fr;
    }

    .payment-summary {
        grid-template-columns: 0.8fr 0.8fr 1.4fr;
    }

    .payment-pix-area {
        align-items: start;
        grid-template-columns: 280px minmax(0, 1fr);
    }

    .proof-panel {
        align-items: center;
        grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    }

    .field.full,
    .form-grid .full {
        grid-column: 1 / -1;
    }
}

@media screen and (max-width: 520px) {
    .landing-page {
        padding: 10px;
    }

    .landing-hero {
        gap: 18px;
        padding: 14px;
    }

    .landing-nav {
        align-items: stretch;
        display: grid;
        gap: 12px;
        justify-content: stretch;
    }

    .landing-nav > a:first-child {
        justify-self: center;
        width: min(100%, 276px);
    }

    .landing-nav img {
        height: auto;
        max-width: 100%;
        width: 100%;
    }

    .landing-nav-actions {
        display: grid;
        gap: 8px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-content: stretch;
        width: 100%;
    }

    .landing-nav-actions a {
        font-size: 0.98rem;
        line-height: 1.15;
        min-height: 52px;
        padding: 9px 8px;
    }

    .landing-copy h1 {
        font-size: 2.05rem;
        line-height: 1.08;
        margin-bottom: 10px;
    }

    .landing-lead,
    .landing-section p {
        font-size: 1rem;
    }

    .landing-price {
        margin: 14px 0;
        padding: 12px;
    }

    .landing-price strong {
        font-size: 1.75rem;
    }

    .landing-section {
        padding: 14px;
    }

    .landing-section h2 {
        font-size: 1.72rem;
    }

    .landing-signup-box {
        padding: 12px;
    }

    .compact-row {
        align-items: flex-start;
        grid-template-columns: 1fr;
    }

    .client-dashboard .compact-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .client-dashboard .compact-row .badge {
        align-self: start;
    }

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

    .validity-row {
        align-items: flex-start;
        grid-template-columns: 1fr;
    }

    .validity-actions {
        align-items: start;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        justify-content: stretch;
        gap: 10px;
        width: 100%;
    }

    .validity-actions .badge {
        grid-column: 1 / -1;
        justify-content: center;
        min-height: 30px;
        padding: 6px 12px;
        width: 138px;
    }

    .validity-actions form {
        width: 100%;
    }

    .validity-actions .compact-link {
        align-items: center;
        border-radius: 8px;
        display: inline-flex;
        font-size: 1.08rem !important;
        font-weight: 800;
        justify-content: center;
        line-height: 1;
        min-height: 44px;
        padding: 0 8px;
        width: 100%;
    }

    .log-meta {
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        white-space: normal;
    }

    .product-head {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .finance-alert,
    .finance-row-head,
    .history-row,
    .pix-client-box,
    .finance-actions,
    .finance-section-head,
    .plan-current,
    .plan-option {
        grid-template-columns: 1fr;
    }

    .finance-section-head {
        display: grid;
    }
}

@media screen and (min-width: 1024px) {
    .app-main {
        padding-left: 32px;
        padding-right: 32px;
    }

    .finance-page {
        width: min(100%, 1240px);
    }

    .landing-page {
        gap: 22px;
    }

    .landing-hero {
        min-height: 620px;
        padding: 28px;
    }

    .landing-hero-grid {
        gap: 34px;
        grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.7fr);
    }

    .landing-copy {
        align-self: center;
    }

    .landing-copy h1 {
        font-size: 3.55rem;
        max-width: 780px;
    }

    .landing-lead {
        max-width: 700px;
    }

    .landing-section {
        padding: 24px;
    }

    .landing-section h2 {
        font-size: 2rem;
    }

    .landing-signup {
        align-items: start;
    }

    .finance-page.account-current-page {
        width: min(100%, 1180px);
    }

    .finance-hero {
        align-items: stretch;
        grid-template-columns: minmax(0, 1fr) 400px;
    }

    .account-current-page .finance-hero {
        gap: 20px;
        grid-template-columns: minmax(0, 1fr) 360px;
    }

    .finance-hero h1 {
        font-size: 2.25rem;
    }

    .account-current-page .finance-hero h1 {
        font-size: 2.1rem;
        margin-bottom: 6px;
    }

    .account-current-page .finance-status-card {
        align-content: center;
        min-height: 118px;
        padding: 20px;
    }

    .finance-status-card,
    .finance-payment-panel,
    .finance-secondary-panel,
    .finance-side-card,
    .subscription-panel {
        box-shadow: 0 16px 34px rgba(0, 0, 0, 0.2);
    }

    .finance-payment-panel,
    .finance-secondary-panel,
    .finance-side-card,
    .subscription-panel {
        padding: 20px;
    }

    .finance-layout {
        gap: 18px;
        grid-template-columns: minmax(0, 1fr) 425px;
    }

    .finance-layout.no-open-charge {
        grid-template-columns: 1fr;
    }

    .finance-layout.no-open-charge .finance-primary {
        display: none;
    }

    .finance-layout.no-open-charge .finance-side {
        display: block;
    }

    .finance-layout.no-open-charge .finance-side-card {
        align-items: center;
        display: grid;
        gap: 18px;
        grid-template-columns: 260px minmax(0, 1fr) 210px;
        padding: 22px 24px;
    }

    .finance-layout.no-open-charge .finance-side-card .finance-section-head,
    .finance-layout.no-open-charge .finance-side-card .plan-current,
    .finance-layout.no-open-charge .finance-side-card .finance-plan-actions {
        margin: 0;
    }

    .finance-layout.no-open-charge .finance-side-card .finance-section-head {
        align-self: center;
        display: block;
    }

    .finance-layout.no-open-charge .finance-side-card .finance-section-head h2 {
        font-size: 1.45rem;
    }

    .finance-layout.no-open-charge .finance-side-card .plan-current {
        background: rgba(11, 18, 32, 0.46);
        min-height: 92px;
        padding: 16px 18px;
    }

    .finance-layout.no-open-charge .finance-side-card .plan-current strong {
        font-size: 1.15rem;
    }

    .finance-layout.no-open-charge .finance-side-card .finance-plan-actions {
        align-self: center;
    }

    .finance-layout.no-open-charge .finance-side-card .plan-picker {
        margin: 0;
    }

    .finance-layout.no-open-charge .finance-side-card .plan-picker summary {
        min-height: 46px;
        padding: 10px 16px;
    }

    .finance-layout.needs-plan {
        grid-template-columns: minmax(0, 0.85fr) minmax(460px, 0.6fr);
    }

    .finance-side {
        align-content: start;
    }

    .finance-side .finance-plan-actions {
        grid-template-columns: 1fr;
    }

    .finance-side .plan-picker {
        margin-top: 16px;
    }

    .finance-side .plan-picker summary {
        min-height: 56px;
        width: 100%;
    }

    .finance-side .plan-option {
        align-items: start;
        grid-template-columns: 1fr;
    }

    .finance-side .plan-option .btn-primary,
    .finance-side .plan-option .btn-secondary {
        width: 100%;
    }

    .finance-side .plan-selection-card {
        border-color: rgba(59, 130, 246, 0.42);
    }

    .finance-side .plan-selection-card .plan-current {
        background: rgba(15, 23, 42, 0.72);
        border-color: rgba(59, 130, 246, 0.32);
    }

    .finance-side .plan-selection-card .plan-options {
        gap: 10px;
    }

    .finance-side .plan-selection-card .plan-option {
        align-items: center;
        grid-template-columns: minmax(0, 1fr) 148px;
        padding: 14px;
    }

    .finance-side .plan-selection-card .plan-option .btn-primary,
    .finance-side .plan-selection-card .plan-option .btn-secondary {
        min-height: 48px;
        width: 100%;
    }

    .payment-summary {
        grid-template-columns: minmax(160px, 0.65fr) minmax(160px, 0.65fr) minmax(260px, 1.4fr);
    }

    .payment-pix-area {
        grid-template-columns: 300px minmax(0, 1fr);
    }

    .account-current-page .finance-secondary-panel {
        padding: 22px 24px;
    }

    .account-current-page .finance-history {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .account-current-page .history-row {
        min-height: 96px;
        padding: 16px;
    }

    .subscription-page {
        width: min(100%, 1180px);
    }

    .subscription-hero {
        grid-template-columns: minmax(0, 1fr) 340px;
    }

    .subscription-hero h1 {
        max-width: 720px;
    }

    .subscription-hero p {
        max-width: 760px;
    }

    .subscription-panel {
        padding: 22px;
    }

    .subscription-panel-head h2 {
        font-size: 1.55rem;
    }

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

    .subscription-plan-card {
        align-content: start;
        min-height: 250px;
        padding: 16px;
    }

    .responsive-grid.list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
