/* ========================================
   QUINTAL BURGERS — ANIMATIONS v3
   Seguro: sem overflow:hidden em cards,
   sem opacity:0 via CSS (so via JS)
   ======================================== */

@keyframes qb-ripple {
    to { transform: scale(3.5); opacity: 0; }
}
@keyframes qb-fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes qb-fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes qb-scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes qb-slideRight {
    from { opacity: 0; transform: translateX(-16px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes qb-pulse-ring {
    0%   { box-shadow: 0 0 0 0 rgba(232,93,4,0.4); }
    70%  { box-shadow: 0 0 0 10px rgba(232,93,4,0); }
    100% { box-shadow: 0 0 0 0 rgba(232,93,4,0); }
}
@keyframes qb-logo-breathe {
    0%, 100% { filter: drop-shadow(0 0 5px rgba(232,93,4,0.35)); }
    50%       { filter: drop-shadow(0 0 16px rgba(232,93,4,0.7)); }
}
@keyframes qb-top-in {
    from { opacity: 0; transform: translateY(-100%); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes qb-bottom-in {
    from { opacity: 0; transform: translateY(100%); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes qb-skeleton {
    0%   { background-position: -400px 0; }
    100% { background-position:  400px 0; }
}

/* ==========================================
   SIDEBAR
   ========================================== */
.sidebar {
    animation: qb-slideRight 0.4s cubic-bezier(0.22,1,0.36,1) both;
}

/* Logo */
.brand-logo {
    animation: qb-logo-breathe 4s ease-in-out infinite !important;
    transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), filter 0.3s ease !important;
}
.brand-logo:hover {
    transform: scale(1.07) rotate(-1deg) !important;
    animation: none !important;
    filter: drop-shadow(0 0 20px rgba(232,93,4,0.9)) !important;
}

/* ==========================================
   TOP BAR
   ========================================== */
.top-bar {
    animation: qb-top-in 0.38s cubic-bezier(0.22,1,0.36,1) both;
    transition: box-shadow 0.3s ease, border-color 0.3s ease !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.page-title h1 {
    animation: qb-fadeUp 0.38s 0.08s cubic-bezier(0.22,1,0.36,1) both;
}

/* ==========================================
   STAT CARDS — SEM overflow:hidden
   ========================================== */
.stat-card {
    transition:
        transform 0.26s cubic-bezier(0.34,1.56,0.64,1),
        box-shadow 0.26s ease,
        border-color 0.22s ease !important;
    position: relative;
}
.stat-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 14px 36px rgba(0,0,0,0.45), 0 0 0 1px rgba(232,93,4,0.2) !important;
    border-color: rgba(232,93,4,0.3) !important;
}

/* ==========================================
   ACTION CARDS
   ========================================== */
.action-card {
    transition:
        transform 0.26s cubic-bezier(0.34,1.56,0.64,1),
        box-shadow 0.26s ease,
        border-color 0.22s ease !important;
    position: relative;
}
.action-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 12px 32px rgba(0,0,0,0.4) !important;
    border-color: rgba(232,93,4,0.35) !important;
}

.quick-action {
    transition:
        transform 0.26s cubic-bezier(0.34,1.56,0.64,1),
        box-shadow 0.26s ease,
        border-color 0.22s ease !important;
}
.quick-action:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 10px 28px rgba(0,0,0,0.4) !important;
    border-color: rgba(232,93,4,0.3) !important;
}

/* ==========================================
   ITEM CARDS — SEM opacity:0 no CSS
   ========================================== */
.item-card {
    transition:
        transform 0.24s cubic-bezier(0.34,1.56,0.64,1),
        box-shadow 0.24s ease,
        border-color 0.2s ease !important;
    position: relative;
}
.item-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.38) !important;
    border-color: rgba(232,93,4,0.38) !important;
}

/* ==========================================
   COMANDA CARDS
   ========================================== */
.comanda-card {
    transition:
        transform 0.24s cubic-bezier(0.34,1.56,0.64,1),
        box-shadow 0.24s ease !important;
}
.comanda-card:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.38) !important;
}

/* ==========================================
   PRODUCT CARDS (PDV)
   ========================================== */
