/* ============================================
   MOOD PRICING - ESTILOS GLOBAIS
   Sistema de Precificação Modern Mood
   ============================================ */

/* ===== VARIÁVEIS CSS ===== */
:root {
    /* Cores Principais - Modern Mood Design System */
    --primary-color: #EC7014;
    --primary-dark: #d96310;
    --primary-light: #ff8c3a;
    
    /* Cores de Fundo - Modern Mood */
    --bg-primary: #F8F3EB;
    --bg-secondary: #F8F3EB;
    --bg-card: #ffffff;
    --bg-hover: rgba(236, 112, 20, 0.1);
    
    /* Cores de Texto */
    --text-primary: #141414;
    --text-secondary: #6c757d;
    --text-muted: #adb5bd;
    
    /* Cores de Status - Modern Mood */
    --success: #E0F431;
    --warning: #E0F431;
    --danger: #F1B3C2;
    --info: #EC7014;
    
    /* Cores Alternativas */
    --accent-pink: #F1B3C2;
    --accent-lime: #E0F431;
    
    /* Bordas e Sombras */
    --border-color: #F8F3EB;
    --border-radius: 12px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    
    /* Espaçamentos */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    /* Tipografia */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.5rem;
    
    /* Transições */
    --transition: all 0.3s ease;
}

/* Dark Mode */
[data-theme="dark"] {
    --bg-primary: #1a1d23;
    --bg-secondary: #25282e;
    --bg-card: #2d3139;
    --bg-hover: #33363e;
    
    --text-primary: #e9ecef;
    --text-secondary: #adb5bd;
    --text-muted: #6c757d;
    
    --border-color: #3d4149;
}

/* ===== RESET E BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    transition: var(--transition);
    overflow-x: hidden; /* Previne scroll horizontal */
}

/* Previne scroll quando sidebar mobile está aberta */
body.sidebar-open {
    overflow: hidden;
}

/* ===== UTILITY CLASSES ===== */
.hidden {
    display: none !important;
}

/* ===== TELA DE LOGIN ===== */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: var(--spacing-lg);
}

.login-screen.hidden {
    display: none !important;
}

.login-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-xl);
    max-width: 400px;
    width: 100%;
    text-align: center;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-logo {
    width: 80px;
    height: auto;
    margin-bottom: var(--spacing-lg);
}

.logo-dark {
    display: none;
}

[data-theme="dark"] .logo-light {
    display: none;
}

[data-theme="dark"] .logo-dark {
    display: block;
}

.login-card h2 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-xl);
}

.login-card p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
}

.form-group-login {
    margin-bottom: var(--spacing-lg);
    text-align: left;
}

.form-group-login label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-sm);
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    width: 100%;
    padding: var(--spacing-md);
    padding-right: 3rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
}

.password-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(236, 112, 20, 0.1);
}

.toggle-password {
    position: absolute;
    right: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--spacing-sm);
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--primary-color);
}

.login-error {
    background: #ffe5e5;
    color: var(--danger);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    margin-top: var(--spacing-lg);
    font-size: var(--font-size-sm);
}

/* ===== BOTÕES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    border: none;
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    width: 100%;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--bg-hover);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-icon {
    padding: 0.5rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.125rem;
}

.btn-icon:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(236, 112, 20, 0.25);
}

.btn-icon:active {
    transform: translateY(0);
}

/* Botão de tema com efeito especial */
#themeToggle {
    position: relative;
    overflow: hidden;
}

#themeToggle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(236, 112, 20, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

#themeToggle:hover::before {
    width: 100%;
    height: 100%;
}

#themeToggle i {
    position: relative;
    z-index: 1;
}

/* Botão de logout premium */
.btn-logout {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(236, 112, 20, 0.25);
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(236, 112, 20, 0.35);
}

.btn-logout:active {
    transform: translateY(0);
}

.btn-logout i {
    margin-right: 0.5rem;
}

.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== CONTAINER PRINCIPAL ===== */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* ===== HEADER ===== */
.main-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: margin-left 0.3s ease, padding 0.3s ease;
}

