* {
    box-sizing: border-box;
}

body {
    margin: 0;
}

.lv-auth-body,
.lv-admin-body,
.lv-pedidos-page,
.lv-pedidos-page button,
.lv-pedidos-page input,
.lv-pedidos-page select,
.lv-pedidos-page textarea {
    font-family: Roboto, Arial, sans-serif;
}

.lv-auth-body {
    align-items: center;
    background: #f3f4f6;
    color: #111;
    display: flex;
    min-height: 100vh;
    padding: 24px;
}

.lv-login-shell {
    display: grid;
    margin: 0 auto;
    max-width: 430px;
    width: 100%;
}

.lv-login-panel {
    background: #fff;
    border: 1px solid #e4e4e4;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(17, 17, 17, .10);
    padding: 26px;
}

.lv-login-brand,
.lv-sidebar-brand {
    align-items: center;
    display: flex;
    gap: 10px;
}

.lv-brand-mark {
    align-items: center;
    background: #111;
    border-radius: 6px;
    color: #fed700;
    display: inline-flex;
    font-size: 15px;
    font-weight: 800;
    height: 38px;
    justify-content: center;
    letter-spacing: 0;
    width: 38px;
}

.lv-login-brand strong,
.lv-sidebar-brand strong {
    color: #111;
    display: block;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.1;
}

.lv-login-brand span,
.lv-sidebar-brand span {
    color: #6b7280;
    display: block;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 2px;
    text-transform: uppercase;
}

.lv-login-panel h1 {
    color: #111;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    margin: 28px 0 16px;
}

.lv-form {
    display: grid;
    gap: 13px;
}

.lv-form label {
    color: #333;
    display: grid;
    font-size: 12px;
    font-weight: 800;
    gap: 6px;
    text-transform: uppercase;
}

.lv-form input,
.lv-pedidos-page input,
.lv-pedidos-page select,
.lv-pedidos-page textarea {
    background: #fff;
    border: 1px solid #cfd4dc;
    border-radius: 6px;
    color: #111;
    font-size: 14px;
    min-height: 38px;
    padding: 7px 10px;
}

.lv-form input:focus,
.lv-pedidos-page input:focus,
.lv-pedidos-page select:focus,
.lv-pedidos-page textarea:focus {
    border-color: #111;
    box-shadow: none;
    outline: none;
}

.lv-notice {
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 14px;
    padding: 9px 10px;
}

.lv-notice-error {
    background: #fef3f2;
    border: 1px solid #fecdca;
    color: #b42318;
}

.lv-notice-success {
    background: #ecfdf3;
    border: 1px solid #abefc6;
    color: #067647;
}

.lv-pedidos-action-btn {
    align-items: center;
    background: #111;
    border: 1px solid #111;
    border-radius: 6px;
    box-shadow: none;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    gap: 6px;
    justify-content: center;
    line-height: 1.2;
    min-height: 36px;
    padding: 8px 12px;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
    white-space: nowrap;
}

.lv-pedidos-action-btn:hover,
.lv-pedidos-action-btn:focus,
.lv-pedidos-action-primary {
    background: #fed700;
    border-color: #fed700;
    color: #111;
}

.lv-admin-body {
    --lv-sidebar-width: 245px;
    background: #f3f4f6;
    color: #111;
    min-height: 100vh;
}

.lv-sidebar {
    background: #111318;
    border-right: 1px solid #252932;
    bottom: 0;
    left: 0;
    padding: 18px 12px 74px;
    position: fixed;
    top: 0;
    width: var(--lv-sidebar-width);
    z-index: 90;
}

.lv-sidebar-logout {
    align-items: center;
    border: 1px solid #303540;
    border-radius: 7px;
    bottom: 18px;
    color: #d4d7dd;
    display: flex;
    font-size: 13px;
    font-weight: 800;
    gap: 9px;
    left: 12px;
    min-height: 38px;
    padding: 9px 12px;
    position: absolute;
    right: 12px;
    text-decoration: none;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}

.lv-sidebar-logout::before {
    content: "\2192";
    font-size: 18px;
    line-height: 1;
}

.lv-sidebar-logout:hover,
.lv-sidebar-logout:focus-visible {
    background: #1b1e24;
    border-color: #fed700;
    color: #fed700;
}

.lv-sidebar-resizer {
    bottom: 0;
    cursor: col-resize;
    position: absolute;
    right: -5px;
    top: 0;
    touch-action: none;
    width: 10px;
    z-index: 98;
}

.lv-sidebar-resizer.lv-redimensionando {
    z-index: 110;
}

.lv-sidebar-resizer::after {
    background: transparent;
    bottom: 0;
    content: "";
    left: 4px;
    position: absolute;
    top: 0;
    transition: background .15s ease;
    width: 2px;
}

.lv-sidebar-resizer:hover::after,
.lv-sidebar-resizer.lv-redimensionando::after {
    background: #fed700;
}

.lv-admin-body.lv-sidebar-redimensionando {
    cursor: col-resize;
    user-select: none;
}

.lv-sidebar .lv-sidebar-brand strong {
    color: #fff;
}

.lv-sidebar .lv-sidebar-brand span:not(.lv-brand-mark) {
    color: #9299a6;
}

.lv-sidebar-nav {
    display: grid;
    gap: 10px;
    margin-top: 26px;
}

