/* ============================================================
   CreatorNetworkLeads – Custom Styles
   Bootstrap 5 base with TikTok-inspired accents
   ============================================================ */

:root {
    --cnl-red:    #ff0050;
    --cnl-red-dk: #cc0040;
    --cnl-cyan:   #00f2ea;
    --cnl-dark:   #0a0a0a;
    --cnl-card:   #141414;
    --cnl-border: #2a2a2a;
}

/* ── Base ──────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

.cnl-logo-img {
    height: 32px;
    width: auto;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.2));
}

.navbar-brand .cnl-logo-img {
    height: 30px;
}

.sidebar-brand .cnl-logo-img {
    height: 34px;
}

[data-bs-theme="dark"] .cnl-logo-img {
    filter: drop-shadow(0 3px 10px rgba(0,0,0,.45));
}

/* ── Landing hero ───────────────────────────────────────────── */
.hero-section {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0010 50%, #0a0a0a 100%);
    min-height: 92vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 40%, rgba(255,0,80,.18) 0%, transparent 70%);
}
.hero-section .container { position: relative; z-index: 1; }

.hero-badge {
    display: inline-block;
    background: rgba(255,0,80,.15);
    border: 1px solid rgba(255,0,80,.4);
    color: #ff6b9d;
    padding: .35rem 1rem;
    border-radius: 50px;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
}
.hero-title .accent { color: var(--cnl-red); }

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,.65);
    max-width: 540px;
}

.hero-mockup {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(10px);
}

/* Improve contrast for muted text on dark sales-page sections */
.hero-section .text-muted,
#leads-preview .text-muted,
footer.bg-dark .text-muted,
section[style*="background:linear-gradient(180deg,#0d1117"] .text-white-50 {
    color: rgba(255,255,255,.74) !important;
}

.hero-mockup .badge.text-muted,
#leads-preview .table .text-muted {
    color: rgba(255,255,255,.82) !important;
}

footer.bg-dark a.text-muted {
    color: rgba(255,255,255,.8) !important;
}

footer.bg-dark a.text-muted:hover {
    color: #ffffff !important;
}

/* ── Stats strip ────────────────────────────────────────────── */
.stats-strip {
    background: linear-gradient(90deg, var(--cnl-red) 0%, #ff4080 100%);
}
.stat-item { text-align: center; }
.stat-number { font-size: 2rem; font-weight: 800; line-height: 1; }
.stat-label  { font-size: .78rem; opacity: .85; text-transform: uppercase; letter-spacing: .08em; }

/* ── Features ───────────────────────────────────────────────── */
.feature-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    padding: 2rem 1.5rem;
    height: 100%;
    transition: box-shadow .25s, transform .25s;
}
.feature-card:hover {
    box-shadow: 0 12px 40px rgba(255,0,80,.12);
    transform: translateY(-4px);
}
.feature-icon {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, #fff0f4 0%, #ffe0ea 100%);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    color: var(--cnl-red);
    margin-bottom: 1.2rem;
}

/* ── How it works ───────────────────────────────────────────── */
.step-number {
    width: 52px; height: 52px;
    background: var(--cnl-red);
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0 auto 1rem;
    flex-shrink: 0;
}

/* ── Pricing ────────────────────────────────────────────────── */
.pricing-card {
    border-radius: 20px;
    transition: transform .25s, box-shadow .25s;
}
.pricing-card.featured {
    border-color: var(--cnl-red) !important;
    box-shadow: 0 0 0 1px var(--cnl-red), 0 20px 60px rgba(255,0,80,.2);
    transform: scale(1.03);
}
.pricing-card:hover { transform: translateY(-6px); }
.pricing-card.featured:hover { transform: scale(1.03) translateY(-6px); }

/* ── Auth pages ─────────────────────────────────────────────── */
.auth-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #fff0f4 100%);
    display: flex; align-items: center;
}
.auth-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,.08);
    width: 100%;
    max-width: 460px;
}
.auth-logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.auth-logo span { font-weight: 800; font-size: 1.25rem; color: #0a0a0a; }

/* ── Dashboard ──────────────────────────────────────────────── */
.dash-stat-card {
    border-radius: 16px;
    border: none;
    height: 100%;
}
.dash-stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
}

.lead-card {
    border-radius: 14px;
    border: 1px solid #e9ecef;
    transition: box-shadow .2s;
    height: 100%;
}
.lead-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.1); }

