:root {
    --bg: #f3f6fb;
    --panel: #ffffff;
    --ink: #142033;
    --muted: #64748b;
    --line: #d9e1ec;
    --primary: #0f6d90;
    --primary-dark: #0b526e;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f9d85f;
    --shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
}

body.modal-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: min(1380px, calc(100% - 32px));
    min-height: 58px;
    margin: 0 auto;
}

.brand {
    font-weight: 800;
    color: var(--primary-dark);
    font-size: 18px;
}

.brand img {
    display: block;
    max-width: 210px;
    max-height: 42px;
    object-fit: contain;
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--primary-dark);
    border-radius: 10px;
}

.nav a {
    padding: 8px 10px;
    border-radius: 6px;
    color: #334155;
}

.nav a:hover {
    background: #eaf3f8;
    color: var(--primary-dark);
}

.page {
    width: min(1380px, calc(100% - 32px));
    margin: 18px auto 42px;
}

.auth-card,
.panel,
.filters-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.auth-card {
    width: min(420px, 100%);
    margin: 9vh auto;
    padding: 28px;
}

.auth-switch {
    margin: 14px 0 0;
    text-align: center;
}

.auth-switch a {
    color: var(--primary-dark);
    font-weight: 800;
    text-decoration: underline;
}

.panel {
    padding: 22px;
}

.panel.wide {
    max-width: 980px;
    margin: 0 auto;
}

.panel.narrow {
    max-width: 520px;
    margin: 0 auto;
}

h1,
h2 {
    margin: 0 0 14px;
}

h1 {
    font-size: 24px;
}

h2 {
    font-size: 16px;
}

p {
    color: var(--muted);
}

.form {
    display: grid;
    gap: 14px;
}

.form.compact {
    gap: 12px;
}

label,
.field-title {
    display: grid;
    gap: 6px;
    color: #213047;
    font-weight: 700;
    font-size: 12px;
}

input,
select,
textarea {
    width: 100%;
    min-height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    padding: 9px 10px;
    color: var(--ink);
    background: #fff;
    font: inherit;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
.paste-box:focus {
    outline: 2px solid rgba(15, 109, 144, 0.2);
    border-color: var(--primary);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: 7px;
    font-weight: 800;
    cursor: pointer;
    font-size: 13px;
}

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

.button.primary:hover {
    background: var(--primary-dark);
}

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

.button.danger:hover {
    background: #b91c1c;
}

.button.secondary,
.button.tiny {
    color: #1f334a;
    background: #fff;
    border-color: var(--line);
}

.button.tiny {
    min-height: 30px;
    padding: 5px 10px;
}

.actions,
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.compact-head {
    margin: 4px 0 -2px;
}

.compact-head h2 {
    margin: 0 0 4px;
    font-size: 16px;
}

.content-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 16px;
    align-items: start;
}

.filters-panel {
    position: sticky;
    top: 76px;
    padding: 16px;
}

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