.lv-sidebar-nav a {
    align-items: center;
    border-radius: 6px;
    color: #d4d7dd;
    display: flex;
    font-size: 13px;
    font-weight: 800;
    gap: 8px;
    min-height: 34px;
    padding: 9px 10px;
    position: relative;
    text-decoration: none;
    transition: background .15s ease, color .15s ease, padding-left .15s ease;
}

.lv-sidebar-nav a:hover,
.lv-sidebar-nav a.ativo {
    background: transparent;
    color: #fed700;
}

.lv-sidebar-group {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    display: block;
    padding: 7px;
    position: relative;
}

.lv-sidebar-group-title {
    align-items: center;
    color: #b6bbc5;
    display: flex;
    font-size: 11px;
    font-weight: 800;
    gap: 7px;
    letter-spacing: 0;
    min-height: 26px;
    padding: 4px 8px 6px;
    text-transform: uppercase;
}

.lv-sidebar-group-title[role="button"] {
    cursor: pointer;
}

.lv-sidebar-group-title[role="button"]:focus-visible {
    border-radius: 5px;
    outline: 2px solid #fed700;
    outline-offset: 2px;
}

.lv-sidebar-group-title::after {
    border-right: 2px solid currentColor;
    border-top: 2px solid currentColor;
    content: "";
    height: 6px;
    margin-left: auto;
    transform: rotate(45deg);
    width: 6px;
}

.lv-sidebar-group.lv-menu-aberto .lv-sidebar-group-title::after {
    transform: rotate(135deg);
}

.lv-sidebar-group-title.ativo {
    color: #fed700;
}

.lv-sidebar-group::after {
    background: #111318;
    border: 1px solid #303540;
    border-radius: 0 9px 9px 0;
    box-shadow: 12px 14px 30px rgba(0, 0, 0, .30);
    content: "";
    left: calc(100% - 1px);
    opacity: 0;
    pointer-events: none;
    position: absolute;
    top: -7px;
    transform: translateX(-8px);
    transition: opacity .16s ease, transform .16s ease;
    visibility: hidden;
    width: 222px;
    z-index: 99;
}

.lv-sidebar-group:has(a:nth-of-type(1))::after { height: 48px; }
.lv-sidebar-group:has(a:nth-of-type(2))::after { height: 84px; }
.lv-sidebar-group:has(a:nth-of-type(3))::after { height: 120px; }
.lv-sidebar-group:has(a:nth-of-type(4))::after { height: 156px; }
.lv-sidebar-group:has(a:nth-of-type(5))::after { height: 192px; }
.lv-sidebar-group:has(a:nth-of-type(6))::after { height: 228px; }

.lv-sidebar-group:hover::after,
.lv-sidebar-group:focus-within::after,
.lv-sidebar-group.lv-menu-aberto::after {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    visibility: visible;
}

.lv-sidebar-group-title::before {
    background: #fed700;
    border-radius: 999px;
    content: "";
    display: inline-block;
    height: 7px;
    width: 7px;
}

.lv-sidebar-main-link {
    background: transparent;
    border: 1px solid transparent;
}

.lv-sidebar-main-link.ativo::before {
    background: #fed700;
    border-radius: 0 999px 999px 0;
    bottom: 8px;
    content: "";
    left: 0;
    position: absolute;
    top: 8px;
    width: 4px;
}

.lv-sidebar-nav a.lv-sidebar-subitem {
    background: transparent;
    border: 1px solid transparent;
    box-shadow: none;
    font-size: 12px;
    font-weight: 700;
    left: 100%;
    min-height: 32px;
    opacity: 0;
    padding: 8px 9px 8px 22px;
    pointer-events: none;
    position: absolute;
    top: 0;
    transform: translateX(-8px);
    transition: opacity .16s ease, transform .16s ease, background .15s ease;
    visibility: hidden;
    width: 215px;
    z-index: 100;
}

.lv-sidebar-group a.lv-sidebar-subitem:nth-of-type(2) { top: 36px; }
.lv-sidebar-group a.lv-sidebar-subitem:nth-of-type(3) { top: 72px; }
.lv-sidebar-group a.lv-sidebar-subitem:nth-of-type(4) { top: 108px; }
.lv-sidebar-group a.lv-sidebar-subitem:nth-of-type(5) { top: 144px; }
.lv-sidebar-group a.lv-sidebar-subitem:nth-of-type(6) { top: 180px; }

.lv-sidebar-group:hover .lv-sidebar-subitem,
.lv-sidebar-group:focus-within .lv-sidebar-subitem,
.lv-sidebar-group.lv-menu-aberto .lv-sidebar-subitem {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    visibility: visible;
}

.lv-sidebar-nav a.lv-sidebar-subitem::before {
    background: #cfd4dc;
    border-radius: 999px;
    content: "";
    height: 5px;
    left: 10px;
    position: absolute;
    width: 5px;
}

.lv-sidebar-nav a.lv-sidebar-subitem:hover {
    background: transparent;
    border-color: transparent;
    color: #fed700;
    padding-left: 24px;
}

.lv-sidebar-nav a.lv-sidebar-subitem:hover::before {
    background: #fed700;
}

.lv-admin-main {
    margin-left: var(--lv-sidebar-width);
    padding: 18px 22px 32px;
}

.lv-pedidos-page {
    max-width: 1680px;
}

.lv-pedidos-lista-page {
    color: #111;
}

.lv-pedidos-lista-topo {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin: 0 0 14px;
}

.lv-pedidos-lista-topo h1 {
    color: #111;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
}

.lv-page-subtitle {
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
    margin: 5px 0 0;
}

