/* ==========================================================================
   GARIMPO OLFATIVO - DASHBOARD STYLESHEET
   Identidade Visual de Perfumaria Boutique & Safari/WebKit Mobile-First
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Variáveis de Design Tokens (Paleta Boutique)
   -------------------------------------------------------------------------- */
:root {
    /* Paleta Principal */
    --brand-coffee: #6F5238;          /* Marrom café / âmbar primário */
    --brand-coffee-dark: #583F29;     /* Marrom café escuro / hover */
    --brand-coffee-light: #8A6B4E;    /* Marrom suave */
    --brand-coffee-subtle: #F5EFE6;   /* Fundo âmbar bem suave */

    --brand-gold: #B08D57;            /* Dourado suave */
    --brand-gold-dark: #967440;       /* Dourado escuro / foco */
    --brand-gold-light: #CDB78F;      /* Dourado claro */
    --brand-gold-subtle: #F7F3EC;     /* Dourado translúcido suave */

    --brand-bg: #FAF8F5;              /* Fundo off-white boutique */
    --brand-card-bg: #FFFFFF;         /* Fundo branco dos cards */
    --brand-border: #EAE4DC;          /* Borda sutil dos cards */
    --brand-border-subtle: #F2ECE4;   /* Borda ainda mais suave */
    --brand-border-focus: #B08D57;    /* Borda de foco dourada */

    /* Tipografia e Cores de Texto */
    --brand-text-primary: #2C241E;    /* Texto principal escuro */
    --brand-text-secondary: #5C5248;  /* Texto secundário */
    --brand-text-muted: #8A7E73;      /* Texto de apoio / muted */

    /* Status Badges Boutique */
    --status-disp-bg: #EBF5EE;
    --status-disp-text: #236932;
    --status-disp-border: #C6E4CD;

    --status-vend-bg: #F5EFE6;
    --status-vend-text: #6F5238;
    --status-vend-border: #DFD3C3;

    --status-res-bg: #FDF4E7;
    --status-res-text: #A16207;
    --status-res-border: #F5DEB3;

    --status-aguard-bg: #F1F3F5;
    --status-aguard-text: #495057;
    --status-aguard-border: #CED4DA;

    /* Sombras Leves */
    --brand-shadow-sm: 0 2px 8px rgba(111, 82, 56, 0.05);
    --brand-shadow: 0 4px 16px rgba(111, 82, 56, 0.07);
    --brand-shadow-hover: 0 8px 24px rgba(111, 82, 56, 0.12);

    /* Raios de Borda */
    --brand-radius-sm: 8px;
    --brand-radius: 12px;
    --brand-radius-lg: 16px;
    --brand-radius-pill: 9999px;
}

/* --------------------------------------------------------------------------
   2. Compatibilidade Total Safari (Desktop e iOS) & Mobile-First Resets
   -------------------------------------------------------------------------- */

/* Zero overflow horizontal e Safe Areas para iPhone */
html, body {
    overflow-x: hidden;
    max-width: 100%;
    background-color: var(--brand-bg);
    color: var(--brand-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    padding-bottom: env(safe-area-inset-bottom);
    min-height: 100vh;
    min-height: 100dvh;
}

/* Fallback de altura de viewport dinâmica (100dvh com fallback 100vh) */
.min-vh-100, .dashboard-wrapper {
    min-height: 100vh;
    min-height: 100dvh;
}

/* Prevenção de Zoom Automático no Safari iOS (< 768px): font-size 16px obrigatório */
@media (max-width: 767.98px) {
    input, select, textarea,
    .form-control, .form-select,
    input.form-control, select.form-select, textarea.form-control {
        font-size: 16px !important;
        line-height: 1.4 !important;
    }
}

/* Reset de aparência nativa Safari/WebKit */
input, select, textarea,
.form-control, .form-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border-radius: var(--brand-radius-sm);
    border: 1px solid var(--brand-border);
    background-color: #FFFFFF;
    color: var(--brand-text-primary);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Estilização suave de foco para inputs */
.form-control:focus, .form-select:focus, input:focus, select:focus, textarea:focus {
    border-color: var(--brand-border-focus);
    box-shadow: 0 0 0 0.2rem rgba(176, 141, 87, 0.25);
    outline: none;
}

/* Seta customizada para selects (evita a seta cinza nativa dura do WebKit) */
select.form-select, select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236F5238' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.85rem center !important;
    background-size: 14px 10px !important;
    padding-right: 2.25rem !important;
}

