/* ================================================
   ChurchLove – Estilos Principais
   ================================================ */

:root {
    --primary:        #4361ee;
    --primary-dark:   #3a0ca3;
    --secondary:      #7209b7;
    --success:        #06d6a0;
    --warning:        #ffd60a;
    --danger:         #ef233c;
    --info:           #4cc9f0;

    --sidebar-w:      260px;
    --sidebar-bg:     #16213e;
    --sidebar-text:   #a8b2d8;
    --sidebar-hover:  rgba(255,255,255,.05);
    --sidebar-active: rgba(67,97,238,.18);
    --sidebar-act-cl: #7ba4ff;

    --topbar-h:       64px;
    --body-bg:        #f0f2f5;
    --card-bg:        #ffffff;
    --card-r:         12px;
    --card-sh:        0 2px 12px rgba(0,0,0,.06);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font);
    background: var(--body-bg);
    color: #1f2937;
    margin: 0; padding: 0;
}

/* ---- SIDEBAR ------------------------------------------------ */
.sidebar {
    position: fixed; top: 0; left: 0;
    height: 100vh; width: var(--sidebar-w);
    background: var(--sidebar-bg);
    display: flex; flex-direction: column;
    z-index: 1000;
    overflow-y: auto; overflow-x: hidden;
    transition: transform .3s ease;
}

.sidebar-logo {
    padding: 1.25rem 1.125rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
    display: flex; align-items: center; gap: 12px;
    text-decoration: none; flex-shrink: 0;
}
.sidebar-logo:hover { opacity: .9; }

.logo-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.1rem; flex-shrink: 0;
}