.lv-pedidos-lista-acoes {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.lv-pedidos-back-btn {
    align-items: center;
    background: #fff;
    border: 1px solid #d9dde3;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(17, 17, 17, .04);
    color: #374151;
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    gap: 7px;
    justify-content: center;
    line-height: 1.2;
    min-height: 36px;
    padding: 8px 12px;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
    white-space: nowrap;
}

.lv-pedidos-back-btn:hover,
.lv-pedidos-back-btn:focus {
    background: #111;
    border-color: #111;
    color: #fed700;
    outline: none;
    transform: translateY(-1px);
}

.lv-pedidos-lista-tabs-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 10px;
}

.lv-pedidos-periodo-toggle,
.lv-pedidos-status-toggle {
    align-items: center;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    color: #111;
    cursor: pointer;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    gap: 6px;
    min-height: 34px;
    padding: 7px 12px;
}

.lv-pedidos-periodo-toggle:hover,
.lv-pedidos-periodo-toggle.ativo,
.lv-pedidos-status-toggle:hover {
    background: #111;
    border-color: #111;
    color: #fed700;
}

.lv-status-dot {
    background: #9ca3af;
    border-radius: 999px;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .35);
    display: inline-block;
    height: 9px;
    width: 9px;
}

.lv-pedidos-filtros {
    align-items: center;
    display: flex;
    gap: 8px;
    margin: 10px 0;
}

.lv-pedidos-busca-wrap {
    align-items: center;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(17, 17, 17, .04);
    color: #777;
    display: flex;
    font-size: 12px;
    font-weight: 800;
    gap: 8px;
    max-width: 520px;
    min-height: 38px;
    padding: 0 12px;
    text-transform: uppercase;
    width: 100%;
}

.lv-pedidos-busca-wrap input[type="search"] {
    background: transparent;
    border: 0;
    box-shadow: none;
    min-width: 0;
    padding: 0;
    text-transform: none;
    width: 100%;
}

.lv-pedidos-lista-totais {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    margin: 12px 0;
}

.lv-pedidos-total-card {
    background: #fff;
    border: 1px solid #e4e4e4;
    border-left: 5px solid #111;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(17, 17, 17, .04);
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 58px;
    padding: 12px 14px;
}

.lv-pedidos-total-card span {
    color: #666;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.lv-pedidos-total-card strong {
    color: #111;
    font-size: 20px;
    line-height: 1.15;
}

.lv-pedidos-total-card.total-valor {
    border-left-color: #fed700;
}

.lv-pedidos-table-container {
    background: #fff;
    border: 1px solid #e4e4e4;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(17, 17, 17, .04);
    overflow: auto;
    padding: 10px;
}

.lv-pedidos-table {
    border-collapse: collapse;
    border-spacing: 0;
    width: 100%;
}

