/* ====== CRM UI ====== */
:root{
  --crm-blue:#0077B6;
  --crm-blue-2:#045a8d;
  --crm-bg:#f6f8fb;
  --crm-card:#ffffff;
  --crm-text:#0b1f2a;
  --crm-muted:#6b7b86;
  --crm-radius:18px;
}

.crm-body{ background:var(--crm-bg); color:var(--crm-text); }
.crm-shell{ display:flex; min-height:100vh; }

/* Sidebar */
.crm-sidebar{
  width:280px; background:var(--crm-blue); color:#fff; position:sticky; top:0; height:100vh;
  padding:18px 16px; display:flex; flex-direction:column; gap:16px;
}
.crm-logo{ display:flex; align-items:center; gap:12px; }
.crm-logo-mark{
  width:42px; height:42px; border-radius:14px; background:rgba(255,255,255,.16);
  display:flex; align-items:center; justify-content:center; font-weight:800; letter-spacing:.3px;
}
.crm-logo-text-1{ font-weight:800; line-height:1.1; }
.crm-logo-text-2{ font-size:12px; opacity:.9; }

.crm-nav{ display:flex; flex-direction:column; gap:6px; margin-top:8px; }
.crm-nav-item{
  color:#fff; text-decoration:none; display:flex; align-items:center; gap:12px;
  padding:10px 12px; border-radius:14px; transition:transform .12s ease, background .12s ease;
  background:rgba(255,255,255,.08);
}
.crm-nav-item:hover{ background:rgba(255,255,255,.14); transform:translateY(-1px); color:#fff; }
.crm-nav-item i{ width:20px; text-align:center; opacity:.95; }
.crm-nav-item span{ font-weight:600; }

.crm-nav-sep{ height:1px; background:rgba(255,255,255,.18); margin:10px 4px; }

.crm-sidebar-bottom{ margin-top:auto; }
.crm-sidebar-chip{
  background:rgba(255,255,255,.14); border-radius:999px; padding:10px 12px;
  display:flex; align-items:center; gap:10px; font-weight:600;
}
.crm-sidebar-chip i{ opacity:.95; }

/* Main */
.crm-main{ flex:1; display:flex; flex-direction:column; min-width:0; }
.crm-topbar{
  height:72px; display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:14px 18px; background:linear-gradient(90deg, var(--crm-blue-2), var(--crm-blue));
  color:#fff; position:sticky; top:0; z-index:10;
}
.crm-sidebar-toggle{ display:none; border-radius:12px; }
.crm-topbar-title-1{ font-weight:800; }
.crm-topbar-title-2{ font-size:12px; opacity:.9; }
.crm-userbox{ display:flex; align-items:center; gap:12px; }
.crm-username{ font-weight:800; }
.crm-userrole{ font-size:12px; opacity:.9; padding:4px 10px; border-radius:999px; background:rgba(255,255,255,.16); }
.crm-content{ padding:18px; }

.crm-hero{ background:linear-gradient(135deg, #0a6aa0, #0077B6); color:#fff; }
.crm-hero-title{ font-size:28px; font-weight:900; letter-spacing:.2px; }
.crm-hero-sub{ opacity:.9; }

.crm-kpi-card{
  border:0; border-radius:var(--crm-radius); box-shadow:0 10px 26px rgba(0,0,0,.06);
}
.crm-kpi-icon{
  width:44px; height:44px; border-radius:16px; display:flex; align-items:center; justify-content:center;
  background:rgba(0,119,182,.10);
}
.crm-kpi-title{ color:var(--crm-muted); font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.6px; }
.crm-kpi-value{ font-size:22px; font-weight:900; }

.crm-info-card{
  background:var(--crm-card); border-radius:var(--crm-radius); padding:14px 14px;
  box-shadow:0 10px 26px rgba(0,0,0,.06);
}
.crm-info-k{ color:var(--crm-muted); font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.6px; }
.crm-info-v{ font-weight:900; margin-top:4px; }

/* Login */
.crm-login-body{ background:linear-gradient(135deg,#eaf4fb,#f6f8fb); min-height:100vh; }
.crm-logo-mark-lg{
  width:52px; height:52px; border-radius:18px; background:var(--crm-blue);
  display:flex; align-items:center; justify-content:center; color:#fff; font-weight:900;
}

/* Mobile */
@media (max-width: 992px){
  .crm-sidebar{ position:fixed; left:-300px; top:0; z-index:100; transition:left .18s ease; }
  .crm-sidebar.open{ left:0; box-shadow:0 14px 40px rgba(0,0,0,.22); }
  .crm-sidebar-toggle{ display:inline-flex; }
}


/* Nudges */
.crm-nudge{
  display:flex; align-items:flex-start; justify-content:space-between; gap:14px;
  background:#fff; border-radius:18px; padding:14px 14px;
  box-shadow:0 10px 26px rgba(0,0,0,.06);
  margin-bottom:10px;
}
.crm-nudge-title{ font-weight:900; }
.crm-nudge-sub{ font-size:13px; color:var(--crm-muted); margin-top:2px; }
.crm-nudge-right{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; }


/* ====== Pills & Buttons ====== */
.btn, .btn-sm, .btn-lg{
  border-radius:999px !important;
}
.form-control, .form-select{
  border-radius:14px;
}
textarea.form-control{ border-radius:18px; }

.btn-primary{
  background:var(--crm-blue) !important;
  border-color:var(--crm-blue) !important;
}
.btn-outline-primary{
  color:var(--crm-blue) !important;
  border-color:rgba(0,119,182,.35) !important;
}
.btn-outline-primary:hover{
  background:rgba(0,119,182,.08) !important;
  border-color:rgba(0,119,182,.6) !important;
}

/* Status pills */
.crm-pill{
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 12px; border-radius:999px; font-weight:700; font-size:12px;
  border:1px solid rgba(0,0,0,.06);
}
.crm-pill-new{ background:#eef6ff; color:#0a4b78; }
.crm-pill-contacted{ background:#f2f7f4; color:#145a32; }
.crm-pill-warm{ background:#fff7e8; color:#8a4b00; }
.crm-pill-hot{ background:#ffecec; color:#8a1f1f; }
.crm-pill-won{ background:#eafff2; color:#0f6b3f; }
.crm-pill-lost{ background:#f1f3f5; color:#495057; }
.crm-pill-open{ background:#eef6ff; color:#0a4b78; }
.crm-pill-inprogress{ background:#fff7e8; color:#8a4b00; }
.crm-pill-blocked{ background:#ffecec; color:#8a1f1f; }
.crm-pill-done{ background:#eafff2; color:#0f6b3f; }


/* === Brand logo image === */
.crm-logo-img{
  width:38px; height:38px;
  border-radius:12px;
  object-fit:contain;
  background:rgba(255,255,255,0.08);
  padding:6px;
}
.crm-logo-img-lg{
  width:48px; height:48px;
  border-radius:14px;
  object-fit:contain;
  background:rgba(255,255,255,0.08);
  padding:8px;
}
