/* ==========================================================================
   PONTO DOS CICLISTAS - DESIGN SYSTEM E ESTILOS GLOBAIS
   Interface Moderna, Ergonômica e Otimizada para Gestão de Oficina e Balcão
   ========================================================================== */

:root {
    color-scheme: light;

    /* Cores de Fundo e Superfícies (Tema Claro Exclusivo - Ergonômico para Loja e Balcão) */
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f5f9;
    --border-color: #cbd5e1;
    --border-subtle: #e2e8f0;
    --card-bg-subtle: #f1f5f9;

    /* Identidade Visual da Marca: Âmbar/Dourado Clássico (Contraste Nítido em Fundo Claro) */
    --brand-gold: #d97706;
    --brand-gold-hover: #b45309;
    --brand-gold-dark: #92400e;
    --brand-black: #000000;
    --brand-dark: #0f172a;

    /* Cores Principais do Sistema */
    --primary: #d97706;
    --primary-hover: #b45309;
    --primary-glow: transparent;
    --primary-text: #ffffff;

    /* Cores de Texto (Alto Contraste) */
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-dim: #64748b;

    /* Cores de Status e Ações (Tons Sólidos e Equilibrados - Zero Neon) */
    --success: #15803d;
    --success-bg: #dcfce7;
    --warning: #b45309;
    --warning-bg: #fef3c7;
    --info: #0369a1;
    --info-bg: #e0f2fe;
    --danger: #b91c1c;
    --danger-bg: #fee2e2;
    --whatsapp: #15803d;
    --whatsapp-hover: #166534;

    /* Tipografia e Raios */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-full: 9999px;

    /* Sombras Limpas e Suaves (Zero Efeito Neon) */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 8px -1px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.1);
    --shadow-glow: none;

    --modal-overlay-bg: rgba(15, 23, 42, 0.55);
}

/* Reset Básico */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    color: var(--text-main);
    display: flex;
    height: 100vh;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   LAYOUT PRINCIPAL: SIDEBAR & CONTEÚDO
   ========================================================================== */
.app-container {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* SIDEBAR */
.app-sidebar {
    width: 320px;
    background-color: #0f172a;
    border-right: 1px solid #1e293b;
    display: flex;
    flex-direction: column;
    z-index: 50;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s;
    flex-shrink: 0;
    overflow: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.app-sidebar::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.app-sidebar.collapsed {
    transform: translateX(-100%);
    position: absolute;
    height: 100%;
}

.sidebar-content {
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 14px 14px 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-content::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* Alternador de Lojas */
.store-selector-group {
    background: #1e293b;
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    gap: 4px;
}

.store-btn {
    flex: 1;
    padding: 9px 8px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.store-btn:hover {
    color: #ffffff;
}

.store-btn.active {
    background: #ffc107;
    color: #0f172a;
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.store-badge-count {
    background: #ef4444;
    color: #ffffff;
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: var(--radius-full);
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.store-btn.active .store-badge-count {
    background: #ef4444;
    color: #ffffff;
}

/* Seção de Filtros (Recolhível) */
.sidebar-collapsible-section {
    display: flex;
    flex-direction: column;
}

.sidebar-filter-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 700;
    color: #f8fafc;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    font-family: var(--font-sans);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.sidebar-filter-toggle:hover {
    background: #24324a;
    border-color: #ffc107;
    color: #ffffff;
}

.sidebar-filter-toggle .toggle-chevron {
    transition: transform 0.25s ease;
    font-size: 0.72rem;
    color: #94a3b8;
}

.sidebar-filter-toggle.open {
    border-color: #ffc107;
    background: #1e293b;
    color: #ffffff;
}

.sidebar-filter-toggle.open .toggle-chevron {
    transform: rotate(180deg);
    color: #ffc107;
}

.filter-active-pill {
    background: #ffc107;
    color: #0f172a;
    font-size: 0.62rem;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.sidebar-filter-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
    opacity: 0;
}

.sidebar-filter-body.open {
    max-height: 520px;
    opacity: 1;
}

.sidebar-section-title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #94a3b8;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-orders-container .sidebar-section-title {
    color: #94a3b8;
}

.sidebar-orders-container .col-counter-badge {
    background: #1e293b;
    color: #f8fafc;
    border: 1px solid #334155;
}

.filter-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-control {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    background: var(--bg-base);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.84rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: var(--primary);
}

select.form-control {
    cursor: pointer;
}

.sidebar-filter-body .form-control {
    background: #1e293b;
    border: 1px solid #334155;
    color: #f8fafc;
}

.sidebar-filter-body .form-control:focus {
    border-color: #ffc107;
    box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.2);
}

.sidebar-filter-body .form-control::placeholder {
    color: #64748b;
}

.sidebar-filter-body select.form-control option {
    background: #1e293b;
    color: #f8fafc;
}

.sidebar-filter-body input[type="date"].form-control {
    color-scheme: dark;
}

.date-inputs-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

.date-inputs-row .form-control {
    padding: 8px 6px;
    font-size: 0.76rem;
    min-width: 0;
}

.btn-secondary-sidebar {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-secondary-sidebar:hover {
    background: var(--bg-card);
    color: var(--text-main);
    border-color: var(--text-dim);
}

.sidebar-filter-body .btn-secondary-sidebar {
    background: #1e293b;
    border: 1px solid #334155;
    color: #cbd5e1;
}

.sidebar-filter-body .btn-secondary-sidebar:hover {
    background: #24324a;
    color: #ffffff;
    border-color: #ffc107;
}

/* Rodapé da Sidebar */
.sidebar-footer {
    padding: 10px 14px;
    border-top: 1px solid #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #0f172a;
    gap: 8px;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    border: 1px solid #334155;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    padding: 3px;
    box-sizing: border-box;
}

.sidebar-brand-logo {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-full);
    object-fit: contain;
    display: block;
    transition: transform 0.2s ease;
}

.sidebar-brand-logo:hover {
    transform: scale(1.08);
}

.user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.user-email-text {
    font-size: 0.74rem;
    font-weight: 600;
    color: #cbd5e1;
    word-break: break-all;
    line-height: 1.25;
}

.sidebar-footer .btn-logout {
    color: #94a3b8;
    background: transparent;
    border: 1px solid transparent;
}

.sidebar-footer .btn-logout:hover {
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.15);
}

/* ==========================================================================
   CONTEÚDO PRINCIPAL E TOPBAR
   ========================================================================== */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-base);
}

