/* ===================================
   InstantBase Partners — Styles
   =================================== */

:root {
    --primary: #2A6DF4;
    --primary-dark: #1a5ac9;
    --primary-light: #e8f0fe;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --dark: #343a40;
    --light: #f8f9fa;
    --border: #dee2e6;
    --text-primary: #333;
    --text-secondary: #666;
    --text-muted: #999;
    --sidebar-width: 250px;

    /* Partners-specific accents */
    --money: #10b981;
    --money-light: #d1fae5;
    --money-dark: #059669;
    --accent-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f5f7fa;
    color: var(--text-primary);
    line-height: 1.6;
}

/* ===================================
   Layout
   =================================== */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-header .logo img {
    height: 50px;
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin: 5px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    font-weight: 500;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: var(--primary-light);
    color: var(--primary);
    border-left-color: var(--primary);
}

.nav-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 20px 30px;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.page-title h1 {
    font-size: 24px;
    font-weight: 600;
}

/* ===================================
   User menu
   =================================== */
.user-menu {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
}

.avatar-wrapper {
    cursor: pointer;
}

.avatar,
.profile-menu-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.profile-menu {
    position: absolute;
    top: 60px;
    right: 0;
    width: 280px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
    z-index: 1000;
    display: none;
}

.profile-menu.active {
    display: block;
}

.profile-menu-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.profile-menu-avatar {
    width: 50px;
    height: 50px;
    font-size: 20px;
}

.profile-menu-name {
    font-weight: 600;
}

.profile-menu-email {
    font-size: 12px;
    color: var(--text-muted);
}

.profile-menu-items {
    padding: 10px 0;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.3s;
    cursor: pointer;
}

.profile-menu-item:hover {
    background: var(--primary-light);
}

.menu-icon {
    font-size: 18px;
    width: 24px;
}

.profile-menu-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

/* ===================================
   Cards
   =================================== */
