/* ========================================
   GM Scraper - Estilos Principales (SaaS Version)
   ======================================== */

/* Variables CSS */
:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    
    --sidebar-width: 260px;
    --header-height: 64px;
}

/* Reset y Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background-color: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-dark);
}

/* ========================================
   LOGIN & REGISTER PAGE
   ======================================== */

.login-page {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-box {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 2.5rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.login-header .logo i {
    font-size: 2.5rem;
    color: var(--primary);
}

.login-header h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
}

.login-header p {
    color: var(--gray-500);
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.login-form label i {
    color: var(--gray-400);
}

.password-input {
    position: relative;
}

.password-input input {
    padding-right: 2.5rem;
}

.password-input .toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
}

.password-input .toggle-password:hover {
    color: var(--gray-600);
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.forgot-password {
    color: var(--primary);
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--gray-400);
    font-size: 0.875rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.divider span {
    padding: 0 1rem;
}

/* Google Button */
.btn-google {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-google:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-google i {
    color: #ea4335;
}

.login-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
    text-align: center;
}

.login-footer p {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.login-footer a {
    font-weight: 600;
}

.trial-note {
    background: #fef3c7;
    color: #92400e;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    margin-top: 0.75rem;
    display: inline-block;
}

.trial-info {
    background: linear-gradient(135deg, #dbeafe 0%, #d1fae5 100%);
    padding: 1rem;
    border-radius: var(--radius);
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--gray-700);
}

.trial-info i {
    color: var(--primary);
}

.terms-note {
    margin-top: 1rem;
    color: var(--gray-400);
}

/* ========================================
   PRICING PAGE
   ======================================== */

.pricing-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

.pricing-header {
    text-align: center;
    margin-bottom: 3rem;
}

.pricing-header .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.pricing-header .logo i {
    font-size: 2.5rem;
    color: var(--primary);
}

.pricing-header .logo h1 {
    font-size: 1.875rem;
    color: white;
}

.pricing-header h2 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 0.5rem;
}

.pricing-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.125rem;
}

/* Billing Toggle */
.billing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.toggle-label {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.toggle-label.active {
    color: white;
}

.save-badge {
    background: #10b981;
    color: white;
    font-size: 0.625rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    margin-left: 0.25rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.3);
    transition: .4s;
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(28px);
}

/* Pricing Grid */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.pricing-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    position: relative;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}

.pricing-card.popular {
    border: 2px solid var(--primary);
    transform: scale(1.02);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.pricing-card-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.pricing-card-header p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.pricing-card-price {
    margin: 1.5rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.25rem;
}

.pricing-card-price .currency {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
}

.pricing-card-price .amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}

.pricing-card-price .period {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.yearly-price {
    color: var(--gray-400);
    font-size: 0.875rem;
    margin-top: -1rem;
    margin-bottom: 1rem;
}

.pricing-features-list {
    list-style: none;
    margin-bottom: 2rem;
    flex: 1;
}

.pricing-features-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.pricing-features-list li i {
    color: var(--success);
}

/* Pricing Features Section */
.pricing-features {
    margin-bottom: 3rem;
}

.pricing-features h3 {
    text-align: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    color: white;
}

.feature-card i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.feature-card h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.feature-card p {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-bottom: 0.75rem;
}

.feature-card .price {
    font-size: 1.5rem;
    font-weight: 700;
}

.feature-card small {
    opacity: 0.7;
}

.pricing-footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.pricing-footer a {
    color: white;
    text-decoration: underline;
}

/* ========================================
   APP LAYOUT
   ======================================== */

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-header .logo i {
    font-size: 1.75rem;
    color: var(--primary);
}

.sidebar-header .logo span {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: var(--gray-600);
    font-weight: 500;
    transition: all 0.2s;
    border-right: 3px solid transparent;
}

.nav-item:hover {
    background: var(--gray-50);
    color: var(--gray-900);
}

.nav-item.active {
    background: var(--primary-light);
    background-opacity: 0.1;
    color: var(--primary);
    border-right-color: var(--primary);
}

.nav-item i {
    width: 1.25rem;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900);
}

.user-role {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: capitalize;
}

