/* ===================================================
   CashFlow Autopilot - Dashboard Styles
   =================================================== */

:root {
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a3e;
    --bg-card: #1e1e48;
    --bg-card-hover: #252560;
    --accent-primary: #6c5ce7;
    --accent-secondary: #a29bfe;
    --accent-success: #00cec9;
    --accent-warning: #fdcb6e;
    --accent-danger: #ff7675;
    --accent-info: #74b9ff;
    --accent-gold: #f0c27f;
    --text-primary: #ffffff;
    --text-secondary: #b2bec3;
    --text-muted: #636e72;
    --border-color: rgba(108, 92, 231, 0.2);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --gradient-primary: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    --gradient-success: linear-gradient(135deg, #00cec9 0%, #55efc4 100%);
    --gradient-gold: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #f0c27f 100%);
    --gradient-hero: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 50%, #2d1b69 100%);
    --radius: 16px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Public Logo Accent (gradient "Forever" text) ─────── */
.logo-accent {
    background: linear-gradient(135deg, #818cf8 0%, #34d399 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Layout ──────────────────────────────────────────── */

.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 2rem 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-brand {
    padding: 0 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.sidebar-brand h1 {
    font-size: 1.4rem;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.sidebar-brand p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.sidebar-nav {
    list-style: none;
    padding: 0 0.75rem;
}

.sidebar-nav li {
    margin-bottom: 0.25rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 0.9rem;
    font-weight: 500;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(108, 92, 231, 0.15);
    color: var(--accent-secondary);
}

.sidebar-nav a.active {
    background: rgba(108, 92, 231, 0.25);
    color: var(--text-primary);
    font-weight: 600;
}

.sidebar-nav .nav-icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.sidebar-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 1.5rem 1rem 0.5rem;
    font-weight: 600;
}

.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem 2.5rem;
    min-height: 100vh;
}

/* ── Page Header ─────────────────────────────────────── */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.page-header .subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

/* ── Cards ───────────────────────────────────────────── */

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(108, 92, 231, 0.4);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ── Metric Cards (Dashboard) ────────────────────────── */

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius) var(--radius) 0 0;
}

.metric-card.revenue::before { background: var(--gradient-success); }
.metric-card.growth::before { background: var(--gradient-primary); }
.metric-card.visitors::before { background: var(--gradient-gold); }
.metric-card.streams::before { background: linear-gradient(135deg, var(--accent-info), var(--accent-primary)); }

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: rgba(108, 92, 231, 0.4);
}

.metric-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.metric-value {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 0.3rem;
}

.metric-value.money { color: var(--accent-success); }
.metric-value.percentage { color: var(--accent-secondary); }
.metric-value.count { color: var(--accent-gold); }

.metric-change {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.metric-change.positive { color: var(--accent-success); }
.metric-change.negative { color: var(--accent-danger); }

/* ── Charts ──────────────────────────────────────────── */

.chart-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.chart-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.chart-canvas {
    width: 100%;
    height: 300px;
    position: relative;
}

/* Simple built-in bar chart */
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 200px;
    padding-top: 1rem;
}

.bar {
    flex: 1;
    background: var(--gradient-primary);
    border-radius: 4px 4px 0 0;
    min-width: 8px;
    position: relative;
    transition: var(--transition);
    cursor: pointer;
}

.bar:hover {
    opacity: 0.8;
    transform: scaleY(1.02);
}

.bar-label {
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.65rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ── Two Column Layout ───────────────────────────────── */

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.three-col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* ── Tables ──────────────────────────────────────────── */

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table th {
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    font-size: 0.9rem;
}

.data-table tr:hover td {
    background: rgba(108, 92, 231, 0.05);
}

/* ── Buttons ─────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-decoration: none;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.4);
}

.btn-success {
    background: var(--gradient-success);
    color: var(--bg-primary);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-secondary);
}

.btn-gold {
    background: var(--gradient-gold);
    color: var(--bg-primary);
    font-weight: 700;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.9rem 2rem;
    font-size: 1rem;
}

/* ── Forms ────────────────────────────────────────────── */

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

select.form-control {
    cursor: pointer;
}

/* ── Badges & Tags ───────────────────────────────────── */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success { background: rgba(0, 206, 201, 0.15); color: var(--accent-success); }
.badge-warning { background: rgba(253, 203, 110, 0.15); color: var(--accent-warning); }
.badge-danger { background: rgba(255, 118, 117, 0.15); color: var(--accent-danger); }
.badge-info { background: rgba(116, 185, 255, 0.15); color: var(--accent-info); }
.badge-primary { background: rgba(108, 92, 231, 0.15); color: var(--accent-secondary); }

/* ── Progress Bar ────────────────────────────────────── */

.progress-bar {
    height: 8px;
    background: var(--bg-primary);
    border-radius: 4px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--gradient-primary);
    transition: width 1s ease;
}

.progress-fill.success { background: var(--gradient-success); }
.progress-fill.gold { background: var(--gradient-gold); }

/* ── Income Stream Cards ─────────────────────────────── */

.stream-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: var(--transition);
}

