.crm-brand img {
    width: 54px !important;
    height: 54px !important;
}

.crm-page {
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    background: #f5f6f8;
    color: #17191c;
}

/* restante CSS do layout */

:root {
    --revision-red: #ef3340;
    --revision-red-dark: #d71920;
    --revision-black: #17191c;
    --revision-dark: #f4f5f7;
    --revision-border: #dde0e4;
    --revision-white: #ffffff;
    --revision-muted: #6b7178;
    color-scheme: light;
}

html {
    scroll-behavior: smooth;
    background: #ffffff;
}

body {
    margin: 0;
    background: #ffffff;
    color: #17191c;
    font-family: Arial, Helvetica, sans-serif;
}

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

* {
    box-sizing: border-box;
}

/* =========================================================
   CRM — ESTADO VAZIO GLOBAL
   ========================================================= */

.crm-empty-state {
    width: 100% !important;
    min-height: 330px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    box-sizing: border-box !important;
    padding: 40px !important;
    background: #ffffff !important;
    border: 1px solid #dfe2e5 !important;
    border-radius: 15px !important;
    color: #17191c !important;
    text-align: center !important;
    box-shadow: 0 14px 40px rgba(17, 24, 39, 0.06) !important;
}

.crm-empty-state-icon {
    width: 50px !important;
    height: 50px !important;
    display: grid !important;
    place-items: center !important;
    flex: 0 0 50px !important;
    margin: 0 0 16px !important;
    background: #fff1f2 !important;
    border: 1px solid #f1c4c7 !important;
    border-radius: 50% !important;
    color: #ef3340 !important;
    font-size: 16px !important;
    font-weight: 900 !important;
}

.crm-empty-state-title {
    display: block !important;
    margin: 0 !important;
    color: #17191c !important;
    font-size: 16px !important;
    font-weight: 900 !important;
    line-height: 1.3 !important;
}

.crm-empty-state-description {
    display: block !important;
    max-width: 520px !important;
    margin: 8px 0 0 !important;
    color: #686e75 !important;
    font-size: 11px !important;
    line-height: 1.6 !important;
}

.crm-empty-state-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    margin-top: 20px !important;
}

    .crm-empty-state-actions button,
    .crm-empty-state-actions a {
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        padding: 0 17px;
        border: 1px solid #ef3340;
        border-radius: 8px;
        background: #ef3340;
        color: #ffffff;
        font-family: inherit;
        font-size: 10px;
        font-weight: 900;
        text-decoration: none;
        cursor: pointer;
    }

        .crm-empty-state-actions button:hover,
        .crm-empty-state-actions a:hover {
            background: #d92b37;
            border-color: #d92b37;
        }

@media (max-width: 650px) {
    .crm-empty-state {
        min-height: 280px !important;
        padding: 30px 20px !important;
    }

    .crm-empty-state-actions {
        width: 100% !important;
        flex-direction: column !important;
    }

        .crm-empty-state-actions button,
        .crm-empty-state-actions a {
            width: 100%;
        }
}

/* =========================================================
   MATRÍCULA
   ========================================================= */

.crm-license-plate {
    display: inline-flex;
    align-items: stretch;
    height: 28px;
    overflow: hidden;
    background: #fff;
    border: 1.5px solid #17191d;
    border-radius: 4px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
    color: #111318;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1;
    vertical-align: middle;
}

.crm-license-plate-eu {
    width: 18px;
    flex: 0 0 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: #164194;
    color: #fff;
}

.crm-license-plate-stars {
    color: #ffd700;
    font-size: 7px;
    line-height: 1;
}

.crm-license-plate-country {
    font-size: 8px;
    font-weight: 800;
    line-height: 1;
}

.crm-license-plate-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 0 9px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.7px;
    white-space: nowrap;
}

/* =========================================================
   CAMPO DE PESQUISA — MATRÍCULA
   ========================================================= */

/* =========================================================
   PESQUISA DE VIATURA
   ========================================================= */