.card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.card-header .card-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ===================================
   Metrics
   =================================== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.metric-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s, box-shadow 0.3s;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.metric-title {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.metric-value.primary { color: var(--primary); }
.metric-value.success { color: var(--success); }
.metric-value.warning { color: var(--warning); }
.metric-value.muted {
    color: var(--text-muted);
    font-size: 22px;
}

.metric-hint {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===================================
   Tables
   =================================== */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    text-align: left;
    padding: 12px;
    background: var(--light);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

table tbody tr:hover {
    background: var(--primary-light);
}

.table-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* ===================================
   Buttons
   =================================== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    font-family: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(42, 109, 244, 0.3);
}

.btn-secondary {
    background: var(--light);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: #e9ecef;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===================================
   Badges
   =================================== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-info {
    background: var(--primary-light);
    color: var(--primary);
}

.badge-muted {
    background: #e9ecef;
    color: #495057;
}

.badge-money {
    background: var(--money-light);
    color: var(--money-dark);
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

/* ===================================
   Tier
   =================================== */
.tier-hero {
    background: var(--primary-gradient);
    color: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.tier-hero-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.tier-hero-name {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 5px;
}

.tier-hero-percent {
    font-size: 24px;
    font-weight: 600;
}

.tier-hero-expires {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 12px;
}

.tier-progress {
    margin-top: 20px;
}

.tier-progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    overflow: hidden;
    margin: 8px 0;
}

.tier-progress-fill {
    height: 100%;
    background: white;
    border-radius: 4px;
    transition: width 0.3s;
}

.tier-progress-text {
    font-size: 13px;
    opacity: 0.9;
}

.tiers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.tier-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    border: 2px solid var(--border);
    transition: all 0.3s;
}

.tier-card.current {
    border-color: var(--primary);
    background: var(--primary-light);
    position: relative;
}

.tier-card.current::before {
    content: "Ваша ступень";
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.tier-card h4 {
    font-size: 20px;
    margin-bottom: 8px;
}

.tier-card .percent {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.tier-card .requirements {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.8;
}

.tier-card .bonuses {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.8;
}

.tier-card .bonuses ul {
    padding-left: 20px;
}

/* ===================================
   Forms
   =================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(42, 109, 244, 0.1);
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===================================
   Pagination
   =================================== */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pagination-info {
    font-size: 13px;
    color: var(--text-muted);
}

.pagination-controls {
    display: flex;
    gap: 5px;
    align-items: center;
}

.pagination-controls .btn {
    min-width: 40px;
}

/* ===================================
   Loading
   =================================== */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.spinner {
    border: 3px solid var(--light);
    border-top-color: var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===================================
   Notifications
   =================================== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    min-width: 300px;
    max-width: 400px;
    border-left: 4px solid var(--primary);
    animation: slideIn 0.3s;
}

.notification.success { border-left-color: var(--success); }
.notification.error { border-left-color: var(--danger); }
.notification.warning { border-left-color: var(--warning); }

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===================================
   Modal
   =================================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
}

/* ===================================
   Landing
   =================================== */
.landing-nav {
    background: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.landing-nav .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.landing-nav .logo img {
    height: 40px;
}

.landing-nav .nav-links {
    display: flex;
    gap: 25px;
    align-items: center;
}

.landing-nav .nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.landing-nav .nav-links a:hover {
    color: var(--primary);
}

/* Hero */
.hero-landing {
    background: var(--primary-gradient);
    color: white;
    padding: 100px 20px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-landing::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 40%);
    pointer-events: none;
}

.hero-landing .container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.hero-landing .hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
}

.hero-landing h1 {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.15;
}

.hero-landing .hero-subtitle {
    font-size: 22px;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.5;
}

.hero-landing .hero-cta {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-landing .btn-hero {
    background: white;
    color: var(--primary);
    padding: 18px 40px;
    font-size: 17px;
    font-weight: 700;
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.hero-landing .btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.hero-landing .btn-hero-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.6);
    padding: 16px 36px;
    font-size: 17px;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.hero-landing .btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
}

/* Sections */
.section {
    padding: 80px 20px;
}

.section .container {
    max-width: 1200px;
    margin: 0 auto;
}

.section h2 {
    font-size: 36px;
    text-align: center;
    margin-bottom: 50px;
}

.section h2 span {
    color: var(--primary);
}

/* Steps */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 30px;
}

.step-card {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.step-card .step-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.step-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.step-card p {
    color: var(--text-secondary);
}

/* Features list */
.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.feature-item {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.feature-item .fi-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.feature-item h4 {
    margin-bottom: 6px;
}

.feature-item p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* CTA */
.cta-section {
    background: var(--primary-gradient);
    color: white;
    text-align: center;
    padding: 80px 20px;
}

.cta-section h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 18px;
    opacity: 0.95;
    margin-bottom: 40px;
}

/* Footer */
.landing-footer {
    background: #333;
    color: white;
    padding: 40px 20px 20px;
    text-align: center;
}

.landing-footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin: 0 10px;
}

.landing-footer a:hover {
    color: white;
}

/* ===================================
   Calculator
   =================================== */
.calc-section {
    background: #f8fafc;
    padding: 80px 20px;
}

.calc-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.calc-container h2 {
    font-size: 32px;
    text-align: center;
    margin-bottom: 10px;
}

.calc-container .calc-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.calc-slider-wrapper {
    margin: 30px 0;
}

.calc-slider-wrapper label {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 15px;
}

.calc-slider-wrapper label span {
    color: var(--primary);
}

.calc-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--light);
    appearance: none;
    outline: none;
    cursor: pointer;
}

.calc-slider::-webkit-slider-thumb {
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(42, 109, 244, 0.4);
}

.calc-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(42, 109, 244, 0.4);
}

.calc-result {
    margin-top: 30px;
    padding: 30px;
    background: var(--money-light);
    border-radius: 16px;
    text-align: center;
}

.calc-result-label {
    font-size: 14px;
    color: #065f46;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.calc-result-value {
    font-size: 42px;
    font-weight: 800;
    color: var(--money-dark);
}