/* Desktop: Header com margem para sidebar */
@media (min-width: 1024px) {
    .main-header {
        margin-left: 280px;
        padding: 1rem 2rem;
    }
    
    .header-content {
        max-width: 100%;
    }
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(236, 112, 20, 0.25);
    flex-shrink: 0;
}

.menu-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(236, 112, 20, 0.35);
}

.menu-toggle:active {
    transform: translateY(0);
}

.menu-toggle i {
    transition: transform 0.3s ease;
}

.sidebar-open .menu-toggle i {
    transform: rotate(90deg);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0; /* Permite truncar texto se necessário */
}

.header-logo {
    width: 40px;
    height: auto;
    flex-shrink: 0;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.header-title h1 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
    font-weight: 700;
    white-space: nowrap;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.btn-logout .btn-text {
    display: inline;
}

/* ===== SIDEBAR PREMIUM ===== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 280px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.08);
    z-index: 150;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.active {
    transform: translateX(0);
}

/* Desktop: Sidebar sempre visível e conteúdo ajustado */
@media (min-width: 1024px) {
    .sidebar {
        transform: translateX(0);
        z-index: 90; /* Menor que o header para não sobrepor */
    }
}

.sidebar-header {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
    min-height: 70px;
}

.sidebar-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

#sidebarClose {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

#sidebarClose:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
    transform: rotate(90deg);
}

.sidebar-nav {
    flex: 1;
    padding: var(--spacing-lg) 0;
    overflow-y: auto;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-xl);
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.sidebar-item:hover {
    background: var(--bg-hover);
    color: var(--primary-color);
}