.app-topbar {
    height: 50px;
    padding: 0 18px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 40;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-sidebar-toggle {
    background: #0f172a;
    color: #ffc107;
    border: 1px solid #1e293b;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-sidebar-toggle:hover {
    background: #1e293b;
    color: #ffc107;
    border-color: #ffc107;
}

/* Botões de Alternância de Visão (Kanban x Tabela) */
.view-mode-toggle {
    background: var(--bg-base);
    padding: 3px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    display: flex;
    gap: 3px;
}

.view-btn {
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.view-btn:hover {
    color: var(--text-main);
}

.view-btn.active {
    background: var(--bg-card);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* Ações do Topo Direito */
.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-pill {
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
}

.status-pill.online {
    background: var(--success-bg);
    color: var(--success);
    border-color: rgba(16, 185, 129, 0.2);
}

.status-pill.connecting {
    background: var(--warning-bg);
    color: var(--warning);
    border-color: rgba(245, 158, 11, 0.2);
}

.status-pill.offline {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

.btn-icon-action {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.88rem;
    transition: all 0.2s;
}

.btn-icon-action:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--bg-card-hover);
}

.btn-icon-action.btn-logout:hover {
    color: var(--danger);
    border-color: var(--danger);
}

.btn-primary-action {
    background: var(--primary);
    color: var(--primary-text);
    border: none;
    padding: 6px 14px;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.btn-primary-action:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-admin-bi {
    background: var(--bg-card);
    color: var(--primary);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-admin-bi:hover {
    background: var(--primary);
    color: var(--primary-text);
    border-color: var(--primary);
}

/* ==========================================================================
   VISUALIZAÇÃO KANBAN
   ========================================================================== */
.view-container {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
}

.kanban-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(280px, 1fr));
    gap: 20px;
    align-items: start;
    min-height: calc(100vh - 120px);
}

.kanban-column {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 190px);
    box-shadow: var(--shadow-sm);
}

.kanban-column-header {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.col-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.col-dot {
    width: 9px;
    height: 9px;
    border-radius: var(--radius-full);
}

.col-dot.dot-novo { background: var(--warning); }
.col-dot.dot-producao { background: var(--info); }
.col-dot.dot-finalizado { background: var(--success); }
.col-dot.dot-cancelado { background: var(--danger); }

.col-counter-badge {
    background: var(--bg-card);
    color: var(--text-main);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
}

.kanban-cards-container {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 150px;
    transition: background-color 0.2s;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.kanban-cards-container::-webkit-scrollbar {
    width: 6px;
}

.kanban-cards-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
}

.kanban-cards-container.drag-over {
    background: var(--card-bg-subtle);
    outline: 2px dashed var(--primary);
    border-radius: var(--radius-md);
}

.kanban-empty-msg {
    text-align: center;
    padding: 30px 10px;
    color: var(--text-dim);
    font-size: 0.82rem;
    font-style: italic;
}

/* CARDS DO KANBAN */
.kanban-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    user-select: none;
}

.kanban-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.kanban-card.dragging {
    opacity: 0.4;
    transform: scale(0.96);
}

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

.card-code {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-mono);
}

