/* =========================================================================
   LaunchPad — custom SaaS theme on top of Bootstrap 5.3
   ========================================================================= */
:root {
    --brand: #4f46e5;
    --brand-700: #4338ca;
    --brand-soft: #eef2ff;
    --ink: #0f172a;
    --muted: #64748b;
    --bg: #f6f7fb;
    --card: #ffffff;
    --border: #e6e8ef;
    --radius: 16px;
    --shadow: 0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06);
    --sidebar-w: 264px;
    --font-display: "Plus Jakarta Sans", system-ui, sans-serif;
    --font-body: "DM Sans", system-ui, sans-serif;
}
[data-bs-theme="dark"] {
    --brand: #818cf8;
    --brand-700: #6366f1;
    --brand-soft: #1e1b3a;
    --ink: #e8eaf2;
    --muted: #94a3b8;
    --bg: #0b0f1a;
    --card: #131826;
    --border: #232a3b;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.4);
}

* { -webkit-font-smoothing: antialiased; }
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--ink);
}
h1,h2,h3,h4,h5,h6,.navbar-brand,.sidebar-brand { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; }

a { text-decoration: none; }
.text-muted { color: var(--muted) !important; }

/* ---- Buttons & brand ------------------------------------------------- */
.btn { border-radius: 10px; font-weight: 600; }
.btn-primary { background: var(--brand); border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-700); border-color: var(--brand-700); }
.btn-outline-primary { color: var(--brand); border-color: var(--brand); }
.btn-outline-primary:hover { background: var(--brand); border-color: var(--brand); }
.text-brand { color: var(--brand) !important; }
.bg-brand-soft { background: var(--brand-soft) !important; }

.btn-icon {
    width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px; border: 1px solid var(--border); background: var(--card); color: var(--ink);
}
.btn-icon:hover { background: var(--brand-soft); color: var(--brand); }

