/* ============================================================
   Sohi Tech CRM — global app styles
   Bootstrap 5 ships from CDN in App.razor; this layer adds the
   shell layout, status colors, and a few mobile niceties.
   ============================================================ */

:root {
    --crm-sidebar-width: 240px;
    --crm-header-height: 60px;
    /* Brand palette derived from the Sohi Technology logo:
       primary = the saturated royal blue from the top-left fold,
       accent  = the leafy green from the bottom-right fold,
       lime    = the bright chartreuse highlight (used sparingly).
       Gradients across the app combine primary -> accent to echo the mark. */
    --crm-primary:        #2D7DF6;
    --crm-primary-dark:   #1E5FCB;
    --crm-primary-light:  #5E9CF8;
    --crm-accent:         #34C724;
    --crm-accent-dark:    #1E9A14;
    --crm-lime:           #C8F12E;
    --crm-brand-gradient: linear-gradient(135deg, #2D7DF6 0%, #34C724 100%);
    --crm-surface: #f8f9fc;
    --crm-border: #e5e7eb;
}

html, body { height: 100%; }
body {
    margin: 0;
    background: var(--crm-surface);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1f2937;
}

/* ---------------- App shell ---------------- */
.app-shell { display: flex; min-height: 100dvh; }

.app-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.page-body {
    padding: 24px;
    flex: 1;
    overflow-x: auto;
}

@media (max-width: 768px) {
    .page-body { padding: 16px; }
}

/* ---------------- Sidebar ---------------- */
.sidebar {
    width: var(--crm-sidebar-width);
    background: linear-gradient(180deg, #0B1E4F 0%, #1A3A8E 100%);
    color: #e5e7eb;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100dvh;
    overflow-y: auto;
    z-index: 1030;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 18px 22px;
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-brand i { font-size: 1.3rem; }

.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    color: rgba(229, 231, 235, 0.85);
    text-decoration: none;
    font-size: 0.95rem;
    transition: background 100ms ease, color 100ms ease;
}
.sidebar-nav .nav-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.sidebar-nav .nav-item.active {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-weight: 600;
}
.sidebar-nav .nav-item i { width: 18px; text-align: center; }

.sidebar-footer {
    padding: 14px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem;
    color: rgba(229, 231, 235, 0.7);
}

/* Mobile drawer */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1029;
}
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -100%;
        transition: left 200ms ease;
    }
    .app-shell.sidebar-open .sidebar { left: 0; }
    .app-shell.sidebar-open .sidebar-overlay { display: block; }
}

/* ---------------- Header ---------------- */
.app-header {
    height: var(--crm-header-height);
    background: #fff;
    border-bottom: 1px solid var(--crm-border);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-toggle { font-size: 1.4rem; padding: 4px 8px; }
.header-spacer { flex: 1; }

.header-bell {
    color: #6b7280;
    font-size: 1.15rem;
    padding: 8px 10px;
    text-decoration: none;
    position: relative;
}
.header-bell:hover { color: var(--crm-primary); }

.header-user {
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    padding: 4px 8px;
}
.header-user::after { margin-left: 6px; }
.header-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--crm-primary);
    color: #fff;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