.badge-pago {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: var(--radius-full);
}

.badge-pago.sim {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-pago.nao {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.card-client-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.card-bikes {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    line-height: 1.35;
}

.card-bikes span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.card-bikes i {
    margin-top: 2px;
    flex-shrink: 0;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-dim);
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border-color);
    margin-bottom: 12px;
}

.card-vendedor {
    background: var(--bg-surface);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--text-muted);
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-price {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-main);
    font-family: var(--font-mono);
}

.card-actions {
    display: flex;
    gap: 6px;
}

.btn-card-action {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    transition: all 0.2s;
}

.btn-card-wpp:hover {
    color: white;
    background: var(--whatsapp);
    border-color: var(--whatsapp);
}

.btn-card-open:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* ==========================================================================
   COLUNA LATERAL DE PEDIDOS (MODO BALCÃO / SISTEMA ANTIGO)
   ========================================================================== */
.sidebar-orders-container {
    display: none;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    margin-top: 6px;
    border-top: 1px solid #1e293b;
    padding-top: 12px;
}

.sidebar-cards-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: #334155 transparent;
}

.sidebar-cards-scroll::-webkit-scrollbar {
    width: 5px;
}

.sidebar-cards-scroll::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: var(--radius-full);
}

.order-card {
    background: var(--bg-surface);
    color: var(--text-main);
    padding: 10px 12px 9px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
}

.order-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.order-card.active {
    border-left-color: var(--success);
    border-color: #86efac;
    background: #f0fdf4;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.12);
}

.order-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3px;
}

.order-card-code {
    font-weight: 800;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    color: var(--primary);
}

.order-card-date {
    font-size: 0.68rem;
    color: var(--text-dim);
}

.order-card-title {
    font-size: 0.84rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 3px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.order-card-bikes {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 7px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 5px;
}

.order-card-bikes i {
    font-size: 0.70rem;
    color: var(--text-dim);
}

.order-card-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 6px;
    border-top: 1px dashed var(--border-subtle);
}

/* ==========================================================================
   VISÃO CENTRAL: MODO LISTA LATERAL COM CUPOM EMBUTIDO (BALCÃO)
   ========================================================================== */
.view-list-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 10px 20px 40px 20px;
    overflow-y: auto;
    width: 100%;
}

.no-order-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--bg-surface);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    max-width: 540px;
    width: 100%;
    margin: 40px auto;
    box-shadow: var(--shadow-sm);
}

.no-order-placeholder i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 18px;
    opacity: 0.85;
}

.no-order-placeholder h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
}

.no-order-placeholder p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.ticket-wrapper-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 24px 28px;
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
}

/* Badges de Status na Lista Lateral */
.status {
    display: inline-flex;
    align-items: center;
    font-size: 0.68rem;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    line-height: 1.2;
}

.status-novo { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(180, 83, 9, 0.25); }
.status-producao { background: var(--info-bg); color: var(--info); border: 1px solid rgba(3, 105, 161, 0.25); }
.status-finalizado { background: var(--success-bg); color: var(--success); border: 1px solid rgba(21, 128, 61, 0.25); }
.status-cancelado { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(185, 28, 28, 0.25); }

/* Badges de Vendedor (Cores Vibrantes e Exclusivas por Funcionário) */
.vendedor-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    line-height: 1.2;
    border: 1px solid transparent;
}

.vendedor-badge i {
    font-size: 0.65rem;
    opacity: 0.9;
}