.filter-close,
.floating-filter-button {
    display: none;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.vehicles-area {
    min-width: 0;
}

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

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

.vehicle-list.is-list {
    grid-template-columns: 1fr;
}

.vehicle-list.is-list .vehicle-card {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
}

.vehicle-list.is-list .vehicle-image {
    height: 100%;
    min-height: 190px;
}

.vehicle-list.is-list .vehicle-body {
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
    align-items: start;
}

.vehicle-list.is-list .vehicle-body h2,
.vehicle-list.is-list .dealership-badge,
.vehicle-list.is-list .spec-grid {
    grid-column: 1;
}

.vehicle-list.is-list .prices,
.vehicle-list.is-list .card-actions {
    grid-column: 2;
}

@media (max-width: 1360px) {
    .vehicle-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1120px) {
    .vehicle-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.vehicle-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

.vehicle-image {
    position: relative;
    height: clamp(176px, 12vw, 206px);
    overflow: hidden;
    display: grid;
    place-items: center;
    background: #edf2f7;
    color: var(--muted);
}

.vehicle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.image-zoom-button {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    cursor: zoom-in;
}

.image-zoom-button img {
    display: block;
}

.status {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 9px;
    border-radius: 5px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.age-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 5px 9px;
    border-radius: 5px;
    color: #fff;
    background: rgba(15, 23, 42, 0.82);
    font-size: 12px;
    font-weight: 900;
}

.dealership-logo-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    max-width: 96px;
    height: 32px;
    padding: 4px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
}

.dealership-logo-overlay img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.status-disponivel {
    background: var(--success);
}

.status-vendido {
    background: var(--danger);
}

.vehicle-body {
    display: grid;
    gap: 12px;
    padding: 12px;
}

.vehicle-body h2 {
    margin: 0;
    min-height: 40px;
    font-size: 15px;
    line-height: 1.35;
    text-transform: uppercase;
}

.dealership-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    max-width: 100%;
    padding: 5px 8px;
    border-radius: 6px;
    color: #27415c;
    background: #eef6fb;
    font-size: 12px;
    font-weight: 800;
}

.dealership-badge img {
    width: auto;
    max-width: 120px;
    height: 28px;
    border-radius: 4px;
    object-fit: contain;
}

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

.spec-grid div {
    min-width: 0;
}

.spec-grid dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.spec-grid dd {
    margin: 2px 0 0;
    font-weight: 700;
}

.prices {
    display: grid;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.prices span {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.prices .margin {
    align-items: center;
    padding: 9px 10px;
    border-radius: 6px;
    color: #111827;
}

.prices .margin span {
    display: grid;
    gap: 2px;
}

.prices .margin b {
    font-size: 12px;
}

.prices .margin small {
    color: rgba(17, 24, 39, 0.72);
    font-weight: 800;
}

.prices .margin strong {
    display: grid;
    justify-items: end;
}

.prices .margin em {
    font-style: normal;
    font-size: 12px;
}

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

.card-actions .button:only-child {
    grid-column: 1 / -1;
}

.band-0-5 {
    background: #fee2e2;
    border-left: 5px solid #ef4444;
}

.band-5-10 {
    background: #ffedd5;
    border-left: 5px solid #f97316;
}

.band-10-20 {
    background: #fef3c7;
    border-left: 5px solid #f59e0b;
}

.band-20-30 {
    background: #dbeafe;
    border-left: 5px solid #3b82f6;
}

.band-30-40 {
    background: #dcfce7;
    border-left: 5px solid #22c55e;
}

.band-40-50 {
    background: #bbf7d0;
    border-left: 5px solid #16a34a;
}

.band-50-plus {
    background: #a7f3d0;
    border-left: 5px solid #047857;
}

.notes {
    margin: 0;
    color: #334155;
    white-space: pre-wrap;
}

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

.span-2 {
    grid-column: span 2;
}

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

.check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #f8fafc;
}

.check input {
    width: auto;
    min-height: auto;
}

.check.is-disabled {
    color: #94a3b8;
    background: #eef2f6;
    cursor: not-allowed;
}

.is-disabled-field {
    color: #94a3b8;
}

.check.is-disabled input {
    cursor: not-allowed;
}

.paste-box {
    display: grid;
    grid-template-columns: 1fr 230px;
    gap: 14px;
    min-height: 190px;
    padding: 16px;
    border: 2px dashed #adc1d4;
    border-radius: 8px;
    background: #f8fafc;
    cursor: text;
}

.paste-box strong,
.paste-box span {
    display: block;
}

.paste-box span {
    margin-top: 5px;
    color: var(--muted);
}

.paste-box.is-processing {
    opacity: 0.72;
    cursor: progress;
}

.additional-images-box {
    display: grid;
    gap: 12px;
    padding-top: 8px;
}

.additional-images-box h2,
.additional-images-box p {
    margin: 0;
}

.compact-paste {
    min-height: 90px;
    grid-template-columns: 1fr;
}

.additional-preview-grid,
.vehicle-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}

