:root {
    --bg: #0b0d10;
    --bg-elevated: #12151a;
    --surface: #161a20;
    --surface-hover: #1c2129;
    --ink: #f5f7fa;
    --muted: #9aa3ad;
    --line: #2a3038;
    --accent: #f0a000;
    --accent-soft: rgba(240, 160, 0, 0.14);
    --ok: #3d9a6a;
    --warn: #c9a227;
    --danger: #d35a5a;
    --radius: 10px;
    --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --mono: Consolas, "Courier New", monospace;
}

* {
    box-sizing: border-box;
}

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

body {
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
}

/* Login */
.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 20% 20%, rgba(240, 160, 0, 0.12), transparent 35%),
        radial-gradient(circle at 80% 80%, rgba(240, 160, 0, 0.06), transparent 30%),
        var(--bg);
}

.login-shell {
    width: min(420px, calc(100% - 32px));
}

.login-card {
    padding: 32px 28px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.login-brand {
    margin-bottom: 28px;
}

.login-brand strong {
    display: block;
    color: var(--accent);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.login-brand span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.95rem;
}

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

.login-form button {
    width: 100%;
    margin-top: 6px;
    padding: 12px 14px;
}

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

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

.topnav {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 16px 28px;
    border-bottom: 1px solid var(--line);
    background: #080a0d;
}

.brand-logo {
    color: var(--accent);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

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

.nav-links a {
    color: #e8ecf0;
    font-size: 0.95rem;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    border-bottom-color: var(--accent);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
    white-space: nowrap;
}

.nav-user span {
    color: var(--muted);
    font-size: 0.92rem;
}

.btn-sair {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 16px;
    border: 1px solid #d7dde5;
    border-radius: 4px;
    background: transparent;
    color: #fff;
    font: inherit;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-sair:hover {
    background: rgba(255, 255, 255, 0.06);
}

.main {
    flex: 1;
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 36px 0 56px;
}

.page-head {
    margin-bottom: 28px;
}

.page-head-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}

.page-head h1 {
    margin: 0;
    font-size: clamp(2rem, 3.2vw, 2.6rem);
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.page-head p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 1rem;
}

.topbar-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.content {
    display: grid;
    gap: 20px;
}

.dashboard {
    display: grid;
    gap: 20px;
}

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

.module-card {
    display: block;
    padding: 22px 20px;
    min-height: 108px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.module-card:hover {
    background: var(--surface-hover);
    border-color: #3a424c;
    transform: translateY(-1px);
}

.module-card strong {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.module-card span {
    display: block;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.35;
}

.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: visible;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    overflow: visible;
    position: relative;
    z-index: 5;
    border-radius: var(--radius) var(--radius) 0 0;
}

.panel-header h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.panel-body {
    padding: 18px;
    position: relative;
    z-index: 1;
    border-radius: 0 0 var(--radius) var(--radius);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 16px;
}

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

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

label {
    display: block;
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.35;
}

label > input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
label > select,
label > textarea,
label > .field-doc,
label > .money-wrap {
    display: block;
    width: 100%;
    margin-top: 6px;
}

input, select, textarea, button, .btn {
    font: inherit;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select,
textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--bg-elevated);
    color: var(--ink);
    outline: none;
    line-height: 1.25;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select {
    height: 44px;
}

select {
    appearance: none;
    -webkit-appearance: none;
    background-color: var(--bg-elevated);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239aa3ad' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

textarea {
    height: auto;
    min-height: 110px;
    resize: vertical;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn, button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    background: var(--accent);
    color: #1a1200;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.15s ease;
}

.btn:hover, button:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
    font-weight: 600;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.04);
    filter: none;
}

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

.btn-small {
    padding: 7px 11px;
    font-size: 0.88rem;
}

.btn-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-icon .icon {
    display: block;
    flex: 0 0 auto;
}

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

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

th, td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    background: rgba(0, 0, 0, 0.25);
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    background: #243040;
    color: #d5e4f5;
}

.badge-toggle {
    cursor: pointer;
    border: 1px solid transparent;
    transition: filter 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.badge-toggle:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.2);
}

