﻿
/* Compatibilidade com navegadores antigos (TV box, Chrome 61/72) — vale para o arquivo todo:
   - toda declaração com "dvh" (Chrome 108) vem precedida de uma versão com
     var(--kds-altura-visivel, 100vh): o navegador antigo descarta a linha com dvh e usa a altura
     VISÍVEL medida por JS (App.razor do Server). Não usar só "100vh": no Android antigo ele inclui a
     área atrás da barra de endereço e o fim da lista fica inalcançável. O moderno usa a última (dvh).
     ATENÇÃO: se a linha com dvh também tiver var(), ela precisa ir para um @supports (height: 100dvh)
     (ver .kds-m-page) — com var() o navegador antigo não descarta a linha e a altura vira "auto";
   - todo "gap" em grid vem precedido de "grid-gap" ("gap" em grid só a partir do Chrome 66);
   - "gap" em flex (Chrome 84) é simulado com margens por compat-navegadores-antigos.css, gerado
     por MonitorKDS.Server/compat-navegadores/gerar-css-compat.js. Mudou este CSS? Rode o gerador. */
.kds-m-page {
    height: calc(var(--kds-altura-visivel, 100vh) / var(--kds-zoom, 1));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f8f9fa;
}

.kds-descricao {
    width: 100%;
    text-align: center;
    color: #6C757D;
    font-size: 18px;
    font-family: Inter;
    font-weight: 400;
    line-height: 20px;
    word-wrap: break-word
}

.kds-m-header {
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 8px;
    background: #fff;
    border-bottom: 2px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    z-index: 1060;
    position: relative;
}

.kds-m-main {
    flex: 1;
    display: flex;
    min-height: 0;
}

.kds-m-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    min-height: 0;
    min-width: 0;
}

.kds-m-content-columns {
    overflow: hidden;
}

/* ============================================================================
   2. Logo
   ============================================================================ */

.kds-m-logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.kds-m-logo-text {
    line-height: 1.2;
}

.kds-m-logo-subtitle {
    font-size: 11px;
    color: #6c757d;
}

.kds-m-logo-entrega {
    color: #0d6efd;
    font-weight: 600;
}

.kds-m-header-entrega {
    border-bottom: 2px solid #0d6efd;
}

/* ============================================================================
   3. Tabs de Estação
   ============================================================================ */

.kds-m-tabs {
    display: flex;
    align-items: center;
    background: #f1f3f5;
    border-radius: 50px;
    padding: 4px;
    gap: 2px;
    overflow-x: auto;
    max-width: 100%;
    scrollbar-width: none;
}

    .kds-m-tabs::-webkit-scrollbar {
        display: none;
    }