.brand-mark {
    width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--brand); color: #fff; margin-right: 8px; font-size: .95rem;
}
.brand-mark.admin { background: #0ea5e9; }

/* ---- Public navbar --------------------------------------------------- */
.site-navbar {
    background: color-mix(in srgb, var(--card) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.site-navbar .nav-link { color: var(--ink); font-weight: 600; padding: .4rem .9rem; border-radius: 8px; }
.site-navbar .nav-link:hover, .site-navbar .nav-link.active { color: var(--brand); background: var(--brand-soft); }
.navbar-brand { color: var(--ink) !important; display: inline-flex; align-items: center; font-size: 1.2rem; }

/* ---- Hero ------------------------------------------------------------ */
.hero {
    position: relative; overflow: hidden;
    padding: 6rem 0 5rem;
    background:
        radial-gradient(900px 500px at 80% -10%, color-mix(in srgb, var(--brand) 22%, transparent), transparent),
        radial-gradient(700px 400px at 0% 10%, color-mix(in srgb, #0ea5e9 16%, transparent), transparent);
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; line-height: 1.05; }
.hero .lead { font-size: 1.18rem; color: var(--muted); max-width: 36rem; }
.eyebrow {
    display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; font-size: .85rem;
    color: var(--brand); background: var(--brand-soft); padding: .35rem .8rem; border-radius: 999px; margin-bottom: 1rem;
}
.hero-card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 1.25rem;
}

/* ---- Generic cards / sections --------------------------------------- */
.section { padding: 4.5rem 0; }
.section-title { font-size: clamp(1.7rem, 3vw, 2.3rem); font-weight: 800; }
.feature-card, .surface {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); height: 100%;
}
.feature-card { padding: 1.6rem; transition: transform .18s ease, box-shadow .18s ease; }
.feature-card:hover { transform: translateY(-4px); }
.feature-icon {
    width: 48px; height: 48px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--brand-soft); color: var(--brand); font-size: 1.4rem; margin-bottom: 1rem;
}
.step-num {
    width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-display);
}

/* ---- Pricing --------------------------------------------------------- */
.price-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; height: 100%; }
.price-card.featured { border-color: var(--brand); box-shadow: 0 12px 40px color-mix(in srgb, var(--brand) 22%, transparent); position: relative; }
.price-card.featured::before {
    content: "Most popular"; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--brand); color: #fff; font-size: .72rem; font-weight: 700; padding: .25rem .8rem; border-radius: 999px;
}
.price-amount { font-size: 2.6rem; font-weight: 800; font-family: var(--font-display); }
.price-list { list-style: none; padding: 0; margin: 1.2rem 0; }
.price-list li { padding: .4rem 0; color: var(--muted); }
.price-list li i { color: #16a34a; margin-right: .5rem; }

/* ---- Testimonials / FAQ --------------------------------------------- */
.testimonial { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.6rem; height: 100%; }
.accordion-button { font-weight: 600; }
.accordion-button:not(.collapsed) { color: var(--brand); background: var(--brand-soft); }

/* ---- Footer ---------------------------------------------------------- */
.site-footer { background: #0b1020; color: #fff; padding: 3.5rem 0 2rem; margin-top: 4rem; }
.site-footer h6 { color: #fff; margin-bottom: 1rem; }
.footer-links { list-style: none; padding: 0; }
.footer-links a { color: rgba(255,255,255,.65); display: block; padding: .25rem 0; }
.footer-links a:hover { color: #fff; }

/* =========================================================================
   APP SHELL (dashboard + admin)
   ========================================================================= */
.app-shell { display: flex; min-height: 100vh; }
.app-sidebar {
    width: var(--sidebar-w); flex-shrink: 0; background: var(--card); border-right: 1px solid var(--border);
    display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 1040;
    overflow-y: auto; transition: transform .25s ease;
}
.sidebar-brand { display: flex; align-items: center; gap: .25rem; padding: 1.1rem 1.25rem; font-size: 1.15rem; color: var(--ink); border-bottom: 1px solid var(--border); }
.side-nav { padding: 1rem .75rem; flex: 1; }
.side-heading { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1rem .5rem .4rem; font-weight: 700; }
.side-link {
    display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; border-radius: 10px;
    color: var(--ink); font-weight: 500; margin-bottom: 2px; position: relative;
}
.side-link i { font-size: 1.05rem; width: 20px; text-align: center; color: var(--muted); }
.side-link:hover { background: var(--brand-soft); color: var(--brand); }
.side-link:hover i { color: var(--brand); }
.side-link.active { background: var(--brand); color: #fff; }
.side-link.active i { color: #fff; }
.side-lock { margin-left: auto; font-size: .8rem !important; color: #f59e0b !important; }
.side-upgrade { padding: 1rem; }
.upgrade-card {
    display: block; background: linear-gradient(135deg, var(--brand), #0ea5e9); color: #fff;
    border-radius: 14px; padding: 1rem; text-align: center;
}
.upgrade-card i { font-size: 1.4rem; display: block; margin-bottom: .3rem; }
.upgrade-card strong { display: block; }
.upgrade-card small { opacity: .85; }
.upgrade-card.premium { background: linear-gradient(135deg, #16a34a, #059669); }

.app-main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.app-topbar {
    display: flex; align-items: center; gap: 1rem; padding: .85rem 1.5rem;
    background: color-mix(in srgb, var(--card) 90%, transparent); backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1030;
}
.app-topbar-title { font-size: 1.25rem; margin: 0; }
.app-topbar-actions { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.app-content { padding: 1.75rem 1.5rem 3rem; flex: 1; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.notif-dot { position: absolute; top: -3px; right: -3px; background: #ef4444; color: #fff; border-radius: 999px; font-size: .65rem; padding: 0 5px; min-width: 17px; text-align: center; }

/* ---- Dashboard widgets ---------------------------------------------- */
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.stat-card .stat-icon { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem; }
.stat-value { font-size: 1.8rem; font-weight: 800; font-family: var(--font-display); line-height: 1; }
.stat-label { color: var(--muted); font-size: .9rem; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.4rem; }
.panel-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 1rem; }

.welcome-banner {
    background: linear-gradient(135deg, var(--brand), #0ea5e9); color: #fff;
    border-radius: var(--radius); padding: 1.8rem; margin-bottom: 1.5rem;
}
.welcome-banner h2 { color: #fff; font-weight: 800; }

.progress { height: 10px; border-radius: 999px; background: var(--brand-soft); }
.progress-bar { background: var(--brand); border-radius: 999px; }

.checklist-item { display: flex; align-items: flex-start; gap: .6rem; padding: .55rem 0; border-bottom: 1px dashed var(--border); }
.checklist-item:last-child { border-bottom: none; }
.checklist-item.done label { text-decoration: line-through; color: var(--muted); }

.table { color: var(--ink); }
.badge-premium { background: linear-gradient(135deg,#16a34a,#059669); color:#fff; }
.badge-free { background: var(--brand-soft); color: var(--brand); }

.tool-grid-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); height:100%; transition: transform .15s ease; }
.tool-grid-card:hover { transform: translateY(-4px); }

.form-control, .form-select { border-radius: 10px; border-color: var(--border); background: var(--card); color: var(--ink); }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--brand) 20%, transparent); }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; background:
    radial-gradient(800px 400px at 50% -10%, var(--brand-soft), transparent); }
.auth-card { width: 100%; max-width: 440px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2.2rem; }

/* ---- Wizard ---------------------------------------------------------- */
.wizard-steps { display: flex; gap: .5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.wizard-step { flex: 1; min-width: 120px; padding: .6rem .8rem; border-radius: 10px; border: 1px solid var(--border); color: var(--muted); font-weight: 600; font-size: .9rem; }
.wizard-step.active { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.wizard-pane { display: none; }
.wizard-pane.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- Responsive ------------------------------------------------------ */
@media (max-width: 991.98px) {
    .app-sidebar { transform: translateX(-100%); }
    .app-sidebar.open { transform: translateX(0); }
    .app-main { margin-left: 0; }
}

/* ---- Print (PDF export) --------------------------------------------- */
@media print {
    .app-sidebar, .app-topbar, .no-print, .btn { display: none !important; }
    .app-main { margin: 0; }
    .app-content { padding: 0; }
    body { background: #fff; }
    .panel, .surface { box-shadow: none; border: 1px solid #ccc; }
}

/* ---- Blog article body ------------------------------------------------- */
.blog-body { font-size: 1.075rem; line-height: 1.8; color: var(--bs-body-color); }
.blog-body p { margin-bottom: 1.1rem; }
.blog-body h2, .blog-body h3 { font-family: var(--font-display, inherit); font-weight: 700; margin: 1.6rem 0 .8rem; }
.blog-body ul, .blog-body ol { margin-bottom: 1.1rem; padding-left: 1.3rem; }
.blog-body img { max-width: 100%; border-radius: 12px; margin: 1rem 0; }
.blog-body a { color: var(--brand, #4f46e5); }
