:root {
    --sidebar-width: 260px;
}

body {
    background-color: #f4f6f9;
    font-family: 'Segoe UI', sans-serif;
}

#sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    transition: width .25s ease, min-width .25s ease;
    overflow: hidden;
    position: sticky;
    top: 0;
    height: 100vh;
}

#sidebar.collapsed {
    width: 0;
    min-width: 0;
}

#sidebar .sidebar-header { white-space: nowrap; }

#sidebar .nav-link {
    border-radius: 6px;
    margin: 2px 8px;
    transition: background .2s;
    white-space: nowrap;
}

#sidebar .nav-link:hover,
#sidebar .nav-link.active {
    background-color: rgba(255,255,255,.12);
    color: #fff !important;
}

#sidebar .nav-link.active {
    background-color: rgba(13,110,253,.3) !important;
    color: #fff !important;
}

#page-content-wrapper { min-height: 100vh; }

.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,.07);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
}

.stat-card { border-radius: 12px; border: none; color: #fff; }

.table-hover tbody tr:hover { background-color: rgba(13,110,253,.04); }

.pagination .page-link {
    border-radius: 6px;
    margin: 0 2px;
    border: 1px solid #dee2e6;
    color: #495057;
}

.pagination .page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

#pdv-busca-input { font-size: 1.1rem; }
.item-venda-row:hover { background-color: #f8f9fa; }

.badge-status-finalizada { background-color: #198754; }
.badge-status-aberta     { background-color: #ffc107; color:#000; }
.badge-status-cancelada  { background-color: #dc3545; }

.login-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
}

.login-card {
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
}

html { font-size: 14px; }
@media (min-width: 768px) { html { font-size: 16px; } }

/* Cards de Meta (gamificação) */
.meta-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: #fff;
    box-shadow: 0 10px 30px rgba(37,117,252,.35);
    transition: transform .2s ease, box-shadow .2s ease;
}

.meta-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(37,117,252,.45);
}

.meta-card::before {
    content: "";
    position: absolute;
    top: -60px; right: -60px;
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(255,255,255,.18) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.meta-card::after {
    content: "";
    position: absolute;
    bottom: -80px; left: -40px;
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(255,255,255,.12) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.meta-prize-badge { animation: meta-pulse 1.8s ease-in-out infinite; }

@keyframes meta-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.meta-progress-track {
    height: 26px;
    border-radius: 999px;
    background: rgba(255,255,255,.2);
    overflow: hidden;
    box-shadow: inset 0 2px 6px rgba(0,0,0,.25);
}

.meta-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #ffd60a, #ff8500);
    box-shadow: 0 0 14px rgba(255,193,7,.8);
    position: relative;
    overflow: hidden;
    transition: width 1s ease;
}

.meta-progress-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,.55) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: meta-shine 2.2s linear infinite;
}

@keyframes meta-shine {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.meta-checkpoint-chip {
    font-size: .85rem;
    padding: .45rem .8rem;
    font-weight: 600;
}

.meta-checkpoint-chip.atingido {
    background: rgba(255,255,255,.95);
    color: #198754;
}

.meta-checkpoint-chip:not(.atingido) {
    background: rgba(255,255,255,.15);
    color: rgba(255,255,255,.9);
    border: 1px dashed rgba(255,255,255,.45);
}

.meta-cta {
    background: rgba(255,255,255,.16);
    border-radius: 14px;
}