/* Resposta Imediata ao Toque (remove atraso de 300ms do Safari) */
button, .btn, a, .card-link, .nav-action-card, .btn-action-boutique, [role="button"] {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(176, 141, 87, 0.15);
}

/* Área Mínima de Toque de 44px (Apple Human Interface Guidelines) */
.btn, .btn-action-boutique, .btn-boutique-primary, .btn-boutique-outline, 
.btn-boutique-gold, .btn-boutique-sold, .btn-boutique-action {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Suporte para Sticky e Backdrop-Filter no Safari */
.sticky-header-boutique {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1020;
    background: rgba(250, 248, 245, 0.94);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--brand-border);
}

/* --------------------------------------------------------------------------
   3. Componentes Boutique Gerais (Cards, Botões e Tipografia)
   -------------------------------------------------------------------------- */

/* Cartão Boutique Padrão */
.boutique-card {
    background: var(--brand-card-bg);
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius);
    box-shadow: var(--brand-shadow);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.boutique-card:hover {
    border-color: var(--brand-gold-light);
    box-shadow: var(--brand-shadow-hover);
}

/* Botão Primário Boutique (Marrom Café / Âmbar) */
.btn-boutique-primary {
    background-color: var(--brand-coffee);
    color: #FFFFFF !important;
    border: 1px solid var(--brand-coffee);
    border-radius: var(--brand-radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 1.25rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-boutique-primary:hover, .btn-boutique-primary:focus {
    background-color: var(--brand-coffee-dark);
    border-color: var(--brand-coffee-dark);
    color: #FFFFFF !important;
    box-shadow: 0 4px 12px rgba(111, 82, 56, 0.25);
    transform: translateY(-1px);
}

.btn-boutique-primary:active {
    transform: translateY(0);
}

/* Botão Secundário / Dourado Suave */
.btn-boutique-gold {
    background-color: var(--brand-gold);
    color: #FFFFFF !important;
    border: 1px solid var(--brand-gold);
    border-radius: var(--brand-radius-sm);
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-boutique-gold:hover, .btn-boutique-gold:focus {
    background-color: var(--brand-gold-dark);
    border-color: var(--brand-gold-dark);
    color: #FFFFFF !important;
    box-shadow: 0 4px 12px rgba(176, 141, 87, 0.25);
    transform: translateY(-1px);
}

/* Botão Outline Boutique */
.btn-boutique-outline {
    background-color: transparent;
    color: var(--brand-coffee) !important;
    border: 1px solid var(--brand-coffee);
    border-radius: var(--brand-radius-sm);
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-boutique-outline:hover, .btn-boutique-outline:focus {
    background-color: var(--brand-coffee);
    color: #FFFFFF !important;
    box-shadow: 0 4px 12px rgba(111, 82, 56, 0.15);
}

/* Botão Marcar como Vendido */
.btn-boutique-sold {
    background-color: #F5EFE6;
    color: var(--brand-coffee) !important;
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius-sm);
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.btn-boutique-sold:hover, .btn-boutique-sold:focus {
    background-color: var(--brand-coffee);
    color: #FFFFFF !important;
    border-color: var(--brand-coffee);
}

/* Cabeçalho de Página */
.dashboard-page-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--brand-border);
}

.dashboard-page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--brand-coffee);
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.dashboard-page-subtitle {
    color: var(--brand-text-muted);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   4. KPIs / Métricas Resumo (Grid Responsivo col-12 col-sm-6 col-lg-3)
   -------------------------------------------------------------------------- */
.kpi-card {
    background: var(--brand-card-bg);
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius);
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--brand-shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--brand-shadow);
    border-color: var(--brand-gold-light);
}

.kpi-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.kpi-icon-wrapper {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.kpi-icon-coffee {
    background: rgba(111, 82, 56, 0.1);
    color: var(--brand-coffee);
}

.kpi-icon-gold {
    background: rgba(176, 141, 87, 0.15);
    color: var(--brand-gold-dark);
}

.kpi-icon-green {
    background: rgba(35, 105, 50, 0.1);
    color: #236932;
}

.kpi-icon-amber {
    background: rgba(161, 98, 7, 0.1);
    color: #A16207;
}

.kpi-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: var(--brand-radius-pill);
    letter-spacing: 0.02em;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--brand-coffee);
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.kpi-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brand-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0;
}

.kpi-footer-text {
    font-size: 0.8rem;
    color: var(--brand-text-muted);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--brand-border-subtle);
}

/* Barra Segmentada de Coerência e Distribuição do Estoque */
.stock-balance-card {
    background: var(--brand-card-bg);
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--brand-shadow-sm);
    margin-bottom: 2rem;
}