.sidebar-item.active {
    background: rgba(236, 112, 20, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.sidebar-item i {
    font-size: var(--font-size-lg);
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border-color);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

.sidebar-user i {
    font-size: 1.5rem;
}

.btn-block {
    width: 100%;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 140; /* Entre sidebar e header em mobile */
    display: none;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Desktop: Sidebar sempre visível */
@media (min-width: 1024px) {
    .sidebar {
        transform: translateX(0);
        position: fixed;
        z-index: 90;
    }

    /* Sidebar colapsada */
    .sidebar.collapsed {
        width: 70px;
    }

    .sidebar.collapsed .sidebar-header h3,
    .sidebar.collapsed .sidebar-item span,
    .sidebar.collapsed .sidebar-footer-text {
        display: none;
    }

    .sidebar.collapsed .sidebar-item {
        justify-content: center;
        padding: var(--spacing-md);
    }

    .sidebar.collapsed .sidebar-item i {
        font-size: 1.25rem;
    }

    .sidebar.collapsed .sidebar-header {
        justify-content: center;
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    /* Ajuste do conteúdo quando sidebar colapsada */
    .main-content {
        margin-left: 280px;
        transition: margin-left 0.3s ease;
    }

    .main-content.sidebar-collapsed {
        margin-left: 70px;
    }
    
    .menu-toggle {
        display: flex !important; /* Sempre visível para permitir colapso */
    }
    
    .sidebar-overlay {
        display: none !important;
    }
    
    .sidebar-header {
        padding-top: calc(76px + var(--spacing-md)); /* Altura do header + espaçamento */
    }
}

/* Tablet e Mobile: Menu hamburguer */
@media (max-width: 1023px) {
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .main-header {
        padding: 0.875rem 1rem;
    }
    
    #sidebarClose {
        display: flex;
    }
    
    .sidebar {
        z-index: 150; /* Maior em mobile para sobrepor tudo */
    }
    
    .sidebar-header {
        padding: var(--spacing-lg);
    }
    
    .main-content {
        margin-left: 0;
    }
}

/* ===== NAVEGAÇÃO (DEPRECATED - Mantido para compatibilidade) ===== */
.main-nav {
    display: none; /* Oculto em favor da sidebar */
}

.nav-content {
    display: none;
}

.nav-item {
    display: none;
}

/* ===== CONTEÚDO PRINCIPAL ===== */
.main-content {
    flex: 1;
    padding: var(--spacing-xl);
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    transition: margin-left 0.3s ease;
}

/* Desktop: Conteúdo com margem para não sobrepor sidebar */
@media (min-width: 1024px) {
    .main-content {
        margin-left: 280px;
        padding: var(--spacing-xl);
        max-width: calc(100% - 280px);
    }
}

/* Mobile: Conteúdo sem margem */
@media (max-width: 1023px) {
    .main-content {
        margin-left: 0;
    }
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: var(--font-size-lg);
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.card-body {
    color: var(--text-secondary);
}

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.badge-primary {
    background: rgba(236, 112, 20, 0.1);
    color: var(--primary-color);
}

.badge-success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #d39e00;
}

.badge-danger {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.toast {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-md) var(--spacing-lg);
    min-width: 300px;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--danger);
}

.toast-warning {
    border-left: 4px solid var(--warning);
}

.toast-info {
    border-left: 4px solid var(--info);
}

/* ===== GRID SYSTEM ===== */
.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ===== FORMULÁRIOS ===== */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
}

.form-control {
    width: 100%;
    padding: var(--spacing-md);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: var(--font-size-base);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(236, 112, 20, 0.1);
}

.form-control:disabled {
    background: var(--bg-secondary);
    cursor: not-allowed;
}

select.form-control {
    cursor: pointer;
}

/* ===== TABELAS ===== */
.table-container {
    overflow-x: auto;
    border-radius: var(--border-radius);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: var(--font-size-sm);
    text-transform: uppercase;
}

.table tbody tr:hover {
    background: var(--bg-hover);
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 1023px) {
    .header-title h1 {
        font-size: 1.25rem;
    }
    
    .header-title .badge {
        display: none;
    }
    
    .btn-logout .btn-text {
        display: none;
    }
    
    .main-content {
        padding: var(--spacing-md);
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 0;
        gap: 0.75rem;
    }
    
    .logo-section {
        gap: 0.625rem;
        flex: 1;
        min-width: 0;
    }
    
    .header-logo {
        width: 32px;
    }
    
    .header-title h1 {
        font-size: 1rem;
        font-weight: 700;
    }
    
    .header-title .badge {
        font-size: 0.65rem;
        padding: 0.125rem 0.375rem;
    }
    
    .header-actions {
        gap: 0.5rem;
    }
    
    .header-actions .btn-logout .btn-text {
        display: none;
    }
    
    .header-actions .btn-logout {
        padding: 0.5rem;
        min-width: auto;
    }
    
    .main-content {
        padding: var(--spacing-sm);
    }
    
    .card {
        padding: var(--spacing-md);
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
}

/* Mobile pequeno - Ajustes extras */
@media (max-width: 480px) {
    .main-header {
        padding: 0.75rem 0.875rem;
    }
    
    .menu-toggle {
        width: 40px;
        height: 40px;
        font-size: 1.125rem;
    }
    
    .header-logo {
        width: 28px;
    }
    
    .header-title h1 {
        font-size: 0.9rem;
    }
    
    .header-title .badge {
        display: none;
    }
    
    .btn-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary-color); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: #d39e00; }

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.hidden { display: none !important; }
.flex { display: flex; }
.flex-center { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

/* ===== COLLECTIONS PAGE ===== */
.collections-page {
    max-width: 100%;
}

.collection-card {
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.collection-card .card-body {
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.collection-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.collection-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
    gap: var(--spacing-sm);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--border-color);
}

.collection-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.collection-header .badge {
    flex-shrink: 0;
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    font-weight: 700;
}

.collection-handle {
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--text-muted);
    font-family: 'Courier New', monospace;
    background: var(--bg-secondary);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
}

.collection-handle i {
    color: var(--primary-color);
}

.collection-stats {
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
    flex: 1; /* Ocupa o espaço disponível */
    display: flex;
    flex-direction: column;
    min-height: 200px; /* Altura mínima para alinhar cards */
}

.collection-stats-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
    border-bottom: 1px solid var(--border-color);
}

.stat-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-label i {
    width: 16px;
    text-align: center;
    font-size: 0.875rem;
    color: var(--primary-color);
}

.stat-value {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1rem;
}

.stat-value.highlight {
    color: var(--success);
    font-size: 1.125rem;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
}

.stat-badge.success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
}

