/* ============================================================
   Sales CRM — style.css
   Clean, professional, Bootstrap-based
   ============================================================ */

:root {
    --crm-primary:   #1a3c5e;
    --crm-accent:    #2e86c1;
    --crm-light-bg:  #f0f4f8;
    --crm-sidebar-w: 240px;
    --crm-radius:    8px;
}

/* ── Global ─────────────────────────────────────────────── */
body {
    background-color: var(--crm-light-bg);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 0.93rem;
}

/* ── Navbar ─────────────────────────────────────────────── */
.crm-navbar {
    background: var(--crm-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
    position: sticky;
    top: 0;
    z-index: 1030;
}
.crm-navbar .navbar-brand { font-size: 1.15rem; letter-spacing: .3px; }
.crm-navbar .nav-link { color: rgba(255,255,255,.82) !important; transition: color .15s; }
.crm-navbar .nav-link:hover,
.crm-navbar .nav-link.active { color: #fff !important; }
.crm-navbar .nav-link.active { border-bottom: 2px solid #5dade2; }
.crm-navbar .dropdown-menu { border: none; box-shadow: 0 4px 16px rgba(0,0,0,.15); }

/* ── Cards ──────────────────────────────────────────────── */
.card {
    border: none;
    border-radius: var(--crm-radius);
    box-shadow: 0 1px 6px rgba(0,0,0,.08);
}
.card-header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    border-radius: var(--crm-radius) var(--crm-radius) 0 0 !important;
}

/* ── Stat tiles on dashboard ────────────────────────────── */
.stat-card {
    border-radius: var(--crm-radius);
    padding: 1.25rem 1.5rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,.12);
    transition: transform .15s;
}
.stat-card:hover { transform: translateY(-2px); }
.stat-card .stat-icon { font-size: 2.4rem; opacity: .85; }
.stat-card .stat-num  { font-size: 2rem; font-weight: 700; line-height: 1; }
.stat-card .stat-lbl  { font-size: .78rem; opacity: .88; text-transform: uppercase; letter-spacing: .5px; }

.stat-hot      { background: linear-gradient(135deg,#c0392b,#e74c3c); }
.stat-cold     { background: linear-gradient(135deg,#1a5276,#2e86c1); }
.stat-callback { background: linear-gradient(135deg,#9a7d0a,#f1c40f); }
.stat-closed   { background: linear-gradient(135deg,#1e8449,#27ae60); }
.stat-ni       { background: linear-gradient(135deg,#4a4a4a,#717d7e); }
.stat-pending  { background: linear-gradient(135deg,#154360,#1a3c5e); }
.stat-total    { background: linear-gradient(135deg,#6c3483,#8e44ad); }

/* ── Tables ─────────────────────────────────────────────── */
.table-responsive { border-radius: var(--crm-radius); }
.table thead th {
    background: var(--crm-primary);
    color: #fff;
    font-weight: 500;
    font-size: .82rem;
    letter-spacing: .3px;
    border: none;
    white-space: nowrap;
}
.table tbody tr:hover { background-color: #eaf3fb; }
.table td { vertical-align: middle; }

/* ── Badges ─────────────────────────────────────────────── */
.badge { font-weight: 500; font-size: .76rem; padding: .35em .7em; }

/* ── Login page ─────────────────────────────────────────── */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--crm-primary) 0%, #2e86c1 100%);
}
.login-card {
    width: 100%;
    max-width: 420px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,.25);
}
.login-card .card-header {
    background: var(--crm-primary);
    color: #fff;
    text-align: center;
    padding: 1.5rem;
    border-radius: 12px 12px 0 0 !important;
    font-size: 1.1rem;
}
.login-card .card-body { padding: 2rem; }

/* ── Filter bar ─────────────────────────────────────────── */
.filter-bar { background: #fff; border-radius: var(--crm-radius); padding: 1rem 1.25rem; margin-bottom: 1.25rem; box-shadow: 0 1px 4px rgba(0,0,0,.06); }

/* ── Lead detail ─────────────────────────────────────────── */
.lead-meta dt { color: #6c757d; font-size: .8rem; font-weight: 500; text-transform: uppercase; }
.lead-meta dd { margin-bottom: .75rem; }
.note-item { background: #f8f9fa; border-left: 3px solid var(--crm-accent); padding: .6rem .9rem; border-radius: 0 6px 6px 0; margin-bottom: .6rem; }
.note-item .note-meta { font-size: .75rem; color: #6c757d; }
.history-item { font-size: .84rem; padding: .4rem .5rem; border-bottom: 1px solid #f0f0f0; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn-crm { background: var(--crm-accent); color: #fff; border: none; }
.btn-crm:hover { background: var(--crm-primary); color: #fff; }

/* ── Footer ─────────────────────────────────────────────── */
.crm-footer { background: #fff; border-top: 1px solid #dee2e6; }

/* ── Pagination ─────────────────────────────────────────── */
.pagination .page-link { color: var(--crm-accent); }
.pagination .page-item.active .page-link { background: var(--crm-accent); border-color: var(--crm-accent); }

/* ── Responsive tweaks ───────────────────────────────────── */
@media (max-width: 576px) {
    .stat-card { padding: 1rem; }
    .stat-card .stat-num { font-size: 1.5rem; }
}