.btn-logout {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.btn-logout:hover {
    background: var(--gray-100);
    color: var(--danger);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.page-header {
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--gray-600);
    cursor: pointer;
    padding: 0.5rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    flex: 1;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

.content-wrapper {
    padding: 2rem;
}

/* ========================================
   COMPONENTS
   ======================================== */

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-header h3 i {
    color: var(--primary);
}

.card-body {
    padding: 1.5rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.blue { background: #dbeafe; color: #2563eb; }
.stat-icon.green { background: #d1fae5; color: #059669; }
.stat-icon.yellow { background: #fef3c7; color: #d97706; }
.stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.stat-icon.orange { background: #ffedd5; color: #ea580c; }
.stat-icon.red { background: #fee2e2; color: #dc2626; }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: 0.875rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.875rem;
    color: var(--gray-700);
}

.table tr:hover td {
    background: var(--gray-50);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-pending { background: #fef3c7; color: #92400e; }
.badge-running { background: #dbeafe; color: #1e40af; }
.badge-completed { background: #d1fae5; color: #065f46; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }
.badge-error { background: #fee2e2; color: #991b1b; }
.badge-draft { background: #f3f4f6; color: #4b5563; }
.badge-active { background: #d1fae5; color: #065f46; }
.badge-paused { background: #fef3c7; color: #92400e; }
.badge-secondary { background: #f3f4f6; color: #6b7280; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline {
    background: white;
    color: var(--gray-700);
    border-color: var(--gray-300);
}

.btn-outline:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-success {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.btn-danger {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.btn-warning {
    background: var(--warning);
    color: white;
    border-color: var(--warning);
}

.btn-info {
    background: var(--info);
    color: white;
    border-color: var(--info);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: white;
    color: var(--gray-900);
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-help {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.checkbox input {
    width: auto;
}

/* Color Picker */
.color-picker {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.color-picker input[type="color"] {
    width: 50px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
}

.color-value {
    font-family: monospace;
    width: auto !important;
}

/* Logo Upload */
.logo-upload {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-preview {
    width: 80px;
    height: 80px;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    overflow: hidden;
}

.logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.5rem;
}

.logo-preview i {
    font-size: 1.5rem;
}

.logo-preview span {
    font-size: 0.625rem;
    margin-top: 0.25rem;
}

.logo-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.logo-actions input[type="file"] {
    display: none;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-xl);
}

.modal-lg .modal-content {
    max-width: 900px;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header h2 i {
    color: var(--primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
}

.btn-close:hover {
    color: var(--gray-600);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: var(--gray-900);
    color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 300;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

/* Charts Row */
.charts-row {
    margin-bottom: 2rem;
}

.chart-card .card-body {
    height: 300px;
}

/* Tables Row */
.tables-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Filters Bar */
.filters-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 200px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.search-box input {
    width: 100%;
    padding: 0.625rem 0.875rem 0.625rem 2.5rem;
    font-size: 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
}

.filter-select {
    padding: 0.625rem 2rem 0.625rem 0.875rem;
    font-size: 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: white;
    min-width: 150px;
}

/* Scraper Types */
.scraper-types,
.campaign-types {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.type-card {
    cursor: pointer;
}

.type-card input {
    display: none;
}

.type-content {
    padding: 1.25rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all 0.2s;
}

.type-card:hover .type-content {
    border-color: var(--primary-light);
}

.type-card input:checked + .type-content {
    border-color: var(--primary);
    background: var(--primary-light);
    background-opacity: 0.05;
}

.type-content i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: block;
}

.type-content span {
    display: block;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.type-content small {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.scraper-fields,
.campaign-fields {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.scraper-fields.hidden,
.campaign-fields.hidden {
    display: none;
}

/* Results Actions */
.results-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.rating {
    color: #f59e0b;
}

.rating i {
    margin-right: 0.25rem;
}

/* Campaign Cards */
.campaigns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.campaign-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.campaign-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.campaign-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.campaign-icon.email { background: #dbeafe; color: #2563eb; }
.campaign-icon.sms { background: #d1fae5; color: #059669; }
.campaign-icon.call { background: #fef3c7; color: #d97706; }

.campaign-info {
    flex: 1;
}

.campaign-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.campaign-scraper {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.campaign-stats-row {
    display: flex;
    justify-content: space-around;
    padding: 1rem 0;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 1rem;
}

.campaign-stats-row .stat {
    text-align: center;
}

.campaign-stats-row .stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
}

.campaign-stats-row .stat-label {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.progress-bar {
    height: 0.5rem;
    background: var(--gray-200);
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 9999px;
    transition: width 0.3s ease;
}

.progress-fill.warning {
    background: var(--warning);
}

.campaign-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Stats Box */
.stat-box {
    background: var(--gray-50);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    text-align: center;
}

.campaign-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Loading & Empty States */
.loading-state,
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray-500);
}

.loading-state i,
.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--gray-300);
}

.empty-state h3 {
    font-size: 1.25rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

/* Usage Stats */
.usage-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.usage-item {
    margin-bottom: 0.5rem;
}

.usage-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.usage-label {
    color: var(--gray-600);
}

.usage-value {
    font-weight: 600;
    color: var(--gray-900);
}

/* Plan Details */
.plan-details h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.plan-status {
    margin-bottom: 0.5rem;
}

.plan-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.plan-renewal {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.plan-canceled {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.plan-canceled i {
    margin-right: 0.25rem;
}

.plan-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* White Label */
.white-label-icon {
    width: 5rem;
    height: 5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.white-label-icon i {
    font-size: 2.5rem;
    color: white;
}

.white-label-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.white-label-features .feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
}

.white-label-features .feature i {
    color: var(--success);
}

.price-tag {
    margin: 1.5rem 0;
}

.price-tag .price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.price-tag .period {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Preview Container */
.preview-container {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 300px;
}

.preview-header {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
}

.preview-logo {
    width: 2rem;
    height: 2rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-logo img {
    max-width: 100%;
    max-height: 100%;
    padding: 0.25rem;
}

.preview-company {
    font-weight: 600;
}

.preview-content {
    display: flex;
    min-height: 250px;
}

.preview-sidebar {
    width: 180px;
    background: var(--gray-50);
    padding: 1rem;
    border-right: 1px solid var(--gray-200);
}

.preview-nav-item {
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
    border-radius: var(--radius);
    margin-bottom: 0.25rem;
}

.preview-nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
}

.preview-main {
    flex: 1;
    padding: 1.5rem;
}

.preview-stats {
    display: flex;
    gap: 1rem;
}

.preview-stat {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
    min-width: 100px;
}

.preview-stat .value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.preview-stat .label {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Instructions */
.instructions h4 {
    margin-bottom: 0.75rem;
}

.instructions code {
    background: var(--gray-100);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-family: monospace;
    margin-right: 0.5rem;
}

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

/* Places API */
.places-api-info {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #dbeafe;
    color: #1e40af;
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.places-api-info .info-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.places-api-info p {
    margin: 0;
    font-size: 0.875rem;
}

.places-api-info a {
    color: #1e40af;
    text-decoration: underline;
}

.api-key-input {
    display: flex;
    gap: 0.5rem;
}

.api-key-input input {
    flex: 1;
}

.places-api-status {
    margin-top: 1rem;
}

/* Logo as link */
a.logo {
    text-decoration: none;
    cursor: pointer;
}

a.logo:hover {
    opacity: 0.9;
}

/* Legal links in login */
.legal-links a:hover {
    color: var(--primary) !important;
    text-decoration: underline;
}

/* Utilities */
.text-center { text-align: center; }
.hidden { display: none !important; }

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .pricing-card.popular {
        transform: none;
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .scraper-types,
    .campaign-types {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .campaign-stats {
        grid-template-columns: 1fr;
    }
    
    .tables-row {
        grid-template-columns: 1fr;
    }
    
    .content-wrapper {
        padding: 1rem;
    }
    
    .login-box {
        padding: 1.5rem;
    }
    
    .pricing-header h2 {
        font-size: 1.75rem;
    }
    
    .white-label-features {
        grid-template-columns: 1fr;
    }
    
    .preview-content {
        flex-direction: column;
    }
    
    .preview-sidebar {
        width: 100%;
    }
}