.kds-m-tab {
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

    .kds-m-tab:hover {
        background: rgba(0, 0, 0, 0.04);
    }

    .kds-m-tab.active {
        background: #6f42c1;
        color: #fff;
        font-weight: 600;
        box-shadow: 0 2px 8px rgba(111, 66, 193, 0.3);
    }

.kds-m-tabs-entrega .kds-m-tab.active {
    background: #198754;
    box-shadow: 0 2px 8px rgba(25, 135, 84, 0.3);
}

.kds-m-tab-count {
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dee2e6;
    color: #495057;
}

.kds-m-tab.active .kds-m-tab-count {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

/* ============================================================================
   4. Toggle de Visualização
   ============================================================================ */

.kds-m-view-toggle {
    display: flex;
    align-items: center;
    padding: 2px;
    background: #e9ecef;
    border-radius: 6px;
}

.kds-m-view-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    color: #6c757d;
    border-radius: 4px;
    white-space: nowrap;
}

    .kds-m-view-btn.active {
        background: #fff;
        color: #212529;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    }

    .kds-m-view-btn:hover:not(.active) {
        color: #495057;
    }

.kds-m-view-badge {
    font-size: 11px;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    font-weight: 700;
    padding: 0 5px;
}

.kds-m-view-btn.active .kds-m-view-badge {
    background: rgba(111, 66, 193, 0.15);
    color: #6f42c1;
}

.kds-m-view-btn:not(.active) .kds-m-view-badge {
    background: #dee2e6;
    color: #6c757d;
}

/* ============================================================================
   5. Botões do Header
   ============================================================================ */
.modal-backdrop {
    z-index: 1080 !important;
    zoom: var(--kds-zoom-inverse, 1);
}

.modal {
    z-index: 1090 !important;
    overflow-x: hidden !important;
}

.modal-content {
    max-height: calc(var(--kds-altura-visivel, 100vh) / var(--kds-zoom, 1) - 3.5rem);
    display: flex;
    flex-direction: column;
}

/* Navegadores com dvh (Chrome 108+) usam a altura dinâmica da tela.
   Fica num @supports, e não como "segunda linha" da mesma regra, porque a linha tem var():
   com var() o navegador antigo NÃO descarta a linha na leitura (só descobre que dvh é inválido
   no cálculo final) e a altura vira "auto" — a página cresce e a rolagem da lista quebra. */
@supports (height: 100dvh) {
    .kds-m-page {
        height: calc(100dvh / var(--kds-zoom, 1));
    }

    .modal-content {
        max-height: calc(100dvh / var(--kds-zoom, 1) - 3.5rem);
    }
}

.modal-body {
    overflow-y: auto;
}

.kds-m-header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.kds-m-header-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1.5px solid #dee2e6;
    background: #f8f9fa;
    color: #495057;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

    .kds-m-header-btn:hover {
        border-color: #adb5bd;
        background: #e9ecef;
    }

    .kds-m-header-btn.active {
        background: rgba(111, 66, 193, 0.15);
        border-color: rgba(111, 66, 193, 0.3);
        color: #6f42c1;
    }

.kds-m-filter-active {
    background: rgba(25, 135, 84, 0.12) !important;
    color: #157347 !important;
    border-color: rgba(25, 135, 84, 0.4) !important;
}

.kds-m-filter-count {
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.kds-m-filter-has-items {
    background: rgba(25, 135, 84, 0.3);
}

.kds-m-config-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background: #e9ecef;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
}

    .kds-m-config-btn:hover {
        background: #dee2e6;
        color: #212529;
    }

    .kds-m-config-btn.active {
        background: #6f42c1;
        color: #fff;
    }

/* Config Dropdown */
.kds-m-config-dropdown {
    position: fixed;
    right: 16px;
    top: 60px;
    width: 350px;
    max-width: calc(100vw - 32px);
    max-height: calc(var(--kds-altura-visivel, 100vh) - 80px);
    max-height: calc(100dvh - 80px);
    overflow-y: auto;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
    z-index: 1050;
}

.kds-m-config-dropdown-header {
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kds-m-config-dropdown-body {
    padding: 0;
}

.kds-m-config-dropdown-section {
    padding: 8px 12px 0px 12px;
    display: flex;
    /*    align-items: center;*/
    justify-content: space-between;
}

.kds-m-config-dropdown-label {
    font-size: 13px;
    color: #495057;
    font-weight: 500;
}
/* Segmented Control (estilo Figma) */
.kds-m-segmented-control {
    display: flex;
    padding: 4px;
    gap: 4px;
    background: #f1f3f5;
    border-radius: 12px;
}

.kds-m-segmented-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 400;
    color: #6c757d;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
}

    .kds-m-segmented-option i {
        color: #adb5bd;
        transition: color 0.15s ease;
    }

    .kds-m-segmented-option.active {
        background: #fff;
        color: #212529;
        font-weight: 600;
        border-color: #dee2e6;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    }

        .kds-m-segmented-option.active i {
            color: #6f42c1;
        }

.kds-m-config-font-btn {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px 10px;
    border: 1.5px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    color: #495057;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

    .kds-m-config-font-btn:hover {
        border-color: #6f42c1;
        color: #6f42c1;
        background: rgba(111, 66, 193, 0.04);
    }

.kds-m-config-font-label {
    font-size: 13px;
    font-weight: 600;
    color: #212529;
    min-width: 40px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.kds-m-config-dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: #495057;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s ease;
    text-align: left;
}

    .kds-m-config-dropdown-item:hover {
        background: #f8f9fa;
    }
/* Toggles dentro do dropdown — visíveis apenas em telas pequenas */
.kds-m-config-toggles {
    display: none;
}
/* Botões secundários do header — visíveis apenas em telas grandes */
.kds-m-header-secondary {
    display: flex;
}

.kds-m-header-pendentes {
    display: flex;
    position: relative;
}

.kds-m-pendentes-badge {
    display: none;
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: #6f42c1;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.kds-m-clock {
    font-size: 12px;
    color: #6c757d;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
/* ============================================================================
   6. Order Card
   ============================================================================ */

.kds-m-card {
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 220px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

    .kds-m-card.kds-m-all-ready {
        /* sem opacidade */
    }

    .kds-m-card.kds-m-card-selected {
        outline: 3px solid #6f42c1;
        outline-offset: 2px;
    }
    /* --- Sistema "Novo" --- */
    /* Comanda nova: borda esquerda azul + sombra sutil + animação de entrada */
    .kds-m-card.kds-m-card-new {
        outline: none;
        border-left: 4px solid #0d6efd;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(13, 110, 253, 0.15);
        animation: kds-m-card-enter 0.4s ease-out;
    }
        /* Comanda nova + selecionada: mantém o outline roxo de seleção junto com o estilo de "novo" */
        .kds-m-card.kds-m-card-new.kds-m-card-selected {
            outline: 3px solid #6f42c1;
            outline-offset: 2px;
        }
/* Tag "NOVO" no header do card */
.kds-m-tag-novo {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
    color: #fff;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    white-space: nowrap;
    animation: kds-m-novo-fadein 0.3s ease-out;
}

    .kds-m-tag-novo i {
        font-size: 9px;
    }
/* Produto novo em comanda existente: fundo azul claro + borda esquerda */
.kds-m-item.kds-m-item-new {
    background: #e8f0fe;
    border-left: 3px solid #0d6efd;
    animation: kds-m-novo-fadein 0.3s ease-out;
}
/* Tag "novo" ao lado do nome do produto */
.kds-m-item-tag-novo {
    display: inline-flex;
    align-items: center;
    padding: 0 5px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 16px;
    color: #0d6efd;
    background: #e8f0fe;
    border: 1px solid rgba(13, 110, 253, 0.3);
    border-radius: 3px;
    white-space: nowrap;
    margin-left: 6px;
    flex-shrink: 0;
}
/* Quando o item já tem fundo azul, a tag precisa de mais contraste */
.kds-m-item.kds-m-item-new .kds-m-item-tag-novo {
    background: #fff;
    border-color: rgba(13, 110, 253, 0.4);
}
/* Badge "+X novos" no header do card */
.kds-m-badge-novos {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 1px 7px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    color: #000;
    background: #fff;
    border-radius: 10px;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    animation: kds-m-novo-fadein 0.3s ease-out;
}

    .kds-m-badge-novos i {
        font-size: 9px;
    }

.kds-m-tag-pago {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1;
    color: #fff;
    background: #198754;
    border-radius: 4px;
    white-space: nowrap;
}

    .kds-m-tag-pago i {
        font-size: 9px;
    }

.kds-m-item-tag-pago {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 0 5px;
    margin-left: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 16px;
    color: #fff;
    background: #198754;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
}

    .kds-m-item-tag-pago i {
        font-size: 9px;
    }

.kds-m-item-done-here .kds-m-item-tag-pago {
    opacity: 0.55;
}
@keyframes kds-m-novo-fadein {
    from {
        opacity: 0;
        transform: translateY(-2px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kds-m-card-header {
    padding: 10px 12px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    color: #fff;
    cursor: pointer;
    transition: background 1s ease;
}

/* Coluna esquerda (nome + subtítulo): é ela que cede espaço quando falta */
.kds-m-card-header-esquerda {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}

/* Linha do nome: se faltar espaço, os badges (Salão/NOVO) descem — o nome não quebra */
.kds-m-card-header-titulo {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    column-gap: 8px;
    row-gap: 4px;
}

/* Coluna direita (timer + apelido + novos): nunca encolhe */
.kds-m-card-header-direita {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.kds-m-card-ok {
    background: #22c55e;
}

.kds-m-card-warning {
    background: #eab308;
}

.kds-m-card-alert {
    background: #f97316;
}

.kds-m-card-critical {
    background: #ef4444;
}

.kds-m-card-number {
    font-weight: 600;
    letter-spacing: 0.05em;
    font-size: 15px;
    white-space: nowrap;
}

.kds-m-card-type-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    font-size: 11px;
    border-radius: 4px;
    white-space: nowrap;
}

.kds-m-card-subtitle {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 2px;
}

.kds-m-card-usuario {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 8px;
    font-weight: 400;
    opacity: 0.85;
}

    .kds-m-card-usuario i {
        font-size: 10px;
        opacity: 0.75;
    }

.kds-m-card-apelido {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 150px;
    padding: 1px 7px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.22);
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .kds-m-card-apelido i {
        font-size: 10px;
        opacity: 0.8;
        flex: 0 0 auto;
    }

.kds-m-card-timer {
    font-variant-numeric: tabular-nums;
    font-size: 14px;
    letter-spacing: 0.05em;
}


.kds-m-card-body {
    background: #fff;
    flex: 1;
}

.kds-m-card-complete-btn {
    width: 100%;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #198754;
    color: #fff;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: filter 0.2s ease;
}

    .kds-m-card-complete-btn:hover {
        filter: brightness(1.1);
    }

.kds-m-card-exiting {
    animation: kds-m-card-exit 0.4s ease-in forwards;
}
/* ============================================================================
   7. Order Item Line
   ============================================================================ */

.kds-m-item {
    padding: 10px 12px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
    transition: background 0.15s ease;
}

    .kds-m-item:hover {
        background: #f8f9fa;
    }

    .kds-m-item.kds-m-prepared {
        background: #f8f9fa;
    }

    .kds-m-item:last-child {
        border-bottom: none;
    }

.kds-m-item-check {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.kds-m-item-check-empty {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #adb5bd;
    transition: border-color 0.2s ease;
}

.kds-m-item:hover .kds-m-item-check-empty {
    border-color: #6f42c1;
}

.kds-m-item-check-done {
    font-size: 20px;
    color: #198754;
}

.kds-m-item-content {
    flex: 1;
    min-width: 0;
}

.kds-m-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #212529;
    display: block;
}

    .kds-m-item-name.kds-m-item-ready {
        color: #6c757d;
    }

.kds-m-item-qty {
    font-size: 14px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    color: #212529;
}

.kds-m-item-notes {
    font-size: 15px;
    color: #6f42c1;
    margin-top: 2px;
}

.kds-m-item-pizza-flavors {
    font-size: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}
/* Pizza - Sabores inline (estilo Figma) */
.kds-m-pizza-flavors-inline {
    margin-top: 2px;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 4px;
    align-items: baseline;
    font-size: 12px;
    color: #495057;
}

.kds-m-pizza-separator {
    color: #adb5bd;
    font-size: 12px;
}

.kds-m-pizza-flavor-item {
    display: inline;
}

.kds-m-pizza-fraction {
    color: #6f42c1;
    font-weight: 600;
    margin-right: 3px;
}

.kds-m-pizza-complement {
    color: #0d6efd;
}

.kds-m-item-ingredients {
    margin-top: 4px;
}

.kds-m-item-exiting {
    animation: kds-m-card-exit 0.3s ease-in forwards;
}
/* Item somente leitura (outros monitores / etapas futuras) */
.kds-m-item.kds-m-item-readonly {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}
/* Item bloqueado (não pronto para entrega — visível apenas com o olho) */
.kds-m-item.kds-m-item-blocked {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
    user-select: none;
}
/* Item concluído neste monitor (sublinhado) */
.kds-m-item.kds-m-item-done-here {
    opacity: 0.55;
    cursor: default;
    pointer-events: none;
}

.kds-m-item-done-here .kds-m-item-name,
.kds-m-item-done-here .kds-m-item-ingredients,
.kds-m-item-done-here .kds-m-item-ingredients .ingrediente {
    text-decoration: line-through;
}
/* Checkbox para readonly */
.kds-m-item-check-readonly {
    font-size: 18px;
    color: #adb5bd;
}
/* Item selecionado via navegação por teclado */
.kds-m-item.kds-m-item-selected {
    background: rgba(111, 66, 193, 0.1);
    border-left: 3px solid #6f42c1;
    padding-left: 9px;
}
/* Timeline de etapas */
.kds-m-timeline {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    flex-wrap: wrap;
}
/* Step base (etapa individual) */
.kds-m-step {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 20px;
    padding: 0 8px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 4px;
    border: none;
    line-height: 1;
}
/* Etapa concluida — verde */
.kds-m-step-done {
    background: #d1f5e0;
    color: #0f7b3f;
}

    .kds-m-step-done i {
        font-size: 11px;
    }
/* Etapa atual — roxo vivo */
.kds-m-step-active {
    background: #6f42c1;
    color: #fff;
    box-shadow: 0 0 0 2px rgba(111, 66, 193, 0.25);
}
/* Etapa futura — cinza claro */
.kds-m-step-future {
    background: #e9ecef;
    color: #868e96;
}
/* Step clicavel */
.kds-m-step-clickable {
    cursor: pointer;
    transition: filter 0.15s, box-shadow 0.15s;
}

    .kds-m-step-clickable:hover {
        filter: brightness(0.9);
    }
/* Etapa selecionada via teclado (modo de seleção de etapa) */
.kds-m-step.kds-m-step-keyboard-selected {
    outline: 2px solid #6f42c1;
    outline-offset: 1px;
    box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.25);
}
/* Grupo de etapas compostas */
.kds-m-chevron-group {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 3px;
    border-radius: 6px;
    background: #f1f3f5;
    border: 1.5px dashed #dee2e6;
}
/* Grupo composto ativo — destaque roxo */
.kds-m-chevron-group-active {
    background: rgba(111, 66, 193, 0.06);
    border-color: rgba(111, 66, 193, 0.35);
}
/* Seta entre etapas simples (nao dentro de grupo) */
.kds-m-timeline > .kds-m-step + .kds-m-step::before,
.kds-m-timeline > .kds-m-step + .kds-m-chevron-group::before,
.kds-m-timeline > .kds-m-chevron-group + .kds-m-step::before,
.kds-m-timeline > .kds-m-chevron-group + .kds-m-chevron-group::before {
    content: "\F285";
    font-family: "bootstrap-icons";
    font-size: 8px;
    color: #adb5bd;
    margin-right: 4px;
}
/* ----------------------------------------------------------------------------
   Atalhos de entrega na timeline
   Nao sao etapas do preparo: atravessam o fluxo. Por isso ficam apos um divisor
   e com estilo proprio, para nao serem confundidos com mais duas etapas.
   ---------------------------------------------------------------------------- */

/* Divisor entre as etapas reais e os atalhos */
.kds-m-step-divisor {
    display: inline-block;
    width: 1px;
    height: 14px;
    margin: 0 2px;
    background: #ced4da;
    vertical-align: middle;
}

.kds-m-step-atalho {
    cursor: pointer;
    border: 1px solid transparent;
    transition: filter 0.15s, box-shadow 0.15s;
}

    .kds-m-step-atalho:hover {
        filter: brightness(0.92);
    }

    .kds-m-step-atalho:active {
        transform: translateY(1px);
    }

    .kds-m-step-atalho i {
        font-size: 11px;
    }

/* "Pronto" — libera para a entrega. Cinza, mesma paleta da etapa futura
   (.kds-m-step-future): le-se como "proximo passo disponivel".
   Verde nao serve aqui porque e a cor de etapa JA concluida (.kds-m-step-done)
   e daria a impressao de que a acao ja aconteceu. */
.kds-m-step-atalho-pronto {
    background: #e9ecef;
    color: #868e96;
    border-color: #adb5bd;
}

/* "Entregue" — acao destrutiva (some do fluxo). Ambar, para destacar do verde
   e sinalizar que exige atencao. */
.kds-m-step-atalho-entregue {
    background: #fff3cd;
    color: #8a6100;
    border-color: #8a6100;
}

/* A timeline insere um chevron automatico entre steps irmaos (regra da secao
   anterior). Os atalhos nao fazem parte da sequencia, entao o chevron e removido
   tanto antes quanto entre eles. */
.kds-m-timeline > .kds-m-step-atalho::before,
.kds-m-timeline > .kds-m-step-divisor + .kds-m-step::before {
    content: none !important;
    margin-right: 0 !important;
}

/* ============================================================================
   8. Grid View
   ============================================================================ */

.kds-m-grid {
    display: grid;
    /* Fallback sem min() (só existe a partir do Chrome 79): o navegador antigo usa esta linha
       e ignora a de baixo; o moderno sobrescreve com a de baixo. "grid-gap" pelo mesmo motivo
       ("gap" em grid só a partir do Chrome 66). */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    grid-gap: 16px;
    gap: 16px;
    align-items: start;
}
/* ============================================================================
   9. Columns View
   ============================================================================ */

.kds-m-columns {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
    height: 100%;
    scroll-snap-type: x mandatory;
    cursor: grab;
}

    .kds-m-columns::-webkit-scrollbar {
        height: 6px;
    }

    .kds-m-columns::-webkit-scrollbar-track {
        background: #f1f3f5;
        border-radius: 3px;
    }

    .kds-m-columns::-webkit-scrollbar-thumb {
        background: #adb5bd;
        border-radius: 3px;
    }

    .kds-m-columns > .kds-m-card {
        flex-shrink: 0;
        width: 280px;
        scroll-snap-align: start;
    }

    .kds-m-columns.kds-m-dragging {
        cursor: grabbing;
        user-select: none;
    }
/* ============================================================================
   10. Kanban View
   ============================================================================ */

.kds-m-kanban {
    display: flex;
    gap: 16px;
    height: 100%;
}

.kds-m-kanban-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.kds-m-kanban-header {
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

    .kds-m-kanban-header.kds-m-novo {
        background: rgba(13, 110, 253, 0.08);
        border-left: 3px solid #0d6efd;
    }

    .kds-m-kanban-header.kds-m-em-preparo {
        background: rgba(111, 66, 193, 0.08);
        border-left: 3px solid #6f42c1;
    }

    .kds-m-kanban-header.kds-m-pronto {
        background: rgba(25, 135, 84, 0.08);
        border-left: 3px solid #198754;
    }

.kds-m-kanban-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.kds-m-kanban-count {
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kds-m-kanban-cards {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-right: 4px;
}
/* ============================================================================
   11. Sidebar
   ============================================================================ */

.kds-m-sidebar {
    width: 320px;
    background: #fff;
    border-left: 2px solid #dee2e6;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: width 0.3s ease, opacity 0.3s ease;
}

    .kds-m-sidebar.kds-m-collapsed {
        width: 0;
        padding: 0;
        overflow: hidden;
        border-left: none;
        opacity: 0;
    }

.kds-m-sidebar-header {
    padding: 12px 16px;
    border-bottom: 1px solid #dee2e6;
    flex-shrink: 0;
}

.kds-m-sidebar-list {
    flex: 1;
    overflow-y: auto;
}

.kds-m-sidebar-category {
    padding: 10px 12px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-left: 3px solid transparent;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: #212529;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
}

    .kds-m-sidebar-category:hover {
        background: #e9ecef;
        border-left-color: #adb5bd;
    }

.kds-m-sidebar-category-active {
    background: #e7f1ff;
    color: #0d6efd;
    border-left-color: #0d6efd;
}

    .kds-m-sidebar-category-active:hover {
        background: #d6e7ff;
        color: #0d6efd;
        border-left-color: #0d6efd;
    }

.kds-m-sidebar-category-count {
    margin-left: auto;
    min-width: 20px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    border-radius: 10px;
    background: #dee2e6;
    color: #495057;
}

.kds-m-sidebar-category-active .kds-m-sidebar-category-count {
    background: #0d6efd;
    color: #fff;
}

.kds-m-sidebar-filter-active {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #0d6efd;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    border-bottom: 1px solid #0b5ed7;
    transition: background 0.15s ease;
}

    .kds-m-sidebar-filter-active:hover {
        background: #0b5ed7;
    }

.kds-m-sidebar-item {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
    /* Item da sidebar selecionado via navegação por teclado */
    .kds-m-sidebar-item.kds-m-sidebar-item-selected {
        background: rgba(111, 66, 193, 0.1);
        border-left: 3px solid #6f42c1;
        padding-left: 9px;
    }

.kds-m-sidebar-item-name {
    font-size: 14px;
    font-weight: 500;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #212529;
}

.kds-m-sidebar-badge {
    min-width: 24px;
    padding: 2px 6px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 4px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

    .kds-m-sidebar-badge.kds-m-high {
        background: #dc3545;
        color: #fff;
    }

    .kds-m-sidebar-badge.kds-m-medium {
        background: #6f42c1;
        color: #fff;
    }

    .kds-m-sidebar-badge.kds-m-low {
        background: #e9ecef;
        color: #495057;
    }
/* ============================================================================
   12. Settings Panel
   ============================================================================ */

.kds-m-settings {
    position: fixed;
    top: 72px;
    right: 24px;
    width: 400px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.18), 0 8px 20px rgba(0, 0, 0, 0.08);
    z-index: 1050;
    max-height: calc(var(--kds-altura-visivel, 100vh) - 90px);
    max-height: calc(100dvh - 90px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: kds-m-settings-enter 0.25s ease-out;
}

.kds-m-settings-backdrop {
    position: fixed;
    /* Equivale a "inset: 0" (que só existe a partir do Chrome 87) */
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    z-index: 1040;
    animation: kds-m-fade-in 0.2s ease;
}

.kds-m-settings-header {
    padding: 20px 24px 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.kds-m-settings-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.kds-m-settings-footer {
    padding: 16px 24px;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
    display: flex;
    gap: 12px;
}
/* ============================================================================
   13. Custom Select
   ============================================================================ */

.kds-m-label {
    display: block;
    font-size: 11px;
    margin-bottom: 6px;
    margin-left: 2px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #6c757d;
}

.kds-m-select {
    position: relative;
}

.kds-m-select-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1.5px solid #dee2e6;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

    .kds-m-select-trigger:hover {
        border-color: #adb5bd;
    }

    .kds-m-select-trigger.open {
        border-color: #6f42c1;
        box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.1);
    }

.kds-m-select-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(111, 66, 193, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kds-m-select-dropdown {
    position: absolute;
    width: 100%;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
    z-index: 50;
    margin-top: 6px;
    padding: 6px 0;
    overflow: hidden;
}

.kds-m-select-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s ease;
    border: none;
    background: transparent;
    text-align: left;
    font-size: 13px;
    color: #495057;
}

    .kds-m-select-option:hover {
        background: #f8f9fa;
    }

    .kds-m-select-option.selected {
        background: rgba(111, 66, 193, 0.06);
        color: #6f42c1;
        font-weight: 500;
    }
/* ============================================================================
   14. Segmented Control
   ============================================================================ */

.kds-m-segment {
    display: flex;
    padding: 4px;
    gap: 4px;
    background: #f1f3f5;
    border-radius: 12px;
}

.kds-m-segment-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    font-size: 13px;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    background: transparent;
    color: #6c757d;
    font-weight: 400;
}

    .kds-m-segment-btn.active {
        background: #fff;
        color: #212529;
        font-weight: 600;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
        border-color: #dee2e6;
    }

    .kds-m-segment-btn:hover:not(.active) {
        background: rgba(0, 0, 0, 0.03);
    }
/* ============================================================================
   15. Toggle Row
   ============================================================================ */

.kds-m-toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1.5px solid #dee2e6;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    text-align: left;
}

    .kds-m-toggle-row:hover {
        border-color: #adb5bd;
    }

    .kds-m-toggle-row.active {
        border-color: rgba(111, 66, 193, 0.2);
        background: rgba(111, 66, 193, 0.04);
    }

.kds-m-toggle-track {
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 50px;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

    .kds-m-toggle-track.on {
        background: #6f42c1;
    }

    .kds-m-toggle-track.off {
        background: #adb5bd;
    }

.kds-m-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15), 0 0 1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.kds-m-toggle-track.on .kds-m-toggle-thumb {
    transform: translateX(20px);
}
/* ============================================================================
   16. History Dropdown
   ============================================================================ */

.kds-m-history-dropdown {
    position: fixed;
    right: 16px;
    top: 60px;
    width: 384px;
    max-width: calc(100vw - 32px);
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
    z-index: 1050;
    overflow: hidden;
}

.kds-m-history-dropdown-header {
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
/* Campo de busca do histórico */
.kds-m-history-search {
    position: relative;
    padding: 8px 12px;
    border-bottom: 1px solid #dee2e6;
    background: #fff;
}

.kds-m-history-search-icon {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: #adb5bd;
    pointer-events: none;
}

.kds-m-history-search-input {
    width: 100%;
    padding: 7px 32px 7px 30px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 13px;
    color: #212529;
    background: #f8f9fa;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}

    .kds-m-history-search-input:focus {
        border-color: #6f42c1;
        background: #fff;
        box-shadow: 0 0 0 2px rgba(111, 66, 193, 0.15);
    }

    .kds-m-history-search-input::placeholder {
        color: #adb5bd;
    }

.kds-m-history-search-clear {
    position: absolute;
    right: 22px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #adb5bd;
    font-size: 14px;
    line-height: 1;
}

    .kds-m-history-search-clear:hover {
        color: #6c757d;
    }

.kds-m-history-dropdown-list {
    max-height: 370px;
    overflow-y: auto;
}

.kds-m-history-dropdown-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f5;
    cursor: default;
}

    .kds-m-history-dropdown-item:hover {
        background: #f8f9fa;
    }

.kds-m-history-undo-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #6f42c1;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

    .kds-m-history-undo-btn:hover {
        background: rgba(111, 66, 193, 0.08);
    }

    .kds-m-history-undo-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }
/* ============================================================================
   17. Empty State
   ============================================================================ */

.kds-m-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #6c757d;
}

.kds-m-empty-logo {
    width: 218px;
    height: 188px;
    object-fit: contain;
}

.kds-m-empty-badge-entrega {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 20px;
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.kds-m-empty-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
}

.kds-m-empty-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6f42c1;
    animation: kds-m-dot-pulse 1.2s ease-in-out infinite;
}
/* ============================================================================
   18. Modal Atalhos
   ============================================================================ */

.kds-m-shortcut-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 6px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    color: #6c757d;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
/* ============================================================================
   19. Animações
   ============================================================================ */

@keyframes kds-m-pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes kds-m-dot-pulse {
    0%, 60%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }

    30% {
        opacity: 1;
        transform: scale(1.4);
    }
}

@keyframes kds-m-card-enter {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(30px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes kds-m-card-exit {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
}

@keyframes kds-m-settings-enter {
    from {
        opacity: 0;
        transform: translateX(20px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes kds-m-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}
/* Respeita preferências de movimento reduzido */
@media (prefers-reduced-motion: reduce) {
    .kds-m-card,
    .kds-m-card-exiting,
    .kds-m-item-exiting,
    .kds-m-empty-logo,
    .kds-m-empty-dot,
    .kds-m-settings {
        animation: none !important;
        transition: none !important;
    }
}
/* ============================================================================
   20. Modal Preparo
   ============================================================================ */

.kds-m-preparo-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1.5px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    color: #6c757d;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

    .kds-m-preparo-tab:hover {
        border-color: #adb5bd;
    }

    .kds-m-preparo-tab.active {
        background: rgba(111, 66, 193, 0.08);
        border-color: #6f42c1;
        color: #6f42c1;
        font-weight: 600;
    }

.kds-m-preparo-tab-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #dee2e6;
    color: #495057;
    font-size: 10px;
    font-weight: 700;
}

.kds-m-preparo-tab.active .kds-m-preparo-tab-num {
    background: #6f42c1;
    color: #fff;
}

.kds-m-preparo-card {
    padding: 14px 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
}
/* Badge de quantidade na tab (para etapas compostas) */
.kds-m-preparo-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #dee2e6;
    color: #495057;
    font-size: 10px;
    font-weight: 700;
}

.kds-m-preparo-tab.active .kds-m-preparo-tab-badge {
    background: rgba(111, 66, 193, 0.15);
    color: #6f42c1;
}
/* Wrapper da etapa composta nas tabs (borda pontilhada envolvendo os monitores) */
.kds-m-preparo-composta {
    display: inline-flex;
    padding: 4px;
    border: 2px dashed #b8a9d4;
    border-radius: 10px;
    background: rgba(111, 66, 193, 0.03);
}
/* ============================================================================
   21. Utilitários
   ============================================================================ */

.kds-m-scrollbar-thin::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.kds-m-scrollbar-thin::-webkit-scrollbar-track {
    background: transparent;
}

.kds-m-scrollbar-thin::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 3px;
}

.ingrediente {
    font-size: 13px;
    color: #6f42c1;
}

/* Título da grade de ingredientes: no máximo 2 linhas, com "..." se passar disso */
.kds-m-item-grade {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
    font-size: 14px;
}

.font13 {
    font-size: 13px;
}

.kds-m-grab {
    cursor: grab;
}

.kds-m-grabbing {
    cursor: grabbing;
}
/* ============================================================================
   21. Responsividade
   ============================================================================ */
/* Texto dos botões do header some em telas estreitas, só ficam os ícones */
.kds-m-header-btn-text {
    display: inline;
}

@media (max-width: 1199.98px) {
    .kds-m-sidebar {
        width: 260px;
    }

    .kds-m-header-btn {
        padding: 8px 10px;
        gap: 4px;
        font-size: 13px;
    }
}

@media (max-width: 991.98px) {
    .kds-m-header {
        padding: 6px 10px;
        gap: 6px;
    }

    .kds-m-header-btn-text {
        display: none;
    }

    .kds-m-header-btn {
        padding: 6px;
        font-size: 13px;
    }
    /* kds-m-main precisa ser referência para o overlay */
    .kds-m-main {
        position: relative;
    }
    /* Sidebar vira overlay abaixo da navbar em telas menores */
    .kds-m-sidebar {
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        z-index: 20;
        width: 300px;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        transform: translateX(0);
        transition: transform 0.25s ease, opacity 0.25s ease;
    }

        .kds-m-sidebar.kds-m-collapsed {
            width: 300px;
            transform: translateX(100%);
            opacity: 0;
            pointer-events: none;
            border-left: 2px solid #dee2e6;
            overflow-y: auto;
        }

    .kds-m-settings {
        right: 12px;
        width: calc(100vw - 24px);
        max-width: 400px;
    }

    .kds-m-logo-text {
        display: none;
    }

    .kds-m-logo-img {
        width: 32px;
        height: 32px;
    }

    .kds-m-tabs {
        padding: 2px;
        gap: 1px;
    }

    .kds-m-tab {
        padding: 4px 8px;
        font-size: 11px;
    }

    .kds-m-tab-count {
        min-width: 16px;
        height: 16px;
        font-size: 10px;
    }
    /* Filtro Salão/Delivery compacto */
    .kds-m-view-toggle {
        padding: 2px;
    }

    .kds-m-view-btn {
        padding: 4px 8px;
        font-size: 11px;
        gap: 4px;
    }

        .kds-m-view-btn i {
            font-size: 11px;
        }

    .kds-m-view-badge {
        min-width: 16px;
        height: 16px;
        font-size: 9px;
    }

    .kds-m-config-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .kds-m-header-controls {
        gap: 4px;
    }
    /* Em tablet: esconde botões secundários do header, mostra no dropdown */
    .kds-m-header-secondary {
        display: none !important;
    }
    /* Excecao: o olho e o filtro de prontos continuam na barra em tablet/celular.
       Sao os dois controles mais usados no dia a dia e o dropdown de configuracoes
       adiciona um toque a mais para chegar neles. O texto ja some pela regra do
       .kds-m-header-btn-text acima, entao eles ficam so com o icone. */
    .kds-m-header-secondary.kds-m-header-tablet {
        display: flex !important;
    }
    
    .kds-m-header-pendentes {
        display: flex !important;
    }

    .kds-m-pendentes-badge {
        display: flex;
    }

    .kds-m-config-toggles {
        display: block;
    }
}

@media (max-width: 767.98px) {
    .kds-m-header {
        padding: 5px 8px;
        gap: 4px;
    }

    .kds-m-header-btn {
        padding: 5px;
        font-size: 12px;
    }

        .kds-m-header-btn svg {
            width: 16px;
            height: 16px;
        }

    .kds-m-logo-img {
        width: 28px;
        height: 28px;
    }

    .kds-m-header-controls {
        gap: 3px;
    }

    .kds-m-kanban {
        flex-direction: column;
    }

    .kds-m-grid {
        grid-template-columns: 1fr;
    }
}