.stat-badge.warning {
    background: rgba(255, 193, 7, 0.1);
    color: #d39e00;
}

.stat-badge.info {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

.collection-meta {
    padding: var(--spacing-sm) 0;
    margin: 0; /* Remove margin-top automático */
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.collection-meta small {
    font-size: 0.8125rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.collection-meta i {
    color: var(--primary-color);
}

.collection-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm); /* Menor espaço para compensar */
}

.collection-actions .btn {
    flex: 1;
    justify-content: center;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    text-align: center;
}

.btn-sm {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
}

/* Grid responsivo melhorado */
.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-3 {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

/* Filtros */
.filters-row {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.9375rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(236, 112, 20, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.3;
}

.empty-state p {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-md);
}

/* Loading state */
.loading-collections {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    gap: var(--spacing-md);
}

.loading-collections .loader {
    width: 48px;
    height: 48px;
    border-width: 4px;
}

.loading-collections p {
    margin: 0;
    text-align: center;
}

/* Responsividade */
@media (max-width: 1200px) {
    .grid-3 {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .collection-card .card-body {
        padding: var(--spacing-md);
    }
    
    .collection-name {
        font-size: 1.125rem;
    }
    
    .collection-actions {
        flex-direction: column;
    }
    
    .collection-actions .btn {
        width: 100%;
        flex: none;
    }
    
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .filters-row {
        flex-direction: column;
    }
    
    .filters-row .form-group {
        width: 100%;
    }
}

/* ============================================
   PÁGINA DE DESCONTOS
   ============================================ */

.discounts-page .page-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.collection-selected {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.collection-info h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.collection-actions {
    display: flex;
    gap: 0.5rem;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.selection-info {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.actions-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Tabela de Produtos */
.products-table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
}

.products-table thead {
    background: var(--bg-secondary);
    position: sticky;
    top: 0;
    z-index: 10;
}

.products-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.products-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.products-table tbody tr {
    transition: var(--transition);
}

.products-table tbody tr:hover {
    background: var(--bg-hover);
}

.products-table tbody tr.selected {
    background: rgba(236, 112, 20, 0.05);
}

.product-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.product-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.product-thumb-placeholder {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 1.5rem;
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.product-info strong {
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.product-info small {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

.modal-lg {
    max-width: 900px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    padding: 0.5rem;
    border-radius: 8px;
}

.modal-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Discount Config */
.discount-config {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Resumo Compacto no Topo */
.discount-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.summary-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-item strong {
    font-size: 1.125rem;
    color: var(--text-primary);
}

/* Inputs em Linha */
.discount-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group.compact {
    margin-bottom: 0;
}

.form-group.compact label {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Opções Compactas */
.discount-options {
    display: flex;
    gap: 2rem;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin-bottom: 0;
}

.checkbox-label.compact {
    font-size: 0.875rem;
}

.checkbox-label.compact span {
    white-space: nowrap;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Preview Compacto */
.discount-preview.compact {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    max-height: 300px;
    overflow-y: auto;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.preview-header strong {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.preview-count {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.preview-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-card);
    border-radius: 6px;
    transition: background 0.2s;
}

.preview-item:hover {
    background: var(--bg-hover);
}

.preview-product {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.preview-product strong {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.preview-product small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.preview-prices {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.old-price {
    color: var(--text-muted);
    text-decoration: line-through;
}

.new-price {
    font-weight: 600;
    color: var(--success);
}

.preview-prices i {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Preview Antigo (manter para compatibilidade) */
.discount-preview {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.discount-preview h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preview-table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
}

.preview-table thead {
    background: var(--bg-hover);
}

.preview-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.preview-table td {
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.preview-table tbody tr:hover {
    background: var(--bg-hover);
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
}

.loading-state .loader {
    width: 50px;
    height: 50px;
}

.loading-state p {
    margin: 0;
    color: var(--text-primary);
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .discounts-page .page-header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .collection-selected {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .collection-actions {
        width: 100%;
    }
    
    .collection-actions .btn {
        flex: 1;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-row {
        flex-wrap: wrap;
    }
    
    .products-table {
        font-size: 0.875rem;
    }
    
    .products-table th,
    .products-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .product-thumb,
    .product-thumb-placeholder {
        width: 50px;
        height: 50px;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
}

/* ============================================
   MODAL DE RESULTADO
   ============================================ */

.result-summary {
    text-align: center;
}

.result-header {
    margin-bottom: 2rem;
}

.result-header i {
    margin-bottom: 1rem;
}

.result-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.75rem;
}

.result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--border-color);
}

.stat-card.success {
    border-left-color: var(--success);
}

.stat-card.danger {
    border-left-color: var(--danger);
}

.stat-card.info {
    border-left-color: var(--info);
}

.stat-card i {
    font-size: 2rem;
    color: var(--text-muted);
}

.stat-card.success i {
    color: var(--success);
}

.stat-card.danger i {
    color: var(--danger);
}

.stat-card.info i {
    color: var(--info);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.result-details {
    text-align: left;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.result-details.error {
    background: rgba(220, 53, 69, 0.05);
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.result-details h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
}

.result-table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
}

.result-table thead {
    background: var(--bg-hover);
}

.result-table th {
    padding: 0.875rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
}

.result-table td {
    padding: 0.875rem;
    border-bottom: 1px solid var(--border-color);
}

.result-table tbody tr:last-child td {
    border-bottom: none;
}

.result-table tbody tr:hover {
    background: var(--bg-hover);
}

.error-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
}

.error-list li {
    padding: 0.75rem;
    background: var(--bg-card);
    border-left: 3px solid var(--danger);
    margin-bottom: 0.5rem;
    border-radius: 4px;
    font-size: 0.9375rem;
}

.error-list li strong {
    color: var(--danger);
}

/* ============================================
   MODAL DE REVERSÃO
   ============================================ */

.revert-config {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.revert-summary {
    display: flex;
    justify-content: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.revert-list {
    max-height: 400px;
    overflow-y: auto;
}

.revert-list h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.revert-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--warning);
}

.revert-item:hover {
    background: var(--bg-hover);
}

.revert-item strong {
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.revert-prices {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.revert-prices .current {
    color: var(--text-muted);
}

.revert-prices .revert-to {
    font-weight: 600;
    color: var(--success);
}

.revert-prices i {
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .result-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        justify-content: center;
    }
}

/* ============================================
   PÁGINA DE PRODUTOS E VARIANTES
   ============================================ */

.products-page {
    padding: 2rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

/* Tabela de Produtos */
.products-table {
    width: 100%;
    border-collapse: collapse;
}

.products-table thead {
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
}

.products-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.products-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.products-table tbody tr:hover {
    background: var(--bg-hover);
}

.products-table td {
    padding: 1rem;
    vertical-align: middle;
}

.product-row.expanded {
    background: var(--bg-secondary);
}

.product-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.product-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.product-thumb-placeholder {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 1.5rem;
}

/* Tabela de Variantes */
.variants-container td {
    padding: 0 !important;
    background: var(--bg-card);
}

.variants-table-wrapper {
    padding: 1rem;
    background: var(--bg-hover);
    border-left: 4px solid var(--primary);
}

.variants-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
}

.variants-table thead {
    background: var(--bg-secondary);
}

.variants-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.variants-table td {
    padding: 0.75rem;
    font-size: 0.875rem;
}

.variant-row {
    border-bottom: 1px solid var(--border-color);
}

.variant-row:last-child {
    border-bottom: none;
}

.variant-row:hover {
    background: var(--bg-hover);
}

/* Campos Editáveis */
.editable-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 100px;
}

.editable-field .field-value {
    flex: 1;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.editable-field:hover .field-value {
    background: var(--bg-secondary);
}

.editable-field .btn-edit {
    opacity: 0;
    transition: opacity 0.2s;
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.editable-field:hover .btn-edit {
    opacity: 1;
}

.editable-field .btn-edit:hover {
    background: var(--primary);
    color: white;
}

.editable-field input {
    flex: 1;
}

.edit-actions {
    display: flex;
    gap: 0.25rem;
}

.edit-actions .btn-icon {
    padding: 0.25rem 0.5rem;
}

/* Dimensões */
.dimensions-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8125rem;
}

.dim-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dim-label {
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.75rem;
    min-width: 12px;
    text-transform: uppercase;
}

.dim-value {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.8125rem;
}

/* Botões de Ação */
.btn-group {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.btn-icon.btn-sm {
    padding: 0.375rem;
    font-size: 0.875rem;
}

.btn-icon.btn-success:hover {
    background: var(--success);
    border-color: var(--success);
}

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

/* Paginação */
.pagination-controls {
    display: flex;
    justify-content: center;
    padding: 1rem;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination .btn {
    min-width: 40px;
}

.pagination-info {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Estado Vazio */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    opacity: 0.5;
}

/* Responsivo */
@media (max-width: 1400px) {
    .variants-table {
        font-size: 0.8125rem;
    }
    
    .variants-table th,
    .variants-table td {
        padding: 0.5rem;
    }
}

@media (max-width: 768px) {
    .products-page {
        padding: 0.75rem;
    }
    
    /* Header responsivo */
    .page-header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch !important;
    }
    
    .header-actions {
        flex-direction: row;
        width: 100%;
        gap: 0.5rem;
    }
    
    .header-actions button {
        flex: 1;
        white-space: nowrap;
        font-size: 0.8125rem !important;
        padding: 0.625rem 0.75rem !important;
    }
    
    /* Stats grid responsivo */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }
    
    .stat-card {
        min-width: unset !important;
        padding: 1rem !important;
    }
    
    .stat-value {
        font-size: 1.5rem !important;
    }
    
    .stat-label {
        font-size: 0.7rem !important;
    }
    
    /* Filtros */
    .filters-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    /* Card de produtos */
    .card {
        margin-bottom: 1rem;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .card-header {
        padding: 1rem !important;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .card-title {
        font-size: 1rem !important;
        flex: 1 1 100%;
    }
    
    .pagination-info {
        font-size: 0.8125rem;
        flex: 1 1 100%;
    }
    
    /* Tabelas */
    .products-table,
    .variants-table {
        font-size: 0.75rem;
    }
    
    .products-table th,
    .products-table td,
    .variants-table th,
    .variants-table td {
        padding: 0.5rem 0.25rem !important;
    }
    
    /* Thumbnails menores */
    .product-thumb,
    .product-thumb-placeholder {
        width: 40px !important;
        height: 40px !important;
    }
    
    /* Badges menores */
    .badge {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.4rem !important;
    }
    
    /* Botões de ação menores */
    .btn-icon {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.875rem !important;
    }
    
    /* Scroll horizontal para tabelas */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Melhorar visualização de tabelas no mobile */
    .products-table-wrapper,
    .variants-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1rem;
        padding: 0 1rem;
    }
}

/* Mobile extra pequeno */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    .header-actions {
        flex-direction: column;
    }
    
    .header-actions button {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .form-row,
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    #editVariantModal .modal-dialog {
        max-width: 95%;
        margin: 0.5rem;
    }
    
    .modal-body {
        max-height: calc(100vh - 150px) !important;
    }
    
    .form-section {
        padding: 0.875rem;
        margin-bottom: 1rem;
    }
    
    .form-section h4 {
        font-size: 0.8125rem;
    }
}

/* Modal de Edição */
#editVariantModal .modal-dialog {
    max-width: 600px;
}

#editVariantModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.form-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.form-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.form-row:last-child {
    margin-bottom: 0;
}

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

.form-group label {
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--text-muted);
}

.form-group input {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.875rem;
    transition: all 0.2s;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group input:disabled {
    background: var(--bg-secondary);
    color: var(--text-muted);
    cursor: not-allowed;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-item label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.info-item span {
    font-size: 0.875rem;
    color: var(--text-color);
    font-weight: 500;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Date Preset Buttons - Enhanced UX */
.date-presets button {
    transition: all 0.2s ease;
    font-weight: 500;
}

.date-presets button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.date-presets button:active {
    transform: translateY(0);
}

.date-presets button.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
}

/* Action Buttons - Enhanced UX */
.btn-icon {
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}

.btn-icon:active {
    transform: translateY(0);
}