.stock-balance-bar {
    height: 10px;
    border-radius: var(--brand-radius-pill);
    overflow: hidden;
    background-color: var(--brand-border-subtle);
    display: flex;
    width: 100%;
}

.stock-segment-disp {
    background-color: #236932;
    transition: width 0.4s ease;
}

.stock-segment-vend {
    background-color: var(--brand-coffee);
    transition: width 0.4s ease;
}

.stock-segment-outros {
    background-color: #B08D57;
    transition: width 0.4s ease;
}

.stock-pill-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: var(--brand-radius-pill);
    background-color: var(--brand-bg);
    border: 1px solid var(--brand-border-subtle);
    color: var(--brand-text-secondary);
}

.stock-pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* --------------------------------------------------------------------------
   5. Cards de Ação Rápida / Navegação Touch-Friendly (Index.cshtml)
   -------------------------------------------------------------------------- */
.nav-action-card {
    background: var(--brand-card-bg);
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius);
    padding: 1.25rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--brand-text-primary);
    box-shadow: var(--brand-shadow-sm);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    min-height: 76px;
    position: relative;
    overflow: hidden;
}

.nav-action-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: transparent;
    transition: background-color 0.2s ease;
}

.nav-action-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--brand-shadow);
    border-color: var(--brand-gold-light);
    color: var(--brand-coffee);
    text-decoration: none;
}

.nav-action-card:hover::before {
    background-color: var(--brand-gold);
}

.nav-action-card:active {
    transform: translateY(0);
    background-color: var(--brand-gold-subtle);
}

.nav-action-icon-box {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 12px;
    background: var(--brand-coffee-subtle);
    color: var(--brand-coffee);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    transition: all 0.2s ease;
}

.nav-action-card:hover .nav-action-icon-box {
    background: var(--brand-coffee);
    color: #FFFFFF;
    transform: scale(1.05);
}

.nav-action-content {
    flex-grow: 1;
    min-width: 0;
}

.nav-action-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-coffee);
    margin-bottom: 0.15rem;
    line-height: 1.25;
}

.nav-action-desc {
    font-size: 0.825rem;
    color: var(--brand-text-muted);
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-action-chevron {
    color: var(--brand-border);
    font-size: 1rem;
    transition: all 0.2s ease;
    margin-left: 0.25rem;
}

.nav-action-card:hover .nav-action-chevron {
    color: var(--brand-gold);
    transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   6. Gerenciar Produtos: Desktop Table & Mobile Cards
   -------------------------------------------------------------------------- */

/* Tabela Desktop Limpa e Sofisticada */
.table-boutique-wrapper {
    background: var(--brand-card-bg);
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius);
    box-shadow: var(--brand-shadow);
    overflow: hidden;
}

.table-boutique {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.table-boutique thead th {
    background-color: #F8F5F0;
    color: var(--brand-text-secondary);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 0.85rem;
    border-bottom: 1px solid var(--brand-border);
    vertical-align: middle;
}

.table-boutique tbody td {
    padding: 0.9rem 0.85rem;
    border-bottom: 1px solid var(--brand-border-subtle);
    vertical-align: middle;
    font-size: 0.925rem;
}

.table-boutique tbody tr:last-child td {
    border-bottom: none;
}

.table-boutique tbody tr {
    transition: background-color 0.15s ease;
}

.table-boutique tbody tr:hover {
    background-color: rgba(176, 141, 87, 0.04);
}

/* Miniatura da foto na tabela desktop */
.table-product-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--brand-border);
    background-color: #FFFFFF;
    display: block;
    flex-shrink: 0;
}

/* Preço do produto */
.product-price-tag {
    font-weight: 700;
    color: var(--brand-coffee);
    font-size: 0.975rem;
}