.calc-result-hint {
    font-size: 13px;
    color: #065f46;
    margin-top: 8px;
}

/* ===================================
   Stat cards (dashboard)
   =================================== */
.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.stat-card .stat-icon.blue {
    background: var(--primary-light);
    color: var(--primary);
}

.stat-card .stat-icon.green {
    background: var(--money-light);
    color: var(--money-dark);
}

.stat-card .stat-icon.orange {
    background: #fff3cd;
    color: #856404;
}

.stat-card .stat-icon.violet {
    background: #ede9fe;
    color: #6d28d9;
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-size: 30px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-card .stat-value.money {
    color: var(--money-dark);
}

.stat-card .stat-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ===================================
   Promo block (materials page)
   =================================== */
.promo-block {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px;
    padding: 24px;
    border: 2px dashed var(--border);
}

.promo-code-display {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--primary);
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    margin-bottom: 16px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.promo-code-display:hover {
    background: var(--primary-light);
}

.promo-code-display .copy-hint {
    font-size: 11px;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0;
    font-weight: 500;
    color: var(--text-muted);
    position: absolute;
    bottom: 6px;
    right: 12px;
}

.promo-link-display {
    display: flex;
    gap: 10px;
    align-items: center;
}

.promo-link-display input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
}

/* ===================================
   Info blocks
   =================================== */
.info-block {
    background: var(--primary-light);
    border-left: 4px solid var(--primary);
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
}

.info-block.warning {
    background: #fff3cd;
    border-left-color: var(--warning);
}

.info-block.success {
    background: var(--money-light);
    border-left-color: var(--money);
}

/* ===================================
   Partner Funnel
   =================================== */
.partner-funnel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 0;
}

.funnel-step {
    display: flex;
    align-items: center;
    gap: 16px;
}

.funnel-step-info {
    min-width: 200px;
    flex-shrink: 0;
}

.funnel-step-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.funnel-step-count {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.funnel-step-count.money { color: var(--money-dark); }

.funnel-step-bar-wrap {
    flex: 1;
    position: relative;
    height: 40px;
    background: var(--light);
    border-radius: 8px;
    overflow: hidden;
}

.funnel-step-bar {
    height: 100%;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 14px;
    color: white;
    font-weight: 600;
    font-size: 13px;
    transition: width 0.4s ease;
    min-width: 44px;
}

.funnel-step-bar.blue   { background: linear-gradient(90deg, #2A6DF4 0%, #4a8af4 100%); }
.funnel-step-bar.green  { background: linear-gradient(90deg, #10b981 0%, #059669 100%); }
.funnel-step-bar.yellow { background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%); }
.funnel-step-bar.violet { background: linear-gradient(90deg, #8b5cf6 0%, #6d28d9 100%); }

.funnel-arrow {
    padding-left: 216px;
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -2px 0;
}

.funnel-arrow-drop {
    color: var(--danger);
    font-weight: 600;
}

.funnel-total {
    margin-top: 14px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.funnel-total strong { color: var(--text-primary); }

/* ===================================
   Responsive
   =================================== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 15px;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .hero-landing h1 {
        font-size: 36px;
    }

    .hero-landing .hero-subtitle {
        font-size: 17px;
    }

    .section h2 {
        font-size: 26px;
    }

    .calc-container {
        padding: 25px;
    }

    .calc-result-value {
        font-size: 32px;
    }

    .stat-card .stat-value {
        font-size: 24px;
    }

    .promo-code-display {
        font-size: 24px;
        letter-spacing: 2px;
    }

    .landing-nav .container {
        flex-wrap: wrap;
        gap: 10px;
    }

    .landing-nav .nav-links {
        flex-wrap: wrap;
        gap: 12px;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .funnel-arrow {
        padding-left: 0;
    }

    .funnel-step {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .funnel-step-info {
        min-width: 0;
        display: flex;
        justify-content: space-between;
        align-items: baseline;
    }

    .funnel-step-name {
        margin-bottom: 0;
    }
}