/* ---------------- Page header ---------------- */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.page-title    { font-size: 1.55rem; font-weight: 700; margin: 0; }
.page-subtitle { color: #6b7280; margin: 4px 0 0; }
.page-actions  { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------- Cards / surfaces ---------------- */
.card { border: 1px solid var(--crm-border); box-shadow: 0 1px 2px rgba(0,0,0,0.03); }

/* ---------------- Status badges ---------------- */
.badge { font-weight: 500; padding: 0.4em 0.7em; font-size: 0.78rem; }

.status-new-lead          { background-color: #dbeafe; color: #1e40af; }
.status-called            { background-color: #ede9fe; color: #5b21b6; }
.status-interested        { background-color: #e0e7ff; color: #3730a3; }
.status-demo-scheduled    { background-color: #fef3c7; color: #92400e; }
.status-demo-completed    { background-color: #fed7aa; color: #9a3412; }
.status-follow-up-pending { background-color: #fde68a; color: #854d0e; }
.status-negotiation       { background-color: #cffafe; color: #155e75; }
.status-payment-pending   { background-color: #fecaca; color: #991b1b; }
.status-converted         { background-color: #d1fae5; color: #065f46; }
.status-not-interested    { background-color: #e5e7eb; color: #374151; }
.status-default           { background-color: #e5e7eb; color: #374151; }

.role-admin         { background-color: #fecaca; color: #991b1b; }
.role-salesmanager  { background-color: #dbeafe; color: #1e40af; }
.role-salesemployee { background-color: #d1fae5; color: #065f46; }

/* ---------------- Empty state ---------------- */
.empty-state-icon { font-size: 2.5rem; color: #9ca3af; }

/* ---------------- Dashboard stat cards ---------------- */
.stat-grid { margin-bottom: 8px; }

.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 12px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--crm-border);
    position: relative;
    overflow: hidden;
    transition: transform 120ms ease, box-shadow 120ms ease;
    height: 100%;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    color: inherit;
    text-decoration: none;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1.1; color: #111827; }
.stat-label { font-size: 0.78rem; color: #6b7280; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }
.stat-sub   { font-size: 0.72rem; color: #9ca3af; margin-top: 4px; }

.stat-blue   .stat-icon { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.stat-orange .stat-icon { background: linear-gradient(135deg, #f97316, #ea580c); }
.stat-red    .stat-icon { background: linear-gradient(135deg, #ef4444, #dc2626); }
.stat-green  .stat-icon { background: linear-gradient(135deg, #22c55e, #16a34a); }
.stat-purple .stat-icon { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.stat-yellow .stat-icon { background: linear-gradient(135deg, #eab308, #ca8a04); }

.stat-pulse {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: pulse 1.6s infinite;
}
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0    rgba(239, 68, 68, 0.7); }
    70%  { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0    rgba(239, 68, 68, 0); }
}

/* ---------------- Chart cards ---------------- */
.chart-card .card-body { min-height: 260px; }
.chart-card canvas     { width: 100% !important; }

.rank-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: #eef2ff;
    color: var(--crm-primary-dark);
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 700;
}

/* ---------------- Leads list ---------------- */
.lead-filters .card-body { padding: 14px 16px; }

.search-wrap { position: relative; }
.search-wrap .search-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.leads-table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; color: #6b7280; }

.status-dropdown-btn { box-shadow: none !important; text-decoration: none; padding: 0; }
.status-dropdown-btn:focus { box-shadow: none; }

/* ---------------- Lead cards (mobile / card view) ---------------- */
.lead-card {
    display: block;
    background: #fff;
    border: 1px solid var(--crm-border);
    border-radius: 10px;
    padding: 14px;
    text-decoration: none;
    color: inherit;
    transition: transform 120ms ease, box-shadow 120ms ease;
    height: 100%;
}
.lead-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
    color: inherit;
    text-decoration: none;
}
.lead-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.lead-card-number { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.78rem; color: #6b7280; }
.lead-card-name { font-weight: 600; }
.lead-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    font-size: 0.82rem;
    color: #6b7280;
}
.lead-card-meta i { margin-right: 4px; }

/* ---------------- Lead detail ---------------- */
.lead-info dt { font-weight: 500; color: #6b7280; padding-top: 6px; }
.lead-info dd { padding-top: 6px; margin-bottom: 0; }
.lead-notes { white-space: pre-wrap; line-height: 1.5; }

/* ---------------- Activity timeline ---------------- */
.timeline {
    list-style: none;
    margin: 0;
    padding: 16px 16px 16px 24px;
    position: relative;
}
.timeline::before {
    content: '';
    position: absolute;
    top: 16px;
    bottom: 16px;
    left: 38px;
    width: 2px;
    background: #e5e7eb;
}
.timeline-item {
    position: relative;
    padding: 8px 0 8px 36px;
    min-height: 38px;
}
.activity-icon {
    position: absolute;
    left: 4px;
    top: 8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: #9ca3af;
    box-shadow: 0 0 0 4px #fff;
    z-index: 1;
}
.activity-icon.activity-green   { background: #22c55e; }
.activity-icon.activity-blue    { background: #3b82f6; }
.activity-icon.activity-orange  { background: #f97316; }
.activity-icon.activity-purple  { background: #8b5cf6; }
.activity-icon.activity-yellow  { background: #eab308; }
.activity-icon.activity-default { background: #9ca3af; }

.timeline-desc { font-size: 0.92rem; color: #1f2937; }
.timeline-meta { font-size: 0.78rem; color: #6b7280; margin-top: 2px; }

.timeline-card .card-body { max-height: 70vh; overflow-y: auto; }

/* ---------------- Follow-ups page ---------------- */
.followup-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
@media (min-width: 768px) {
    .followup-stats { grid-template-columns: repeat(3, 220px); }
}

.followup-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--crm-border);
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease;
    text-align: left;
    font: inherit;
    color: inherit;
}
.followup-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}
.followup-stat.is-active {
    border-color: var(--crm-primary);
    box-shadow: 0 0 0 2px rgba(45, 125, 246, 0.15);
}
.followup-stat i {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.followup-stat .value { font-size: 1.35rem; font-weight: 700; line-height: 1; display: block; }
.followup-stat .label { font-size: 0.78rem; color: #6b7280; text-transform: uppercase; letter-spacing: 0.03em; }

.followup-stat.is-overdue i { background: linear-gradient(135deg, #ef4444, #dc2626); }
.followup-stat.is-today   i { background: linear-gradient(135deg, #f97316, #ea580c); }
.followup-stat.is-week    i { background: linear-gradient(135deg, #22c55e, #16a34a); }

.followup-tabs .nav-link {
    color: #6b7280;
    border-radius: 999px;
    padding: 6px 14px;
}
.followup-tabs .nav-link.active {
    background-color: var(--crm-primary);
    color: #fff;
}

.followups-table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; color: #6b7280; }
.followups-table tr.row-overdue {
    border-left: 4px solid #ef4444;
    background-color: rgba(239, 68, 68, 0.03);
}

.followup-card {
    background: #fff;
    border: 1px solid var(--crm-border);
    border-radius: 10px;
    padding: 14px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.followup-card.is-overdue {
    border-left: 4px solid #ef4444;
}
.followup-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.followup-card-name { color: inherit; font-weight: 600; text-decoration: none; }
.followup-card-name:hover { color: var(--crm-primary); }
.followup-card-when { display: flex; align-items: center; gap: 6px; font-size: 0.92rem; color: #4b5563; }
.followup-card-notes { font-size: 0.88rem; color: #6b7280; }
.followup-card-actions { display: flex; gap: 6px; margin-top: 4px; }

/* ---------------- Payments page ---------------- */
.payment-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--crm-border);
    height: 100%;
}
.payment-summary-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.payment-summary-value { font-size: 1.3rem; font-weight: 700; line-height: 1.1; color: #111827; }
.payment-summary-label { font-size: 0.78rem; color: #6b7280; text-transform: uppercase; letter-spacing: 0.03em; margin-top: 2px; }

.summary-green  .payment-summary-icon { background: linear-gradient(135deg, #22c55e, #16a34a); }
.summary-blue   .payment-summary-icon { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.summary-yellow .payment-summary-icon { background: linear-gradient(135deg, #eab308, #ca8a04); }
.summary-red    .payment-summary-icon { background: linear-gradient(135deg, #ef4444, #dc2626); }

.payments-table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; color: #6b7280; }

/* ---------------- Users page ---------------- */
.users-table th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; color: #6b7280; }
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--crm-brand-gradient);
    color: #fff;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    flex-shrink: 0;
}
.user-avatar-lg { width: 56px; height: 56px; font-size: 1rem; }

/* ---------------- Password strength meter ---------------- */
.pw-meter        { margin-top: 6px; }
.pw-meter-track  { height: 5px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.pw-meter-fill   { height: 100%; transition: width 200ms ease, background 200ms ease; border-radius: 999px; }
.pw-meter-label  { margin-top: 4px; }
.pw-meter-fill.pw-empty  { background: transparent; }
.pw-meter-fill.pw-weak   { background: #ef4444; }
.pw-meter-fill.pw-fair   { background: #f59e0b; }
.pw-meter-fill.pw-good   { background: #3b82f6; }
.pw-meter-fill.pw-strong { background: #22c55e; }

/* ---------------- Notification bell + drawer ---------------- */
.header-bell.is-pinging i {
    animation: bell-ping 0.8s ease;
    transform-origin: top center;
}
@keyframes bell-ping {
    0%   { transform: rotate(0); }
    20%  { transform: rotate(-12deg); }
    40%  { transform: rotate(10deg); }
    60%  { transform: rotate(-8deg); }
    80%  { transform: rotate(4deg); }
    100% { transform: rotate(0); }
}

.notification-drawer { width: 380px; max-width: 95vw; }

.notification-list .list-group-item { padding: 12px 16px; }
.notification-row.is-unread { background: rgba(45, 125, 246, 0.04); }
.notification-title { font-size: 0.92rem; }
.notification-msg   { font-size: 0.86rem; color: #4b5563; margin-top: 2px; }
.notification-meta .btn-link { font-size: 0.78rem; }

.notif-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}
.notif-icon.notif-orange { background: linear-gradient(135deg, #f97316, #ea580c); }
.notif-icon.notif-blue   { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.notif-icon.notif-red    { background: linear-gradient(135deg, #ef4444, #dc2626); }
.notif-icon.notif-gray   { background: linear-gradient(135deg, #9ca3af, #6b7280); }

.notif-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--crm-primary);
    display: inline-block;
    margin-top: 6px;
    flex-shrink: 0;
}

/* ---------------- Mobile: sticky bottom action bar ---------------- */
.page-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 6px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 1px solid var(--crm-border);
    box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.04);
    z-index: 50;
}
.page-action-bar .btn { min-height: 44px; font-size: 1.05rem; }

/* When the bar is rendered, leave room at the bottom of page-body so the
   last card doesn't get hidden behind it. */
@media (max-width: 768px) {
    .page-body { padding-bottom: 90px; }
}

/* Fullscreen-sm-down: tighter padding on small modals for breathing room */
@media (max-width: 575.98px) {
    .modal-fullscreen-sm-down .modal-body { padding: 16px; }
    .modal-fullscreen-sm-down .form-control,
    .modal-fullscreen-sm-down .form-select { min-height: 44px; }
}

/* ---------------- Placeholder pages (3A only) ---------------- */
.placeholder-page {
    text-align: center;
    padding: 64px 24px;
    color: #6b7280;
}

/* ---------------- Auth pages ---------------- */
.auth-page {
    min-height: 100dvh;
    background: var(--crm-brand-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.auth-card {
    background: #fff;
    border-radius: 16px;
    padding: 36px 32px 28px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
}

/* Brand block at top of card */
.auth-brand-large {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
}
.auth-logo {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;             /* never grow / shrink — the image inside is huge */
    border-radius: 12px;
    background: #fff;           /* the logo art has its own white field */
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(45, 125, 246, 0.30);
}
.auth-logo > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.auth-brand-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1f2937;
    line-height: 1.1;
}
.auth-brand-subtitle {
    color: #6b7280;
    font-size: 0.78rem;
    margin-top: 2px;
}

.auth-heading {
    font-size: 1.4rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}
.auth-subheading {
    color: #6b7280;
    font-size: 0.92rem;
    margin-bottom: 24px;
}

.auth-forgot {
    color: var(--crm-primary);
    font-size: 0.8rem;
    text-decoration: none;
    font-weight: 500;
}
.auth-forgot:hover { text-decoration: underline; }

/* Inputs with leading icon */
.input-group-icon .input-group-text {
    background: #f9fafb;
    border-right: 0;
    color: #6b7280;
}
.input-group-icon .form-control {
    border-left: 0;
}
.input-group-icon .form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
    border-color: #a5b4fc;
}
.input-group-icon .form-control:focus + .btn,
.input-group-icon .form-control:focus ~ .btn {
    border-color: #a5b4fc;
}

.btn-auth {
    padding: 11px 16px;
    font-weight: 600;
    background: var(--crm-brand-gradient);
    border: none;
}
.btn-auth:hover,
.btn-auth:focus {
    background: linear-gradient(135deg, var(--crm-primary-dark) 0%, var(--crm-accent-dark) 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(45, 125, 246, 0.30);
}
.btn-auth:disabled {
    opacity: 0.85;
    transform: none;
}

/* Old simple brand mark — kept for backwards compatibility */
.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--crm-primary);
    margin-bottom: 20px;
}
.auth-brand i { font-size: 1.25rem; }

/* ---------------- Buttons ---------------- */
.btn-primary {
    background-color: var(--crm-primary);
    border-color: var(--crm-primary);
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--crm-primary-dark);
    border-color: var(--crm-primary-dark);
}

/* ---------------- Responsive tap targets ---------------- */
@media (max-width: 768px) {
    .form-control, .form-select, .btn { min-height: 44px; }
    .btn-sm { min-height: 36px; }
}

/* ---------------- Live map / visit pages ---------------- */
.livemap-page {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 16px;
    height: calc(100vh - 140px);
}
.livemap-page .staff-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.livemap-page .staff-panel-header {
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}
.livemap-page .staff-list {
    flex: 1;
    overflow-y: auto;
}
.livemap-page .staff-row {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    display: flex;
    gap: 10px;
    align-items: center;
}
.livemap-page .staff-row:hover    { background: #f8fafc; }
.livemap-page .staff-row.active   { background: #eef2ff; }
.livemap-page .staff-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--crm-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}
.livemap-page .map-shell {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}
.livemap-page .map-container { width: 100%; height: 100%; }

.staff-pin {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--crm-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    border: 3px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.staff-popup .small { font-size: 12px; line-height: 1.4; }

.visit-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
    display: flex;
    gap: 12px;
}
.visit-card .visit-date {
    text-align: center;
    background: #f8fafc;
    border-radius: 6px;
    padding: 6px 10px;
    min-width: 64px;
}
.visit-card .visit-date .d  { font-weight: 700; font-size: 18px; }
.visit-card .visit-date .m  { font-size: 11px; color: #64748b; text-transform: uppercase; }
.visit-card .visit-photo-thumb {
    width: 64px; height: 64px;
    border-radius: 6px;
    object-fit: cover;
}
.visit-card .badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }

.lightbox-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.lightbox-backdrop img { max-width: 100%; max-height: 100%; border-radius: 4px; }
.lightbox-close {
    position: absolute; top: 16px; right: 16px;
    background: rgba(255,255,255,0.15);
    border: none; color: #fff;
    width: 40px; height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
}

.visit-detail-map { width: 100%; height: 240px; border-radius: 6px; }

@media (max-width: 992px) {
    .livemap-page {
        grid-template-columns: 1fr;
        height: auto;
    }
    .livemap-page .staff-panel { max-height: 280px; }
    .livemap-page .map-shell   { height: 60vh; }
}

/* ---------------- Brand logo overrides ---------------- */
.sidebar-logo-wrap {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 6px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.10);
}
.sidebar-logo-wrap > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Tints that reuse logo colors in stat cards / chips */
.brand-gradient-bg { background: var(--crm-brand-gradient); color: #fff; }
.brand-accent-text { color: var(--crm-accent); }

/* ---------------- 100vh Leads view ---------------- */
.leads-page-shell {
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
}
.leads-page-shell .leads-list-scroll {
    flex: 1;
    overflow-y: auto;
}

/* ---------------- Dashboard trend chart ---------------- */
/* Fixed height keeps the chart compact so the "Recent leads" + "Upcoming
   follow-ups" tables stay within reach without scrolling. */
.dashboard-trend-card .card-body {
    height: 280px;
    padding: 12px 16px;
}
.dashboard-trend-card canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ============================================================
   Landing page (public marketing site)
   Namespaced under .lp-* so nothing collides with the CRM chrome.
   ============================================================ */

/* IMPORTANT: do NOT add overflow-x: hidden here. It silently turns
   .landing-shell into a scroll container and breaks position: sticky
   on the top nav. Each section that has overflowing decorations
   (radial glows, marquee track) clips them locally instead. */
.landing-shell {
    background: #0b1330;
    color: #e9eef9;
    min-height: 100dvh;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.landing-shell .lp-section,
.landing-shell .lp-hero,
.landing-shell .lp-trust-strip,
.landing-shell .lp-stats {
    overflow: hidden;
}
/* Subtle shadow once the user scrolls past the hero so the sticky nav
   visually separates from the body. */
.lp-nav.is-stuck {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
    background: rgba(11, 19, 48, 0.92);
}
.lp-container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms cubic-bezier(.2,.7,.2,1), transform 700ms cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Top nav ---------- */
.lp-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background: rgba(11, 19, 48, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.lp-nav-row { display: flex; align-items: center; gap: 18px; height: 66px; }
.lp-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.lp-brand-logo {
    width: 36px; height: 36px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(45, 125, 246, 0.35);
}
.lp-brand-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.lp-brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.lp-brand-text strong { font-size: 0.95rem; font-weight: 700; }
.lp-brand-text span   { font-size: 0.7rem; color: rgba(255,255,255,0.6); }

.lp-nav-links { display: flex; align-items: center; gap: 22px; margin-left: 24px; }
.lp-nav-links a {
    color: rgba(255,255,255,0.78);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: color 120ms ease;
}
.lp-nav-links a:hover { color: #fff; }

.lp-nav-cta { display: flex; gap: 10px; margin-left: auto; align-items: center; }

/* ---------- Buttons ---------- */
.lp-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 120ms ease, box-shadow 200ms ease, background 200ms ease;
    line-height: 1;
}
.lp-btn-lg { padding: 13px 22px; font-size: 1rem; border-radius: 10px; }
.lp-btn-primary {
    background: linear-gradient(135deg, #2D7DF6 0%, #34C724 100%);
    color: #fff;
    box-shadow: 0 6px 22px rgba(45, 125, 246, 0.45);
}
.lp-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(45, 125, 246, 0.55); color: #fff; }
.lp-btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.25); }
.lp-btn-outline:hover { background: rgba(255,255,255,0.08); color: #fff; }
.lp-btn-ghost { background: rgba(255,255,255,0.07); color: #fff; border: 1px solid rgba(255,255,255,0.08); }
.lp-btn-ghost:hover { background: rgba(255,255,255,0.13); color: #fff; }

/* ---------- Hero ---------- */
.lp-hero { position: relative; padding: 80px 0 100px; isolation: isolate; overflow: hidden; }
.lp-hero-glow {
    position: absolute; width: 620px; height: 620px; border-radius: 50%;
    filter: blur(120px); opacity: 0.55; z-index: -1; pointer-events: none;
}
.lp-hero-glow-1 { background: radial-gradient(circle, #2D7DF6 0%, rgba(45,125,246,0) 70%); top: -180px; left: -120px; }
.lp-hero-glow-2 { background: radial-gradient(circle, #34C724 0%, rgba(52,199,36,0) 70%); top:  80px; right: -160px; }
.lp-grid-bg {
    position: absolute; inset: 0; z-index: -1;
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
    opacity: 0.6;
}
.lp-hero-row { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.lp-hero-copy { max-width: 580px; }
.lp-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px; border-radius: 999px;
    background: rgba(45, 125, 246, 0.18);
    border: 1px solid rgba(94, 156, 248, 0.35);
    color: #b6cbf5;
    font-size: 0.78rem; font-weight: 600;
    letter-spacing: 0.01em;
    margin-bottom: 18px;
}
.lp-eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: #34C724; box-shadow: 0 0 10px #34C724; }
.lp-eyebrow-quiet { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.08); color: #b6c0d7; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.72rem; }
.lp-eyebrow-quiet.on-dark { background: rgba(255,255,255,0.06); color: #c8d3eb; }

.lp-hero-title {
    font-size: clamp(2.2rem, 4.4vw, 3.6rem);
    line-height: 1.08;
    letter-spacing: -0.02em;
    font-weight: 800;
    margin: 0 0 18px;
    color: #fff;
}
.lp-gradient-text {
    background: linear-gradient(120deg, #5E9CF8 0%, #34C724 65%, #C8F12E 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.lp-hero-sub {
    font-size: 1.12rem;
    line-height: 1.55;
    color: #c5cce0;
    margin: 0 0 30px;
    max-width: 560px;
}
.lp-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.lp-hero-trust {
    list-style: none; padding: 0; margin: 0;
    display: flex; gap: 28px; flex-wrap: wrap;
    color: #aeb8d2;
    font-size: 0.88rem;
}
.lp-hero-trust strong { color: #fff; font-weight: 700; margin-right: 4px; }

/* Dashboard mock-up */
.lp-hero-mock { position: relative; height: 460px; }
.lp-mock-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 40px 80px -20px rgba(0,0,0,0.55);
    overflow: hidden;
}
.lp-mock-main {
    position: absolute; inset: 0;
    transform: perspective(1200px) rotateX(4deg) rotateY(-6deg);
    animation: lp-mock-bob 6s ease-in-out infinite;
}
@keyframes lp-mock-bob { 0%, 100% { transform: perspective(1200px) rotateX(4deg) rotateY(-6deg) translateY(0); } 50% { transform: perspective(1200px) rotateX(4deg) rotateY(-6deg) translateY(-8px); } }

.lp-mock-toolbar {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.03);
}
.lp-mock-toolbar > span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.18); }
.lp-mock-toolbar > span:nth-child(1) { background: #ef4444; }
.lp-mock-toolbar > span:nth-child(2) { background: #f59e0b; }
.lp-mock-toolbar > span:nth-child(3) { background: #34C724; }
.lp-mock-toolbar-label { margin-left: auto; color: #9aa4bf; font-size: 0.72rem; }
.lp-mock-body { padding: 18px; }

.lp-mock-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.lp-mock-stat {
    padding: 10px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    display: flex; flex-direction: column; gap: 4px;
}
.lp-mock-stat-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: #8e9ab8; }
.lp-mock-stat-value { font-size: 1.15rem; font-weight: 700; color: #fff; }
.lp-mock-stat-delta { font-size: 0.7rem; font-weight: 600; }
.lp-mock-stat-delta.up { color: #34C724; }

.lp-mock-chart { height: 90px; margin-bottom: 12px; border-radius: 8px; background: rgba(255,255,255,0.03); padding: 6px; }
.lp-mock-chart svg { width: 100%; height: 100%; }

.lp-mock-rows { display: flex; flex-direction: column; gap: 8px; }
.lp-mock-row {
    display: grid; grid-template-columns: 24px 1fr auto 10px;
    align-items: center; gap: 8px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    font-size: 0.78rem;
}
.lp-mock-row > span:first-child { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, #2D7DF6, #34C724); }
.lp-mock-row b  { color: #fff; font-weight: 600; }
.lp-mock-row em { color: #99a3bd; font-style: normal; font-size: 0.72rem; }
.lp-mock-dot { width: 8px; height: 8px; border-radius: 50%; }
.lp-mock-dot.live { background: #34C724; box-shadow: 0 0 8px #34C724; animation: lp-pulse 1.6s ease-in-out infinite; }
.lp-mock-dot.warn { background: #f59e0b; }
@keyframes lp-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Floating mini-cards */
.lp-floating {
    position: absolute;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 10px 14px; border-radius: 12px;
    display: flex; align-items: center; gap: 8px;
    color: #fff; font-size: 0.85rem; font-weight: 600;
    box-shadow: 0 14px 30px rgba(0,0,0,0.35);
}
.lp-floating i { color: #5E9CF8; font-size: 1.1rem; }
.lp-floating-1 { top: 24px; left: -28px; animation: lp-float 7s ease-in-out infinite; }
.lp-floating-2 { bottom: 30px; left: -10px; animation: lp-float 8s ease-in-out infinite 0.6s; }
.lp-floating-3 { top: 200px; right: -34px; animation: lp-float 9s ease-in-out infinite 1.2s; }
.lp-floating-2 i { color: #34C724; }
.lp-floating-3 i { color: #C8F12E; }
@keyframes lp-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- Trusted-by marquee ---------- */
.lp-trust-strip { padding: 30px 0 10px; background: rgba(255,255,255,0.02); border-block: 1px solid rgba(255,255,255,0.05); overflow: hidden; }
.lp-trust-eyebrow { text-align: center; color: #94a0bf; font-size: 0.85rem; margin: 0 0 18px; }
.lp-marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.lp-marquee-track {
    display: inline-flex; gap: 28px; padding: 8px 0;
    animation: lp-marquee 26s linear infinite;
    white-space: nowrap;
}
.lp-logo-chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 16px; border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: #c1cbe6; font-weight: 500; font-size: 0.88rem;
}
.lp-logo-chip i { color: #5E9CF8; }
@keyframes lp-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Section base ---------- */
.lp-section { padding: 90px 0; position: relative; }
.lp-section-tint { background: linear-gradient(180deg, rgba(45,125,246,0.06) 0%, rgba(11,19,48,0) 100%); }
.lp-section-dark { background: #060d24; }
.lp-section-head { max-width: 760px; margin: 0 auto 50px; text-align: center; }
.lp-section-head h2 {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    line-height: 1.15; letter-spacing: -0.01em; font-weight: 800;
    color: #fff; margin: 14px 0 10px;
}
.lp-section-head h2.on-dark { color: #fff; }
.lp-section-head p { color: #b3bcd6; font-size: 1.02rem; line-height: 1.55; margin: 0; }
.lp-section-head p.on-dark { color: #c8d3eb; }

/* ---------- Products ---------- */
.lp-product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.lp-product {
    position: relative;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 28px 24px 26px;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 240ms ease;
}
.lp-product:hover { transform: translateY(-4px); border-color: rgba(94,156,248,0.4); box-shadow: 0 30px 50px -20px rgba(45,125,246,0.35); }
.lp-product-feature { background: linear-gradient(155deg, rgba(45,125,246,0.14), rgba(52,199,36,0.10)); border-color: rgba(94,156,248,0.35); }
.lp-badge-flag {
    position: absolute; top: 14px; right: 14px;
    background: linear-gradient(135deg, #34C724, #C8F12E);
    color: #062200;
    font-size: 0.7rem; font-weight: 700;
    padding: 4px 10px; border-radius: 999px;
    letter-spacing: 0.04em;
}
.lp-product-mark {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.4rem; color: #fff;
    margin-bottom: 16px;
    box-shadow: 0 12px 22px -8px rgba(0,0,0,0.55);
}
.mark-blue   { background: linear-gradient(135deg, #2D7DF6, #1E5FCB); }
.mark-green  { background: linear-gradient(135deg, #34C724, #1E9A14); }
.mark-purple { background: linear-gradient(135deg, #7C3AED, #2D7DF6); }

.lp-product h3 { color: #fff; font-size: 1.32rem; font-weight: 700; margin: 0 0 4px; }
.lp-product-tag { color: #aab5d1; font-size: 0.92rem; margin: 0 0 18px; }
.lp-feat { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-direction: column; gap: 8px; }
.lp-feat li { color: #d3dbf0; font-size: 0.9rem; display: flex; gap: 8px; align-items: flex-start; }
.lp-feat li i { color: #34C724; margin-top: 2px; }

.lp-platforms { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.lp-platforms span {
    font-size: 0.7rem; font-weight: 600;
    padding: 3px 9px; border-radius: 999px;
    background: rgba(255,255,255,0.06); color: #c4cce4;
    border: 1px solid rgba(255,255,255,0.08);
}
.lp-link { color: #5E9CF8; text-decoration: none; font-weight: 600; font-size: 0.92rem; display: inline-flex; gap: 6px; align-items: center; }
.lp-link:hover { color: #C8F12E; }

/* ---------- Hardware ---------- */
.lp-hw-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lp-hw {
    padding: 24px; border-radius: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    transition: transform 180ms ease, border-color 180ms ease;
}
.lp-hw:hover { transform: translateY(-3px); border-color: rgba(94,156,248,0.3); }
.lp-hw-icon {
    width: 46px; height: 46px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(45,125,246,0.22), rgba(52,199,36,0.18));
    display: inline-flex; align-items: center; justify-content: center;
    color: #5E9CF8; font-size: 1.25rem;
    margin-bottom: 14px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06);
}
.lp-hw h4 { color: #fff; font-size: 1.08rem; font-weight: 700; margin: 0 0 6px; }
.lp-hw p { color: #aeb8d4; font-size: 0.9rem; line-height: 1.5; margin: 0 0 14px; }
.lp-hw ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.lp-hw ul li { font-size: 0.72rem; color: #c4cce4; padding: 3px 9px; background: rgba(255,255,255,0.05); border-radius: 999px; }

/* ---------- AI split ---------- */
.lp-split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.lp-split-copy h2 { color: #fff; font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800; line-height: 1.15; margin: 12px 0 14px; }
.lp-split-copy > p { color: #b3bcd6; font-size: 1.02rem; line-height: 1.55; margin: 0 0 22px; }
.lp-bullets { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.lp-bullets li { display: flex; gap: 14px; align-items: flex-start; }
.lp-bullets li i { color: #5E9CF8; font-size: 1.2rem; margin-top: 2px; }
.lp-bullets li b { color: #fff; font-size: 0.98rem; display: block; margin-bottom: 2px; }
.lp-bullets li span { color: #b3bcd6; font-size: 0.9rem; }

.lp-ai-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(94,156,248,0.18);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 30px 60px -20px rgba(45,125,246,0.4);
}
.lp-ai-card-head { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; margin-bottom: 18px; }
.lp-ai-card-head i { color: #34C724; font-size: 1.3rem; }
.lp-ai-card-body { display: flex; flex-direction: column; gap: 12px; }
.lp-ai-bar { position: relative; padding: 8px 12px; background: rgba(255,255,255,0.04); border-radius: 8px; overflow: hidden; }
.lp-ai-bar span { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #2D7DF6, #34C724); opacity: 0.35; border-radius: 8px; }
.lp-ai-bar b   { position: relative; color: #fff; font-weight: 600; font-size: 0.88rem; }
.lp-ai-bar em  { position: relative; float: right; color: #cfe1ff; font-style: normal; font-weight: 700; font-size: 0.88rem; }
.lp-ai-card-foot { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.07); color: #aeb8d4; font-size: 0.78rem; }
.lp-ai-card-foot i { margin-right: 4px; color: #5E9CF8; }

/* ---------- Why us ---------- */
.lp-why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lp-why { padding: 22px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; }
.lp-why i { color: #34C724; font-size: 1.4rem; margin-bottom: 10px; display: block; }
.lp-why h4 { color: #fff; font-size: 1.04rem; font-weight: 700; margin: 0 0 6px; }
.lp-why p  { color: #aeb8d4; font-size: 0.9rem; margin: 0; }

/* ---------- Stats ---------- */
.lp-stats { padding: 70px 0; background: linear-gradient(135deg, rgba(45,125,246,0.10) 0%, rgba(52,199,36,0.08) 100%); border-block: 1px solid rgba(255,255,255,0.06); }
.lp-stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.lp-stat { text-align: center; }
.lp-stat strong { display: block; font-size: clamp(2rem, 3.6vw, 2.8rem); color: #fff; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.lp-stat span   { display: block; color: #b3bcd6; font-size: 0.92rem; margin-top: 8px; }

/* ---------- Testimonials ---------- */
.lp-testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lp-testi { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07); border-radius: 14px; padding: 22px; margin: 0; }
.lp-testi blockquote { margin: 0 0 18px; color: #dbe2f4; font-size: 0.98rem; line-height: 1.55; }
.lp-testi figcaption { display: flex; align-items: center; gap: 12px; }
.lp-avatar { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 0.85rem; }
.grad-blue   { background: linear-gradient(135deg, #2D7DF6, #1E5FCB); }
.grad-green  { background: linear-gradient(135deg, #34C724, #1E9A14); }
.grad-purple { background: linear-gradient(135deg, #7C3AED, #2D7DF6); }
.lp-testi b  { color: #fff; font-size: 0.92rem; display: block; }
.lp-testi em { color: #a3afcc; font-style: normal; font-size: 0.8rem; }

/* ---------- CTA + form ---------- */
.lp-cta { background: radial-gradient(ellipse at 20% 0%, rgba(45,125,246,0.25), transparent 60%) , #060d24; }
.lp-cta-row { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.lp-cta-copy h2 { color: #fff; font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.12; font-weight: 800; margin: 12px 0 14px; }
.lp-cta-copy > p { color: #c8d3eb; font-size: 1.02rem; line-height: 1.55; margin: 0 0 20px; }
.lp-cta-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; color: #c8d3eb; }
.lp-cta-points i { color: #34C724; margin-right: 8px; }

.lp-form {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 26px;
    display: flex; flex-direction: column; gap: 14px;
}
.lp-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lp-form label { display: flex; flex-direction: column; gap: 6px; color: #c8d3eb; font-size: 0.85rem; font-weight: 500; }
.lp-form input, .lp-form select, .lp-form textarea {
    background: rgba(11,19,48,0.6);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 8px;
    padding: 10px 12px;
    color: #fff;
    font-size: 0.92rem;
    font-family: inherit;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}
.lp-form input:focus, .lp-form select:focus, .lp-form textarea:focus {
    outline: none;
    border-color: #5E9CF8;
    box-shadow: 0 0 0 3px rgba(45,125,246,0.25);
}
.lp-form button { justify-content: center; }
.lp-spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; animation: lp-spin 700ms linear infinite; display: inline-block; }
@keyframes lp-spin { to { transform: rotate(360deg); } }
.lp-form-ok { color: #34C724; font-size: 0.9rem; margin: 0; display: flex; align-items: center; gap: 6px; }

/* ---------- Footer ---------- */
.lp-footer { background: #050a1c; border-top: 1px solid rgba(255,255,255,0.06); padding: 60px 0 24px; color: #94a0bf; }
.lp-brand-footer { color: #fff; }
.lp-footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.lp-footer-blurb { color: #93a0c0; font-size: 0.88rem; line-height: 1.55; margin: 14px 0 0; max-width: 320px; }
.lp-footer-blurb a { color: #5E9CF8; text-decoration: none; }
.lp-footer h6 { color: #fff; font-size: 0.92rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 14px; }
.lp-footer a { display: block; color: #a8b3cf; text-decoration: none; font-size: 0.9rem; padding: 4px 0; }
.lp-footer a:hover { color: #fff; }
.lp-social { display: flex; gap: 10px; margin-top: 14px; }
.lp-social a { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,0.05); color: #c8d3eb; padding: 0; }
.lp-social a:hover { background: linear-gradient(135deg, #2D7DF6, #34C724); color: #fff; }
.lp-footer-bottom { border-top: 1px solid rgba(255,255,255,0.06); padding-top: 18px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.82rem; color: #7c8ab0; }
.lp-footer-bottom a { display: inline; color: #94a0bf; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .lp-hero-row, .lp-split, .lp-cta-row { grid-template-columns: 1fr; gap: 36px; }
    .lp-hero-mock { height: 380px; }
    .lp-product-grid, .lp-hw-grid, .lp-why-grid, .lp-testi-grid { grid-template-columns: 1fr 1fr; }
    .lp-stats-row { grid-template-columns: 1fr 1fr; gap: 30px; }
    .lp-nav-links { display: none; }
    .lp-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .lp-hero { padding: 60px 0 80px; }
    .lp-product-grid, .lp-hw-grid, .lp-why-grid, .lp-testi-grid, .lp-stats-row { grid-template-columns: 1fr; }
    .lp-form-row { grid-template-columns: 1fr; }
    .lp-section { padding: 70px 0; }
    .lp-hero-mock { height: 340px; }
    .lp-floating-1, .lp-floating-3 { display: none; }
    .lp-footer-grid { grid-template-columns: 1fr; }
}

/* Inline error on the demo form */
.lp-form-err {
    color: #fda4af;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.88rem;
    margin: 0;
    display: flex; align-items: center; gap: 8px;
}

/* ============================================================
   Reports page
   ============================================================ */
.reports-rangebar .vr { height: 24px; }

.kpi-card {
    display: flex; align-items: center; gap: 14px;
    padding: 16px 18px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--crm-border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    height: 100%;
}
.kpi-icon {
    width: 44px; height: 44px;
    border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.2rem;
    flex-shrink: 0;
}
.kpi-blue   .kpi-icon { background: linear-gradient(135deg, #2D7DF6, #1E5FCB); }
.kpi-green  .kpi-icon { background: linear-gradient(135deg, #34C724, #1E9A14); }
.kpi-purple .kpi-icon { background: linear-gradient(135deg, #7C3AED, #2D7DF6); }
.kpi-amber  .kpi-icon { background: linear-gradient(135deg, #F59E0B, #D97706); }
.kpi-value  { font-size: 1.45rem; font-weight: 700; line-height: 1.05; color: #111827; }
.kpi-label  { font-size: 0.78rem; color: #6b7280; text-transform: uppercase; letter-spacing: 0.04em; margin-top: 3px; }

.report-card { border: 1px solid var(--crm-border); border-radius: 14px; }
.report-card .card-header strong { font-size: 0.98rem; }

/* Funnel */
.funnel { display: flex; flex-direction: column; gap: 6px; }
.funnel-row {}
.funnel-bar {
    position: relative;
    min-width: 26%;
    height: 38px;
    border-radius: 7px;
    color: #fff;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 14px;
    font-weight: 600;
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.08);
    transition: filter 120ms ease;
}
.funnel-bar:hover { filter: brightness(1.05); }
.funnel-label { font-size: 0.92rem; }
.funnel-count { font-size: 0.88rem; opacity: 0.92; font-variant-numeric: tabular-nums; }
.funnel-drop {
    margin: 4px 0 2px 12px;
    font-size: 0.75rem;
    color: #6b7280;
}
.funnel-drop.warn { color: #b45309; font-weight: 600; }

/* Source effectiveness row */
.source-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 8px; vertical-align: middle; }
.conv-cell { min-width: 180px; }
.conv-cell .conv-bar { width: 130px; height: 8px; border-radius: 999px; background: #f1f5f9; display: inline-block; vertical-align: middle; margin-right: 8px; overflow: hidden; }
.conv-cell .conv-bar span { display: block; height: 100%; border-radius: 999px; }

/* Rep avatar in scorecard */
.rep-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2D7DF6, #34C724);
    color: #fff;
    font-weight: 700;
    font-size: 0.72rem;
    display: inline-flex; align-items: center; justify-content: center;
}
.rank-pill {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #374151;
    font-size: 0.78rem; font-weight: 700;
}

/* ============================================================
   Lead import page
   ============================================================ */
.import-stat {
    border: 1px solid var(--crm-border);
    border-radius: 10px;
    padding: 14px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: #fff;
}
.import-stat-num   { font-size: 1.8rem; font-weight: 700; line-height: 1; }
.import-stat-label { font-size: 0.78rem; color: #6b7280; margin-top: 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.import-stat.ok   { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.import-stat.skip { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.import-stat.fail { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.csv-template { white-space: pre; overflow-x: auto; }