/* Botões de Ação na Tabela e nos Cards */
.btn-action-boutique {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 8px;
    border: 1px solid var(--brand-border);
    background: #FFFFFF;
    color: var(--brand-text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-action-boutique:hover {
    border-color: var(--brand-coffee);
    color: var(--brand-coffee);
    background-color: var(--brand-coffee-subtle);
    transform: translateY(-1px);
}

.btn-action-edit:hover {
    border-color: var(--brand-coffee);
    color: var(--brand-coffee);
    background-color: var(--brand-coffee-subtle);
}

.btn-action-photo:hover {
    border-color: var(--brand-gold);
    color: var(--brand-gold-dark);
    background-color: var(--brand-gold-subtle);
}

.btn-action-sold:hover {
    border-color: #236932;
    color: #236932;
    background-color: var(--status-disp-bg);
}

.btn-action-delete:hover {
    border-color: #DC3545;
    color: #DC3545;
    background-color: #FFF5F5;
}

/* Badges de Status Boutique */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: var(--brand-radius-pill);
    font-size: 0.785rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.status-badge-disponivel {
    background-color: var(--status-disp-bg);
    color: var(--status-disp-text);
    border: 1px solid var(--status-disp-border);
}

.status-badge-vendido {
    background-color: var(--status-vend-bg);
    color: var(--status-vend-text);
    border: 1px solid var(--status-vend-border);
}

.status-badge-reservado {
    background-color: var(--status-res-bg);
    color: var(--status-res-text);
    border: 1px solid var(--status-res-border);
}

.status-badge-aguardando {
    background-color: var(--status-aguard-bg);
    color: var(--status-aguard-text);
    border: 1px solid var(--status-aguard-border);
}

/* --------------------------------------------------------------------------
   7. Layout em Cards Empilhados Mobile (Safari iOS & Telas < 768px)
   -------------------------------------------------------------------------- */
.product-card-mobile {
    background: var(--brand-card-bg);
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--brand-shadow-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.product-card-mobile:active {
    background-color: #FAF8F5;
}

.product-card-mobile-header {
    display: flex;
    gap: 0.875rem;
    align-items: flex-start;
}

.product-card-mobile-thumb {
    width: 68px;
    height: 68px;
    min-width: 68px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--brand-border);
    background-color: #FFFFFF;
    flex-shrink: 0;
}

.product-card-mobile-info {
    flex-grow: 1;
    min-width: 0;
}

.product-card-mobile-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-coffee);
    margin-bottom: 0.2rem;
    line-height: 1.25;
    word-break: break-word;
}

.product-card-mobile-meta {
    font-size: 0.825rem;
    color: var(--brand-text-muted);
    margin-bottom: 0.4rem;
}

.product-card-mobile-details {
    padding: 0.65rem 0;
    margin-top: 0.5rem;
    border-top: 1px solid var(--brand-border-subtle);
    border-bottom: 1px solid var(--brand-border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-card-mobile-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--brand-coffee);
    letter-spacing: -0.01em;
}

.product-card-mobile-payment {
    font-size: 0.8rem;
    margin-top: 0.4rem;
    margin-bottom: 0.4rem;
    color: var(--brand-text-muted);
}

.product-card-mobile-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    align-items: center;
}

.product-card-mobile-actions .btn {
    flex: 1 1 auto;
    font-size: 0.85rem;
    padding: 0.45rem 0.5rem;
    min-height: 44px;
}

/* --------------------------------------------------------------------------
   8. Barra de Filtros e Busca Rápida (Layout Mobile-First & Boutique)
   -------------------------------------------------------------------------- */
.filter-search-container {
    background: var(--brand-card-bg);
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius);
    padding: 0.875rem 1rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--brand-shadow-sm);
}

.filter-search-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.filter-search-input-group {
    width: 100%;
    min-width: 0;
}

.filter-pills-wrapper {
    width: 100%;
    min-width: 0;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.filter-pills::-webkit-scrollbar {
    display: none;
}

.filter-pill-btn {
    border: 1px solid var(--brand-border);
    background: #FFFFFF;
    color: var(--brand-text-secondary);
    padding: 0.4rem 0.85rem;
    border-radius: var(--brand-radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    touch-action: manipulation;
    transition: all 0.15s ease;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    user-select: none;
    line-height: 1.2;
}

.filter-pill-btn:hover {
    background: var(--brand-coffee-subtle);
    color: var(--brand-coffee);
    border-color: var(--brand-border-dark);
}

.filter-pill-btn.active, 
.filter-pill-btn.active:hover {
    background: var(--brand-coffee);
    color: #FFFFFF;
    border-color: var(--brand-coffee);
}

.filter-pill-btn .badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25em 0.55em;
    transition: all 0.15s ease;
}

.filter-pill-btn.active .badge {
    background-color: rgba(255, 255, 255, 0.25) !important;
    color: #FFFFFF !important;
}

/* Telas Desktop Grandes (>= 1200px): Busca à esquerda e Filtros alinhados à direita */
@media (min-width: 1200px) {
    .filter-search-wrapper {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1.25rem;
    }

    .filter-search-input-group {
        flex: 0 1 380px;
        max-width: 420px;
    }

    .filter-pills-wrapper {
        flex: 1 1 auto;
        display: flex;
        justify-content: flex-end;
    }

    .filter-pills {
        justify-content: flex-end;
        width: auto;
    }
}

/* --------------------------------------------------------------------------
   9. Utilitários de Ações e Rodapés com Safe Area (iOS / Safari)
   -------------------------------------------------------------------------- */
.boutique-action-footer {
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
}

@media (max-width: 575.98px) {
    .boutique-action-footer.sticky-mobile {
        position: -webkit-sticky;
        position: sticky;
        bottom: 0;
        background: rgba(255, 255, 255, 0.96);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
        padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom));
        margin: 1.5rem -1rem -1rem -1rem;
        border-top: 1px solid var(--brand-border);
        box-shadow: 0 -4px 16px rgba(111, 82, 56, 0.08);
        z-index: 1000;
    }
}