.crm-vehicle-search-card {
    width: fit-content;
    min-width: 330px;
    padding: 24px;
    background: #fff;
    border: 1px solid #d8dce1;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.07);
}

    .crm-vehicle-search-card h2 {
        margin: 8px 0 4px;
        color: #111318;
        font-size: 22px;
        line-height: 1.15;
    }

    .crm-vehicle-search-card > p {
        margin: 0;
        color: #707680;
        font-size: 13px;
    }

.crm-vehicle-search-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 270px;
    margin-top: 18px;
}

    .crm-vehicle-search-form .crm-license-plate-input {
        width: 100%;
    }

.crm-vehicle-search-button {
    width: 100%;
    height: 44px;
    padding: 0 20px;
    background: #f53240;
    border: 1px solid #f53240;
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

    .crm-vehicle-search-button:hover:not(:disabled) {
        background: #dc2634;
        border-color: #dc2634;
        transform: translateY(-1px);
    }

    .crm-vehicle-search-button:disabled {
        cursor: not-allowed;
        opacity: 0.5;
    }

@media (max-width: 480px) {
    .crm-vehicle-search-card {
        width: 100%;
        min-width: 0;
        padding: 20px;
    }

    .crm-vehicle-search-form {
        width: 100%;
    }
}

.crm-vehicle-search-card {
    width: 320px;
    max-width: 100%;
    min-width: 0;
    padding: 24px;
    background: #fff;
    border: 1px solid #d8dce1;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.07);
}

    .crm-vehicle-search-card h2 {
        margin: 8px 0 4px;
        font-size: 22px;
        line-height: 1.15;
    }

    .crm-vehicle-search-card > p {
        margin: 0;
        color: #707680;
        font-size: 13px;
    }

.crm-vehicle-search-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin-top: 18px;
}

    .crm-vehicle-search-form .crm-license-plate-input,
    .crm-vehicle-search-form .crm-vehicle-search-button {
        width: 100%;
    }

/* =========================================================
   PESQUISA DE VIATURA
   ========================================================= */

.crm-vehicle-search-page {
    position: static;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    min-height: 0;
    padding: 0 0 32px;
    box-sizing: border-box;
}

.crm-vehicle-search-card {
    width: 340px;
    max-width: 100%;
    padding: 28px;
    background: #fff;
    border: 1px solid #d8dce1;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(17, 24, 39, 0.09);
    margin: 0;
    box-sizing: border-box;
}

    .crm-vehicle-search-card h2 {
        margin: 8px 0 4px;
        color: #111318;
        font-size: 22px;
        line-height: 1.15;
    }

    .crm-vehicle-search-card > p {
        margin: 0;
        color: #707680;
        font-size: 13px;
    }

.crm-vehicle-search-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 20px;
}

/* Matrícula editável */

.crm-license-plate-input {
    display: flex;
    align-items: stretch;
    width: 100%;
    height: 62px;
    overflow: hidden;
    background: #fff;
    border: 2px solid #15171b;
    border-radius: 7px;
    box-shadow: inset 0 0 0 2px #dfe2e6, 0 6px 15px rgba(17, 24, 39, 0.08);
}

    .crm-license-plate-input:focus-within {
        border-color: #f53240;
        box-shadow: inset 0 0 0 2px #fff, 0 0 0 3px rgba(245, 50, 64, 0.14);
    }

.crm-license-plate-input-eu {
    display: flex;
    flex: 0 0 38px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 100%;
    background: #164194;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.crm-license-plate-input-stars {
    color: #ffd700;
    font-size: 12px;
    line-height: 1;
}

.crm-license-plate-input input {
    flex: 1;
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0 14px;
    background: #fff;
    border: 0;
    outline: 0;
    color: #111318;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 2px;
    text-align: center;
    text-transform: uppercase;
}

    .crm-license-plate-input input::placeholder {
        color: #a5aab1;
        opacity: 1;
    }

/* Botão */