/* Cores exclusivas para identificação visual imediata */
.vend-janete {
    background: #f3e8ff;
    color: #6b21a8;
    border-color: #d8b4fe;
}

.vend-erykledson {
    background: #fce7f3;
    color: #9d174d;
    border-color: #f472b6;
}

.vend-jaelton {
    background: #ffedd5;
    color: #9a3412;
    border-color: #fdba74;
}

.vend-kalliany {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

.vend-victor {
    background: #d1fae5;
    color: #065f46;
    border-color: #6ee7b7;
}

.vend-pendente {
    background: #f1f5f9;
    color: #64748b;
    border-color: #cbd5e1;
    border-style: dashed;
}

.vendedor-tag {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.btn-table-action {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-table-action:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-table-wpp:hover {
    color: white;
    background: var(--whatsapp);
    border-color: var(--whatsapp);
}

/* ==========================================================================
   MODAIS (ESTRUTURA GERAL)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--modal-overlay-bg);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-dialog {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-close-modal:hover {
    color: var(--danger);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

/* ==========================================================================
   MODAL DO EDITOR DE OS E VISUALIZAÇÃO DO CUPOM (80MM)
   ========================================================================== */
#ticket-view-modal {
    overflow-y: auto;
    padding: 20px;
}

#ticket-view-modal .modal-dialog {
    width: 100%;
    max-width: 920px;
    height: 92vh;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: auto;
}

#ticket-modal-host #ticket-editor-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    width: 100%;
}

#ticket-modal-host .modal-header {
    flex-shrink: 0;
}

#ticket-modal-host .modal-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 24px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

#ticket-modal-host .modal-body::-webkit-scrollbar {
    width: 7px;
}

#ticket-modal-host .modal-body::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
}

#ticket-modal-host .modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--text-dim);
}

.ticket-controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 18px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.status-dropdown-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dropdown-group label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
}

.os-tabs-container {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 20px;
    border-bottom: 1px dashed var(--border-color);
}

.os-tab-btn {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}

.os-tab-btn:hover {
    border-color: var(--primary);
    color: var(--text-main);
}

.os-tab-btn.active {
    background: var(--primary);
    color: var(--primary-text);
    border-color: var(--primary);
}

.os-tab-btn .check-icon {
    display: none;
    color: var(--success);
}

.os-tab-btn.printed .check-icon {
    display: inline-block;
}

.os-tab-btn.active.printed .check-icon {
    color: var(--primary-text);
}

/* CUPOM TÉRMICO (FORMATO 80MM) */
.thermal-receipt-preview-container {
    display: flex;
    justify-content: center;
    background: #e2e8f0;
    padding: 30px;
    border-radius: var(--radius-md);
    overflow: visible;
}

#print-area {
    width: 80mm;
    background: #ffffff;
    color: #000000;
    font-family: var(--font-mono);
    font-size: 11pt;
    line-height: 1.45;
    padding: 10px 8px;
    border: 1px dashed #cbd5e1;
    box-shadow: var(--shadow-md);
    box-sizing: border-box;
}

.t-center { text-align: center; }
.t-divider { border-bottom: 1px dashed #000; margin: 8px 0; }
.t-title { font-weight: bold; font-size: 12pt; margin-bottom: 4px; }
.t-row { display: flex; justify-content: space-between; margin-bottom: 4px; }

.input-print {
    outline: none;
    border: none;
    border-bottom: 1px dashed #94a3b8;
    font-family: var(--font-mono);
    font-size: 11pt;
    padding: 2px 0;
    width: 100%;
    box-sizing: border-box;
    background: transparent;
    transition: background 0.2s;
    color: #000;
}

.input-print:focus, .input-print:hover {
    background: #fefce8;
}

.editable.multiline {
    display: block;
    width: 100%;
    min-height: 24px;
    border: 1px dashed #94a3b8;
    padding: 4px;
    box-sizing: border-box;
    white-space: pre-wrap;
    outline: none;
    color: #000;
}

.check-box-print { display: none; }
.check-label {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    margin-right: 15px;
    font-family: var(--font-mono);
    font-size: 11pt;
    color: #000;
}
.check-label::before { content: "[ ]"; margin-right: 5px; font-weight: bold; }
.check-box-print:checked + .check-label::before { content: "[X]"; }

.show-on-print-inline { display: none; }

/* Itens Extras do Cupom */
.extra-item-card {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 10px;
}

.extra-item-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 8px;
}

