/**
 * Estilos customizados - Mercado Afiliado
 * Base: CSS customizado + Google Fonts
 */

/* Google Fonts - Marketing Digital */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@400;500;600;700;800&display=swap');

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Typography base */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* Variáveis CSS */
:root {
    --color-primary: #f59e0b;
    --color-primary-dark: #d97706;
    --color-primary-light: #fbbf24;
    --color-secondary: #3b82f6;
    --color-dark: #111827;
    --color-gray: #6b7280;
    --color-light-gray: #f3f4f6;
    --color-white: #ffffff;
    --border-radius: 0.5rem;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Typography scales */
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
}

/* Typography classes */
.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }
.text-4xl { font-size: var(--font-size-4xl); }
.text-5xl { font-size: var(--font-size-5xl); }

.font-light { font-weight: 300; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

.font-marketing { 
    font-family: 'Poppins', sans-serif; 
    font-weight: 600; 
    letter-spacing: -0.025em; 
}

/* Utilitários base */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: -0.01em;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-dark);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 1.5px solid var(--color-primary);
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: var(--color-dark);
    transform: translateY(-1px);
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: var(--font-size-lg);
    font-weight: 600;
    border-radius: 0.75rem;
}

/* Cards */
.card {
    background: var(--color-white);
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: var(--font-size-lg);
    letter-spacing: -0.01em;
}

.card-body {
    padding: 1.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: var(--color-dark);
    font-size: var(--font-size-sm);
    letter-spacing: -0.01em;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1.5px solid #d1d5db;
    border-radius: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: var(--font-size-base);
    transition: all 0.2s ease;
    background-color: #fafafa;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
    background-color: var(--color-white);
}

.form-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* Header/Nav */
.header {
    background: var(--color-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: var(--color-dark);
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--color-gray);
    text-decoration: none;
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--color-dark);
}

/* Hero section */
.hero {
    background: linear-gradient(135deg, var(--color-dark) 0%, #374151 100%);
    color: var(--color-white);
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-family: 'Poppins', sans-serif;
    font-size: var(--font-size-5xl);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.hero p {
    font-size: var(--font-size-xl);
    font-weight: 400;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* Pricing */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.pricing-card {
    position: relative;
    padding: 2rem;
    text-align: center;
}

.pricing-card.featured {
    border: 2px solid var(--color-primary);
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.price {
    font-family: 'Poppins', sans-serif;
    font-size: var(--font-size-4xl);
    font-weight: 800;
    color: var(--color-dark);
    letter-spacing: -0.02em;
}

.price-period {
    font-size: var(--font-size-base);
    color: var(--color-gray);
    font-weight: 400;
}

/* Dashboard */
.sidebar {
    background: var(--color-white);
    box-shadow: var(--shadow);
    min-height: calc(100vh - 80px);
    padding: 2rem 0;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--color-gray);
    text-decoration: none;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: var(--color-light-gray);
    color: var(--color-dark);
}

/* Responsivo */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .pricing-card.featured {
        transform: none;
    }
    
    .nav-links {
        display: none;
    }
}

/* Alertas */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.alert-success {
    background: #d1fae5;
    border: 1px solid #10b981;
    color: #065f46;
}

.alert-error {
    background: #fee2e2;
    border: 1px solid #ef4444;
    color: #991b1b;
}

.alert-info {
    background: #dbeafe;
    border: 1px solid #3b82f6;
    color: #1e3a8a;
}

.alert-warning {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    color: #92400e;
}

/* ===== MODAL STYLES ===== */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    border-radius: 12px 12px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-dark);
}

.modal-close {
    font-size: 2rem;
    font-weight: bold;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    padding: 0.25rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
}

.modal-close:hover {
    color: var(--color-dark);
    background: #f3f4f6;
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* UTM Section Styles */
.utm-section {
    transition: all 0.3s ease;
}

/* Radio Button Styles */
input[type="radio"] {
    accent-color: var(--color-primary);
}

/* Form Styles Enhancement */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.form-input:disabled {
    background: #f9fafb;
    color: #6b7280;
}

/* Button Styles Enhancement */
.btn-primary {
    background: var(--color-primary);
    color: white;
    font-weight: 600;
}

.btn-primary:hover:not(:disabled) {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal {
        padding: 0.5rem;
        align-items: flex-start;
        padding-top: 2rem;
    }
    
    .modal-content {
        max-width: 100%;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
}