@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette */
    --primary-color: #bb86fc;
    --primary-variant: #3700b3;
    --secondary-color: #03dac6;
    --background-color: #121212;
    --surface-color: #1e1e1e;
    --error-color: #cf6679;
    --on-primary: #000000;
    --on-secondary: #000000;
    --on-background: #ffffff;
    --on-surface: #ffffff;
    --on-error: #000000;
    
    /* Gradients */
    --accent-gradient: linear-gradient(135deg, #6200ee 0%, #bb86fc 100%);
    --glass-background: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* Spacing & Borders */
    --border-radius: 12px;
    --sidebar-width: 260px;
    --header-height: 70px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--on-background);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--surface-color);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    overflow: hidden;
}

.sidebar-menu::-webkit-scrollbar {
    width: 4px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.sidebar-header {
    padding: 2.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    border-bottom: 1px solid var(--glass-border);
    margin-bottom: 1rem;
    text-align: center;
    overflow: hidden;
}

.brand-logo {
    width: 140px;
    height: 140px;
    object-fit: contain;
    background: rgba(255,255,255,0.05);
    border-radius: 24px;
    padding: 12px;
    flex-shrink: 0;
    transition: var(--transition);
}

.brand-logo:hover {
    transform: scale(1.05);
    background: rgba(255,255,255,0.1);
}

/* Specific size for horizontal navbars */
.nav-marketing .brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 8px;
}

.brand-name {
    font-size: 1.2rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    color: #fff;
    white-space: nowrap;
    letter-spacing: -0.5px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-menu {
    flex: 1;
    padding: 0 1rem;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    margin-bottom: 0.5rem;
    border-radius: var(--border-radius);
    color: rgba(255, 255, 255, 0.7);
    gap: 12px;
}
/* Portfolio Carousel */
.portfolio-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
    padding: 20px 0;
    -webkit-overflow-scrolling: touch;
}

.portfolio-carousel::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.portfolio-item {
    flex: 0 0 350px;
    height: 450px;
    scroll-snap-align: start;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: var(--transition);
    border: 1px solid var(--glass-border);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transition: var(--transition);
}

.indicator.active {
    background: var(--primary-color);
    width: 25px;
    border-radius: 10px;
}

@media (max-width: 768px) {
    .portfolio-item {
        flex: 0 0 280px;
        height: 380px;
    }
}

.menu-item:hover, .menu-item.active {
    background-color: rgba(187, 134, 252, 0.1);
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    min-width: 0; /* Alcoa fix for grid/flex overflow */
}

.header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

/* Cards & Stats */
.card {
    background-color: var(--surface-color);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

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

.stat-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: var(--glass-background);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.stat-title {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

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

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    color: #fff;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(187, 134, 252, 0.2);
}

/* Fix for Select dropdown visibility in Dark Mode */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
    padding-right: 2.5rem;
    cursor: pointer;
}

select.form-control option {
    background-color: var(--surface-color);
    color: #fff;
    padding: 10px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    border: none;
    gap: 8px;
    transition: var(--transition);
}

.btn-primary {
    background: var(--accent-gradient);
    color: var(--on-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(187, 134, 252, 0.4);
}

/* Tables */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

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

th {
    text-align: left;
    padding: 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    border-bottom: 1px solid var(--glass-border);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-success { background: rgba(3, 218, 198, 0.1); color: var(--secondary-color); }
.badge-warning { background: rgba(255, 183, 77, 0.1); color: #ffb74d; }
.badge-error { background: rgba(207, 102, 121, 0.1); color: var(--error-color); }

/* Responsive */
/* --- NOVOS ESTILOS SAAS HIGH-TICKET (NINJA STYLE) --- */

.pricing-section {
    padding: 100px 5%;
    text-align: center;
}

/* Toggle Switch */
.toggle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.toggle-switch {
    background: rgba(255, 255, 255, 0.05);
    padding: 6px;
    border-radius: 50px;
    display: flex;
    position: relative;
    border: 1px solid var(--glass-border);
}

.toggle-btn {
    padding: 10px 25px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    z-index: 10;
}

.toggle-btn.active {
    color: #fff;
}

.toggle-slider {
    position: absolute;
    height: calc(100% - 12px);
    top: 6px;
    left: 6px;
    background: var(--accent-gradient);
    border-radius: 50px;
    transition: var(--transition);
    z-index: 1;
    box-shadow: 0 4px 15px rgba(187, 134, 252, 0.3);
}

/* Pricing Cards */
.pricing-grid-premium {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.plan-item-card {
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    border-radius: 2.5rem;
    padding: 3rem 2.5rem;
    text-align: left;
    position: relative;
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
}

.plan-item-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--primary-color);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.plan-item-card.popular {
    border-color: var(--primary-color);
    box-shadow: 0 0 40px rgba(187, 134, 252, 0.1);
}

.plan-badge-premium {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: var(--secondary-color);
    color: #000;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.plan-name-premium {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    color: #fff;
    letter-spacing: -1px;
}

.plan-desc-premium {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.4;
}

.plan-price-premium {
    margin-bottom: 2.5rem;
}

.plan-price-val {
    font-size: 4.5rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -3px;
}

.plan-price-period {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
    margin-left: 5px;
}

.plan-features-premium {
    list-style: none;
    margin-bottom: 3rem;
    flex-grow: 1;
}

.plan-features-premium li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.plan-features-premium li b {
    color: var(--primary-color);
}

.plan-features-premium li i {
    color: #444; /* Ninja style bullet < > */
    font-family: monospace;
    font-style: normal;
    font-weight: bold;
}

.btn-buy-premium {
    width: 100%;
    padding: 1.2rem;
    border-radius: 1.2rem;
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: #222;
    color: #fff;
    transition: var(--transition);
}

.plan-item-card.popular .btn-buy-premium {
    background: var(--accent-gradient);
}

/* --- RESPONSIVE DESIGN --- */

/* Mobile Menu Toggle (Hamburger) */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1002;
    font-size: 1.5rem;
    color: var(--primary-color);
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    cursor: pointer;
    width: 45px;
    height: 45px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
}

/* Tablets (iPad, etc) */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar { width: 80px; }
    .sidebar-header .brand-name, .menu-text { display: none; }
    .sidebar-header { padding: 1rem 0; gap: 0; }
    .brand-logo { width: 40px !important; height: 40px !important; }
    .main-content { margin-left: 80px; }
}

/* Small Screens (Mobiles) */
@media (max-width: 768px) {
    .sidebar {
        left: -100% !important;
        width: var(--sidebar-width);
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
    }
    
    .sidebar.active { left: 0 !important; }

    .main-content {
        margin-left: 0 !important;
        padding: 1rem !important;
        width: 100%;
        overflow-x: hidden;
    }

    .mobile-toggle { display: block; }

    .dashboard-header {
        padding: 1.5rem !important;
        border-radius: 16px !important;
    }

    .dashboard-header h1 {
        font-size: 1.5rem !important;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .stat-value {
        font-size: 1.5rem !important;
    }

    /* FORÇA GRIDS INLINE A VIRAREM COLUNA ÚNICA */
    div[style*="display: grid"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* PREVINE OVERFLOW DE CANVAS (GRÁFICOS) */
    .chart-container {
        position: relative;
        height: 250px !important;
        width: 100% !important;
    }
    
    canvas {
        max-width: 100% !important;
    }
}