.extra-image-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.remove-image-check {
    position: absolute;
    right: 8px;
    bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 10px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.78);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.22);
    backdrop-filter: blur(4px);
}

.remove-image-check input {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: 100%;
    opacity: 0;
    cursor: pointer;
}

.extra-image-card:has(.remove-image-check input:checked) {
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.18), 0 8px 22px rgba(127, 29, 29, 0.12);
}

.extra-image-card:has(.remove-image-check input:checked) .remove-image-check {
    background: #dc2626;
}

.extra-image-card:has(.remove-image-check input:checked)::after {
    position: absolute;
    top: 8px;
    left: 8px;
    content: "Excluir ao salvar";
    padding: 5px 8px;
    border-radius: 999px;
    color: #fff;
    background: #dc2626;
    font-size: 11px;
    font-weight: 900;
}

.extra-thumb,
.gallery-thumb {
    overflow: hidden;
    aspect-ratio: 4 / 3;
    border: 0;
    border-radius: 0;
    background: #eef3f8;
}

.extra-thumb img,
.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview {
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 7px;
    background: #e2e8f0;
    color: var(--muted);
}

.preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 56px 18px 18px;
    background: rgba(7, 13, 24, 0.88);
}

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

.app-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.52);
}

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

.app-modal-card {
    width: min(720px, 100%);
    max-height: calc(100vh - 36px);
    display: grid;
    gap: 14px;
    overflow: auto;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.image-modal img {
    max-width: min(1200px, 100%);
    max-height: calc(100vh - 88px);
    object-fit: contain;
    border-radius: 6px;
    background: #111827;
}

.image-modal-close {
    position: fixed;
    top: 14px;
    right: 18px;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 7px;
    color: #fff;
    background: rgba(15, 23, 42, 0.85);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.image-modal-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 58px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    color: #fff;
    background: rgba(15, 23, 42, 0.72);
    font-size: 42px;
    line-height: 1;
    cursor: pointer;
}

.image-modal-prev {
    left: 18px;
}

.image-modal-next {
    right: 18px;
}

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

.split-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 16px;
    align-items: start;
}