.badge.aberta { background: #1e2d44; color: #9ec0ef; }
.badge.diagnostico { background: #1e2a3a; color: #8bb8e8; }
.badge.aguardando_aprovacao { background: #3a3018; color: #f0c87a; }
.badge.aprovada { background: #1d3328; color: #8fdfb2; }
.badge.rejeitada { background: #3a1d1d; color: #f0a0a0; }
.badge.em_andamento { background: #3a3118; color: #f0d27a; }
.badge.aguardando_peca { background: #3a2618; color: #f0b27a; }
.badge.concluida, .badge.entregue { background: #1d3328; color: #8fdfb2; }
.badge.cancelada { background: #3a1d1d; color: #f0a0a0; }

.icon {
    display: inline-flex;
    line-height: 1;
    font-style: normal;
}

.row-inactive td {
    opacity: 0.55;
}

td.actions,
th.actions-col {
    width: 1%;
    white-space: nowrap;
    text-align: right;
    vertical-align: middle;
}

/* Evita que .actions quebre a célula da tabela */
td.actions {
    display: table-cell;
}

td.actions > .btn {
    display: inline-flex;
    vertical-align: middle;
}

td.actions > .btn + .btn {
    margin-left: 6px;
}

.actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.form-grid > .actions.full {
    justify-content: flex-start;
}

.actions .btn {
    gap: 0;
}

.req {
    display: inline;
    color: var(--accent);
    font-weight: 800;
    margin-right: 2px;
}

.field-doc {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 8px;
    align-items: stretch;
}

.field-doc select,
.field-doc input {
    height: 44px;
}

.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0 4px;
    font-weight: 600;
}

.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex: 0 0 auto;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: #2a3038;
    border: 1px solid var(--line);
    border-radius: 999px;
    transition: 0.2s ease;
}

.switch-slider::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #c5ccd6;
    border-radius: 50%;
    transition: 0.2s ease;
}

.switch input:checked + .switch-slider {
    background: var(--accent);
    border-color: var(--accent);
}

.switch input:checked + .switch-slider::before {
    transform: translateX(20px);
    background: #111;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.form-grid > .actions.full .btn-block {
    width: auto;
    min-width: 160px;
}

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 4px;
}

.alert-success {
    background: #1d3328;
    color: #8fdfb2;
}

.alert-error {
    background: #3a1d1d;
    color: #f0a0a0;
}

.empty {
    padding: 28px;
    text-align: center;
    color: var(--muted);
}

.search {
    min-width: min(280px, 100%);
}

.mono {
    font-family: var(--mono);
    font-size: 0.9rem;
}

.totals {
    display: grid;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--line);
}

.totals div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.totals .grand {
    font-size: 1.15rem;
    font-weight: 800;
}

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

.tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.tab {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-weight: 600;
}

.tab.is-active,
.tab:hover {
    color: var(--ink);
    border-color: var(--accent);
    background: var(--accent-soft);
}

.quote-layout {
    display: grid;
    gap: 16px;
}

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

.item-row {
    display: grid;
    grid-template-columns: 120px 1fr 90px 140px 40px;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}

.item-row .input-qtd {
    text-align: center;
}

.money-field {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    height: 44px;
    padding: 0 10px 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg-elevated);
}

.money-field:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.money-prefix {
    color: var(--muted);
    font-weight: 600;
    flex: 0 0 auto;
}

.money-field .input-valor {
    border: none;
    background: transparent;
    box-shadow: none;
    height: auto;
    min-height: 0;
    padding: 0;
    text-align: right;
    min-width: 0;
}

.money-field .input-valor:focus {
    border: none;
    box-shadow: none;
}

.quote-total {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
    font-size: 1.2rem;
    font-weight: 800;
    text-align: right;
}

.items-empty {
    padding: 24px;
    text-align: center;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: 10px;
}

.actions-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Confirm modal */
body.confirm-open {
    overflow: hidden;
}

.confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(4, 6, 10, 0.72);
    backdrop-filter: blur(4px);
}

.confirm-overlay[hidden] {
    display: none !important;
}

.confirm-dialog {
    width: min(420px, 100%);
    padding: 28px 24px 22px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    text-align: center;
    animation: confirm-in 0.18s ease;
}

.confirm-dialog.is-danger {
    border-color: rgba(211, 90, 90, 0.55);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(211, 90, 90, 0.2);
}

.confirm-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid rgba(240, 160, 0, 0.35);
}

.confirm-dialog.is-danger .confirm-icon {
    background: rgba(211, 90, 90, 0.16);
    color: #f0a0a0;
    border-color: rgba(211, 90, 90, 0.45);
}

.confirm-title {
    margin: 0 0 8px;
    font-size: 1.15rem;
    font-weight: 800;
}

.confirm-dialog.is-danger .confirm-title {
    color: #f0a0a0;
}

.confirm-message {
    margin: 0 0 22px;
    color: var(--muted);
    line-height: 1.45;
    font-size: 0.98rem;
}

.confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

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

.confirm-dialog.is-danger [data-confirm-ok] {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.confirm-dialog.is-danger [data-confirm-ok]:hover {
    filter: brightness(1.08);
}

@keyframes confirm-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.panel-header-tools {
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.catalog-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-left: auto;
}

.dd {
    position: relative;
    z-index: 20;
}

.dd-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 50;
    width: min(400px, 85vw);
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
    overflow: visible;
}

.dd-search {
    padding: 10px;
    border-bottom: 1px solid var(--line);
    background: var(--bg-elevated);
    border-radius: 10px 10px 0 0;
}

.dd-search input {
    width: 100%;
    padding: 10px 12px;
}

.dd-list {
    max-height: 230px; /* ~5 itens + rolagem */
    overflow-y: auto;
    border-radius: 0 0 10px 10px;
}

.dd-item {
    min-height: 44px;
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border: none;
    border-bottom: 1px solid var(--line);
    background: transparent;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
    font: inherit;
    box-sizing: border-box;
}

.dd-item:last-child {
    border-bottom: none;
}

.dd-item:hover {
    background: var(--surface-hover);
}

.dd-item strong {
    color: var(--accent);
    font-size: 0.86rem;
    white-space: nowrap;
}

.dd-empty {
    padding: 14px 12px;
    color: var(--muted);
    font-size: 0.9rem;
}

.os-add-item {
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--line);
}