/* Galeria de Fotos & Sortable Drag States */
.photo-item-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sortable-ghost-boutique {
    opacity: 0.35 !important;
    border: 2px dashed var(--brand-gold) !important;
    transform: scale(0.98);
}

.sortable-chosen-boutique {
    box-shadow: 0 10px 25px rgba(111, 82, 56, 0.25) !important;
}

/* Badges para Pedidos (Cobrança e Etiquetas) */
.badge-cobranca-paga {
    background-color: var(--status-disp-bg);
    color: var(--status-disp-text);
    border: 1px solid var(--status-disp-border);
}

.badge-cobranca-pendente {
    background-color: #FFF9DB;
    color: #925400;
    border: 1px solid #FFE066;
}

.badge-cobranca-viewed {
    background-color: #E7F5FF;
    color: #1971C2;
    border: 1px solid #A5D8FF;
}

.badge-etiqueta-notcreated {
    background-color: #F1F3F5;
    color: #495057;
    border: 1px solid #CED4DA;
}

.badge-etiqueta-pending {
    background-color: #FFF9DB;
    color: #925400;
    border: 1px solid #FFE066;
}

.badge-etiqueta-released {
    background-color: #EBF5EE;
    color: #236932;
    border: 1px solid #C6E4CD;
}

.badge-etiqueta-generated {
    background-color: #E7F5FF;
    color: #1971C2;
    border: 1px solid #A5D8FF;
}

.badge-etiqueta-posted {
    background-color: #F3F0FF;
    color: #5F3DC4;
    border: 1px solid #D0BFFF;
}

.badge-etiqueta-delivered {
    background-color: #EBF5EE;
    color: #236932;
    border: 1px solid #C6E4CD;
}

.badge-etiqueta-cancelled {
    background-color: #FFF5F5;
    color: #C92A2A;
    border: 1px solid #FFC9C9;
}

/* Cartões Mobile de Pedidos e Clientes */
.order-card-mobile, .client-card-mobile {
    background: var(--brand-card-bg);
    border: 1px solid var(--brand-border);
    border-radius: var(--brand-radius);
    padding: 1.15rem;
    margin-bottom: 1rem;
    box-shadow: var(--brand-shadow-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.order-card-mobile:active, .client-card-mobile:active {
    background-color: #FAF8F5;
}

.client-avatar-circle {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    background: var(--brand-coffee-subtle);
    color: var(--brand-coffee);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    border: 1px solid var(--brand-border);
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Multi-Seleção Touch-Friendly de Categorias (Pills 44px, Safari iOS)
   -------------------------------------------------------------------------- */
.category-pills-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
}

.category-pill-label {
    display: inline-flex;
    align-items: stretch;
    margin: 0;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.category-pill-checkbox {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    pointer-events: none;
}

.category-pill-content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    border: 1.5px solid var(--brand-border);
    background-color: #FFFFFF;
    color: var(--brand-text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--brand-shadow-sm);
}

.category-pill-check {
    display: none;
    font-size: 0.85rem;
}

@media (hover: hover) {
    .category-pill-label:hover .category-pill-content {
        border-color: var(--brand-gold);
        background-color: var(--brand-coffee-subtle);
        color: var(--brand-coffee);
    }
}

.category-pill-checkbox:checked + .category-pill-content {
    background-color: var(--brand-coffee);
    border-color: var(--brand-coffee);
    color: #FFFFFF;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(111, 82, 56, 0.25);
    transform: translateY(-1px);
}

.category-pill-checkbox:checked + .category-pill-content .category-pill-check {
    display: inline-block;
}

.category-pill-checkbox:focus-visible + .category-pill-content {
    outline: 2px solid var(--brand-gold);
    outline-offset: 3px;
}

.category-pill-label:active .category-pill-content {
    transform: scale(0.97);
}