.product-card {
    transition:
        transform 0.18s cubic-bezier(0.34,1.56,0.64,1),
        box-shadow 0.18s ease,
        border-color 0.15s ease !important;
}
.product-card:hover {
    transform: scale(1.04) !important;
    box-shadow: 0 6px 18px rgba(232,93,4,0.22) !important;
    border-color: var(--primary) !important;
}
.product-card:active {
    transform: scale(0.96) !important;
    transition-duration: 0.08s !important;
}

/* ==========================================
   BOTOES
   ========================================== */
.btn {
    transition:
        transform 0.18s cubic-bezier(0.34,1.56,0.64,1),
        box-shadow 0.18s ease,
        background 0.2s ease,
        border-color 0.18s ease !important;
    position: relative;
}
.btn:hover  { transform: translateY(-2px) !important; }
.btn:active { transform: translateY(0) scale(0.97) !important; transition-duration: 0.08s !important; }

.btn-primary  { box-shadow: 0 4px 14px rgba(232,93,4,0.3) !important; }
.btn-primary:hover  { box-shadow: 0 8px 22px rgba(232,93,4,0.48) !important; }
.btn-success:hover  { box-shadow: 0 6px 18px rgba(39,174,96,0.38) !important; }
.btn-danger:hover   { box-shadow: 0 6px 18px rgba(231,76,60,0.38) !important; }

.btn-primary.btn-pulse {
    animation: qb-pulse-ring 1.8s cubic-bezier(0.66,0,0,1) infinite;
}

/* ==========================================
   FORMULARIOS
   ========================================== */
input, select, textarea {
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(232,93,4,0.16), 0 2px 6px rgba(0,0,0,0.18) !important;
}
.form-group.qb-focused label {
    color: var(--primary) !important;
    transition: color 0.2s ease;
}

/* ==========================================
   MODAIS
   ========================================== */
.modal-overlay {
    transition: opacity 0.28s ease, visibility 0.28s ease !important;
}
.modal-overlay.active {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.modal {
    transition: transform 0.32s cubic-bezier(0.34,1.56,0.64,1), opacity 0.28s ease !important;
    will-change: transform;
}
.modal-overlay:not(.active) .modal {
    transform: scale(0.9) translateY(20px) !important;
    opacity: 0;
}
.modal-overlay.active .modal {
    transform: scale(1) translateY(0) !important;
    opacity: 1;
}
.modal-overlay.qb-closing {
    opacity: 0 !important;
    transition: opacity 0.26s ease !important;
}
.modal-overlay.qb-closing .modal {
    transform: scale(0.9) translateY(16px) !important;
    transition: transform 0.26s ease !important;
}
.modal-close {
    transition: background 0.18s ease, color 0.18s ease, transform 0.22s cubic-bezier(0.34,1.56,0.64,1) !important;
}
.modal-close:hover {
    transform: rotate(90deg) scale(1.1) !important;
    background: var(--danger) !important;
    color: white !important;
}

/* ==========================================
   TOASTS
   ========================================== */
.toast {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.toast:hover {
    transform: translateX(-3px) !important;
    box-shadow: 0 10px 36px rgba(0,0,0,0.55) !important;
}

/* ==========================================
   MOBILE BOTTOM NAV
   ========================================== */
.mobile-bottom-nav {
    animation: qb-bottom-in 0.4s cubic-bezier(0.22,1,0.36,1) both;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(15,15,26,0.94) !important;
    border-top: 1px solid rgba(255,255,255,0.07) !important;
    box-shadow: 0 -6px 28px rgba(0,0,0,0.4) !important;
}
.mobile-bottom-nav a {
    transition: color 0.2s ease, background 0.2s ease,
                transform 0.22s cubic-bezier(0.34,1.56,0.64,1) !important;
    position: relative;
}
.mobile-bottom-nav a .icon {
    display: block;
    transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1);
}
.mobile-bottom-nav a.active .icon,
.mobile-bottom-nav a:hover .icon {
    transform: translateY(-2px) scale(1.1);
}
.mobile-bottom-nav a.active::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 28px; height: 3px;
    background: linear-gradient(90deg, var(--primary-light), var(--primary));
    border-radius: 0 0 5px 5px;
    box-shadow: 0 0 8px rgba(232,93,4,0.5);
    animation: qb-fadeIn 0.22s ease;
}
.mobile-bottom-nav a:active {
    transform: scale(0.88) !important;
}