.lead-avatar-wrap {
    position: relative;
    display: inline-block;
}
.lead-avatar-wrap .status-dot {
    position: absolute;
    bottom: 2px; right: 2px;
    width: 10px; height: 10px;
    border-radius: 50%;
    border: 2px solid #fff;
}

.dashboard-menu-card {
    border-radius: 14px;
}

.dashboard-menu-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .65rem .75rem;
    border-radius: 10px;
    text-decoration: none;
    color: #334155;
    font-weight: 600;
    margin-bottom: .25rem;
    transition: background .15s ease, color .15s ease;
}

.dashboard-menu-link:hover {
    background: #f8fafc;
    color: #0f172a;
}

.dashboard-menu-link.active {
    background: rgba(255, 0, 80, .1);
    color: #b00040;
}

.template-preview-pane {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: .9rem 1rem;
    min-height: 180px;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: .9rem;
    line-height: 1.5;
    margin: 0;
}

.template-tag-highlight {
    display: inline-block;
    background: rgba(255, 0, 80, .14);
    color: #b00040;
    border: 1px solid rgba(255, 0, 80, .28);
    border-radius: 6px;
    padding: 0 .25rem;
    font-weight: 600;
}

/* ── Admin sidebar ──────────────────────────────────────────── */
.admin-wrapper { display: flex; min-height: 100vh; }

.sidebar {
    width: 260px;
    min-width: 260px;
    background: #0f172a;
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1040;
    overflow-y: auto;
    transition: transform .3s;
}
.sidebar-brand {
    padding: 1.4rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,.07);
    display: flex; align-items: center; gap: .75rem;
    text-decoration: none; color: #fff;
    flex-shrink: 0;
}
.sidebar-brand .brand-text { font-weight: 700; font-size: 1rem; line-height: 1.2; }
.sidebar-brand .brand-sub  { font-size: .72rem; color: #64748b; font-weight: 400; }

.sidebar-nav { padding: .75rem 0; flex: 1; }
.sidebar-nav .nav-section {
    padding: .75rem 1.5rem .3rem;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #475569;
}
.sidebar-nav .nav-link {
    display: flex; align-items: center; gap: .75rem;
    padding: .55rem 1.5rem;
    color: #94a3b8;
    text-decoration: none;
    font-size: .875rem;
    border-radius: 0;
    transition: background .15s, color .15s;
    border-left: 3px solid transparent;
}
.sidebar-nav .nav-link i { font-size: 1rem; width: 18px; text-align: center; }
.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background: rgba(255,255,255,.06);
    color: #fff;
}
.sidebar-nav .nav-link.active { border-left-color: var(--cnl-red); }

.admin-main {
    margin-left: 260px;
    flex: 1;
    background: #f8fafc;
    min-height: 100vh;
    display: flex; flex-direction: column;
}
.admin-topbar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: .85rem 1.5rem;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 100;
}
.admin-content { padding: 1.75rem; flex: 1; }

