:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fb;
    color: #333;
}

.bg-gradient-primary {
    background: var(--gradient) !important;
}

.navbar-brand {
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

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

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

.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    height: 100%;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin-bottom: 16px;
}

.stat-card.primary .stat-icon { background: var(--primary); }
.stat-card.success .stat-icon { background: var(--success); }
.stat-card.warning .stat-icon { background: var(--warning); }
.stat-card.danger .stat-icon { background: var(--danger); }
.stat-card.info .stat-icon { background: var(--info); }

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.stat-card .stat-label {
    color: #888;
    font-size: 14px;
    margin: 0;
}

.code-block {
    background: #2d3748;
    color: #e2e8f0;
    padding: 16px;
    border-radius: 8px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    overflow-x: auto;
}

.integration-card {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
}

.integration-card:hover {
    border-color: var(--primary);
}

.integration-card.active {
    border-color: var(--success);
    background: #f0f9f4;
}

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

.platform-bitrix24 { background: #e3f2fd; color: #1565c0; }
.platform-meta { background: #e7f0fd; color: #1877f2; }
.platform-google { background: #fef7e0; color: #ea8600; }
.platform-tiktok { background: #ffe5e8; color: #fe2c55; }

.webhook-url {
    background: #f8f9fa;
    border: 1px dashed #adb5bd;
    padding: 10px 14px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 13px;
    word-break: break-all;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-success { background: #d4edda; color: #155724; }
.status-failed { background: #f8d7da; color: #721c24; }
.status-pending { background: #fff3cd; color: #856404; }

.auth-page {
    min-height: 100vh;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    padding: 40px;
    max-width: 440px;
    width: 100%;
}

.auth-logo {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    margin-bottom: 8px;
}

.usage-bar {
    background: #e9ecef;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
}

.usage-bar-fill {
    height: 100%;
    background: var(--gradient);
    transition: width 0.3s;
}

.table-actions a, .table-actions button {
    color: #6c757d;
    font-size: 16px;
    margin-right: 8px;
    text-decoration: none;
    border: none;
    background: none;
}

.table-actions a:hover { color: var(--primary); }

pre {
    background: #f4f4f4;
    padding: 12px;
    border-radius: 6px;
    font-size: 12px;
    max-height: 300px;
    overflow: auto;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state .empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}