.crm-vehicle-search-button {
    width: 100%;
    height: 46px;
    background: #f53240;
    border: 1px solid #f53240;
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

    .crm-vehicle-search-button:hover:not(:disabled) {
        background: #dc2634;
        border-color: #dc2634;
    }

    .crm-vehicle-search-button:disabled {
        cursor: not-allowed;
        opacity: 0.5;
    }

@media (max-width: 480px) {
    .crm-vehicle-search-page {
        min-height: calc(100vh - 70px);
        padding: 20px;
    }

    .crm-vehicle-search-card {
        width: 100%;
        padding: 22px;
    }
}

.crm-vehicle-card-label {
    display: block;
    margin-bottom: 10px;
    color: #f53240;
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.crm-vehicle-result {
    background: #fff;
    border: 1px solid #d8dce1;
    border-left: 3px solid #f53240;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.07);
}

    .crm-vehicle-result h3 {
        color: #111318;
    }

    .crm-vehicle-result p {
        color: #707680;
    }

    .crm-vehicle-result button {
        background: #f53240;
        border: 1px solid #f53240;
        color: #fff;
    }

        .crm-vehicle-result button:hover {
            background: #dc2634;
            border-color: #dc2634;
        }

/* =========================================================
   VIATURA NÃO ENCONTRADA
   ========================================================= */

body .vehicles-page .vehicle-not-found {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    width: min(100%, 760px);
    margin: 0 auto 28px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #d8dce1;
    border-left: 3px solid #f53240;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.07);
}

body .vehicles-page .vehicle-not-found-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    background: #fff1f2;
    border: 1px solid #f1c4c7;
    border-radius: 10px;
    color: #f53240;
    font-size: 18px;
}

body .vehicles-page .vehicle-not-found > div:nth-child(2) {
    min-width: 0;
}

body .vehicles-page .vehicle-not-found strong {
    display: block;
    color: #111318;
    font-size: 15px;
    font-weight: 800;
}

body .vehicles-page .vehicle-not-found span {
    display: block;
    margin-top: 4px;
    color: #707680;
    font-size: 12px;
    line-height: 1.45;
}

body .vehicles-page .vehicle-not-found button {
    min-height: 42px;
    padding: 0 17px;
    background: #f53240;
    border: 1px solid #f53240;
    border-radius: 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

    body .vehicles-page .vehicle-not-found button:hover {
        background: #dc2634;
        border-color: #dc2634;
    }

@media (max-width: 650px) {
    body .vehicles-page .vehicle-not-found {
        grid-template-columns: 44px minmax(0, 1fr);
        padding: 16px;
    }

    body .vehicles-page .vehicle-not-found-icon {
        width: 44px;
        height: 44px;
    }

    body .vehicles-page .vehicle-not-found button {
        grid-column: 1 / -1;
        width: 100%;
    }
}

.crm-page {
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    background: #f5f6f8;
    color: #17191c;
}

.crm-brand img {
    width: 44px;
    height: 44px;
}

.crm-sidebar {
    position: sticky;
    top: 0;
    width: 270px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 24px 18px;
    overflow-x: hidden;
    overflow-y: auto;
    background: #ffffff;
    border-right: 1px solid #e1e3e6;
    box-shadow: 8px 0 30px rgba(17, 24, 39, 0.04);
    box-sizing: border-box;
}

.crm-sidebar-top {
    flex: 0 0 auto;
}

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

    .crm-brand img {
        display: block;
        width: 54px;
        height: 54px;
        object-fit: contain;
    }

.crm-workshop-name {
    margin-top: 24px;
    padding: 15px 14px;
    background: #f6f7f8;
    border: 1px solid #e1e3e6;
    border-radius: 11px;
}

    .crm-workshop-name small {
        display: block;
        margin-bottom: 5px;
        color: #686e75;
        font-size: 9px;
        font-weight: 900;
        letter-spacing: 2px;
    }

    .crm-workshop-name strong {
        display: block;
        overflow: hidden;
        color: #1b1d20;
        font-size: 13px;
        font-weight: 900;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.crm-menu {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 26px;
}

    .crm-menu a, .crm-sidebar-bottom a, .crm-sidebar-bottom button {
        position: relative;
        min-height: 48px;
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 0 15px;
        border: 0;
        border-radius: 9px;
        background: transparent;
        color: #656b73;
        font-family: inherit;
        font-size: 12px;
        font-weight: 800;
        text-align: left;
        text-decoration: none;
        cursor: pointer;
        transition: background .2s ease, color .2s ease, transform .2s ease;
    }

        .crm-menu a:hover, .crm-sidebar-bottom a:hover, .crm-sidebar-bottom button:hover {
            color: #17191c;
            background: #f3f4f6;
        }

        .crm-menu a.active {
            color: #17191c;
            background: #fff0f1;
        }

            .crm-menu a.active::before {
                content: "";
                position: absolute;
                left: 0;
                top: 12px;
                bottom: 12px;
                width: 3px;
                background: #ef3340;
                border-radius: 0 3px 3px 0;
            }

.crm-menu-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .crm-menu-icon svg {
        width: 18px;
        height: 18px;
        display: block;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.crm-menu a.active .crm-menu-icon {
    color: #ef3340;
}

.crm-menu a.locked {
    color: #a3a7ac;
    cursor: default;
}

    .crm-menu a.locked:hover {
        background: transparent;
        color: #a3a7ac;
    }

.crm-lock {
    margin-left: auto;
    font-size: 10px;
    opacity: .7;
}

.crm-menu-separator {
    height: 1px;
    margin: 12px 6px;
    background: #e6e8ea;
}

.crm-sidebar-bottom {
    flex: 0 0 auto;
    padding-top: 18px;
    border-top: 1px solid #e6e8ea;
}

    .crm-sidebar-bottom a, .crm-sidebar-bottom button {
        width: 100%;
    }

    .crm-sidebar-bottom button {
        margin-top: 4px;
    }

.crm-main {
    min-width: 0;
    min-height: 100dvh;
    padding: 34px 36px 50px;
    background: #f5f6f8;
    box-sizing: border-box;
}

.crm-sidebar::-webkit-scrollbar {
    width: 4px;
}

.crm-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.crm-sidebar::-webkit-scrollbar-thumb {
    background: #d4d7db;
    border-radius: 999px;
}

.crm-stat-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

    .crm-stat-link article {
        height: 100%;
        cursor: pointer;
        transition: transform .2s ease, border-color .2s ease, background .2s ease;
    }

    .crm-stat-link:hover article {
        transform: translateY(-2px);
        border-color: #b9bdc2;
    }

@media (max-width: 1200px) {
    .crm-page {
        grid-template-columns: 235px minmax(0, 1fr);
    }

    .crm-sidebar {
        width: 235px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .crm-main {
        padding-left: 26px;
        padding-right: 26px;
    }
}

@media (max-width: 900px) {
    .crm-page {
        display: block;
    }

    .crm-sidebar {
        position: static;
        width: 100%;
        height: auto;
        padding: 18px;
        border-right: 0;
        border-bottom: 1px solid #e1e3e6;
    }

    .crm-brand img {
        width: 48px;
        height: 48px;
    }

    .crm-workshop-name {
        margin-top: 18px;
    }

    .crm-menu {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 22px;
    }

    .crm-menu-separator {
        display: none;
    }

    .crm-sidebar-bottom {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 7px;
        margin-top: 15px;
    }

    .crm-main {
        padding: 26px 20px 40px;
    }
}

@media (max-width: 650px) {
    .crm-sidebar {
        padding: 15px;
    }

    .crm-menu, .crm-sidebar-bottom {
        grid-template-columns: 1fr;
    }

    .crm-main {
        padding: 22px 14px 36px;
    }
}

.crm-session-loading {
    display: grid;
    width: 100%;
    min-height: 100dvh;
    place-items: center;
    background: #f5f6f8;
    color: #707680;
    font-size: 13px;
}