.extra-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 14px;
    border-top: 1px dashed #cbd5e1;
    padding-top: 8px;
}

.extra-val-box {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 4px 8px;
    border-radius: 6px;
    width: 140px;
}

.btn-remove-extra {
    background: transparent;
    border: none;
    color: var(--danger);
    cursor: pointer;
    padding: 6px;
    font-size: 1rem;
    transition: transform 0.2s;
}

.btn-remove-extra:hover {
    transform: scale(1.15);
}

/* ==========================================================================
   MODAL DE NOVO PEDIDO (FORMULÁRIO COMPLETO)
   ========================================================================== */
#modal-new-order .modal-dialog {
    width: 100%;
    max-width: 780px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
}

.form-section-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 20px 0 12px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================================================
   MODAL DE WHATSAPP
   ========================================================================== */
#modal-whatsapp .modal-dialog {
    width: 100%;
    max-width: 580px;
}

.wpp-header-info {
    background: rgba(37, 211, 102, 0.08);
    border: 1px solid rgba(37, 211, 102, 0.2);
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wpp-preview-box {
    width: 100%;
    height: 180px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: var(--radius-md);
    padding: 14px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    line-height: 1.5;
    outline: none;
    resize: vertical;
}

.wpp-preview-box:focus {
    border-color: var(--whatsapp);
}

.btn-send-whatsapp {
    background: var(--whatsapp);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-send-whatsapp:hover {
    background: var(--whatsapp-hover);
    transform: translateY(-1px);
}

/* Modal de Confirmação & Alertas */
#custom-confirm-modal .modal-dialog {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
}

#confirm-message {
    color: var(--text-main) !important;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.5;
}

#wpp-modal-client-name {
    color: var(--text-main) !important;
}

/* ==========================================================================
   PAINEL BI MODERNO (DASHBOARD EXECUTIVO)
   ========================================================================== */
#admin-dashboard {
    position: fixed;
    inset: 0;
    background: var(--bg-base);
    z-index: 2000;
    display: none;
    overflow-y: auto;
    padding: 30px 40px;
}

.bi-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 16px;
}

.bi-title-wrapper {
    display: flex;
    align-items: center;
    gap: 14px;
}

.bi-header-logo {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: rgba(241, 171, 65, 0.1);
    border: 1px solid rgba(241, 171, 65, 0.28);
    padding: 3px;
    object-fit: contain;
    flex-shrink: 0;
}

.bi-topbar h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.bi-header-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    display: block;
    margin-top: 2px;
}

.bi-filter-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.bi-shortcuts {
    display: flex;
    gap: 8px;
    width: 100%;
    margin-bottom: 10px;
}