.checklist-form {
    display: grid;
    gap: 16px;
}

.checklist-panel .panel-body {
    padding: 22px;
}

.checklist-title {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.checklist-label {
    display: grid;
    gap: 8px;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.checklist-label select,
.checklist-label textarea,
.checklist-label input,
.checklist-panel textarea {
    width: 100%;
}

.view-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 10px;
}

.view-tab {
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-weight: 600;
    cursor: pointer;
}

.view-tab.is-active,
.view-tab:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #111;
}

.checklist-view-hint {
    margin: 0 0 12px;
    font-size: 0.9rem;
}

.car-stage {
    display: grid;
    place-items: center;
    min-height: 320px;
    padding: 12px 0 20px;
}

.car-wrap {
    position: relative;
    width: min(100%, 280px);
}

.car-wrap.is-wide {
    width: min(100%, 560px);
}

.car-blueprint,
.car-svg {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.35));
}

.car-wrap:not(.is-wide) .car-blueprint {
    max-height: 420px;
    object-fit: contain;
    margin: 0 auto;
}

.car-point {
    position: absolute;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid rgba(0, 0, 0, 0.45);
    border-radius: 50%;
    background: #f5f7fa;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
    cursor: pointer;
    padding: 0;
    transition: transform 0.12s ease, background 0.12s ease;
}

.car-point:hover {
    transform: scale(1.2);
}

.car-point.ok { background: #3d9a6a; }
.car-point.risco { background: #e6c84a; }
.car-point.amassado { background: #f0a000; }
.car-point.quebrado { background: #d35a5a; }
.car-point.arranhado { background: #8b5a2b; }
.car-point.outro { background: #8b6bb8; }
.car-point.none { background: #f5f7fa; }

.car-point.has-obs {
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.2),
        0 0 0 4px rgba(240, 160, 0, 0.55);
}

.point-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(4, 6, 10, 0.72);
    backdrop-filter: blur(4px);
}

.point-overlay[hidden] {
    display: none !important;
}

.point-dialog {
    width: min(440px, 100%);
    padding: 22px 22px 20px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    animation: confirm-in 0.18s ease;
}

.point-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.point-dialog-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.point-dialog-close {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.point-dialog-close:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.06);
}

.point-dialog .checklist-label {
    margin-top: 0;
    margin-bottom: 14px;
}

.point-dialog .btn-block {
    margin-top: 8px;
}

.cond-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    justify-content: center;
    padding-top: 8px;
    color: var(--muted);
    font-size: 0.88rem;
}

.cond-legend .dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 6px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.35);
    vertical-align: -1px;
}

.cond-legend .dot.ok { background: #3d9a6a; }
.cond-legend .dot.risco { background: #e6c84a; }
.cond-legend .dot.amassado { background: #f0a000; }
.cond-legend .dot.quebrado { background: #d35a5a; }
.cond-legend .dot.arranhado { background: #8b5a2b; }
.cond-legend .dot.outro { background: #8b6bb8; }
.cond-legend .dot.none { background: #f5f7fa; }

.check-grid {
    display: grid;
    gap: 12px 20px;
    margin-top: 16px;
}

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

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

.check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-weight: 500;
    cursor: pointer;
}

.check-item input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    min-height: 0;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 1.5px solid var(--accent);
    border-radius: 2px;
    background: transparent;
    cursor: pointer;
    flex: 0 0 12px;
    box-shadow: none;
    line-height: 1;
}

.check-item input[type="checkbox"]:checked {
    background: var(--accent);
    box-shadow: inset 0 0 0 2px var(--bg);
}

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

    .grid-2,
    .form-grid,
    .form-grid-4 {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 760px) {
    .topnav {
        flex-wrap: wrap;
        gap: 14px;
        padding: 14px 16px;
    }

    .nav-user {
        width: 100%;
        justify-content: space-between;
        margin-left: 0;
    }

    .main {
        width: calc(100% - 32px);
        padding-top: 24px;
    }

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

    .check-grid-2,
    .check-grid-4 {
        grid-template-columns: 1fr;
    }

    .car-wrap,
    .car-wrap.is-wide {
        width: min(100%, 100%);
    }
}
