/* ===================================
   SMAX Market Intelligence - Dark Theme
   Modern Professional Design
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Dark Theme Colors */
    --bg-primary: #0f1117;
    --bg-secondary: #1a1f2e;
    --bg-card: #1e2537;
    --bg-hover: #252d42;
    
    /* Borders */
    --border-color: #2d3748;
    --border-active: #10b981;
    
    /* Text Colors */
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Accent Colors */
    --accent-primary: #10b981;
    --accent-secondary: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    
    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    /* Curves */
    --curva-a-bg: #064e3b;
    --curva-a-text: #34d399;
    --curva-b-bg: #1e3a5f;
    --curva-b-text: #60a5fa;
    --curva-c-bg: #4a1942;
    --curva-c-text: #f472b6;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.3);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===================================
   Scrollbar Custom
   =================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* ===================================
   Sidebar Navigation
   =================================== */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform var(--transition-normal);
}

.sidebar.collapsed {
    transform: translateX(-260px);
}

.logo-section {
    padding: 30px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: var(--accent-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    box-shadow: var(--shadow-glow);
}

.logo-text h2 {
    font-size: 24px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text p {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-menu {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    position: relative;
    font-weight: 500;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: var(--accent-gradient);
    transition: height var(--transition-fast);
    border-radius: 0 4px 4px 0;
}

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

.nav-item.active {
    color: var(--accent-primary);
    background: rgba(16, 185, 129, 0.1);
}

.nav-item.active::before {
    height: 70%;
}

.nav-item i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.date-display {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.version {
    font-size: 10px;
    color: var(--text-muted);
}

.sidebar-toggle {
    position: fixed;
    left: 20px;
    top: 20px;
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    transition: all var(--transition-fast);
}

.sidebar-toggle:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* ===================================
   Main Content
   =================================== */

.main-content {
    margin-left: 260px;
    min-height: 100vh;
    transition: margin-left var(--transition-normal);
}

.main-content.expanded {
    margin-left: 0;
}

.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 25px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-left {
    flex: 1;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.breadcrumb {
    font-size: 13px;
    color: var(--text-secondary);
}

.breadcrumb span:last-child {
    color: var(--accent-primary);
}

.header-right {
    display: flex;
    gap: 12px;
}

.btn-edit-mode,
.btn-save {
    padding: 10px 20px;
    border: 2px solid var(--accent-primary);
    background: transparent;
    color: var(--accent-primary);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

.btn-edit-mode:hover {
    background: var(--accent-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-edit-mode.active {
    background: var(--accent-primary);
    color: white;
    animation: pulse 2s infinite;
}

.btn-save {
    background: var(--accent-gradient);
    border: none;
    color: white;
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    50% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
}

/* ===================================
   Page Content
   =================================== */

.page-content {
    display: none;
    padding: 40px;
    animation: fadeIn 0.3s ease;
}

.page-content.active {
    display: block;
}

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

/* ===================================
   Dashboard
   =================================== */

.dashboard-header {
    margin-bottom: 40px;
}

.dashboard-title h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

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

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-fast);
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

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

.kpi-card:hover::before {
    opacity: 1;
}

.kpi-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-primary);
}

.card-gradient-1 .kpi-icon { background: rgba(16, 185, 129, 0.15); }
.card-gradient-2 .kpi-icon { background: rgba(6, 182, 212, 0.15); }
.card-gradient-3 .kpi-icon { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.card-gradient-4 .kpi-icon { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

.kpi-value {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.kpi-label {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.kpi-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

/* ===================================
   Insights Section
   =================================== */

.insights-section {
    margin: 50px 0;
}

.section-header {
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-header i {
    color: var(--accent-primary);
}

.section-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

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

.insight-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    gap: 20px;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.insight-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    transition: all var(--transition-fast);
}

.insight-hot::before { background: linear-gradient(180deg, #ef4444 0%, #f97316 100%); }
.insight-potential::before { background: linear-gradient(180deg, #3b82f6 0%, #8b5cf6 100%); }
.insight-margin::before { background: linear-gradient(180deg, #10b981 0%, #06b6d4 100%); }
.insight-alert::before { background: linear-gradient(180deg, #f59e0b 0%, #eab308 100%); }

.insight-card:hover {
    border-color: var(--accent-primary);
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
}

.insight-card:hover::before {
    width: 6px;
}

.insight-icon {
    font-size: 36px;
    flex-shrink: 0;
}

.insight-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-primary);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.insight-text {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.5;
}

.insight-text strong {
    color: var(--accent-primary);
    font-weight: 700;
}

/* ===================================
   Quick Stats
   =================================== */

.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 50px;
}

.stat-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-item i {
    font-size: 32px;
    color: var(--accent-primary);
}

.stat-item h4 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-item p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ===================================
   Products Page
   =================================== */

.produtos-header {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.search-bar {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.search-bar i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.search-bar input {
    width: 100%;
    padding: 14px 20px 14px 50px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all var(--transition-fast);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.btn-primary {
    padding: 14px 24px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.filters-bar {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

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

.filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.filter-group select {
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    min-width: 180px;
    transition: all var(--transition-fast);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

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

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: all var(--transition-fast);
    position: relative;
}

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

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.product-name {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.product-brand {
    font-size: 13px;
    color: var(--text-secondary);
}

.product-score {
    background: var(--accent-gradient);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
}

.product-details {
    margin: 16px 0;
}

.product-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

.product-detail-item:last-child {
    border-bottom: none;
}

.product-detail-item .label {
    color: var(--text-secondary);
}

.product-detail-item .value {
    font-weight: 600;
    color: var(--text-primary);
}

.product-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--accent-primary);
    margin: 16px 0;
}

.badge-curva {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-curva-a {
    background: var(--curva-a-bg);
    color: var(--curva-a-text);
}

.badge-curva-b {
    background: var(--curva-b-bg);
    color: var(--curva-b-text);
}

.badge-curva-c {
    background: var(--curva-c-bg);
    color: var(--curva-c-text);
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.btn-edit,
.btn-delete {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-edit {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-primary);
}

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

.btn-delete {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.btn-delete:hover {
    background: #ef4444;
    color: white;
}

/* ===================================
   Charts Page
   =================================== */

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 30px;
}

.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    transition: all var(--transition-fast);
}

.chart-container:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
}

.chart-container.full-width {
    grid-column: 1 / -1;
}

.chart-container h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-container h3 i {
    color: var(--accent-primary);
}

/* ===================================
   Table Page
   =================================== */

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

.table-header h2 {
    font-size: 26px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-export {
    padding: 12px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

.btn-export:hover {
    border-color: var(--accent-primary);
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-primary);
}

.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}

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

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

.data-table th {
    padding: 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.data-table tbody tr {
    transition: background var(--transition-fast);
}

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

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

.table-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.btn-icon.edit {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-primary);
}

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

.btn-icon.delete {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.btn-icon.delete:hover {
    background: #ef4444;
    color: white;
}

/* ===================================
   Configuration Page
   =================================== */

.config-sections {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.config-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
}

.config-section h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.config-section h2 i {
    color: var(--accent-primary);
}

.config-item {
    margin-bottom: 20px;
}

.config-item label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.config-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all var(--transition-fast);
}

.config-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.config-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-warning {
    padding: 12px 20px;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid #f59e0b;
    border-radius: 8px;
    color: #fbbf24;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

.btn-warning:hover {
    background: #f59e0b;
    color: white;
}

.btn-success {
    padding: 12px 20px;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid var(--accent-primary);
    border-radius: 8px;
    color: var(--accent-primary);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

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

.system-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.system-info p {
    font-size: 14px;
    color: var(--text-secondary);
}

.system-info strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ===================================
   Modal
   =================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

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

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

.modal-header h2 {
    font-size: 22px;
    font-weight: 700;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    border-radius: 8px;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.modal-body {
    padding: 30px;
}

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

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

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-group input,
.form-group select {
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.btn-secondary {
    padding: 12px 24px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

/* ===================================
   Executive Summary Section
   =================================== */

.executive-summary {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 50px;
    position: relative;
    overflow: hidden;
}

.executive-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    flex-wrap: wrap;
    gap: 30px;
}

.summary-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.summary-title i {
    font-size: 32px;
    color: var(--accent-primary);
    animation: pulse 2s infinite;
}

.summary-title h2 {
    font-size: 28px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.health-indicator {
    display: flex;
    align-items: center;
    gap: 20px;
}

.health-circle {
    position: relative;
    width: 120px;
    height: 120px;
}

.health-circle svg {
    transform: rotate(-90deg);
}

.health-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.health-value span {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
}

.health-value small {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.health-status h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.health-status p {
    font-size: 13px;
    color: var(--text-secondary);
}

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

.summary-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
    transition: all var(--transition-fast);
}

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

.summary-card.opportunities {
    border-left: 3px solid #10b981;
}

.summary-card.risks {
    border-left: 3px solid #ef4444;
}

.summary-card.recommendations {
    border-left: 3px solid #3b82f6;
}

.summary-icon {
    font-size: 32px;
    margin-bottom: 12px;
    color: var(--accent-primary);
}

.summary-icon i {
    font-size: 32px;
}

.summary-content h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.summary-content ul li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
}

.summary-content ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: 700;
}

.summary-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.metric-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.metric-item i {
    font-size: 28px;
    color: var(--accent-primary);
}

.metric-item span {
    display: block;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.metric-item p {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ===================================
   URL Analysis Modal - Professional Design
   =================================== */

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

.btn-analyze-url {
    margin-top: 8px;
    padding: 10px 16px;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid #8b5cf6;
    border-radius: 8px;
    color: #a78bfa;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
}

.btn-analyze-url:hover {
    background: #8b5cf6;
    color: white;
}

.btn-analyze-url:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.url-analysis-loading {
    text-align: center;
    padding: 80px 20px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    margin: 0 auto 24px;
    animation: spin 1s linear infinite;
}

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

.url-analysis-loading p {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: 600;
}

.url-analysis-loading small {
    font-size: 13px;
    color: var(--text-secondary);
}

.url-analysis-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.analysis-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all var(--transition-fast);
}

.analysis-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.analysis-card.full-width {
    grid-column: 1 / -1;
}

.analysis-card.highlight {
    border: 2px solid var(--accent-primary);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(6, 182, 212, 0.05) 100%);
}

.card-header {
    background: var(--bg-secondary);
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header i {
    color: var(--accent-primary);
    font-size: 18px;
}

.card-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-content {
    padding: 24px;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
}

.status-badge i {
    font-size: 24px;
    color: var(--accent-primary);
}

.status-badge span {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.status-badge.invalid {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.status-badge.invalid i {
    color: #ef4444;
}

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

.suggestion-item {
    text-align: center;
}

.suggestion-item label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.suggestion-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
}

.badge-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    font-size: 28px;
    font-weight: 800;
    border-radius: 12px;
    background: var(--curva-a-bg);
    color: var(--curva-a-text);
    border: 2px solid var(--curva-a-text);
}

.badge-large.curva-b {
    background: var(--curva-b-bg);
    color: var(--curva-b-text);
    border-color: var(--curva-b-text);
}

.badge-large.curva-c {
    background: var(--curva-c-bg);
    color: var(--curva-c-text);
    border-color: var(--curva-c-text);
}

.score-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    font-size: 24px;
    font-weight: 800;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
}

.btn-apply {
    padding: 8px 16px;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid var(--accent-primary);
    border-radius: 6px;
    color: var(--accent-primary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-transform: uppercase;
}

.btn-apply:hover {
    background: var(--accent-primary);
    color: white;
}

.btn-apply-all {
    width: 100%;
    padding: 14px 20px;
    background: var(--accent-gradient);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all var(--transition-fast);
    text-transform: uppercase;
}

.btn-apply-all:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.suggestion-reason {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
    font-style: italic;
}

.metric-display {
    text-align: center;
}

.metric-value {
    display: block;
    font-size: 32px;
    font-weight: 800;
    color: var(--accent-primary);
    margin-bottom: 8px;
}

.metric-value.small {
    font-size: 20px;
}

.metric-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.seo-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.seo-circle {
    position: relative;
    width: 80px;
    height: 80px;
}

.seo-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.competitor-grid {
    display: grid;
    gap: 12px;
}

.competitor-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    align-items: center;
    transition: all var(--transition-fast);
}

.competitor-item:hover {
    border-color: var(--accent-primary);
    background: var(--bg-hover);
}

.competitor-name {
    font-size: 14px;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.competitor-name a {
    color: var(--accent-primary);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition-fast);
}

.competitor-name a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

.competitor-name small {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: normal;
}

.competitor-price {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.competitor-price strong {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-primary);
}

.competitor-price small {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.competitor-position {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-end;
}

.position-badge {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.competitor-position small {
    font-size: 11px;
    color: var(--text-secondary);
}

.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0;
    margin: 0;
}

.recommendations-strategic {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.recommendation-card {
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-primary);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all var(--transition-fast);
}

.recommendation-card:hover {
    border-left-color: var(--accent-secondary);
    background: var(--bg-hover);
}

.rec-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.rec-header i {
    color: var(--accent-primary);
    font-size: 18px;
}

.rec-header strong {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.rec-benefit,
.rec-action,
.rec-impact {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.6;
}

.rec-benefit i {
    color: #06b6d4;
    margin-top: 2px;
    font-size: 14px;
}

.rec-action i {
    color: #f59e0b;
    margin-top: 2px;
    font-size: 14px;
}

.rec-impact i {
    color: #10b981;
    margin-top: 2px;
    font-size: 14px;
}

.rec-benefit span,
.rec-action span,
.rec-impact span {
    color: var(--text-primary);
    flex: 1;
}

.rec-benefit strong,
.rec-action strong,
.rec-impact strong {
    color: var(--accent-primary);
    font-weight: 600;
}

.recommendations-list li {
    padding: 12px 16px;
    padding-left: 40px;
    position: relative;
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
    border-left: 3px solid var(--accent-primary);
    background: var(--bg-secondary);
    border-radius: 6px;
    margin-bottom: 10px;
}

.recommendations-list li::before {
    content: '▸';
    position: absolute;
    left: 16px;
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 18px;
}

/* ===================================
   AI Status & Features
   =================================== */

.ai-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid var(--accent-primary);
    border-radius: 20px;
    color: var(--accent-primary);
    font-size: 13px;
    font-weight: 600;
}

.ai-status i {
    animation: pulse 2s infinite;
}

.ai-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.ai-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: all var(--transition-fast);
}

.ai-stat-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.ai-stat-icon {
    width: 50px;
    height: 50px;
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.ai-stat-content h3 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.ai-stat-content p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* ===================================
   AI Insights Section
   =================================== */

.ai-insights-section {
    margin: 50px 0;
}

.ai-insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.ai-insight-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

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

.ai-insight-card.insight-hot::before { background: linear-gradient(180deg, #ef4444, #f97316); }
.ai-insight-card.insight-success::before { background: linear-gradient(180deg, #10b981, #06b6d4); }
.ai-insight-card.insight-warning::before { background: linear-gradient(180deg, #f59e0b, #eab308); }
.ai-insight-card.insight-alert::before { background: linear-gradient(180deg, #ef4444, #dc2626); }
.ai-insight-card.insight-info::before { background: linear-gradient(180deg, #3b82f6, #8b5cf6); }
.ai-insight-card.insight-opportunity::before { background: linear-gradient(180deg, #8b5cf6, #ec4899); }

.ai-insight-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.ai-insight-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.ai-insight-icon {
    font-size: 28px;
}

.ai-insight-confidence {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.confidence-bar {
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
    display: block;
}

.confidence-text {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.ai-insight-card h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-insight-card p {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
}

.ai-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.ai-loading i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    color: var(--accent-primary);
}

.ai-loading p {
    font-size: 16px;
}

/* ===================================
   Product Card AI Enhancements
   =================================== */

.ai-price-section {
    background: var(--bg-primary);
    border-radius: 10px;
    padding: 14px;
    margin: 16px 0;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.price-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

.product-price-ai {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-secondary);
}

.ai-suggestion {
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    margin-top: 6px;
}

.ai-audience {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-primary);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-audience i {
    font-size: 14px;
}

.btn-view {
    flex: 1;
    padding: 10px;
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
}

.btn-view:hover {
    background: #3b82f6;
    color: white;
}

/* ===================================
   Table AI Enhancements
   =================================== */

.ai-suggested-price {
    color: var(--accent-secondary);
    font-weight: 700;
}

.ai-audience-cell {
    font-size: 12px;
    color: var(--text-secondary);
    max-width: 180px;
}

.btn-icon.view {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.btn-icon.view:hover {
    background: #3b82f6;
    color: white;
}

/* ===================================
   Charts Section
   =================================== */

.charts-section {
    margin-top: 50px;
}

.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.no-products i {
    font-size: 64px;
    margin-bottom: 20px;
    display: block;
    opacity: 0.5;
}

.no-products p {
    font-size: 18px;
}

/* ===================================
   Editable Elements
   =================================== */

.editable-text {
    transition: all var(--transition-fast);
    border-radius: 4px;
    padding: 2px 6px;
    margin: -2px -6px;
}

body.edit-mode .editable-text {
    cursor: text;
    outline: 2px dashed transparent;
}

body.edit-mode .editable-text:hover {
    outline-color: var(--accent-primary);
    background: rgba(16, 185, 129, 0.05);
}

.editable-text.editing {
    background: var(--bg-primary);
    outline: 2px solid var(--accent-primary);
    padding: 6px 10px;
}

/* ===================================
   Toast Notification
   =================================== */

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--accent-primary);
    border-radius: 10px;
    padding: 16px 20px;
    min-width: 300px;
    box-shadow: var(--shadow-lg);
    transform: translateX(500px);
    opacity: 0;
    transition: all var(--transition-normal);
    z-index: 3000;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

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

.toast.error {
    border-left-color: var(--error);
}

.toast.warning {
    border-left-color: var(--warning);
}

/* ===================================
   Responsive Design
   =================================== */

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-260px);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-toggle {
        display: flex;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 20px;
        flex-direction: column;
        gap: 16px;
    }
    
    .header-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .page-content {
        padding: 20px;
    }
    
    .kpi-grid,
    .insights-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .produtos-header {
        flex-direction: column;
    }
    
    .search-bar {
        min-width: 100%;
    }
    
    .filters-bar {
        flex-direction: column;
    }
    
    .filter-group select {
        width: 100%;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .data-table {
        min-width: 800px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 22px;
    }
    
    .kpi-value {
        font-size: 28px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   Utility Classes
   =================================== */

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

.text-right {
    text-align: right;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

.hidden {
    display: none !important;
}

.loading {
    opacity: 0.5;
    pointer-events: none;
}