.btn-bi-shortcut {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-bi-shortcut:hover {
    background: var(--primary);
    color: var(--primary-text);
    border-color: var(--primary);
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
}

.kpi-total::before { background: var(--info); }
.kpi-realizado::before { background: var(--success); }
.kpi-projetado::before { background: var(--warning); }
.kpi-ticket::before { background: #8b5cf6; }
.kpi-bikes::before { background: #14b8a6; }
.kpi-upsell::before { background: #ec4899; }
.kpi-churn::before { background: var(--danger); }

.kpi-title {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-dim);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.kpi-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
    font-family: var(--font-mono);
    letter-spacing: -0.5px;
}

.kpi-sub {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.bi-charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 30px;
}

.bi-charts-full {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 30px;
}

.bi-chart-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.bi-chart-box h3 {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-canvas-container {
    position: relative;
    width: 100%;
    height: 280px;
}

.bi-store-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.bi-store-name {
    font-weight: 700;
    color: var(--text-main);
    display: block;
}

.bi-store-fat {
    font-size: 0.8rem;
    color: var(--primary);
    font-family: var(--font-mono);
}

.bi-badge-perc {
    background: var(--info-bg);
    color: var(--info);
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-weight: 800;
    font-size: 0.75rem;
    margin-left: 8px;
}

/* ==========================================================================
   TOASTS E FEEDBACKS VISUAIS
   ========================================================================== */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-main);
    font-size: 0.88rem;
    font-weight: 600;
    min-width: 280px;
    max-width: 420px;
    pointer-events: auto;
    transform: translateX(120%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.toast-card.visible {
    transform: translateX(0);
}

.toast-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
}

.toast-success::before { background: var(--success); }
.toast-success .toast-icon { color: var(--success); }

.toast-error::before { background: var(--danger); }
.toast-error .toast-icon { color: var(--danger); }

.toast-warning::before { background: var(--warning); }
.toast-warning .toast-icon { color: var(--warning); }

.toast-info::before { background: var(--info); }
.toast-info .toast-icon { color: var(--info); }

.toast-icon { font-size: 1.2rem; }
.toast-message { flex: 1; }
.toast-close {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.9rem;
}
.toast-close:hover { color: var(--text-main); }

/* ==========================================================================
   BARRA DE FILTROS SUPERIOR (DESKTOP) E ABAS MÓVEIS DO KANBAN
   ========================================================================== */
.topbar-filter-bar {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 8px 28px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    z-index: 35;
}

.filter-item-search {
    position: relative;
    flex: 1.5;
    min-width: 220px;
}

.filter-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 0.85rem;
}

.top-search-input {
    padding-left: 34px !important;
    height: 38px;
}

.filter-item-select {
    flex: 1;
    min-width: 150px;
}

.filter-item-select select {
    height: 38px;
    cursor: pointer;
}

.filter-item-dates {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 250px;
}

.filter-item-dates input {
    height: 38px;
}

.btn-clear-filters {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0 14px;
    height: 38px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-clear-filters:hover {
    background: var(--bg-card);
    color: var(--primary);
    border-color: var(--primary);
}

.no-mobile {
    display: flex;
}

.only-mobile {
    display: none;
}

/* BACKDROP DA SIDEBAR MOBILE */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(3px);
    z-index: 1400;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-backdrop.visible {
    display: block;
    opacity: 1;
}

/* SELETOR RÁPIDO KANBAN MOBILE */
.mobile-kanban-tabs {
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
}

.mobile-k-tab {
    padding: 8px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-k-tab.active {
    background: var(--primary);
    color: var(--primary-text);
    border-color: var(--primary);
}

.m-k-count {
    background: var(--bg-card);
    color: var(--text-main);
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: var(--radius-full);
}

.mobile-k-tab.active .m-k-count {
    background: var(--primary-text);
    color: var(--primary);
}

/* ==========================================================================
   CARD DA META DE FATURAMENTO DO BI (MINIMALISTA & ESTRATÉGICO)
   ========================================================================== */
.bi-goal-compact-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.bi-goal-compact-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px 12px 24px;
    gap: 24px;
    flex-wrap: nowrap;
}

.bi-goal-col-target {
    flex: 1;
    min-width: 210px;
}

.bi-goal-target-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bi-goal-icon-badge {
    width: 38px;
    height: 38px;
    background: var(--card-bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.bi-goal-title-lbl {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 2px;
    cursor: pointer;
}

.bi-goal-input-container {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.bi-goal-currency-symbol {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-mono);
}

.bi-goal-inline-input {
    background: transparent;
    border: none;
    border-bottom: 1.5px dashed var(--border-color);
    color: var(--primary);
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 1.2rem;
    width: 130px;
    padding: 1px 0;
    outline: none;
    transition: all 0.2s;
}

.bi-goal-inline-input:focus {
    border-bottom: 1.5px solid var(--primary);
    background: transparent;
}

.bi-goal-inline-input::placeholder {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.bi-goal-v-divider {
    width: 1px;
    height: 40px;
    background: var(--border-color);
    flex-shrink: 0;
}

.bi-goal-col-metric {
    flex: 1.2;
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.bi-goal-sub-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2px;
    gap: 8px;
}

.bi-goal-meta-lbl {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bi-goal-badge-perc {
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--primary);
    background: var(--card-bg-subtle);
    border: 1px solid var(--border-color);
    padding: 1px 8px;
    border-radius: var(--radius-full);
    font-family: var(--font-mono);
}

.bi-goal-badge-time {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--info);
    background: var(--info-bg);
    padding: 1px 8px;
    border-radius: var(--radius-full);
}

.bi-goal-metric-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    font-family: var(--font-mono);
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.bi-goal-pace-note {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bi-goal-track-slim {
    width: 100%;
    height: 5px;
    background: var(--border-subtle);
    overflow: hidden;
}

.bi-goal-bar-slim {
    height: 100%;
    background: var(--primary);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-brand-logo {
    max-width: 240px;
    height: auto;
    margin: 0 auto 12px auto;
    display: block;
}

.receipt-brand-logo {
    max-width: 55mm;
    height: auto;
    margin: 0 auto 6px auto;
    display: block;
    filter: contrast(180%);
}

/* ==========================================================================
   IMPRESSÃO TÉRMICA (80MM) - REVERSÃO ESTRITA AO PADRÃO DO MVP
   ========================================================================== */
@media print {
    @page {
        margin: 0 auto;
        size: 80mm auto;
    }

    html, body {
        background: #ffffff !important;
        color: #000000 !important;
        height: auto !important;
        min-height: 100% !important;
        overflow: visible !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        position: static !important;
        margin: 0 auto !important;
        padding: 0 !important;
        width: 100% !important;
        text-align: center !important;
    }

    /* Oculta toda a UI do sistema durante a impressão */
    .app-container,
    .app-sidebar,
    .app-topbar,
    .topbar-filter-bar,
    .view-container,
    .modal-header,
    .modal-footer,
    .ticket-controls-bar,
    .os-tabs-container,
    .ticket-header-controls,
    #toast-container,
    #admin-dashboard,
    #login-screen,
    #modal-new-order,
    #modal-whatsapp,
    #modal-unsaved,
    #custom-confirm-modal,
    #aviso-concorrencia,
    .sidebar-backdrop,
    .btn-remove-extra,
    .hide-on-print,
    .no-print {
        display: none !important;
    }

    #ticket-view-modal,
    #ticket-view-modal .modal-dialog,
    #ticket-view-modal .modal-body,
    .thermal-receipt-preview-container {
        position: static !important;
        inset: auto !important;
        background: transparent !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    #print-area {
        border: none !important;
        padding: 4px 6px !important;
        width: 80mm !important;
        max-width: 80mm !important;
        min-width: 80mm !important;
        margin: 0 auto !important;
        height: auto !important;
        overflow: visible !important;
        box-shadow: none !important;
        font-family: 'JetBrains Mono', monospace !important;
        font-size: 10.5pt !important;
        color: #000 !important;
        line-height: 1.35 !important;
        text-align: left !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        page-break-after: auto !important;
    }

    .t-divider {
        border-bottom: 1px dashed #000 !important;
        margin: 4px 0 !important;
    }

    .t-row {
        margin-bottom: 2px !important;
    }

    .input-print, .editable {
        border: none !important;
        background: transparent !important;
        appearance: none;
        -webkit-appearance: none;
        height: auto !important;
        overflow: visible !important;
        color: #000 !important;
        font-family: 'JetBrains Mono', monospace !important;
        font-size: 10.5pt !important;
    }

    .hide-on-print {
        display: none !important;
    }

    .show-on-print-inline {
        display: inline !important;
    }

    .extra-item-card {
        background: transparent !important;
        border: none !important;
        border-bottom: 1px dashed #000 !important;
        border-radius: 0 !important;
        padding: 3px 0 !important;
        margin-bottom: 4px !important;
        box-shadow: none !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .extra-item-footer {
        border-top: none !important;
        padding-top: 2px !important;
    }

    .extra-val-box {
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
        width: auto !important;
    }
}

/* ==========================================================================
   RESPONSIVIDADE E AJUSTES MOBILE / TABLET APRIMORADOS
   ========================================================================== */
@media (max-width: 1200px) {
    .kanban-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .bi-charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .no-mobile {
        display: none !important;
    }
    .only-mobile {
        display: flex !important;
    }

    .app-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        height: 100%;
        transform: translateX(-100%);
        z-index: 1500;
        box-shadow: var(--shadow-lg);
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    .app-topbar {
        padding: 0 10px;
        height: 48px;
    }

    .view-container {
        padding: 12px;
    }

    .topbar-right {
        gap: 8px;
    }

    .status-pill {
        padding: 4px 10px;
        font-size: 0.7rem;
    }

    .btn-primary-action {
        padding: 7px 12px;
        font-size: 0.8rem;
    }

    /* Meta compacta em telas menores */
    .bi-goal-compact-body {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px;
    }
    .bi-goal-v-divider {
        display: none;
    }
    .bi-goal-inline-input {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .kanban-grid {
        grid-template-columns: 1fr;
    }

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

    .modal-dialog {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        border-radius: 0 !important;
    }

    .modal-overlay {
        padding: 0 !important;
    }

    /* Evita zoom indesejado em formulários no iOS */
    .form-control, .input-print {
        font-size: 16px !important;
    }
}