.lv-pedidos-table th {
    background: #f3f4f6;
    border-bottom: 1px solid #d9dde3;
    color: #374151;
    font-size: 12px;
    font-weight: 800;
    padding: 10px 8px;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.lv-pedidos-table td {
    border-bottom: 1px solid #eee;
    color: #222;
    padding: 12px 8px;
    vertical-align: middle;
}

.lv-empty-row {
    color: #6b7280;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

.lv-pedidos-table tbody tr[data-edit-url] {
    cursor: pointer;
}

.lv-pedidos-table tbody tr[data-edit-url]:hover {
    background: #fff8cc;
}

.lv-status-pill {
    align-items: center;
    background: #f3f4f6;
    border: 1px solid var(--lv-status-color, #9ca3af);
    border-radius: 999px;
    color: #111;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    min-height: 24px;
    padding: 4px 9px;
    white-space: nowrap;
}

.lv-pedidos-header {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin: 0 0 18px;
}

.lv-pedidos-header h1 {
    color: #111;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
}

.lv-pedidos-header-actions {
    align-items: center;
    display: flex;
    gap: 8px;
}

.lv-pedido-grid {
    align-items: start;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) 320px;
}

.lv-pedido-main,
.lv-pedido-side {
    display: grid;
    gap: 14px;
}

.lv-card {
    background: #fff;
    border: 1px solid #d9dde3;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(17, 17, 17, .04);
    overflow: visible;
}

.lv-card > h2,
.lv-card-title-row {
    align-items: center;
    background: #f3f4f6;
    border-bottom: 1px solid #d9dde3;
    border-radius: 8px 8px 0 0;
    color: #111;
    display: flex;
    font-size: 14px;
    font-weight: 800;
    justify-content: space-between;
    line-height: 1.3;
    margin: 0;
    min-height: 44px;
    padding: 11px 12px;
    text-transform: uppercase;
}

.lv-card-title-row h2 {
    font-size: 14px;
    margin: 0;
}

.lv-card .button,
.button {
    align-items: center;
    background: #fff;
    border: 1px solid #d9dde3;
    border-radius: 6px;
    color: #374151;
    cursor: pointer;
    display: inline-flex;
    font-size: 13px;
    font-weight: 800;
    justify-content: center;
    min-height: 34px;
    padding: 7px 10px;
    text-decoration: none;
}

.lv-add-card-btn {
    background: #111 !important;
    border-color: #111 !important;
    color: #fff !important;
}

.lv-add-card-btn:hover,
.lv-add-card-btn:focus {
    background: #fed700 !important;
    border-color: #fed700 !important;
    color: #111 !important;
}

.lv-fields {
    display: grid;
    gap: 10px;
    padding: 12px;
}

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

.lv-fields-cliente {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.lv-fields-cliente > label:nth-child(1) { grid-column: span 5; }
.lv-fields-cliente > label:nth-child(2) { grid-column: span 3; }
.lv-fields-cliente > label:nth-child(3) { grid-column: span 4; }
.lv-fields-cliente > label:nth-child(4) { grid-column: span 3; }
.lv-fields-cliente > label:nth-child(5) { grid-column: span 4; }
.lv-fields-cliente > label:nth-child(6) { grid-column: span 5; }
.lv-fields-cliente > label:nth-child(7) { grid-column: span 2; }
.lv-fields-cliente > label:nth-child(8) { grid-column: span 8; }
.lv-fields-cliente > label:nth-child(9) { grid-column: span 2; }
.lv-fields-cliente > label:nth-child(10) { grid-column: span 3; }
.lv-fields-cliente > label:nth-child(11) { grid-column: span 4; }
.lv-fields-cliente > label:nth-child(12) { grid-column: span 3; }
.lv-fields-cliente > label:nth-child(13) { grid-column: span 2; }

.lv-fields-transportador {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.lv-fields-transportador > label:nth-child(1) { grid-column: span 2; }
.lv-fields-transportador > label:nth-child(3) { grid-column: span 3; }
.lv-fields-transportador > label:nth-child(4) { grid-column: span 2; }

.lv-fields-nf {
    grid-template-columns: minmax(90px, .55fr) minmax(62px, .35fr) minmax(190px, 1.2fr) minmax(260px, 1.9fr);
}

.lv-card label,
.lv-totais-card label {
    color: #333;
    display: grid;
    font-size: 12px;
    font-weight: 800;
    gap: 5px;
    text-transform: uppercase;
}

.lv-card input,
.lv-card select,
.lv-card textarea {
    background-color: #f9fafb;
    border: 1px solid #cfd4dc;
    border-radius: 6px;
    box-sizing: border-box;
    color: #111;
    font-size: 13px;
    min-height: 36px;
    padding: 7px 9px;
    width: 100%;
}

.lv-cep-field {
    align-items: stretch;
    display: flex;
    width: 100%;
}

.lv-card .lv-cep-field input {
    border-radius: 6px 0 0 6px;
    min-width: 0;
}

.lv-cep-search-btn {
    align-items: center;
    background: #111;
    border: 1px solid #111;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 38px;
    justify-content: center;
    min-height: 36px;
    position: relative;
}

.lv-cep-search-btn::before {
    border: 2px solid #fed700;
    border-radius: 999px;
    content: "";
    height: 12px;
    width: 12px;
}

.lv-cep-search-btn::after {
    background: #fed700;
    content: "";
    height: 2px;
    position: absolute;
    right: 10px;
    top: 23px;
    transform: rotate(45deg);
    width: 8px;
}

.lv-cep-search-btn:hover,
.lv-cep-search-btn:focus {
    background: #fed700;
    border-color: #fed700;
    outline: none;
}

.lv-cep-search-btn:hover::before,
.lv-cep-search-btn:focus::before {
    border-color: #111;
}

.lv-cep-search-btn:hover::after,
.lv-cep-search-btn:focus::after {
    background: #111;
}

.lv-cep-search-btn.carregando {
    cursor: wait;
    opacity: .72;
}

.lv-card textarea {
    min-height: 110px;
    resize: vertical;
}

.lv-status-select {
    position: relative;
    text-transform: none;
}

.lv-status-select-button {
    align-items: center;
    background-color: #f9fafb;
    border: 1px solid #cfd4dc;
    border-radius: 6px;
    box-sizing: border-box;
    color: #111;
    cursor: pointer;
    display: flex;
    font-size: 13px;
    gap: 9px;
    min-height: 36px;
    padding: 7px 34px 7px 9px;
    position: relative;
    text-align: left;
    width: 100%;
}

.lv-status-select-button:focus,
.lv-status-select.aberto .lv-status-select-button {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, .12);
    outline: none;
}

.lv-status-select-dot {
    background: var(--lv-status-color, #9ca3af);
    border: 2px solid #fff;
    border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(17, 24, 39, .2);
    flex: 0 0 auto;
    height: 16px;
    width: 16px;
}

.lv-status-select-dot-empty {
    background: #cfd4dc;
}

.lv-status-select-arrow {
    border-bottom: 2px solid #111;
    border-right: 2px solid #111;
    height: 8px;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-62%) rotate(45deg);
    width: 8px;
}

.lv-status-select-menu {
    background: #fff;
    border: 1px solid #d9dde3;
    border-radius: 8px;
    box-shadow: 0 14px 30px rgba(17, 24, 39, .16);
    display: none;
    left: 0;
    max-height: none;
    overflow: visible;
    padding: 6px;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 30;
}

.lv-status-select.aberto .lv-status-select-menu {
    display: grid;
    gap: 2px;
}

.lv-status-select-option {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 7px;
    color: #111;
    cursor: pointer;
    display: flex;
    font-size: 13px;
    gap: 9px;
    min-height: 34px;
    padding: 7px 9px;
    text-align: left;
    width: 100%;
}

.lv-status-select-option:hover,
.lv-status-select-option:focus,
.lv-status-select-option.ativo {
    background: #f1f2f4;
    outline: none;
}

.lv-pedidos-dia-picker {
    position: relative;
}

.lv-pedido-date-picker {
    display: block;
}

.lv-pedidos-periodo-toggle {
    align-items: center;
    background-color: #f9fafb;
    border: 1px solid #cfd4dc;
    border-radius: 6px;
    box-sizing: border-box;
    color: #111;
    cursor: pointer;
    display: inline-flex;
    font-size: 13px;
    gap: 8px;
    justify-content: flex-start;
    min-height: 36px;
    padding: 7px 9px;
    text-align: left;
    width: 100%;
}

.lv-pedidos-periodo-toggle:hover,
.lv-pedidos-periodo-toggle:focus,
.lv-pedidos-periodo-toggle.ativo,
.lv-pedidos-dia-picker.aberto .lv-pedidos-periodo-toggle {
    border-color: #111;
    box-shadow: 0 0 0 3px rgba(17, 17, 17, .08);
    outline: none;
}

.lv-calendar-icon {
    border: 2px solid currentColor;
    border-radius: 4px;
    flex: 0 0 auto;
    height: 15px;
    position: relative;
    width: 15px;
}

.lv-calendar-icon::before {
    background: currentColor;
    content: "";
    height: 2px;
    left: -2px;
    position: absolute;
    right: -2px;
    top: 3px;
}

.lv-pedidos-periodo-popover {
    background: #fff;
    border: 1px solid #d9dde3;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(17, 17, 17, .14);
    display: none;
    left: 0;
    padding: 12px;
    position: absolute;
    top: calc(100% + 8px);
    width: 270px;
    z-index: 100;
}

.lv-pedidos-dia-picker.aberto .lv-pedidos-periodo-popover {
    display: block;
}

.lv-picker-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.lv-picker-header strong {
    color: #111;
    font-size: 14px;
    text-transform: capitalize;
}

.lv-picker-nav {
    align-items: center;
    background: #f5f5f5;
    border: 1px solid #e4e4e4;
    border-radius: 6px;
    color: #111;
    cursor: pointer;
    display: inline-flex;
    height: 28px;
    justify-content: center;
    padding: 0;
    width: 28px;
}

.lv-picker-nav:hover,
.lv-picker-nav:focus {
    background: #fed700;
    border-color: #fed700;
    outline: none;
}

.lv-picker-weekdays,
.lv-picker-grid {
    display: grid;
    gap: 4px;
    grid-template-columns: repeat(7, 1fr);
}

.lv-picker-weekdays {
    color: #666;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 6px;
    text-align: center;
}

.lv-picker-day,
.lv-picker-empty {
    align-items: center;
    border-radius: 6px;
    display: inline-flex;
    height: 30px;
    justify-content: center;
}

.lv-picker-day {
    background: #fff;
    border: 1px solid #ececec;
    color: #111;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.lv-picker-day:hover,
.lv-picker-day:focus,
.lv-picker-day.ativo {
    background: #111;
    border-color: #111;
    color: #fed700;
    outline: none;
}

.lv-picker-day.hoje:not(.ativo) {
    border-color: #fed700;
    box-shadow: inset 0 0 0 1px #fed700;
}

.lv-card input[readonly] {
    background: #f3f4f6;
    color: #6b7280;
}

.lv-card-padding {
    padding: 12px;
}

.lv-itens {
    display: grid;
    gap: 8px;
    padding: 12px;
}

.lv-itens-actions {
    border-top: 1px solid #edf0f3;
    display: flex;
    justify-content: flex-start;
    padding: 0 12px 12px;
}

.lv-item-row {
    align-items: center;
    display: grid;
    gap: 6px;
    grid-template-columns: 28px 50px minmax(220px, 1fr) 110px 70px 92px 100px minmax(120px, .7fr) 34px;
}

.lv-item-drag-handle {
    align-items: center;
    background: #f3f4f6;
    border: 1px solid #d9dde3;
    border-radius: 6px;
    color: #6b7280;
    display: inline-flex;
    height: 34px;
    justify-content: center;
}

.lv-item-img {
    background-color: #f6f7f7;
    background-position: center;
    background-size: cover;
    border: 1px solid #d9dde3;
    border-radius: 6px;
    height: 42px;
    width: 50px;
}

.lv-icon-delete {
    align-items: center;
    background: #fff1f1;
    border: 1px solid #ffd6d6;
    border-radius: 8px;
    color: #c92a2a;
    cursor: pointer;
    display: inline-flex;
    font-size: 20px;
    font-weight: 800;
    height: 34px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 34px;
}

.lv-icon-delete:hover {
    background: #c92a2a;
    border-color: #c92a2a;
    color: #fff;
}

.lv-actions-card {
    padding: 12px;
}

.lv-save-pedido-btn {
    width: 100%;
}

.lv-totais-card {
    display: grid;
    gap: 10px;
    padding: 0 12px 12px;
}

.lv-totais-card h2 {
    margin-left: -12px;
    margin-right: -12px;
}

.lv-discount-row {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) 80px;
}

.lv-pagamento-card {
    overflow: visible;
}

#lv-pagamentos {
    display: grid;
    gap: 10px;
    padding: 12px;
}

.lv-pagamento-row {
    background: #fff;
    border: 1px solid #e7e7e7;
    border-left: 5px solid #4fb861;
    border-radius: 8px;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) 42px;
    padding: 10px;
}

.lv-pagamento-row > input,
.lv-pagamento-row > label,
.lv-pagamento-row > textarea {
    grid-column: 1;
}

.lv-pagamento-row .lv-icon-delete {
    grid-column: 2;
    grid-row: 1;
}

.lv-cadastros-grid {
    display: block;
}

.lv-cadastros-grid-wide {
    display: block;
}

.lv-page-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.lv-cadastro-drawer-overlay {
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity .18s ease;
    z-index: 100;
}

.lv-cadastro-drawer-overlay.ativo {
    opacity: 1;
    pointer-events: auto;
}

.lv-cadastro-drawer-backdrop {
    background: rgba(17, 24, 39, .38);
    display: block;
    inset: 0;
    position: fixed;
}

.lv-cadastro-drawer {
    background: #f5f6f8;
    border-right: 1px solid #d9dde3;
    box-shadow: 14px 0 34px rgba(17, 24, 39, .18);
    display: flex;
    flex-direction: column;
    height: 100vh;
    left: 0;
    max-width: min(520px, 92vw);
    overflow: hidden;
    position: fixed;
    top: 0;
    transform: translateX(-18px);
    transition: transform .18s ease;
    width: 440px;
    z-index: 1;
}

.lv-cadastro-drawer-overlay.ativo .lv-cadastro-drawer {
    transform: translateX(0);
}

.lv-cadastro-page-mode .lv-cadastros-grid,
.lv-cadastro-page-mode .lv-cadastros-grid-wide {
    display: block;
    width: 100%;
}

.lv-cadastro-page-mode .lv-pedidos-lista-topo .lv-pedidos-action-primary {
    display: none;
}

.lv-cadastro-page-mode .lv-cadastro-drawer-overlay {
    background: transparent;
    opacity: 1;
    pointer-events: auto;
    position: static;
}

.lv-cadastro-page-mode .lv-cadastro-drawer-backdrop,
.lv-cadastro-page-mode .lv-pedidos-table-container {
    display: none;
}

.lv-cadastro-page-mode .lv-cadastro-drawer {
    border: 1px solid #d9dde3;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(17, 24, 39, .08);
    height: auto;
    max-width: 100%;
    position: static;
    transform: none;
    width: 100%;
}

.lv-cadastro-page-mode .lv-cadastro-form {
    overflow-y: visible;
    padding-bottom: 28px;
}

.lv-cadastro-drawer-header {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #d9dde3;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    min-height: 64px;
    padding: 14px 16px;
}

.lv-cadastro-drawer-header h2 {
    color: #111;
    font-size: 18px;
    line-height: 1.2;
    margin: 0;
}

.lv-cadastro-form {
    display: grid;
    flex: 1;
    gap: 12px;
    overflow-y: auto;
    padding: 16px;
}

.lv-cadastro-form label {
    color: #333;
    display: grid;
    font-size: 12px;
    font-weight: 800;
    gap: 5px;
    text-transform: uppercase;
}

.lv-cadastro-form input[type="text"],
.lv-cadastro-form input[type="number"],
.lv-cadastro-form input[type="email"],
.lv-cadastro-form input[type="url"],
.lv-cadastro-form select,
.lv-cadastro-form textarea {
    background: #fff;
    border: 1px solid #cfd4dc;
    border-radius: 6px;
    color: #111;
    font-size: 13px;
    min-height: 36px;
    padding: 7px 9px;
    width: 100%;
}

.lv-cadastro-form textarea {
    min-height: 110px;
    resize: vertical;
}

.lv-cadastro-form input[type="color"] {
    border: 1px solid #cfd4dc;
    border-radius: 6px;
    cursor: pointer;
    height: 36px;
    padding: 3px;
    width: 76px;
}

.lv-cadastro-check {
    align-items: center;
    display: flex !important;
    flex-direction: row;
    gap: 8px !important;
    text-transform: none !important;
}

.lv-cadastro-check input {
    width: auto;
}

.lv-cadastro-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.lv-cadastro-color {
    background: var(--lv-cadastro-color, #9ca3af);
    border-radius: 999px;
    display: inline-block;
    height: 14px;
    margin: 0 8px 0 0;
    vertical-align: middle;
    width: 14px;
}

.lv-cadastro-inativo {
    opacity: .58;
}

.lv-cadastro-row-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    white-space: nowrap;
}

.lv-icon-action {
    align-items: center;
    background: #fff;
    border: 1px solid #d9dde3;
    border-radius: 6px;
    color: #4b5563;
    cursor: pointer;
    display: inline-flex;
    height: 32px;
    justify-content: center;
    padding: 0;
    text-decoration: none;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
    width: 32px;
}

.lv-icon-action svg {
    display: block;
    fill: currentColor;
    height: 17px;
    width: 17px;
}

.lv-icon-action:hover {
    background: #fff7d6;
    border-color: #e5c44a;
    color: #8a7100;
    transform: translateY(-1px);
}

.lv-icon-action-danger {
    color: #b42318;
}

.lv-icon-action-danger:hover {
    background: #fff1f0;
    border-color: #f1a7a0;
    color: #7a271a;
}

.lv-inline-form {
    display: inline;
    margin: 0;
}

.lv-financeiro-filtros { align-items: end; display: grid; grid-template-columns: 110px 100px 150px 150px minmax(220px,1fr) auto; }
.lv-financeiro-filtros label { color:#333; display:grid; font-size:11px; font-weight:800; gap:5px; text-transform:uppercase; }
.lv-financeiro-filtros .button { min-height:38px; }
.lv-fin-receita strong,.lv-fin-valor.receita,.lv-fin-saldo strong { color:#067647; }
.lv-fin-despesa strong,.lv-fin-valor.despesa,.lv-fin-negativo strong { color:#b42318; }
.lv-fin-valor { font-size:14px; font-weight:800; white-space:nowrap; }
.lv-fin-tipo,.lv-fin-status { border-radius:999px; display:inline-flex; font-size:11px; font-weight:800; padding:5px 8px; }
.lv-fin-tipo.receita { background:#ecfdf3; color:#067647; }
.lv-fin-tipo.despesa { background:#fef3f2; color:#b42318; }
.lv-fin-status { background:#f3f4f6; color:#4b5563; }
.lv-fin-status.status-pago { background:#ecfdf3; color:#067647; }
.lv-fin-status.status-atrasado { background:#fef3f2; color:#b42318; }
.lv-fin-status.status-em-aberto { background:#fffaeb; color:#b54708; }
.lv-fin-form-grid { display:grid; gap:12px; grid-template-columns:1fr 1fr; }
.lv-painel-filtros {
    align-items: center;
    background: #fff;
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(17, 24, 39, .05);
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(280px, 1.7fr) minmax(155px, .75fr) minmax(175px, .85fr) 145px 145px auto auto;
    margin: 10px 0 14px;
    padding: 10px;
}

.lv-painel-filtros .lv-pedidos-busca-wrap {
    background: #f8f9fb;
    border-color: #d7dce3;
    border-radius: 7px;
    max-width: none;
    min-height: 40px;
}

.lv-painel-filtros .lv-pedidos-busca-wrap:focus-within {
    background: #fff;
    border-color: #111;
}

.lv-painel-filtros .lv-pedidos-busca-wrap input {
    background: transparent;
    border: 0;
    box-shadow: none;
    min-height: 36px;
    padding-left: 0;
    width: 100%;
}

.lv-painel-filtros > select,
.lv-painel-filtros > input[type="date"] {
    background-color: #f8f9fb;
    border: 1px solid #d7dce3;
    border-radius: 7px;
    color: #252a32;
    font-size: 12px;
    font-weight: 700;
    min-height: 40px;
    padding: 7px 9px;
    width: 100%;
}

.lv-painel-filtros > select:hover,
.lv-painel-filtros > input[type="date"]:hover {
    background-color: #fff;
    border-color: #aeb5c0;
}

.lv-painel-filtros > select:focus,
.lv-painel-filtros > input[type="date"]:focus {
    background-color: #fff;
    border-color: #111;
    box-shadow: none;
    outline: none;
}

.lv-painel-filtros > .button,
.lv-painel-filtros > .lv-pedidos-action-btn {
    min-height: 40px;
    white-space: nowrap;
}

.lv-painel-filtros > .button {
    background: #111318;
    border-color: #111318;
    color: #fed700;
}

.lv-painel-filtros > .button:hover {
    background: #fed700;
    border-color: #fed700;
    color: #111;
}

.lv-painel-date-filters {
    gap: 9px;
    margin-bottom: 12px;
}

.lv-painel-date-form {
    margin: 0;
}

.lv-painel-date-picker {
    display: block;
}

.lv-painel-date-picker > .lv-pedidos-periodo-toggle {
    background: #fff;
    border: 1px solid #d7dce3;
    border-left: 4px solid #111318;
    border-radius: 8px;
    box-shadow: 0 2px 7px rgba(17, 24, 39, .05);
    color: #111;
    gap: 10px;
    min-height: 48px;
    min-width: 205px;
    padding: 7px 12px 7px 10px;
    position: relative;
}

.lv-painel-date-form:nth-child(2) .lv-pedidos-periodo-toggle {
    border-left-color: #fed700;
}

.lv-painel-date-picker > .lv-pedidos-periodo-toggle > span:nth-child(2) {
    display: grid;
    gap: 2px;
    text-align: left;
}

.lv-painel-date-picker .lv-pedidos-periodo-toggle small {
    color: #737b88;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.lv-painel-date-picker .lv-pedidos-periodo-toggle strong {
    color: #111;
    font-size: 13px;
}

.lv-painel-date-picker > .lv-pedidos-periodo-toggle i {
    border-bottom: 2px solid #6b7280;
    border-right: 2px solid #6b7280;
    height: 7px;
    margin-left: auto;
    transform: rotate(45deg) translateY(-2px);
    width: 7px;
}

.lv-painel-date-picker > .lv-pedidos-periodo-toggle:hover,
.lv-painel-date-picker > .lv-pedidos-periodo-toggle.ativo,
.lv-painel-date-picker.aberto > .lv-pedidos-periodo-toggle {
    background: #fff;
    border-color: #111;
    color: #111;
    transform: translateY(-1px);
}

.lv-painel-date-picker .lv-pedidos-periodo-popover {
    z-index: 120;
}

.lv-picker-clear {
    background: #f5f6f8;
    border: 1px solid #d9dde3;
    border-radius: 6px;
    color: #4b5563;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    margin-top: 10px;
    min-height: 32px;
    width: 100%;
}

.lv-picker-clear:hover {
    background: #111318;
    border-color: #111318;
    color: #fed700;
}

.lv-search-symbol {
    align-items: center;
    color: #737b88;
    display: inline-flex;
    font-size: 21px;
    justify-content: center;
    width: 19px;
}
.lv-painel-pedidos-table thead a { color:inherit; text-decoration:none; }
.lv-painel-pedidos-table .row-title { color:#111; font-size:14px; font-weight:800; text-decoration:none; }
.lv-lista-marcadores { min-width:120px; }
.lv-tag-chip { background:color-mix(in srgb,var(--lv-tag-color,#111) 14%,white); border:1px solid color-mix(in srgb,var(--lv-tag-color,#111) 40%,white); border-radius:999px; color:#374151; display:inline-flex; font-size:11px; font-weight:800; margin:2px; padding:4px 7px; }
.lv-valor-pago { color:#067647 !important; }
.lv-valor-restante { color:#b54708 !important; }
.lv-painel-totais-rodape { margin-top:14px; }
.lv-limpar-filtros-btn { background:#fff; border-color:#d9dde3; color:#374151; }

@media (max-width: 1380px) {
    .lv-painel-filtros {
        grid-template-columns: minmax(260px, 1.5fr) repeat(2, minmax(145px, .75fr)) repeat(2, 140px) auto;
    }

    .lv-painel-filtros .lv-limpar-filtros-btn {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

@media (max-width: 900px) {
    .lv-painel-filtros {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lv-painel-filtros .lv-pedidos-busca-wrap {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .lv-painel-filtros {
        grid-template-columns: 1fr;
    }

    .lv-painel-filtros .lv-pedidos-busca-wrap,
    .lv-painel-filtros .lv-limpar-filtros-btn {
        grid-column: auto;
        width: 100%;
    }
}
.lv-cadastro-form label:has(input[name="bandeira"]) { display:none; }
.lv-fin-cadastro-cartoes .lv-pedidos-table th:nth-child(2),
.lv-fin-cadastro-cartoes .lv-pedidos-table td:nth-child(2) { display:none; }

@media (max-width: 960px) {
    .lv-financeiro-filtros { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .lv-sidebar {
        border-bottom: 1px solid #d9dde3;
        border-right: 0;
        padding-bottom: 18px;
        position: static;
        width: 100%;
    }

    .lv-sidebar-logout {
        margin-top: 14px;
        position: static;
        width: 100%;
    }

    .lv-sidebar-resizer {
        display: none;
    }

    .lv-sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 14px;
    }

    .lv-sidebar-group {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        margin-top: 0;
        padding: 6px;
    }

    .lv-sidebar-group-title::after {
        display: none;
    }

    .lv-sidebar-group::after {
        display: none;
    }

    .lv-sidebar-group-title {
        align-items: center;
        display: inline-flex;
        padding: 6px 8px;
    }

    .lv-sidebar-nav a.lv-sidebar-subitem {
        box-shadow: none;
        left: auto;
        opacity: 1;
        padding-left: 20px;
        pointer-events: auto;
        position: relative;
        top: auto;
        transform: none;
        visibility: visible;
        width: auto;
    }

    .lv-sidebar-group a.lv-sidebar-subitem:nth-of-type(n) {
        top: auto;
    }

    .lv-admin-main {
        margin-left: 0;
        padding: 16px;
    }

    .lv-pedidos-lista-topo,
    .lv-pedidos-filtros {
        align-items: stretch;
        flex-direction: column;
    }

    .lv-pedidos-lista-acoes {
        justify-content: flex-start;
    }

    .lv-pedidos-lista-totais {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lv-pedido-grid {
        grid-template-columns: 1fr;
    }

    .lv-fields-4,
    .lv-fields-cliente,
    .lv-fields-transportador,
    .lv-fields-nf,
    .lv-cadastros-grid {
        grid-template-columns: 1fr;
    }

    .lv-fields-cliente > label:nth-child(n),
    .lv-fields-transportador > label:nth-child(n) {
        grid-column: auto;
    }

    .lv-item-row {
        grid-template-columns: 28px 50px minmax(180px, 1fr) 100px 60px 84px 92px 34px;
    }

    .lv-item-row input[name*="[observacoes]"] {
        grid-column: 3 / -2;
    }
}

@media (max-width: 620px) {
    .lv-auth-body {
        padding: 14px;
    }

    .lv-login-panel {
        padding: 20px;
    }

    .lv-pedidos-lista-topo h1 {
        font-size: 22px;
    }

    .lv-pedidos-lista-acoes,
    .lv-pedidos-lista-tabs-row {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .lv-pedidos-action-btn,
    .lv-pedidos-back-btn,
    .lv-pedidos-periodo-toggle,
    .lv-pedidos-status-toggle {
        width: 100%;
    }

    .lv-pedidos-lista-totais {
        grid-template-columns: 1fr;
    }

    .lv-pedidos-header {
        align-items: stretch;
        flex-direction: column;
    }

    .lv-item-row {
        align-items: stretch;
        display: grid;
        grid-template-columns: 58px minmax(0, 1fr) minmax(0, 1fr);
        position: relative;
    }

    .lv-item-drag-handle {
        display: none;
    }

    .lv-item-img {
        grid-column: 1;
        grid-row: 1 / 3;
        height: 58px;
        width: 58px;
    }

    .lv-item-row .lv-produto-nome {
        grid-column: 2 / -1;
    }

    .lv-item-row input[name*="[sku]"] {
        grid-column: 2 / -1;
    }

    .lv-item-row .lv-item-qtd,
    .lv-item-row .lv-item-valor,
    .lv-item-row .lv-item-total {
        grid-row: 3;
    }

    .lv-item-row input[name*="[observacoes]"] {
        grid-column: 1 / -1;
    }

    .lv-item-row .lv-remove-item {
        position: absolute;
        right: 0;
        top: 0;
    }
}
