/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1a1a2e;
    background: #f8fafc;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 24px; border-radius: 10px; font-weight: 600; font-size: 14px;
    border: 2px solid transparent; cursor: pointer; transition: all .2s;
    font-family: inherit; gap: 8px;
}
.btn-primary { background: #6366f1; color: #fff; border-color: #6366f1; }
.btn-primary:hover { background: #4f46e5; border-color: #4f46e5; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(99,102,241,.3); }
.btn-outline { background: transparent; color: #6366f1; border-color: #e0e0ef; }
.btn-outline:hover { border-color: #6366f1; background: #f0f0ff; }
.btn-ghost { background: transparent; color: #6366f1; border: none; padding: 10px 16px; }
.btn-ghost:hover { background: #f0f0ff; }
.btn-lg { padding: 14px 32px; font-size: 16px; border-radius: 12px; }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }

/* ===== HEADER ===== */
.header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(255,255,255,.92); backdrop-filter: blur(20px);
    border-bottom: 1px solid #e8e8f0; height: 72px;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 800; }
.logo-icon { font-size: 28px; }
.logo-highlight { color: #6366f1; }
.nav { display: flex; gap: 32px; }
.nav-link { font-size: 14px; font-weight: 500; color: #555; transition: color .2s; }
.nav-link:hover { color: #6366f1; }
.header-actions { display: flex; gap: 12px; align-items: center; }
.burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.burger span { display: block; width: 24px; height: 2px; background: #333; margin: 5px 0; transition: .3s; }

/* ===== HERO ===== */
.hero {
    padding: 160px 0 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff; text-align: center; position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,.08) 1px, transparent 1px);
    background-size: 40px 40px; animation: heroFloat 60s linear infinite;
}
@keyframes heroFloat { to { transform: translate(40px, 40px); } }
.hero-content { position: relative; z-index: 1; }
.hero-badge {
    display: inline-block; padding: 6px 16px; border-radius: 20px;
    background: rgba(255,255,255,.15); font-size: 13px; font-weight: 600;
    margin-bottom: 24px; backdrop-filter: blur(10px);
}
.hero-title { font-size: clamp(36px, 5vw, 64px); font-weight: 800; line-height: 1.15; margin-bottom: 20px; }
.text-gradient {
    background: linear-gradient(90deg, #ffd89b, #19547b);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-subtitle { font-size: 18px; opacity: .85; max-width: 600px; margin: 0 auto 36px; }
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 60px; }
.hero-cta .btn-primary { background: #fff; color: #6366f1; border-color: #fff; }
.hero-cta .btn-primary:hover { background: #f0f0ff; box-shadow: 0 8px 32px rgba(0,0,0,.15); }
.hero-cta .btn-ghost { color: #fff; }
.hero-cta .btn-ghost:hover { background: rgba(255,255,255,.15); }
.hero-stats { display: flex; gap: 48px; justify-content: center; flex-wrap: wrap; }
.stat-item { text-align: center; }
.stat-number { font-size: 32px; font-weight: 800; }
.stat-label { font-size: 13px; opacity: .75; }

/* ===== SECTIONS ===== */
.section-header { text-align: center; margin-bottom: 48px; }
.section-badge {
    display: inline-block; padding: 4px 14px; border-radius: 16px;
    background: #eef2ff; color: #6366f1; font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .5px; margin-bottom: 12px;
}
.section-title { font-size: clamp(28px, 3.5vw, 42px); font-weight: 800; margin-bottom: 12px; }
.section-subtitle { color: #666; max-width: 520px; margin: 0 auto; }

.features { padding: 100px 0; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.feature-card {
    background: #fff; border-radius: 16px; padding: 36px 28px;
    border: 1px solid #eee; transition: all .3s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0,0,0,.06); border-color: #6366f1; }
.feature-icon { font-size: 40px; margin-bottom: 16px; }
.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: #666; }

.how-it-works { padding: 100px 0; background: #fff; }
.steps { display: flex; gap: 32px; flex-wrap: wrap; }
.step { flex: 1; min-width: 280px; text-align: center; padding: 32px 20px; }
.step-number {
    font-size: 64px; font-weight: 900; color: #eef2ff; margin-bottom: 16px;
    line-height: 1;
}
.step h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.step p { font-size: 14px; color: #666; }

.niches { padding: 80px 0; }
.niches-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.niche-tag {
    padding: 10px 20px; border-radius: 24px; background: #fff;
    border: 1px solid #e8e8f0; font-size: 14px; font-weight: 500;
    transition: all .2s; cursor: default;
}
.niche-tag:hover { border-color: #6366f1; background: #f0f0ff; color: #6366f1; }

.pricing { padding: 100px 0; background: #fff; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; align-items: start; }
.pricing-card {
    background: #fff; border: 2px solid #eee; border-radius: 20px;
    padding: 36px 28px; text-align: center; position: relative; transition: all .3s;
}
.pricing-card:hover { border-color: #6366f1; }
.pricing-popular { border-color: #6366f1; transform: scale(1.03); }
.pricing-badge {
    position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
    background: #6366f1; color: #fff; padding: 4px 16px; border-radius: 12px;
    font-size: 12px; font-weight: 700; white-space: nowrap;
}
.pricing-name { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.pricing-price { font-size: 48px; font-weight: 900; color: #6366f1; }
.pricing-desc { font-size: 13px; color: #888; margin-bottom: 24px; }
.pricing-features { text-align: left; margin-bottom: 28px; }
.pricing-features li { padding: 8px 0; font-size: 14px; color: #555; border-bottom: 1px solid #f0f0f0; }
.pricing-features li::before { content: '✓ '; color: #10b981; font-weight: 700; }

.cta-section { padding: 100px 0; }
.cta-card {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 24px; padding: 64px 40px; text-align: center; color: #fff;
}
.cta-card h2 { font-size: clamp(24px, 3vw, 36px); font-weight: 800; margin-bottom: 12px; }
.cta-card p { opacity: .85; margin-bottom: 28px; }
.cta-card .btn-primary { background: #fff; color: #6366f1; border-color: #fff; }

/* ===== FOOTER ===== */
.footer { background: #0f172a; color: #94a3b8; padding: 64px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand p { font-size: 14px; margin-top: 16px; }
.footer-col h4 { color: #fff; font-size: 14px; font-weight: 700; margin-bottom: 16px; }
.footer-col a { display: block; font-size: 14px; padding: 4px 0; transition: color .2s; }
.footer-col a:hover { color: #6366f1; }
.footer-bottom { border-top: 1px solid #1e293b; padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; font-size: 13px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a:hover { color: #6366f1; }

/* ===== AUTH PAGES ===== */
.auth-page { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-container { width: 100%; max-width: 440px; }
.auth-card { background: #fff; border-radius: 20px; padding: 40px 36px; text-align: center; }
.auth-logo { justify-content: center; margin-bottom: 32px; }
.auth-card h1 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.auth-subtitle { color: #888; font-size: 14px; margin-bottom: 28px; }
.auth-form { text-align: left; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: #444; margin-bottom: 6px; }
.form-group input {
    width: 100%; padding: 12px 16px; border: 2px solid #e8e8f0; border-radius: 10px;
    font-size: 14px; font-family: inherit; transition: border .2s; outline: none;
}
.form-group input:focus { border-color: #6366f1; }
.form-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #666; cursor: pointer; }
.checkbox-label a { color: #6366f1; font-weight: 600; }
.form-link { font-size: 13px; color: #6366f1; font-weight: 600; }
.auth-footer { margin-top: 24px; font-size: 14px; color: #888; }
.auth-footer a { color: #6366f1; font-weight: 600; }

/* ===== DASHBOARD ===== */
.dashboard-page { display: flex; min-height: 100vh; }

.sidebar {
    width: 260px; background: #0f172a; color: #fff;
    display: flex; flex-direction: column; position: fixed;
    top: 0; bottom: 0; left: 0; z-index: 50; transition: transform .3s;
}
.sidebar-header { padding: 24px 20px; border-bottom: 1px solid #1e293b; }
.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.sidebar-link {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border-radius: 10px; font-size: 14px; font-weight: 500;
    color: #94a3b8; transition: all .2s; margin-bottom: 4px;
}
.sidebar-link:hover { background: #1e293b; color: #fff; }
.sidebar-link.active { background: #6366f1; color: #fff; }
.sidebar-icon { font-size: 18px; }
.sidebar-footer { padding: 16px 20px; border-top: 1px solid #1e293b; }
.user-info { display: flex; align-items: center; gap: 12px; }
.user-avatar {
    width: 40px; height: 40px; border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 16px;
}
.user-name { font-size: 14px; font-weight: 600; }
.user-email { font-size: 11px; color: #94a3b8; }

.main-content { flex: 1; margin-left: 260px; min-height: 100vh; }
.dashboard-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 32px; background: #fff; border-bottom: 1px solid #eee;
    position: sticky; top: 0; z-index: 40;
}
.menu-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; }
.header-right { display: flex; align-items: center; gap: 20px; }
.balance-display { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.balance-label { color: #888; }
.balance-amount { font-weight: 800; color: #6366f1; font-size: 18px; }
.notification-bell {
    position: relative; cursor: pointer; font-size: 20px;
    padding: 6px; border-radius: 8px; transition: background .2s;
}
.notification-bell:hover { background: #f0f0f0; }
.notif-badge {
    position: absolute; top: 0; right: 0; background: #ef4444; color: #fff;
    font-size: 10px; font-weight: 700; width: 18px; height: 18px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}

.dashboard-content { padding: 32px; }
.dashboard-section { margin-bottom: 48px; }
.section-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.section-title-row h2 { font-size: 22px; font-weight: 800; }
.project-badge {
    background: #eef2ff; color: #6366f1; padding: 4px 14px;
    border-radius: 8px; font-size: 13px; font-weight: 700;
}

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card {
    background: #fff; border-radius: 14px; padding: 24px;
    border: 1px solid #eee; transition: all .2s;
}
.stat-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.05); }
.stat-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.stat-card-icon { font-size: 24px; }
.stat-card-icon.green { background: #ecfdf5; padding: 6px 10px; border-radius: 10px; }
.stat-card-icon.blue { background: #eef2ff; padding: 6px 10px; border-radius: 10px; }
.stat-card-icon.purple { background: #faf5ff; padding: 6px 10px; border-radius: 10px; }
.stat-card-icon.orange { background: #fff7ed; padding: 6px 10px; border-radius: 10px; }
.stat-card-change { font-size: 12px; font-weight: 700; }
.stat-card-change.positive { color: #10b981; }
.stat-card-change.neutral { color: #6366f1; }
.stat-card-value { font-size: 28px; font-weight: 800; margin-bottom: 4px; }
.stat-card-label { font-size: 13px; color: #888; }

/* Report Card */
.report-card { background: #fff; border-radius: 16px; border: 1px solid #eee; overflow: hidden; }
.report-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 28px 32px; background: linear-gradient(135deg, #f0f0ff 0%, #faf5ff 100%); border-bottom: 1px solid #eee; flex-wrap: wrap; gap: 16px; }
.report-title { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.report-subtitle { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.report-status { font-size: 13px; font-weight: 600; }
.status-completed { color: #10b981; }
.report-date { font-size: 13px; color: #888; }
.report-total { text-align: right; }
.report-total-label { font-size: 13px; color: #888; margin-bottom: 4px; }
.report-total-amount { font-size: 32px; font-weight: 900; color: #10b981; }

.report-info-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1px; background: #eee; border-bottom: 1px solid #eee;
}
.report-info-item { display: flex; gap: 8px; padding: 14px 32px; background: #fff; font-size: 14px; }
.report-info-label { color: #888; font-weight: 500; }
.report-info-value { font-weight: 600; }
.report-info-value a { color: #6366f1; }

.report-table-wrap { overflow-x: auto; }
.report-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.report-table thead { background: #f8fafc; }
.report-table th { padding: 12px 16px; text-align: left; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: #888; border-bottom: 2px solid #eee; }
.report-table td { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; }
.report-table tbody tr:hover { background: #fafafe; }
.report-table tfoot { background: #f8fafc; }
.domain-link { color: #6366f1; font-weight: 600; }
.dr-badge { padding: 2px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.dr-high { background: #ecfdf5; color: #059669; }
.dr-mid { background: #eef2ff; color: #6366f1; }
.dr-low { background: #fef3c7; color: #d97706; }
.anchor-text { font-style: italic; color: #555; max-width: 200px; }
.status-pill { padding: 4px 12px; border-radius: 8px; font-size: 12px; font-weight: 700; }
.status-pill.active { background: #ecfdf5; color: #059669; }

.report-summary { padding: 28px 32px; background: #f8fafc; border-top: 1px solid #eee; }
.report-summary h4 { font-size: 16px; font-weight: 700; margin-bottom: 20px; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }
.summary-item { text-align: center; padding: 16px; background: #fff; border-radius: 10px; border: 1px solid #eee; }
.summary-value { font-size: 24px; font-weight: 800; color: #6366f1; margin-bottom: 4px; }
.summary-label { font-size: 12px; color: #888; }

/* Links Section */
.filter-bar { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-select {
    padding: 8px 16px; border: 2px solid #e8e8f0; border-radius: 10px;
    font-size: 13px; font-family: inherit; background: #fff; cursor: pointer; outline: none;
}
.filter-select:focus { border-color: #6366f1; }

.links-list { display: flex; flex-direction: column; gap: 8px; }
.link-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; background: #fff; border: 1px solid #eee;
    border-radius: 12px; gap: 16px; flex-wrap: wrap; transition: all .2s;
}
.link-item:hover { border-color: #6366f1; box-shadow: 0 2px 12px rgba(99,102,241,.08); }
.link-domain { font-weight: 700; color: #6366f1; font-size: 15px; }
.link-meta { font-size: 12px; color: #888; margin-top: 2px; }
.link-anchor { font-size: 13px; color: #555; font-style: italic; }

/* Orders Table */
.orders-table-wrap { overflow-x: auto; background: #fff; border-radius: 12px; border: 1px solid #eee; }

/* Balance */
.balance-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.balance-card-main {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff; border-radius: 16px; padding: 32px; text-align: center;
}
.balance-card-main .balance-card-label { opacity: .8; font-size: 14px; margin-bottom: 8px; }
.balance-card-main .balance-card-amount { font-size: 40px; font-weight: 900; margin-bottom: 20px; }
.balance-card-stat {
    background: #fff; border: 1px solid #eee; border-radius: 16px;
    padding: 28px; text-align: center;
}
.balance-card-stat .balance-card-label { font-size: 14px; color: #888; margin-bottom: 8px; }
.balance-card-stat .balance-card-amount { font-size: 28px; font-weight: 800; color: #1a1a2e; }

/* Notifications */
.notification-panel {
    position: fixed; top: 0; right: -400px; width: 380px; height: 100vh;
    background: #fff; box-shadow: -4px 0 24px rgba(0,0,0,.1); z-index: 200;
    transition: right .3s; display: flex; flex-direction: column;
}
.notification-panel.open { right: 0; }
.notif-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid #eee; }
.notif-header h3 { font-size: 18px; font-weight: 700; }
.notif-close { background: none; border: none; font-size: 20px; cursor: pointer; padding: 4px; }
.notif-list { flex: 1; overflow-y: auto; }
.notif-item { display: flex; gap: 12px; padding: 16px 24px; border-bottom: 1px solid #f0f0f0; }
.notif-item.unread { background: #f8f8ff; }
.notif-icon { font-size: 20px; flex-shrink: 0; }
.notif-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.notif-text { font-size: 13px; color: #666; margin-bottom: 4px; }
.notif-time { font-size: 11px; color: #aaa; }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 150; display: none; }
.overlay.open { display: block; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav, .header-actions { display: none; }
    .burger { display: block; }
    .hero { padding: 120px 0 60px; }
    .hero-stats { gap: 24px; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .menu-toggle { display: block; }
    .dashboard-content { padding: 20px; }
    .report-header { padding: 20px; }
    .report-info-item { padding: 12px 20px; }
    .report-summary { padding: 20px; }
    .report-total-amount { font-size: 24px; }
}

/* ===== PRINT ===== */
@media print {
    .sidebar, .dashboard-header, .notification-panel, .overlay, .btn, .filter-bar, .report-actions { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .report-card { border: 1px solid #ddd; }
}