.dealership-logo-preview {
    width: 92px;
    height: 92px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.site-logo-preview {
    width: min(220px, 100%);
    max-height: 90px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.soft-divider {
    width: 100%;
    margin: 22px 0;
    border: 0;
    border-top: 1px solid var(--line);
}

.contacts-editor {
    display: grid;
    gap: 10px;
}

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

.contact-row {
    display: grid;
    grid-template-columns: 34px 1fr 1fr auto;
    gap: 8px;
    align-items: center;
}

.whatsapp-mark {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #22c55e;
    font-size: 13px;
    font-weight: 900;
}

.dealership-list {
    display: grid;
    gap: 10px;
}

.dealership-item {
    display: grid;
    grid-template-columns: 54px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.dealership-logo {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 8px;
    color: #fff;
    background: var(--primary);
    font-weight: 900;
}

.dealership-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.dealership-item h2,
.dealership-item p {
    margin: 0;
}

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

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

.data-table th {
    background: var(--primary-dark);
    color: #fff;
    text-align: left;
}

.data-table th,
.data-table td {
    padding: 10px;
    border-bottom: 1px solid var(--line);
}

.flash {
    margin-bottom: 12px;
    padding: 11px 12px;
    border-radius: 7px;
    font-weight: 700;
}

.flash-success {
    color: #14532d;
    background: #dcfce7;
}

.flash-error {
    color: #7f1d1d;
    background: #fee2e2;
}

.empty-state {
    grid-column: 1 / -1;
    padding: 28px;
    text-align: center;
    color: var(--muted);
    background: #fff;
    border: 1px dashed var(--line);
    border-radius: 8px;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.pagination-summary {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.pagination-summary strong {
    color: var(--ink);
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.page-ellipsis {
    color: var(--muted);
    font-weight: 900;
}

.pagination-jump {
    display: flex;
    align-items: center;
    gap: 7px;
}

.pagination-jump input {
    width: 74px;
    min-height: 36px;
    padding: 7px 9px;
    text-align: center;
}

.page-link {
    min-width: 38px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    font-weight: 800;
    color: #1f334a;
}

.page-link:hover {
    border-color: var(--primary);
    color: var(--primary-dark);
    background: #eef7fb;
}

.page-link-wide {
    min-width: 92px;
}

.page-link.is-active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.page-link.is-disabled {
    pointer-events: none;
    opacity: 0.45;
    background: #f8fafc;
}

.muted {
    color: var(--muted);
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.dashboard-grid {
    display: grid;
    gap: 16px;
}

.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.dashboard-hero p,
.plans-page p {
    margin: 0;
}

.plan-status-card,
.stat-card,
.plan-card,
.access-lock-card,
.access-lock-wide {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.plan-status-card {
    display: grid;
    gap: 5px;
    min-width: 230px;
    padding: 14px;
}

.plan-status-card span,
.stat-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.plan-status-card strong,
.stat-card strong {
    font-size: 26px;
    color: var(--ink);
}

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

.stat-card {
    display: grid;
    gap: 6px;
    padding: 16px;
    box-shadow: var(--shadow);
}

.dashboard-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.ranking-list {
    display: grid;
    gap: 9px;
}

.ranking-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #f8fafc;
    font-weight: 800;
}

.ranking-list span {
    min-width: 0;
}

.ranking-list strong {
    white-space: nowrap;
    color: var(--primary-dark);
}

.plans-page {
    display: grid;
    gap: 16px;
}

.view-toggle {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.view-toggle a {
    width: 38px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    color: #334155;
    font-weight: 900;
}

.view-toggle svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.view-toggle a.is-active {
    color: #fff;
    background: var(--primary);
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.plan-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    box-shadow: var(--shadow);
}

.plan-card span {
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.plan-card strong {
    font-size: 30px;
}

.addon-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.payment-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
    align-items: start;
    gap: 18px;
    background: #f8fafc;
}

.payment-panel h2,
.payment-panel p {
    margin: 0;
}

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

.payment-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.payment-meta-line span {
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
}

.payment-checkout {
    display: grid;
    justify-items: stretch;
    gap: 10px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #1e3a8a;
    background: #dbeafe;
    font-weight: 900;
    text-transform: uppercase;
}

.status-pill.is-approved {
    color: #14532d;
    background: #dcfce7;
}

.status-pill.is-pending {
    color: #854d0e;
    background: #fef3c7;
}

.status-pill.is-warning {
    color: #713f12;
    background: #fde68a;
}

.status-pill.is-cancelled,
.status-pill.is-expired,
.status-pill.is-failed {
    color: #7f1d1d;
    background: #fee2e2;
}

.pix-qr {
    width: min(220px, 100%);
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.pix-copy-box {
    display: grid;
    gap: 6px;
}

.pix-copy-box textarea {
    min-height: 96px;
    font-size: 12px;
}

.payment-history-panel {
    display: grid;
    gap: 12px;
}

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

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

.payment-row strong,
.payment-row span,
.payment-row small {
    display: block;
}

.payment-row span,
.payment-row small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.payment-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.locked-filter-callout {
    display: grid;
    gap: 4px;
    margin: 0 0 12px;
    padding: 10px;
    border: 1px solid #bfdbfe;
    border-radius: 7px;
    color: #1e3a8a;
    background: #eff6ff;
    font-weight: 800;
    font-size: 12px;
}

.locked-filter-callout a {
    color: var(--primary-dark);
    text-decoration: underline;
}

.is-disabled-form {
    opacity: 0.68;
}

.button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    cursor: not-allowed;
    opacity: 0.72;
}

.access-lock-card {
    display: grid;
    gap: 10px;
    padding: 13px;
    color: #1e3a8a;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.access-lock-card strong {
    font-size: 15px;
}

.access-lock-card span {
    color: #334155;
    line-height: 1.4;
}

.access-lock-wide {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px;
}

.access-lock-wide h2,
.access-lock-wide p {
    margin: 0;
}

.details-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 16px;
    align-items: start;
}

.details-main {
    display: grid;
    gap: 18px;
}

.details-hero {
    display: grid;
    grid-template-columns: minmax(280px, 520px) minmax(260px, 1fr);
    gap: 16px;
    align-items: start;
}

.details-image {
    overflow: hidden;
    aspect-ratio: 4 / 3;
    display: grid;
    place-items: center;
    color: var(--muted);
    background: #edf2f7;
    border-radius: 8px;
}

.details-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.details-summary {
    display: grid;
    gap: 12px;
}

.status-inline {
    display: inline-flex;
    width: fit-content;
    padding: 7px 10px;
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

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

.detail-grid div {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #f8fafc;
}

.detail-grid dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.detail-grid dd {
    margin: 4px 0 0;
    font-weight: 800;
}

.notes-block {
    margin: 0 20px 20px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.section-title-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.section-title-line h2 {
    margin: 0;
}

.professional-notes {
    display: grid;
    gap: 9px;
}

.note-item {
    display: grid;
    grid-template-columns: 9px 1fr;
    gap: 10px;
    align-items: start;
    padding: 10px;
    border: 1px solid #e3eaf2;
    border-radius: 7px;
    background: #fff;
}

.note-item span {
    width: 9px;
    height: 9px;
    margin-top: 5px;
    border-radius: 50%;
    background: var(--primary);
}

.note-item p {
    margin: 0;
    color: #26364b;
    line-height: 1.45;
}

.vehicle-gallery-section {
    padding: 0 20px 20px;
}

.vehicle-gallery-section h2 {
    margin-bottom: 12px;
}

.details-side {
    display: grid;
    gap: 16px;
}

.timeline-list,
.comment-list {
    display: grid;
    gap: 10px;
}

.timeline-item,
.comment-item {
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #f8fafc;
}

.timeline-item strong,
.timeline-item span {
    display: block;
}

.timeline-item span,
.comment-item header span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.comment-form {
    margin-bottom: 14px;
}

.comment-item header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.comment-item p {
    margin: 8px 0 0;
    color: #334155;
    white-space: pre-wrap;
}

.vehicle-showroom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 18px;
    align-items: start;
}

.showroom-main,
.showroom-side .panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.showroom-main {
    overflow: hidden;
}

.showroom-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.showroom-head h1 {
    margin: 0 0 4px;
    font-size: 24px;
    line-height: 1.2;
    text-transform: uppercase;
}

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

.showroom-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 18px;
    padding: 20px;
}

.showroom-image {
    overflow: hidden;
    aspect-ratio: 16 / 10;
    display: grid;
    place-items: center;
    min-height: 360px;
    max-height: 640px;
    background: #eef3f8;
    border-radius: 8px;
}

.showroom-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.showroom-summary {
    display: grid;
    align-content: start;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.showroom-dealership {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.showroom-dealership img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.showroom-dealership strong,
.showroom-dealership span {
    display: block;
}

.showroom-dealership span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.showroom-summary .prices {
    padding-top: 0;
    border-top: 0;
}

.showroom-summary .prices > span:not(.margin) {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.showroom-summary .prices strong {
    font-size: 17px;
}

.status-inline {
    display: inline-flex;
    width: fit-content;
    padding: 7px 10px;
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.showroom-specs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0 20px 20px;
}

.showroom-specs div {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.showroom-specs dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.showroom-specs dd {
    margin: 5px 0 0;
    font-size: 15px;
    font-weight: 800;
}

.showroom-side {
    display: grid;
    gap: 18px;
}

.dealership-detail-card,
.dealership-contact-list {
    display: grid;
    gap: 8px;
}

.dealership-detail-card {
    margin-bottom: 12px;
}

.dealership-detail-card span {
    color: var(--muted);
}

.dealership-contact {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #f8fafc;
    font-weight: 800;
}

.dealership-contact small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-weight: 700;
}

@media (max-width: 900px) {
    .topbar-inner {
        position: relative;
        min-height: 56px;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .nav {
        position: absolute;
        top: calc(100% + 1px);
        right: 0;
        left: 0;
        display: none;
        align-items: flex-end;
        flex-direction: column;
        padding: 10px;
        background: #fff;
        border: 1px solid var(--line);
        border-top: 0;
        border-radius: 0 0 8px 8px;
        box-shadow: var(--shadow);
    }

    .nav a {
        width: fit-content;
        text-align: right;
    }

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

    .content-grid,
    .split-layout,
    .dashboard-columns,
    .paste-box,
    .details-layout,
    .details-hero,
    .vehicle-showroom,
    .showroom-hero,
    .vehicle-list.is-list .vehicle-card,
    .vehicle-list.is-list .vehicle-body {
        grid-template-columns: 1fr;
    }

    .vehicle-list {
        grid-template-columns: 1fr;
    }

    .vehicle-image {
        height: auto;
        aspect-ratio: 4 / 3;
    }

    .vehicle-list.is-list .vehicle-body h2,
    .vehicle-list.is-list .dealership-badge,
    .vehicle-list.is-list .spec-grid,
    .vehicle-list.is-list .prices,
    .vehicle-list.is-list .card-actions {
        grid-column: auto;
    }

    .dashboard-hero,
    .addon-panel,
    .access-lock-wide {
        align-items: stretch;
        flex-direction: column;
    }

    .payment-panel {
        grid-template-columns: 1fr;
    }

    .filters-panel {
        position: fixed;
        inset: 0;
        z-index: 40;
        display: none;
        max-height: none;
        overflow: auto;
        padding: 18px 14px calc(24px + env(safe-area-inset-bottom));
        border-radius: 0;
    }

    .filters-panel.is-open {
        display: block;
    }

    .filter-close {
        display: inline-grid;
        place-items: center;
        width: 34px;
        height: 34px;
        border: 1px solid var(--line);
        border-radius: 7px;
        background: #fff;
        font-size: 22px;
        cursor: pointer;
    }

    .floating-filter-button {
        position: sticky;
        top: 68px;
        z-index: 35;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: fit-content;
        min-height: 38px;
        margin: 0 0 12px auto;
        padding: 8px 13px;
        border: 1px solid var(--primary);
        border-radius: 999px;
        color: #fff;
        background: var(--primary);
        font-weight: 900;
        box-shadow: var(--shadow);
    }

    body.filters-open::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 30;
        background: rgba(15, 23, 42, 0.45);
    }

    .contact-row {
        grid-template-columns: 34px 1fr;
    }

    .contact-row .button {
        grid-column: 2;
    }

    .form-grid,
    .check-grid,
    .detail-grid,
    .stat-grid,
    .showroom-specs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .span-2 {
        grid-column: span 2;
    }
}

@media (max-width: 560px) {
    .page {
        width: min(100% - 20px, 1380px);
    }

    .form-grid,
    .check-grid,
    .detail-grid,
    .stat-grid,
    .showroom-specs {
        grid-template-columns: 1fr;
    }

    .showroom-head {
        align-items: stretch;
        flex-direction: column;
    }

    .showroom-hero {
        padding: 14px;
    }

    .showroom-image {
        min-height: 240px;
    }

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

    .image-modal-nav {
        width: 40px;
        height: 50px;
        font-size: 36px;
    }

    .span-2 {
        grid-column: span 1;
    }

    .section-head,
    .actions {
        align-items: stretch;
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    .pagination-controls {
        width: 100%;
        justify-content: center;
    }

    .pagination-jump {
        width: auto;
        flex: 0 0 auto;
    }

    .pagination-jump input {
        width: 66px;
    }

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

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

    .payment-row-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .payment-row-actions .status-pill {
        width: 100%;
    }
}