/* ==========================================
   REPORT CARDS & SECTION CARDS
   ========================================== */
.section-card, .chart-card {
    transition: box-shadow 0.26s ease, border-color 0.2s ease !important;
}
.section-card:hover, .chart-card:hover {
    box-shadow: 0 8px 26px rgba(0,0,0,0.38) !important;
    border-color: var(--border-light) !important;
}
.report-card {
    transition: transform 0.24s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.24s ease !important;
}
.report-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 10px 28px rgba(0,0,0,0.4) !important;
}

/* ==========================================
   ABAS
   ========================================== */
.clientes-tab, .report-tab, .financeiro-tab {
    transition: color 0.2s ease, background 0.2s ease !important;
    position: relative;
}
.clientes-tab::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0; right: 0;
    height: 3px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.25s cubic-bezier(0.22,1,0.36,1);
    border-radius: 2px 2px 0 0;
}
.clientes-tab.active::after {
    transform: scaleX(1);
}
/* report-tab e financeiro-tab: sem linha, só cor de fundo */
.report-tab::after, .financeiro-tab::after { display: none; }

/* ==========================================
   TABELAS
   ========================================== */
tbody tr { transition: background 0.15s ease !important; }
tbody tr:hover td { background: rgba(232,93,4,0.04) !important; }

/* ==========================================
   STATUS DOT
   ========================================== */
.status-indicator.online .status-dot {
    animation: qb-pulse-ring 2.2s cubic-bezier(0.66,0,0,1) infinite !important;
}

/* ==========================================
   SCROLLBAR
   ========================================== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ==========================================
   CHECKBOX
   ========================================== */
input[type="checkbox"] {
    transition: background 0.18s ease, border-color 0.18s ease,
                transform 0.18s cubic-bezier(0.34,1.56,0.64,1) !important;
}
input[type="checkbox"]:hover { transform: scale(1.08) !important; }

/* ==========================================
   SKELETON
   ========================================== */
.qb-skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 400px 100%;
    animation: qb-skeleton 1.4s ease infinite;
    border-radius: var(--radius-md);
    color: transparent !important;
    user-select: none;
}
.qb-skeleton * { visibility: hidden !important; }

/* ==========================================
   KEYBOARD FOCUS
   ========================================== */
.qb-using-keyboard .btn:focus,
.qb-using-keyboard input:focus,
.qb-using-keyboard .nav-item:focus {
    outline: 2px solid var(--primary) !important;
    outline-offset: 2px !important;
}

/* ==========================================
   MOBILE
   ========================================== */
@media (max-width: 768px) {
    .stat-card:hover, .item-card:hover,
    .action-card:hover, .quick-action:hover {
        transform: translateY(-2px) !important;
    }
    .btn:hover { transform: none !important; }
    .btn:active { transform: scale(0.95) !important; }
    .product-card:hover { transform: scale(1.02) !important; }
    .product-card:active { transform: scale(0.94) !important; }
    .mobile-bottom-nav { background: rgba(10,10,20,0.96) !important; }
    .modal-overlay.active {
        backdrop-filter: blur(2px) !important;
        -webkit-backdrop-filter: blur(2px) !important;
    }
}

/* ==========================================
   TEMA CLARO
   ========================================== */
html.light-theme .mobile-bottom-nav,
[data-theme="light"] .mobile-bottom-nav {
    background: rgba(255,255,255,0.96) !important;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.08) !important;
    border-top: 1px solid rgba(0,0,0,0.08) !important;
}

/* ==========================================
   REDUCAO DE MOVIMENTO
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================
   UTILITARIOS
   ========================================== */
.qb-lift { transition: transform 0.24s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.24s ease; }
.qb-lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.qb-anim-fadeUp  { animation: qb-fadeUp  0.35s cubic-bezier(0.22,1,0.36,1) both; }
.qb-anim-fadeIn  { animation: qb-fadeIn  0.3s ease both; }
.qb-anim-scaleIn { animation: qb-scaleIn 0.32s cubic-bezier(0.22,1,0.36,1) both; }
.qb-delay-1 { animation-delay: 0.06s; }
.qb-delay-2 { animation-delay: 0.12s; }
.qb-delay-3 { animation-delay: 0.18s; }
.qb-delay-4 { animation-delay: 0.24s; }
.qb-delay-5 { animation-delay: 0.30s; }