.stream-card:hover {
    transform: translateX(5px);
    border-color: rgba(108, 92, 231, 0.4);
}

.stream-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stream-icon.affiliate { background: rgba(0, 206, 201, 0.15); }
.stream-icon.product { background: rgba(108, 92, 231, 0.15); }
.stream-icon.ads { background: rgba(253, 203, 110, 0.15); }
.stream-icon.email { background: rgba(116, 185, 255, 0.15); }

.stream-info { flex: 1; }

.stream-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.stream-amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-success);
}

/* ── Freedom Tracker ─────────────────────────────────── */

.freedom-tracker {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.freedom-tracker::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-gold);
}

.freedom-percentage {
    font-size: 4rem;
    font-weight: 900;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.freedom-label {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.freedom-milestones {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.milestone {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.milestone-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.milestone-check.done {
    background: rgba(0, 206, 201, 0.2);
    color: var(--accent-success);
}

.milestone-check.pending {
    background: rgba(99, 110, 114, 0.2);
    color: var(--text-muted);
}

/* ── Quick Actions ───────────────────────────────────── */

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
    text-align: center;
}

.action-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
    box-shadow: 0 12px 40px rgba(108, 92, 231, 0.2);
}

.action-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.action-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.action-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ── Status Indicators ───────────────────────────────── */

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.status-dot.active { background: var(--accent-success); box-shadow: 0 0 8px rgba(0,206,201,0.4); }
.status-dot.pending { background: var(--accent-warning); }
.status-dot.inactive { background: var(--text-muted); }

/* ── Empty State ─────────────────────────────────────── */

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* ── Alerts ──────────────────────────────────────────── */

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.alert-info {
    background: rgba(116, 185, 255, 0.1);
    border: 1px solid rgba(116, 185, 255, 0.2);
    color: var(--accent-info);
}

.alert-success {
    background: rgba(0, 206, 201, 0.1);
    border: 1px solid rgba(0, 206, 201, 0.2);
    color: var(--accent-success);
}

.alert-warning {
    background: rgba(253, 203, 110, 0.1);
    border: 1px solid rgba(253, 203, 110, 0.2);
    color: var(--accent-warning);
}

/* ── Animations ──────────────────────────────────────── */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes shimmer {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}

.fade-in {
    animation: fadeInUp 0.5s ease forwards;
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* ── Public Pages ────────────────────────────────────── */

.landing-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--gradient-hero);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.landing-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(108, 92, 231, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(0, 206, 201, 0.08) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

.hero-content {
    position: relative;
    max-width: 700px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(108, 92, 231, 0.15);
    border: 1px solid rgba(108, 92, 231, 0.3);
    border-radius: 30px;
    font-size: 0.8rem;
    color: var(--accent-secondary);
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero-title .highlight {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* ── Blog Styles ─────────────────────────────────────── */

.blog-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.blog-post {
    margin-bottom: 3rem;
}

.blog-post h1 {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.blog-post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.blog-content {
    line-height: 1.8;
    font-size: 1.05rem;
}

.blog-content h2 {
    font-size: 1.6rem;
    margin: 2rem 0 1rem;
    font-weight: 700;
}

.blog-content h3 {
    font-size: 1.3rem;
    margin: 1.5rem 0 0.75rem;
    font-weight: 600;
}

.blog-content p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

.blog-content a {
    color: var(--accent-secondary);
    text-decoration: underline;
    text-decoration-color: rgba(162, 155, 254, 0.3);
    text-underline-offset: 3px;
}

.blog-content ul, .blog-content ol {
    margin: 1rem 0 1rem 1.5rem;
    color: var(--text-secondary);
}

.blog-content li {
    margin-bottom: 0.5rem;
}

/* ── Product Cards ───────────────────────────────────── */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: rgba(108, 92, 231, 0.4);
}

.product-image {
    height: 200px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.product-info {
    padding: 1.5rem;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.product-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-success);
    margin-bottom: 1rem;
}

/* ── Responsive ──────────────────────────────────────── */

@media (max-width: 1024px) {
    .two-col, .three-col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 1.5rem;
    }

    .metrics-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .page-header h2 {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: 1fr 1fr;
    }
}

/* ── Scrollbar ───────────────────────────────────────── */

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* ── Utility ─────────────────────────────────────────── */

.text-success { color: var(--accent-success); }
.text-warning { color: var(--accent-warning); }
.text-danger { color: var(--accent-danger); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