.admin-stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    display: flex; align-items: center; gap: 1rem;
}
.admin-stat-icon {
    width: 50px; height: 50px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.admin-stat-label { font-size: .78rem; color: #64748b; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; }
.admin-stat-value { font-size: 1.75rem; font-weight: 800; color: #0f172a; line-height: 1.1; }

/* ── Tables ─────────────────────────────────────────────────── */
.table-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
}
.table-card .table { margin-bottom: 0; }
.table-card .table th {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #64748b;
    padding: .9rem 1rem;
}
.table-card .table td { padding: .85rem 1rem; vertical-align: middle; font-size: .875rem; }

.export-btn {
    background: linear-gradient(135deg, var(--cnl-red) 0%, #ff5b8f 100%);
    border: 1px solid rgba(255, 0, 80, .85);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(255, 0, 80, .18);
}
.export-btn:hover,
.export-btn:focus,
.export-btn:active,
.export-btn.show {
    background: linear-gradient(135deg, var(--cnl-red-dk) 0%, #ff3b78 100%) !important;
    border-color: rgba(255, 0, 80, .95) !important;
    color: #fff !important;
    box-shadow: 0 12px 28px rgba(255, 0, 80, .28) !important;
}

[data-bs-theme="dark"] .export-btn {
    box-shadow: 0 12px 30px rgba(255, 0, 80, .32);
}

/* ── Utilities ───────────────────────────────────────────────── */
.btn-danger   { background: var(--cnl-red); border-color: var(--cnl-red); }
.btn-danger:hover { background: var(--cnl-red-dk); border-color: var(--cnl-red-dk); }

.text-red   { color: var(--cnl-red) !important; }
.bg-red     { background: var(--cnl-red) !important; }
.border-red { border-color: var(--cnl-red) !important; }

@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; }
    .navbar-brand .cnl-logo-img { height: 28px; }
}

/* ── Dark mode overrides ─────────────────────────────────────── */
[data-bs-theme="dark"] body {
    background-color: #0d1117;
    color: #e6edf3;
}
[data-bs-theme="dark"] .admin-main {
    background: #0d1117;
}
[data-bs-theme="dark"] .admin-topbar {
    background: #161b22;
    border-bottom-color: #30363d;
}
[data-bs-theme="dark"] .admin-topbar .fw-semibold {
    color: #e6edf3;
}
[data-bs-theme="dark"] .admin-stat-card {
    background: #161b22;
    border-color: #30363d;
}
[data-bs-theme="dark"] .admin-stat-label { color: #8b949e; }
[data-bs-theme="dark"] .admin-stat-value { color: #e6edf3; }
[data-bs-theme="dark"] .table-card {
    background: #161b22;
    border-color: #30363d;
}
[data-bs-theme="dark"] .table-card .table th {
    background: #0d1117;
    border-bottom-color: #30363d;
    color: #8b949e;
}
[data-bs-theme="dark"] .dash-stat-card {
    background: #161b22 !important;
    border-color: #30363d !important;
}
[data-bs-theme="dark"] .card {
    background: #161b22;
    border-color: #30363d;
}
[data-bs-theme="dark"] .card-body { color: #e6edf3; }
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .input-group-text {
    background-color: #0d1117;
    border-color: #30363d;
    color: #e6edf3;
}
[data-bs-theme="dark"] footer {
    background: #161b22 !important;
    border-top-color: #30363d !important;
}
[data-bs-theme="dark"] .auth-wrapper {
    background: linear-gradient(135deg, #0d1117 0%, #1a0010 100%);
}
[data-bs-theme="dark"] .auth-card {
    background: #161b22;
    border-color: #30363d;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
[data-bs-theme="dark"] .auth-logo span { color: #e6edf3; }

/* Stat icon circles – override inline pastel backgrounds */
[data-bs-theme="dark"] .dash-stat-icon,
[data-bs-theme="dark"] .admin-stat-icon {
    background: rgba(255,255,255,.1) !important;
}

/* bg-white utility */
[data-bs-theme="dark"] .bg-white {
    background-color: #161b22 !important;
    color: #e6edf3 !important;
}

/* Card headers */
[data-bs-theme="dark"] .card-header {
    background-color: #0d1117;
    border-bottom-color: #30363d;
    color: #e6edf3;
}

/* bg-light utility (used on landing page sections) */
[data-bs-theme="dark"] .bg-light {
    background-color: #0d1117 !important;
    color: #e6edf3;
}

/* Feature cards on sales/landing page */
[data-bs-theme="dark"] .feature-card {
    background: #161b22;
    border-color: #30363d;
    color: #e6edf3;
}
[data-bs-theme="dark"] .feature-icon {
    background: rgba(255,0,80,.15);
}

/* Lead cards on customer dashboard */
[data-bs-theme="dark"] .lead-card {
    background: #161b22;
    border-color: #30363d;
}
[data-bs-theme="dark"] .lead-avatar-wrap .status-dot {
    border-color: #161b22;
}
[data-bs-theme="dark"] .dashboard-menu-link {
    color: #c9d1d9;
}
[data-bs-theme="dark"] .dashboard-menu-link:hover {
    background: #21262d;
    color: #e6edf3;
}
[data-bs-theme="dark"] .dashboard-menu-link.active {
    background: rgba(255, 0, 80, .2);
    color: #ff8fb1;
}
[data-bs-theme="dark"] .template-preview-pane {
    background: #0d1117;
    border-color: #30363d;
    color: #e6edf3;
}
[data-bs-theme="dark"] .template-tag-highlight {
    background: rgba(255, 0, 80, .24);
    color: #ff8fb1;
    border-color: rgba(255, 0, 80, .45);
}

/* Tip / highlight cards with inline light-green bg */
[data-bs-theme="dark"] .tip-card {
    background: rgba(5,150,105,.12) !important;
    border-color: rgba(5,150,105,.3) !important;
}
[data-bs-theme="dark"] .tip-card .text-dark { color: #e6edf3 !important; }
[data-bs-theme="dark"] .tip-card .text-muted { color: #8b949e !important; }