.logo-text   { font-size: 1.05rem; font-weight: 700; color: #fff; line-height: 1.2; }
.logo-sub    { font-size: .6rem; color: var(--sidebar-text); text-transform: uppercase; letter-spacing: .5px; }

.sidebar-section { padding: 1.125rem .875rem .375rem; }

.sidebar-label {
    font-size: .6rem; text-transform: uppercase; letter-spacing: 1.2px;
    color: rgba(168,178,216,.45); font-weight: 600;
    padding: 0 .25rem; margin-bottom: .375rem;
}

.sidebar-nav { list-style: none; padding: 0; margin: 0; }
.sidebar-nav .nav-item { margin-bottom: 2px; }

.sidebar-nav .nav-link {
    display: flex; align-items: center; gap: 11px;
    padding: .56rem .75rem;
    border-radius: 8px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: .855rem; font-weight: 500;
    transition: background .18s, color .18s;
}
.sidebar-nav .nav-link:hover  { background: var(--sidebar-hover); color: #fff; }
.sidebar-nav .nav-link.active { background: var(--sidebar-active); color: var(--sidebar-act-cl); }
.sidebar-nav .nav-link .ni    { width: 18px; text-align: center; font-size: .9rem; flex-shrink: 0; }
.sidebar-nav .nav-link .badge { margin-left: auto; font-size: .6rem; }

.sidebar-divider { border-color: rgba(255,255,255,.06); margin: .5rem .875rem; }

.sidebar-footer {
    margin-top: auto; padding: .875rem;
    border-top: 1px solid rgba(255,255,255,.06); flex-shrink: 0;
}

.user-card {
    display: flex; align-items: center; gap: 10px;
    padding: .5rem .625rem; border-radius: 8px; cursor: pointer;
    text-decoration: none;
    transition: background .18s;
}
.user-card:hover { background: var(--sidebar-hover); }

.user-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: .78rem; font-weight: 700; flex-shrink: 0;
}

.user-name { font-size: .82rem; font-weight: 600; color: #fff; line-height: 1.2; }
.user-role { font-size: .68rem; color: var(--sidebar-text); }

/* ---- MAIN CONTENT ------------------------------------------- */
.main-content { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

/* ---- TOPBAR -------------------------------------------------- */
.topbar {
    position: sticky; top: 0; height: var(--topbar-h);
    background: #fff; border-bottom: 1px solid #e8ecf0;
    display: flex; align-items: center; gap: 1rem;
    padding: 0 1.5rem; z-index: 900;
}

.topbar-title { font-size: 1rem; font-weight: 600; color: #1a1a2e; flex: 1; }

.search-wrap { position: relative; max-width: 260px; flex: 1; }
.search-wrap .form-control {
    padding-left: 2.2rem; border-radius: 8px;
    border: 1.5px solid #e5e7eb; font-size: .85rem; background: #f8f9fa;
}
.search-wrap .form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(67,97,238,.1); background: #fff; }
.search-icon { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: #9ca3af; font-size: .8rem; }

.topbar-actions { display: flex; align-items: center; gap: .5rem; }

.btn-icon {
    width: 38px; height: 38px; border-radius: 8px; border: none;
    background: #f0f2f5; color: #6b7280;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all .2s; position: relative; font-size: .9rem;
}
.btn-icon:hover { background: #e4e8f2; color: var(--primary); }

.notif-dot {
    position: absolute; top: 7px; right: 7px;
    width: 8px; height: 8px; background: var(--danger);
    border-radius: 50%; border: 2px solid #fff;
}

.topbar-user {
    display: flex; align-items: center; gap: 8px;
    padding: .375rem .625rem; border-radius: 8px; cursor: pointer;
    background: transparent; border: none; transition: background .18s;
}
.topbar-user:hover { background: #f0f2f5; }
.topbar-user-name { font-size: .82rem; font-weight: 600; color: #374151; }

/* ---- PAGE CONTENT ------------------------------------------- */
.page-content { padding: 1.5rem; flex: 1; }

.page-header { margin-bottom: 1.5rem; }
.page-header h1 { font-size: 1.35rem; font-weight: 700; color: #1a1a2e; margin: 0; }
.page-header p   { font-size: .875rem; color: #6b7280; margin: .25rem 0 0; }

/* ---- STAT CARDS --------------------------------------------- */
.stat-card {
    background: var(--card-bg); border-radius: var(--card-r);
    box-shadow: var(--card-sh); padding: 1.25rem 1.375rem;
    display: flex; align-items: center; gap: 1rem;
    transition: transform .2s, box-shadow .2s; text-decoration: none; color: inherit;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }

.stat-icon {
    width: 52px; height: 52px; border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; flex-shrink: 0;
}

.stat-label { font-size: .72rem; color: #6b7280; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.stat-value { font-size: 1.65rem; font-weight: 800; color: #1a1a2e; line-height: 1; margin-bottom: 4px; }
.stat-change { font-size: .75rem; color: #6b7280; }
.stat-change .up   { color: var(--success); }
.stat-change .down { color: var(--danger); }

/* ---- CARDS -------------------------------------------------- */
.card { border: none; border-radius: var(--card-r); box-shadow: var(--card-sh); }
.card-header {
    background: transparent; border-bottom: 1px solid #f0f0f0;
    padding: 1rem 1.25rem;
    display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: .9rem; font-weight: 700; color: #1a1a2e; margin: 0; }

/* ---- TABLE -------------------------------------------------- */
.table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; color: #6b7280; font-weight: 600; border-top: none; white-space: nowrap; }
.table td { font-size: .855rem; vertical-align: middle; }
.table-hover tbody tr:hover { background: #f8f9ff; }

.member-ava {
    width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .78rem; font-weight: 700; color: #fff; flex-shrink: 0;
}

/* ---- BADGE -------------------------------------------------- */
.badge { font-weight: 600; }

/* ---- PROGRESS ----------------------------------------------- */
.progress { height: 6px; border-radius: 3px; }

/* ---- MOBILE -------------------------------------------------- */
.sidebar-toggle { display: none; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 999; }

@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .sidebar-toggle { display: flex; }
    .sidebar-overlay.show { display: block; }
}

/* ---- SOFT BG HELPERS ---------------------------------------- */
.bg-primary-soft { background: rgba(67,97,238,.12); color: var(--primary); }
.bg-success-soft { background: rgba(6,214,160,.12); color: #059669; }
.bg-warning-soft { background: rgba(255,214,10,.18); color: #b45309; }
.bg-danger-soft  { background: rgba(239,35,60,.12); color: #dc2626; }
.bg-info-soft    { background: rgba(76,201,240,.15); color: #0284c7; }
.bg-purple-soft    { background: rgba(114,9,183,.12); color: var(--secondary); }
.bg-secondary-soft { background: rgba(107,114,128,.12); color: #374151; }
.bg-whatsapp-soft  { background: rgba(37,211,102,.12); color: #16a34a; }

/* ============================================================
   LANDING PAGE
   ============================================================ */

html { scroll-behavior: smooth; }

.lp-nav {
    position: fixed; top: 0; width: 100%;
    padding: 1rem 0; z-index: 1000;
    transition: background .3s, box-shadow .3s, padding .3s;
}
.lp-nav.scrolled { background: rgba(255,255,255,.97); box-shadow: 0 2px 20px rgba(0,0,0,.08); padding: .6rem 0; }
.lp-nav .navbar-brand { font-size: 1.2rem; font-weight: 800; color: #fff; text-decoration: none; }
.lp-nav.scrolled .navbar-brand { color: #1a1a2e; }
.lp-nav .nav-link-lp { color: rgba(255,255,255,.8); font-size: .875rem; font-weight: 500; text-decoration: none; padding: .375rem .75rem; transition: color .2s; }
.lp-nav.scrolled .nav-link-lp { color: #374151; }
.lp-nav .nav-link-lp:hover { color: #fff; }
.lp-nav.scrolled .nav-link-lp:hover { color: var(--primary); }

/* HERO */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 55%, #24243e 100%);
    display: flex; align-items: center;
    padding: 7rem 0 4rem; position: relative; overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(67,97,238,.2) 0%, transparent 60%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(67,97,238,.2); border: 1px solid rgba(67,97,238,.4);
    color: #a5b4fc; padding: .35rem 1rem; border-radius: 50px;
    font-size: .8rem; font-weight: 600; margin-bottom: 1.25rem;
}

.hero-title {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: 800; color: #fff; line-height: 1.18; margin-bottom: 1.125rem;
}
.hero-title .grad {
    background: linear-gradient(90deg, #7ba4ff, #c77dff);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.hero-sub { font-size: 1.05rem; color: rgba(255,255,255,.7); line-height: 1.65; margin-bottom: 2rem; max-width: 500px; }

/* Dashboard mockup */
.mockup-wrap { position: relative; z-index: 1; }
.mockup {
    background: #1e293b; border-radius: 16px;
    box-shadow: 0 40px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.05);
    overflow: hidden; font-size: 0;
}
.mockup-bar {
    background: #0f172a; padding: 10px 14px;
    display: flex; align-items: center; gap: 6px;
}
.mockup-dot { width: 9px; height: 9px; border-radius: 50%; }
.mockup-sidebar {
    width: 55px; background: #0f172a; padding: 14px 8px;
    display: flex; flex-direction: column; gap: 6px; flex-shrink: 0;
}
.mockup-si {
    width: 100%; height: 26px; border-radius: 6px; background: rgba(255,255,255,.07);
}
.mockup-si.active { background: rgba(67,97,238,.4); }
.mockup-body { display: flex; height: 220px; }
.mockup-main { flex: 1; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.mockup-cards { display: flex; gap: 6px; }
.mockup-card {
    flex: 1; height: 48px; border-radius: 6px; background: rgba(255,255,255,.06);
    padding: 8px; position: relative; overflow: hidden;
}
.mockup-card::after { content: ''; position: absolute; bottom: 0; left: 0; height: 3px; width: 40%; border-radius: 2px; }
.mockup-card:nth-child(1)::after { background: #4361ee; }
.mockup-card:nth-child(2)::after { background: #06d6a0; }
.mockup-card:nth-child(3)::after { background: #f72585; }
.mockup-card:nth-child(4)::after { background: #ffd60a; }
.mockup-chart { flex: 1; background: rgba(255,255,255,.04); border-radius: 6px; padding: 8px; display: flex; align-items: flex-end; gap: 4px; }
.mockup-bar-item { flex: 1; border-radius: 3px 3px 0 0; }
.mockup-table { background: rgba(255,255,255,.04); border-radius: 6px; padding: 6px 8px; }
.mockup-row { height: 14px; background: rgba(255,255,255,.06); border-radius: 3px; margin-bottom: 5px; }
.mockup-row:last-child { margin: 0; width: 70%; }
.lh-1 { height: 7px; width: 30%; background: rgba(255,255,255,.12); border-radius: 2px; margin-bottom: 2px; }
.lh-2 { height: 5px; width: 55%; background: rgba(255,255,255,.07); border-radius: 2px; }

/* STATS BAR */
.stats-bar { background: #fff; padding: 1.5rem 0; box-shadow: 0 4px 20px rgba(0,0,0,.06); }
.stat-item { text-align: center; padding: .5rem 1rem; }
.stat-item .number { font-size: 2rem; font-weight: 800; color: var(--primary); line-height: 1; display: block; }
.stat-item .label  { font-size: .78rem; color: #6b7280; margin-top: 4px; }

/* FEATURES */
.features { padding: 5rem 0; background: #f8f9ff; }
.section-tag {
    display: inline-block; background: rgba(67,97,238,.1); color: var(--primary);
    padding: .28rem 1rem; border-radius: 50px; font-size: .75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: .75rem;
}
.section-title { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800; color: #1a1a2e; margin-bottom: .75rem; }
.section-sub   { font-size: 1rem; color: #6b7280; }

.feat-card {
    background: #fff; border-radius: 16px; padding: 1.875rem;
    height: 100%; border: 1.5px solid #f0f0f0; transition: all .3s;
}
.feat-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(67,97,238,.1); border-color: rgba(67,97,238,.25); }

.feat-icon { width: 54px; height: 54px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; margin-bottom: 1.125rem; }
.feat-title { font-size: 1rem; font-weight: 700; color: #1a1a2e; margin-bottom: .375rem; }
.feat-desc  { font-size: .855rem; color: #6b7280; line-height: 1.65; }

/* HOW IT WORKS */
.how { padding: 5rem 0; background: #fff; }
.how-step { text-align: center; padding: 1.5rem 1rem; }
.how-num {
    width: 60px; height: 60px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff; font-size: 1.3rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.125rem;
}
.how-title { font-size: 1.05rem; font-weight: 700; color: #1a1a2e; margin-bottom: .375rem; }
.how-desc  { font-size: .875rem; color: #6b7280; }

/* PRICING */
.pricing { padding: 5rem 0; background: #f8f9ff; }

.price-card {
    background: #fff; border-radius: 20px; padding: 2.25rem;
    border: 2px solid #f0f0f0; height: 100%; position: relative;
    transition: all .3s;
}
.price-card:hover,
.price-card.popular { border-color: var(--primary); box-shadow: 0 20px 60px rgba(67,97,238,.15); }
.price-card.popular { transform: scale(1.03); }

.popular-badge {
    position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: #fff; padding: .3rem 1.25rem; border-radius: 50px;
    font-size: .72rem; font-weight: 700; white-space: nowrap;
}

.price-plan { font-size: .8rem; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: .375rem; }
.price-amount { font-size: 2.6rem; font-weight: 800; color: #1a1a2e; line-height: 1; }
.price-currency { font-size: 1rem; font-weight: 700; vertical-align: super; font-size: 1.1rem; }
.price-period  { font-size: .8rem; color: #9ca3af; }
.price-desc    { font-size: .875rem; color: #6b7280; margin: .75rem 0 1.25rem; }

.price-features { list-style: none; padding: 0; margin: 0 0 1.75rem; }
.price-features li { display: flex; align-items: center; gap: 10px; padding: .44rem 0; font-size: .875rem; color: #374151; border-bottom: 1px solid #f9f9f9; }
.price-features li:last-child { border: none; }
.price-features .check { color: var(--success); flex-shrink: 0; }

/* CTA SECTION */
.cta-section { background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); padding: 5rem 0; text-align: center; }

/* FOOTER */
.lp-footer { background: #0f0c29; color: rgba(255,255,255,.65); padding: 3rem 0 1.5rem; }
.lp-footer a { color: rgba(255,255,255,.65); text-decoration: none; font-size: .875rem; }
.lp-footer a:hover { color: #fff; }
.footer-brand { font-size: 1.2rem; font-weight: 800; color: #fff; margin-bottom: .5rem; }
.footer-brand small { display: block; font-size: .7rem; font-weight: 400; color: rgba(255,255,255,.4); }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 55%, #24243e 100%);
    display: flex; align-items: center; justify-content: center; padding: 2rem 1rem;
}

.auth-card {
    background: #fff; border-radius: 20px; padding: 2.5rem;
    width: 100%; max-width: 440px;
    box-shadow: 0 24px 64px rgba(0,0,0,.35);
}

.auth-logo { text-align: center; margin-bottom: 1.75rem; }
.auth-logo .logo-icon {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 16px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.5rem; margin-bottom: .625rem;
}
.auth-logo h5 { font-weight: 700; color: #1a1a2e; margin: 0; }
.auth-logo p  { font-size: .82rem; color: #6b7280; margin: .25rem 0 0; }

.form-label   { font-size: .8rem; font-weight: 600; color: #374151; margin-bottom: .35rem; }
.input-icon   { position: relative; }
.input-icon .form-control { padding-left: 2.375rem; }
.input-icon .icon { position: absolute; left: .875rem; top: 50%; transform: translateY(-50%); color: #9ca3af; font-size: .85rem; }

.form-control, .form-select {
    border-radius: 8px; border: 1.5px solid #e5e7eb;
    padding: .6rem .875rem; font-size: .875rem; transition: all .2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary); box-shadow: 0 0 0 3px rgba(67,97,238,.12);
}

.btn-primary { background: var(--primary); border-color: var(--primary); border-radius: 8px; font-weight: 600; transition: all .2s; }
.btn-primary:hover,
.btn-primary:focus { background: var(--primary-dark); border-color: var(--primary-dark); }

.btn-outline-primary { border-color: var(--primary); color: var(--primary); border-radius: 8px; font-weight: 600; }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); }

.divider { display: flex; align-items: center; gap: 1rem; color: #9ca3af; font-size: .78rem; margin: 1.25rem 0; }
.divider::before, .divider::after { content: ''; flex: 1; border-top: 1px solid #e5e7eb; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar       { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #c1c9d2; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a0aab4; }
