@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --app-font:"Inter","Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --bs-font-sans-serif:var(--app-font);
  --bs-body-font-family:var(--app-font);
  --sidebar:#0b1739;
  --sidebar-soft:#142552;
  --brand:#4f6ef7;
  --brand-dark:#3652d9;
  --accent:#f5a524;
  --canvas:#f4f7fb;
  --surface:#ffffff;
  --text:#17223b;
  --muted:#69758b;
  --line:#e3e8f1;
  --success:#16a36a;
  --shadow:0 10px 30px rgba(29,43,76,.07);
  --sidebar-width:264px;
}
* { box-sizing:border-box; }
[hidden] { display:none!important; }
.session-loader { min-height:100vh; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1rem; padding:1.5rem; color:var(--muted); text-align:center; }
.session-loader p { margin:0; max-width:32rem; }
.page-content { position:relative; min-height:280px; }
.view-loader { position:absolute; inset:0; min-height:260px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:1rem; color:var(--muted); }
.page-content.is-loading .view { visibility:hidden; pointer-events:none; }
.vendor-module-badges { max-width:260px; display:flex; flex-wrap:wrap; gap:.25rem; }
html { font-size:15px; }
body { min-height:100vh; margin:0; background:var(--canvas); color:var(--text); font-family:var(--app-font); line-height:1.5; -webkit-font-smoothing:antialiased; }
button, input, select, textarea, .btn, .form-control, .form-select { font-family:var(--app-font); }
a { color:var(--brand-dark); }
.brand { font-weight:800; letter-spacing:-.045em; }
.sidebar { width:var(--sidebar-width); min-height:100vh; height:100vh; position:sticky; top:0; z-index:1040; display:flex; flex-direction:column; background:linear-gradient(180deg,var(--sidebar) 0%,#07112b 100%); box-shadow:8px 0 24px rgba(9,20,48,.08); }
.sidebar-brand-mark { width:36px; height:36px; display:inline-grid; place-items:center; border-radius:11px; background:linear-gradient(135deg,var(--brand),#8298ff); box-shadow:0 8px 18px rgba(79,110,247,.3); }
.sidebar-caption { color:#7282a7; padding:.5rem .9rem .35rem; font-size:.68rem; font-weight:700; letter-spacing:.12em; text-transform:uppercase; }
.sidebar .nav { flex:1 1 auto; min-height:0; flex-wrap:nowrap; overflow-x:hidden; overflow-y:auto; scrollbar-width:thin; }
.sidebar .nav-link { display:flex; align-items:center; gap:.72rem; min-height:46px; margin:.16rem 0; padding:.72rem .86rem; color:#aebadb; border:1px solid transparent; border-radius:.75rem; font-weight:600; transition:all .18s ease; }
.sidebar .nav-link i { width:1.35rem; text-align:center; font-size:1.05rem; }
.sidebar .nav-link:hover { color:#fff; background:rgba(255,255,255,.07); transform:translateX(2px); }
.sidebar .nav-link.active { color:#fff; background:linear-gradient(100deg,var(--brand),#6682ff); box-shadow:0 9px 22px rgba(53,82,217,.28); }
.user-box { border-color:rgba(255,255,255,.1)!important; }
.user-box { display:flex; align-items:center; gap:.65rem; flex-shrink:0; min-width:0; padding-bottom:.35rem; }
.user-box > i { font-size:1.7rem; color:#aebadb; flex-shrink:0; margin:0!important; }
.user-label { display:grid; gap:.2rem; min-width:0; }
.profile-name { display:block; color:#fff; font-size:.86rem; font-weight:700; line-height:1.35; overflow-wrap:anywhere; }
.profile-role { display:block; color:#b8c5e5; font-size:.72rem; line-height:1.35; }
.profile-workspace { display:block; color:#91a2c7; font-size:.7rem; line-height:1.4; overflow-wrap:anywhere; }
.app-main { min-width:0; width:calc(100% - var(--sidebar-width)); }
.app-header { position:sticky; top:0; z-index:1020; min-height:78px; background:rgba(255,255,255,.92)!important; backdrop-filter:blur(16px); box-shadow:0 1px 0 var(--line); }
.page-title { color:var(--text); font-size:1.55rem; font-weight:800; letter-spacing:-.035em; }
.page-kicker { color:var(--brand); font-size:.7rem; font-weight:800; letter-spacing:.11em; text-transform:uppercase; }
.content-grid { width:100%; max-width:1720px; margin:0 auto; }
.page-content { min-height:calc(100vh - 78px); }
.view { display:none; animation:pageIn .2s ease; }
.view.active { display:block; }
@keyframes pageIn { from { opacity:0; transform:translateY(3px); } to { opacity:1; transform:none; } }
.card { border:1px solid var(--line); border-radius:1rem; background:var(--surface); box-shadow:var(--shadow); overflow:hidden; }
.card-header { min-height:72px; padding:1rem 1.2rem; border-color:var(--line); }
.card-header h2 { color:var(--text); font-weight:750; letter-spacing:-.02em; }
.metric-card { border:1px solid var(--line); box-shadow:var(--shadow); transition:transform .18s ease,box-shadow .18s ease; }
.metric-card:hover { transform:translateY(-2px); box-shadow:0 14px 34px rgba(29,43,76,.11); }
.metric-card .card-body { padding:1.15rem; }
.metric-icon { width:44px; height:44px; display:grid; place-items:center; flex:0 0 auto; border-radius:13px; color:var(--brand); background:#edf1ff; font-size:1.15rem; }
.metric-value { font-size:1.9rem; line-height:1; font-weight:800; letter-spacing:-.04em; }
.summary-chip { height:100%; padding:1rem; border:1px solid var(--line); border-radius:.8rem; background:#f8faff; }
.summary-chip .value { font-size:1.25rem; font-weight:800; color:var(--text); }
.btn { min-height:40px; border-radius:.65rem; font-weight:650; }
.btn-sm { min-height:34px; }
.btn-primary { background:var(--brand); border-color:var(--brand); }
.btn-primary:hover,.btn-primary:focus { background:var(--brand-dark); border-color:var(--brand-dark); }
.form-control,.form-select,.input-group-text { min-height:42px; border-color:#dce2ec; border-radius:.65rem; }
.form-control:focus,.form-select:focus { border-color:#91a4ff; box-shadow:0 0 0 .22rem rgba(79,110,247,.13); }
.form-label { color:#3f4b61; font-size:.82rem; font-weight:700; }
.filter-panel { padding:1rem; border:1px solid var(--line); border-radius:.85rem; background:#f8faff; }
.table-responsive { position:relative; width:100%; overflow:auto; scrollbar-width:thin; scrollbar-color:#b8c2d4 transparent; }
.table { width:100%; min-width:max-content; margin:0; color:var(--text); }
.table thead { position:sticky; top:0; z-index:6; }
.table thead th { padding:.83rem 1rem; white-space:nowrap; color:#667188; background:#f4f6fa; border-bottom:1px solid #dce2ec; font-size:.7rem; font-weight:800; letter-spacing:.065em; text-transform:uppercase; }
.table tbody td { padding:.78rem 1rem; white-space:nowrap; vertical-align:middle; border-color:#edf0f5; background:#fff; }
.table tbody tr { transition:background .15s ease; }
.table-hover tbody tr:hover td { background:#f7f9ff; }
.table th:first-child,.table td:first-child { position:sticky; left:0; z-index:4; box-shadow:1px 0 0 var(--line); }
.table thead th:first-child { z-index:8; background:#f4f6fa; }
.table td .small { line-height:1.35; }
.table .cell-truncate { display:block; max-width:280px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.table .btn-link { color:#25365a; text-decoration:none; }
.table .btn-link:hover { color:var(--brand); }
.status-badge { padding:.42rem .68rem; font-size:.68rem; font-weight:750; letter-spacing:.025em; }
.text-bg-light { color:#465268!important; background:#edf1f6!important; }
.empty-state { padding:4rem 1rem; color:#7d889b; text-align:center; }
.pagination-bar { padding-top:1rem; border-top:1px solid var(--line); }
.login-shell { min-height:100vh; background:radial-gradient(circle at 78% 8%,rgba(113,139,255,.45),transparent 32%),radial-gradient(circle at 10% 90%,rgba(245,165,36,.18),transparent 28%),linear-gradient(135deg,#07132f,#17366b); }
.login-card { max-width:430px; border:1px solid rgba(255,255,255,.22); box-shadow:0 30px 80px rgba(3,10,28,.38); }
.toast-container { z-index:1090; }
.mobile-menu,.sidebar-backdrop { display:none; }

@media (max-width:1199.98px) {
  :root { --sidebar-width:84px; }
  .sidebar { padding-left:.75rem!important; padding-right:.75rem!important; }
  .sidebar .brand { justify-content:center; }
  .sidebar .brand-text,.sidebar .sidebar-caption,.sidebar .nav-link span,.sidebar .user-label { display:none; }
  .sidebar .nav-link { justify-content:center; padding:.75rem; }
  .sidebar .nav-link i { width:auto; margin:0!important; font-size:1.15rem; }
}
@media (max-width:767.98px) {
  :root { --sidebar-width:0px; }
  html { font-size:14px; }
  .sidebar { position:fixed; left:0; top:0; bottom:0; width:270px; height:100vh; padding:1rem!important; transform:translateX(-105%); transition:transform .22s ease; }
  body.sidebar-open { overflow:hidden; }
  body.sidebar-open .sidebar { transform:translateX(0); }
  .sidebar .brand { justify-content:flex-start; }
  .sidebar .brand-text,.sidebar .sidebar-caption,.sidebar .nav-link span,.sidebar .user-label { display:inline; }
  .sidebar .user-label { display:grid; }
  .sidebar .nav-link { justify-content:flex-start; }
  .sidebar .nav-link i { width:1.35rem; margin-right:.5rem!important; }
  .sidebar-backdrop { position:fixed; inset:0; z-index:1035; background:rgba(4,12,31,.52); backdrop-filter:blur(2px); }
  body.sidebar-open .sidebar-backdrop { display:block; }
  .mobile-menu { display:inline-flex; align-items:center; justify-content:center; }
  .app-main { width:100%; }
  .app-header { min-height:68px; padding:.7rem 1rem!important; }
  .page-title { font-size:1.25rem; }
  .page-content { min-height:calc(100vh - 68px); padding:.85rem!important; }
  .card-header { min-height:auto; align-items:flex-start!important; flex-direction:column; gap:.8rem; }
  .card-header > .d-flex,.card-header > .btn,.card-header > .form-select { width:100%!important; }
  .card-header .d-flex { flex-wrap:wrap; }
  .card-header .btn { flex:1 1 auto; }
  .metric-card .card-body { padding:1rem; }
  .metric-value { font-size:1.55rem; }
  .metric-icon { width:38px; height:38px; }
  .table-responsive { max-height:calc(100vh - 245px); }
  .table thead th,.table tbody td { padding:.7rem .75rem; }
  .modal-dialog { margin:.5rem; }
}
@media (max-width:419.98px) {
  .header-action-label { display:none!important; }
  .page-kicker { display:none; }
  .metric-card .text-secondary.small { max-width:88px; }
}
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; } }

/* Employee My Leads modules */
.min-w-0 { min-width:0; }
.lead-loading,.modal-loading { min-height:180px; display:flex; align-items:center; justify-content:center; gap:.75rem; color:#667188; }
.lead-mobile-list { display:none; }
.lead-row-actions { display:inline-flex; align-items:center; gap:.4rem; }
.lead-row-actions .btn { display:inline-flex; align-items:center; gap:.4rem; }
.crm-badge { display:inline-flex; align-items:center; min-height:24px; padding:.25rem .6rem; border-radius:999px; font-size:.67rem; line-height:1; font-weight:800; letter-spacing:.02em; white-space:nowrap; }
.crm-badge-blue { color:#1554b8; background:#e7f0ff; }
.crm-badge-cyan { color:#08748a; background:#ddf7fb; }
.crm-badge-purple { color:#7041c6; background:#f0e9ff; }
.crm-badge-orange { color:#a65008; background:#fff0dc; }
.crm-badge-green { color:#147a49; background:#dcf7e9; }
.crm-badge-red { color:#b42336; background:#ffe5e8; }
.crm-badge-gray { color:#526174; background:#edf1f5; }
.score-pill { display:inline-grid; place-items:center; min-width:34px; min-height:24px; padding:.2rem .45rem; border-radius:.45rem; color:#614a00; background:#ffd43b; font-size:.72rem; font-weight:850; }
.lead-modal-summary { display:flex; align-items:center; gap:.85rem; padding:.85rem; border:1px solid var(--line); border-radius:.85rem; background:#f8faff; }
.lead-avatar { width:46px; height:46px; display:grid; place-items:center; flex:0 0 auto; border-radius:.75rem; color:var(--brand); background:#e8edff; font-size:1.2rem; }
.lead-detail-grid { display:grid; grid-template-columns:1fr 1fr; border:1px solid var(--line); border-radius:.85rem; overflow:hidden; }
.detail-section { padding:1rem 1.1rem; border-right:1px solid var(--line); }
.detail-section:nth-child(2) { border-right:0; }
.detail-section-wide { grid-column:1/-1; border-top:1px solid var(--line); border-right:0; }
.detail-section h3 { margin:0 0 .8rem; color:#25365a; font-size:.78rem; font-weight:850; letter-spacing:.04em; text-transform:uppercase; }
.detail-section dl { display:grid; grid-template-columns:minmax(105px,.7fr) 1.3fr; gap:.55rem 1rem; margin:0; font-size:.82rem; }
.detail-section dt { color:#68748a; font-weight:650; }
.detail-section dd { margin:0; color:#24314a; font-weight:550; }
.lead-info-list { grid-template-columns:repeat(4,minmax(90px,.6fr) minmax(110px,1fr))!important; align-items:center; }
.current-sales-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:.75rem; }
.current-sales-grid > div { display:flex; flex-direction:column; align-items:flex-start; gap:.55rem; padding:.8rem; border:1px solid var(--line); border-radius:.75rem; background:#fafbfe; }
.current-sales-grid span:first-child { color:#68748a; font-size:.72rem; font-weight:700; }
.module-form { border:1px solid var(--line); border-radius:.85rem; padding:1rem; }
.modal-action-bar { display:flex; justify-content:flex-end; gap:.6rem; margin:1.1rem -1rem -1rem; padding:.85rem 1rem; border-top:1px solid var(--line); background:#fafbfe; }
.choice-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.55rem; }
.choice-card { cursor:pointer; }
.choice-card input { position:absolute; opacity:0; pointer-events:none; }
.choice-card span { display:flex; align-items:center; min-height:40px; padding:.65rem .8rem; border:1px solid #dce2ec; border-radius:.65rem; font-size:.82rem; font-weight:650; transition:.15s ease; }
.choice-card input:checked + span { color:#244ed8; border-color:#7690ff; background:#edf1ff; box-shadow:0 0 0 2px rgba(79,110,247,.1); }
.activity-timeline { position:relative; padding-left:.4rem; }
.timeline-item { position:relative; display:grid; grid-template-columns:38px 1fr; gap:.75rem; }
.timeline-item:not(:last-child)::before { content:""; position:absolute; left:18px; top:34px; bottom:-4px; width:1px; background:#dfe5ef; }
.timeline-marker { position:relative; z-index:1; width:36px; height:36px; display:grid; place-items:center; border-radius:50%; color:#fff; background:#61708b; }
.timeline-call { background:#17ad75; }.timeline-followup { background:#3d73ed; }.timeline-sales_update { background:#8658e8; }.timeline-note { background:#e49a24; }.timeline-assignment { background:#5c6ac4; }
.timeline-content { margin-bottom:.75rem; padding:.85rem 1rem; border:1px solid var(--line); border-radius:.75rem; background:#fff; }
.timeline-content time { color:#7a8599; font-size:.72rem; }
.timeline-content p { margin:.4rem 0; color:#3f4b61; font-size:.84rem; white-space:pre-wrap; }
.timeline-meta { display:flex; flex-wrap:wrap; gap:.4rem; margin-bottom:.4rem; }
.timeline-meta span { padding:.2rem .45rem; border-radius:.35rem; color:#526174; background:#eef2f8; font-size:.7rem; }

@media (max-width: 767.98px) {
  .lead-desktop-table { display:none; }
  .lead-mobile-list { display:grid; gap:.75rem; }
  .lead-mobile-card { padding:1rem; border:1px solid var(--line); border-radius:.9rem; background:#fff; box-shadow:0 5px 16px rgba(25,42,79,.06); }
  .lead-mobile-card .btn-link { color:#25365a; text-decoration:none; }
  .mobile-contact { display:flex; align-items:center; gap:.5rem; margin:.8rem 0; color:#526174; font-size:.82rem; }
  .mobile-meta { display:grid; gap:.35rem; margin:.75rem 0; color:#68748a; font-size:.76rem; }
  .mobile-lead-actions { display:grid; grid-template-columns:repeat(5,1fr); gap:.35rem; padding-top:.75rem; border-top:1px solid var(--line); }
  .mobile-lead-actions button { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.25rem; min-width:0; min-height:48px; padding:.35rem .15rem; border:0; border-radius:.5rem; color:#4b5870; background:#f6f8fc; font-size:.62rem; font-weight:700; }
  .mobile-lead-actions button i { color:var(--brand); font-size:1rem; }
  .lead-detail-grid { grid-template-columns:1fr; }
  .detail-section,.detail-section:nth-child(2) { border-right:0; border-bottom:1px solid var(--line); }
  .detail-section-wide { grid-column:auto; border-top:0; border-bottom:0; }
  .lead-info-list { grid-template-columns:minmax(100px,.75fr) 1.25fr!important; }
  .current-sales-grid { grid-template-columns:1fr; }
  .choice-grid { grid-template-columns:1fr; }
  .modal-action-bar { position:sticky; bottom:-1rem; z-index:3; }
}

/* Lead table layout: no pinned cells, so columns never cover each other. */
.lead-desktop-table .data-table-scroll {
  overflow-x:auto;
  overflow-y:visible;
  padding-bottom:.25rem;
}
.lead-desktop-table .table {
  width:100%;
  min-width:1160px;
  table-layout:fixed;
}
.lead-desktop-table .table th,
.lead-desktop-table .table td {
  position:static;
  overflow:hidden;
  text-overflow:ellipsis;
  box-shadow:none;
}
.lead-desktop-table .table th:first-child,
.lead-desktop-table .table td:first-child,
.lead-desktop-table .table th:last-child,
.lead-desktop-table .table td:last-child {
  position:static;
  background:inherit;
  box-shadow:none;
}
.lead-desktop-table .table th:nth-child(1),
.lead-desktop-table .table td:nth-child(1) { width:42px; }
.lead-desktop-table .table th:nth-child(2),
.lead-desktop-table .table td:nth-child(2) { width:215px; }
.lead-desktop-table .table th:nth-child(3),
.lead-desktop-table .table td:nth-child(3) { width:145px; }
.lead-desktop-table .table th:nth-child(4),
.lead-desktop-table .table td:nth-child(4) { width:55px; }
.lead-desktop-table .table th:nth-child(5),
.lead-desktop-table .table td:nth-child(5) { width:95px; }
.lead-desktop-table .table th:nth-child(6),
.lead-desktop-table .table td:nth-child(6) { width:95px; }
.lead-desktop-table .table th:nth-child(7),
.lead-desktop-table .table td:nth-child(7) { width:85px; }
.lead-desktop-table .table th:nth-child(8),
.lead-desktop-table .table td:nth-child(8) { width:105px; }
.lead-desktop-table .table th:nth-child(9),
.lead-desktop-table .table td:nth-child(9) { width:145px; }
.lead-desktop-table .table th:nth-child(10),
.lead-desktop-table .table td:nth-child(10) { width:178px; overflow:visible; }
.lead-desktop-table .cell-truncate {
  width:100%;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
}
.lead-row-actions {
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:.3rem;
  white-space:nowrap;
}
.lead-row-actions .btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.3rem;
  min-height:32px;
  padding:.3rem .4rem;
  font-size:.69rem;
}
.lead-row-actions .dropdown { flex:0 0 auto; }
.lead-row-actions .dropdown-menu {
  z-index:1080;
  min-width:190px;
}
@media (max-width:991.98px) {
  .lead-desktop-table { display:none; }
  .lead-mobile-list { display:grid; gap:.75rem; }
}


.lead-desktop-table .table td { overflow:visible; text-overflow:clip; }
.lead-desktop-table .table th { overflow:hidden; text-overflow:ellipsis; }
.lead-desktop-table .table th:nth-child(2),
.lead-desktop-table .table td:nth-child(2),
.lead-desktop-table .table th:nth-child(8),
.lead-desktop-table .table td:nth-child(8) { overflow:hidden; text-overflow:ellipsis; }
.lead-desktop-table .table th:nth-child(4),
.lead-desktop-table .table td:nth-child(4) { width:65px; }

.menu-access-panel { margin-top:1rem; padding:1rem; border:1px solid var(--line); border-radius:.9rem; background:#f8faff; }
.menu-access-panel legend { float:none; width:auto; margin:0 0 .25rem; color:#25365a; font-size:.9rem; font-weight:800; }
.menu-access-panel > p { margin-bottom:.85rem; color:#68748a; font-size:.78rem; }
.menu-permission-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.65rem; }
.menu-permission-card { display:grid; grid-template-columns:auto 38px 1fr; align-items:center; gap:.65rem; min-height:68px; padding:.7rem; border:1px solid #dce2ec; border-radius:.75rem; background:#fff; cursor:pointer; transition:.15s ease; }
.menu-permission-card:has(input:checked) { border-color:#8297ff; background:#f0f3ff; box-shadow:0 0 0 2px rgba(79,110,247,.08); }
.menu-permission-icon { width:38px; height:38px; display:grid; place-items:center; border-radius:.65rem; color:var(--brand); background:#e8edff; }
.menu-permission-card strong,.menu-permission-card small { display:block; }
.menu-permission-card strong { color:#293752; font-size:.82rem; }
.menu-permission-card small { margin-top:.15rem; color:#748096; font-size:.69rem; line-height:1.3; }
.menu-access-disabled { opacity:.55; }
.menu-access-summary { display:flex; flex-wrap:wrap; gap:.3rem; max-width:430px; }
.menu-access-summary span { display:inline-flex; align-items:center; gap:.28rem; padding:.24rem .45rem; border-radius:.4rem; color:#465268; background:#edf1f7; font-size:.67rem; font-weight:650; }
.employee-actions { display:inline-flex; align-items:center; gap:.4rem; white-space:nowrap; }
.employee-table th:first-child,.employee-table td:first-child,
.employee-table th:last-child,.employee-table td:last-child { position:static; box-shadow:none; }
.employee-table td { white-space:normal; }
@media (max-width:767.98px) {
  .menu-permission-grid { grid-template-columns:1fr; }
  .menu-access-panel { padding:.8rem; }
  .employee-actions .btn span { display:none; }
}

.report-loading,.report-error { min-height:360px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.75rem; color:#68748a; text-align:center; }
.report-error i { color:#dc3545; font-size:2rem; }
.report-error h2 { margin:0; color:#25365a; font-size:1.2rem; }
.report-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
.report-heading h2 { margin:0 0 .2rem; color:#1e2d4b; font-size:1.35rem; font-weight:800; }
.report-heading p { margin:0; color:#6d7890; font-size:.85rem; }
.report-updated { display:flex; align-items:center; gap:.4rem; color:#7a8599; font-size:.75rem; white-space:nowrap; }
.report-metric-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:.75rem; }
.report-metric { display:flex; align-items:flex-start; gap:.7rem; min-height:112px; padding:1rem; border:1px solid var(--line); border-radius:.9rem; background:#fff; box-shadow:var(--shadow); }
.report-metric-icon { width:38px; height:38px; display:grid; place-items:center; flex:0 0 auto; border-radius:.7rem; font-size:1rem; }
.report-metric span,.report-metric strong,.report-metric small { display:block; }
.report-metric span { color:#69758b; font-size:.72rem; font-weight:700; }
.report-metric strong { margin:.2rem 0; color:#182744; font-size:1.45rem; line-height:1.1; letter-spacing:-.03em; }
.report-metric small { color:#8a94a6; font-size:.64rem; line-height:1.25; }
.report-tone-blue { color:#315ddd; background:#e9efff; }.report-tone-green { color:#168354; background:#e0f7eb; }.report-tone-purple { color:#7447d2; background:#f0e9ff; }.report-tone-cyan { color:#087c93; background:#def7fb; }.report-tone-orange { color:#ad5c0b; background:#fff0dc; }
.report-section .card-header { display:flex; align-items:center; justify-content:space-between; }
.report-section .card-header h3 { margin:0 0 .15rem; color:#25365a; font-size:1rem; font-weight:800; }
.report-section .card-header p { margin:0; color:#7a8599; font-size:.74rem; }
.report-total { padding:.3rem .55rem; border-radius:.45rem; color:#536177; background:#eef2f7; font-size:.7rem; font-weight:750; white-space:nowrap; }
.report-bars { display:grid; gap:.85rem; }
.report-bar-row { display:grid; grid-template-columns:130px minmax(80px,1fr) 38px 42px; align-items:center; gap:.65rem; }
.report-bar-track,.mini-track { height:8px; overflow:hidden; border-radius:999px; background:#edf1f6; }
.report-bar-track span,.mini-track span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#4f6ef7,#8096ff); }
.report-bar-row > strong { color:#273550; text-align:right; }
.report-bar-row > small { color:#7a8599; text-align:right; }
.report-empty { min-height:180px; display:flex; align-items:center; justify-content:center; gap:.6rem; color:#8290a5; }
.report-table-wrap { border-radius:0 0 1rem 1rem; }
.report-table { min-width:760px; }
.report-table th:first-child,.report-table td:first-child,.report-table th:last-child,.report-table td:last-child { position:static; box-shadow:none; }
.report-table td { white-space:normal; }
.performance-value { margin-bottom:.35rem; font-weight:750; }
.mini-track { width:130px; height:5px; }
.rate-value { color:#315ddd; }
.employee-insight { display:flex; align-items:center; gap:1rem; padding:1rem 1.1rem; border:1px solid #cfd9ff; border-radius:.9rem; background:#f2f5ff; }
.employee-insight > i { color:#4f6ef7; font-size:1.4rem; }
.employee-insight div { flex:1; }
.employee-insight strong { color:#25365a; }
.employee-insight p { margin:.15rem 0 0; color:#69758b; font-size:.78rem; }
@media (max-width:1399.98px) { .report-metric-grid { grid-template-columns:repeat(3,1fr); } }
@media (max-width:767.98px) {
  .report-heading { align-items:flex-start; flex-direction:column; }
  .report-metric-grid { grid-template-columns:repeat(2,1fr); }
  .report-metric { min-height:100px; padding:.8rem; }
  .report-metric-icon { width:34px; height:34px; }
  .report-metric strong { font-size:1.2rem; }
  .report-bar-row { grid-template-columns:105px minmax(55px,1fr) 30px; gap:.45rem; }
  .report-bar-row > small { display:none; }
  .employee-insight { align-items:flex-start; flex-wrap:wrap; }
  .employee-insight .btn { width:100%; }
}
@media (max-width:419.98px) {
  .report-metric-grid { grid-template-columns:1fr; }
  .report-metric { min-height:auto; }
}

.audit-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:1rem; }
.audit-heading h2 { margin:0 0 .2rem; color:#1e2d4b; font-size:1.35rem; font-weight:800; }
.audit-heading p { margin:0; color:#6d7890; font-size:.84rem; }
.audit-heading > span { display:inline-flex; align-items:center; gap:.4rem; padding:.4rem .65rem; border-radius:.55rem; color:#315ddd; background:#e9efff; font-size:.72rem; font-weight:750; white-space:nowrap; }
.audit-metric-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:.75rem; margin-top:1rem; }
.audit-metric { display:flex; align-items:center; gap:.8rem; padding:1rem; border:1px solid var(--line); border-radius:.9rem; background:#fff; box-shadow:var(--shadow); }
.audit-icon,.audit-event-icon { display:grid; place-items:center; flex:0 0 auto; border-radius:.7rem; }
.audit-icon { width:42px; height:42px; }
.audit-metric small,.audit-metric strong,.audit-metric p { display:block; }
.audit-metric small { color:#6f7b91; font-size:.7rem; font-weight:700; }
.audit-metric strong { color:#1d2b48; font-size:1.35rem; }
.audit-metric p { margin:0; color:#8a94a6; font-size:.65rem; }
.audit-blue { color:#315ddd; background:#e9efff; }.audit-green { color:#168354; background:#e0f7eb; }.audit-purple { color:#7447d2; background:#f0e9ff; }.audit-orange { color:#a85a0d; background:#fff0dc; }.audit-red { color:#b42336; background:#ffe5e8; }.audit-gray { color:#5e6a7d; background:#edf1f5; }.audit-cyan { color:#087c93; background:#def7fb; }
.audit-section .card-header { display:flex; align-items:center; justify-content:space-between; }
.audit-section .card-header h3 { margin:0 0 .15rem; color:#25365a; font-size:1rem; font-weight:800; }
.audit-section .card-header p { margin:0; color:#7a8599; font-size:.74rem; }
.audit-help { color:#718097; font-size:.7rem; }
.employee-audit-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.75rem; }
.employee-audit-card { padding:1rem; border:1px solid var(--line); border-radius:.8rem; background:#fafbfe; }
.employee-audit-head { display:grid; grid-template-columns:42px minmax(0,1fr) auto; align-items:center; gap:.7rem; }
.employee-initial { width:42px; height:42px; display:grid; place-items:center; border-radius:50%; color:#fff; background:linear-gradient(135deg,#4f6ef7,#8398ff); font-weight:800; }
.employee-audit-head strong,.employee-audit-head small { display:block; }
.employee-audit-head strong { color:#283650; }
.employee-audit-head small { color:#7a8599; font-size:.68rem; }
.activity-count { padding:.25rem .45rem; border-radius:.4rem; color:#315ddd; background:#e9efff; font-size:.66rem; font-weight:750; }
.employee-audit-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:.4rem; margin:.85rem 0; }
.employee-audit-stats span { color:#78849a; font-size:.64rem; text-align:center; }
.employee-audit-stats strong { display:block; color:#24314a; font-size:1rem; }
.employee-last-active { padding-top:.65rem; border-top:1px solid var(--line); color:#68758b; font-size:.7rem; }
.audit-filters { display:grid; grid-template-columns:minmax(240px,1fr) 170px 185px 140px 42px; gap:.55rem; margin-bottom:1rem; padding:.75rem; border:1px solid var(--line); border-radius:.75rem; background:#f8faff; }
.audit-search { position:relative; }
.audit-search i { position:absolute; left:.8rem; top:50%; z-index:2; color:#7b879a; transform:translateY(-50%); }
.audit-search input { padding-left:2.25rem; }
.audit-activity-list { display:grid; gap:.65rem; }
.audit-event { display:grid; grid-template-columns:40px minmax(0,1fr) 125px; gap:.8rem; padding:.85rem; border:1px solid var(--line); border-radius:.75rem; background:#fff; transition:.15s ease; }
.audit-event:hover { border-color:#cbd5ea; box-shadow:0 6px 18px rgba(25,42,79,.06); }
.audit-event-icon { width:40px; height:40px; }
.audit-event-title { display:flex; align-items:center; flex-wrap:wrap; gap:.45rem; }
.audit-event-title strong { color:#25334f; font-size:.84rem; }
.audit-category { padding:.18rem .38rem; border-radius:.35rem; color:#69758a; background:#eef2f7; font-size:.61rem; font-weight:700; text-transform:uppercase; }
.audit-event-main p { margin:.25rem 0 .4rem; color:#566279; font-size:.78rem; }
.audit-event-meta { display:flex; flex-wrap:wrap; gap:.75rem; color:#7a8599; font-size:.68rem; }
.audit-event-meta span { display:inline-flex; align-items:center; gap:.28rem; }
.audit-event-time { text-align:right; }
.audit-event-time strong,.audit-event-time span { display:block; }
.audit-event-time strong { color:#47546b; font-size:.7rem; }
.audit-event-time span { margin-top:.2rem; color:#8a94a6; font-size:.62rem; }
.audit-event details { margin-top:.55rem; }
.audit-event summary { color:#4566d5; cursor:pointer; font-size:.68rem; font-weight:700; }
.audit-event pre { max-height:180px; margin:.45rem 0 0; padding:.65rem; overflow:auto; border-radius:.5rem; color:#4b5870; background:#f4f6fa; font-size:.65rem; white-space:pre-wrap; }
.audit-empty { min-height:170px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.35rem; color:#8290a5; text-align:center; }
.audit-empty i { font-size:1.4rem; }
@media (max-width:1199.98px) {
  .audit-filters { grid-template-columns:1fr 1fr 1fr; }
  .audit-search { grid-column:1/-1; }
  .audit-filters > button { width:42px; }
}
@media (max-width:767.98px) {
  .audit-heading { align-items:flex-start; flex-direction:column; }
  .audit-metric-grid { grid-template-columns:repeat(2,1fr); }
  .employee-audit-grid { grid-template-columns:1fr; }
  .audit-filters { grid-template-columns:1fr 1fr; }
  .audit-search { grid-column:1/-1; }
  .audit-event { grid-template-columns:36px minmax(0,1fr); }
  .audit-event-icon { width:36px; height:36px; }
  .audit-event-time { grid-column:2; display:flex; gap:.4rem; text-align:left; }
}
@media (max-width:419.98px) {
  .audit-metric-grid { grid-template-columns:1fr; }
  .employee-audit-stats { grid-template-columns:repeat(2,1fr); }
  .audit-filters { grid-template-columns:1fr; }
  .audit-search { grid-column:auto; }
}

.employee-last-active { display:flex; align-items:center; gap:.35rem; }
.workspace-loading,.workspace-error,.workspace-empty{min-height:260px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;color:#64748b;gap:.65rem}.workspace-error i,.workspace-empty>i{font-size:2rem;color:#94a3b8}.workspace-error h2,.workspace-empty h3{margin:0;color:#0f2747;font-size:1.05rem}.workspace-error p,.workspace-empty p{margin:0;max-width:420px}.workspace-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:1rem;margin-bottom:1.25rem}.workspace-heading h2{font-size:1.55rem;color:#102a4c;margin:.35rem 0 .25rem}.workspace-heading p{margin:0;color:#64748b}.workspace-eyebrow{text-transform:uppercase;letter-spacing:.08em;font-size:.7rem;font-weight:800;color:#2563eb}.workspace-eyebrow i{margin-right:.35rem}.work-metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem;margin-bottom:1rem}.work-metric{display:flex;align-items:center;gap:.9rem;padding:1rem;border:1px solid #e4ebf4;border-radius:14px;background:#fff;box-shadow:0 8px 24px rgba(26,54,93,.045)}.work-metric-icon{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;font-size:1.05rem;background:#eff6ff;color:#2563eb;flex:none}.work-metric-danger .work-metric-icon{background:#fff1f2;color:#e11d48}.work-metric-warning .work-metric-icon{background:#fff7ed;color:#ea580c}.work-metric-success .work-metric-icon{background:#ecfdf5;color:#059669}.work-metric-violet .work-metric-icon{background:#f5f3ff;color:#7c3aed}.work-metric-value{font-size:1.35rem;font-weight:800;color:#102a4c;line-height:1.1}.work-metric-label{font-size:.78rem;font-weight:750;color:#334155;margin-top:.15rem}.work-metric-help{font-size:.68rem;color:#8492a6;margin-top:.1rem}.team-strip{background:linear-gradient(135deg,#f8fbff,#f1f7ff);border:1px solid #dbe8f8;border-radius:14px;padding:1rem;margin-bottom:1rem}.team-strip-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:.8rem}.team-strip-heading h3{font-size:.95rem;margin:.2rem 0 0;color:#15345b}.team-strip-heading>span{font-size:.72rem;color:#64748b}.team-load-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem}.team-load-item{display:flex;align-items:center;gap:.65rem;background:#fff;border:1px solid #e3ecf7;border-radius:10px;padding:.65rem}.avatar-mini{width:28px;height:28px;border-radius:50%;display:inline-grid;place-items:center;flex:none;background:#e8f0ff;color:#2563eb;font-size:.72rem;font-weight:800}.team-load-item>div{min-width:0;display:flex;flex-direction:column}.team-load-item strong{font-size:.78rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#1e3657}.team-load-item small{font-size:.66rem;color:#748399}.team-overdue{margin-left:auto;white-space:nowrap;font-size:.66rem;padding:.22rem .4rem;border-radius:6px;background:#f1f5f9;color:#64748b}.team-overdue.has-overdue{background:#fff1f2;color:#be123c;font-weight:700}.workspace-panel{border:1px solid #e1e9f3;border-radius:14px;overflow:hidden}.workspace-toolbar{display:flex;gap:.7rem;padding:1rem;border-bottom:1px solid #edf1f6}.workspace-search{position:relative;flex:1}.workspace-search i{position:absolute;left:.85rem;top:50%;transform:translateY(-50%);color:#94a3b8;z-index:1}.workspace-search .form-control{padding-left:2.35rem}.workspace-toolbar>.form-select{width:auto;min-width:170px}.workspace-tabs{display:flex;gap:.35rem;padding:.65rem 1rem;border-bottom:1px solid #edf1f6;overflow-x:auto}.workspace-tab{border:0;background:transparent;color:#64748b;font-size:.76rem;font-weight:700;border-radius:8px;padding:.5rem .7rem;white-space:nowrap}.workspace-tab span{background:#eef2f7;border-radius:999px;margin-left:.35rem;padding:.1rem .35rem;font-size:.62rem}.workspace-tab.active{background:#eaf2ff;color:#1d4ed8}.workspace-tab.active span{background:#fff;color:#2563eb}.followup-list{padding:.4rem 1rem 1rem}.followup-item{display:grid;grid-template-columns:145px minmax(0,1fr) auto;gap:1rem;align-items:center;padding:1rem 0;border-bottom:1px solid #edf1f6}.followup-item:last-child{border-bottom:0}.followup-time{display:flex;flex-direction:column;gap:.12rem;padding-left:.75rem;border-left:3px solid #3b82f6}.followup-overdue .followup-time{border-color:#e11d48}.followup-today .followup-time{border-color:#f59e0b}.followup-completed .followup-time{border-color:#10b981}.followup-time>span{font-size:.72rem;color:#64748b}.followup-time>strong{font-size:.92rem;color:#183455}.state-pill,.type-pill,.call-result{display:inline-flex;align-items:center;gap:.3rem;width:max-content;border-radius:999px;padding:.25rem .5rem;font-size:.63rem;font-weight:750}.state-overdue{background:#fff1f2;color:#be123c}.state-today{background:#fff7ed;color:#c2410c}.state-upcoming{background:#eff6ff;color:#1d4ed8}.state-completed{background:#ecfdf5;color:#047857}.type-pill{background:#f3f6fa;color:#52647a}.followup-title-row{display:flex;justify-content:space-between;gap:.75rem;align-items:flex-start}.followup-title-row h3{margin:0;color:#123154;font-size:.88rem}.followup-title-row p{margin:.15rem 0 0;font-size:.7rem;color:#718096}.followup-meta{display:flex;flex-wrap:wrap;gap:.65rem 1rem;margin-top:.5rem;color:#687a91;font-size:.68rem}.followup-meta i{margin-right:.3rem;color:#3b82f6}.followup-note{display:flex;gap:.5rem;margin-top:.55rem;border-radius:8px;background:#f8fafc;padding:.55rem .65rem;color:#52647a;font-size:.71rem}.followup-note i{color:#8492a6;flex:none}.followup-actions{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap;justify-content:flex-end}.completed-at{font-size:.66rem;color:#047857}.completed-at i{margin-right:.3rem}.modal-action-bar{display:flex;justify-content:flex-end;gap:.5rem;margin-top:1.25rem;padding-top:1rem;border-top:1px solid #edf1f6}.call-team-grid{display:grid;gap:.55rem}.call-team-item{display:grid;grid-template-columns:minmax(180px,1.4fr) repeat(4,minmax(80px,1fr));align-items:center;gap:.7rem;background:#fff;border:1px solid #e3ecf7;border-radius:10px;padding:.7rem .85rem}.call-team-name{display:flex;align-items:center;gap:.55rem;min-width:0}.call-team-name strong{font-size:.78rem;overflow:hidden;text-overflow:ellipsis}.call-team-item>div:not(.call-team-name){display:flex;flex-direction:column}.call-team-item>div>strong{font-size:.78rem;color:#183455}.call-team-item>div>small{font-size:.63rem;color:#8492a6}.calls-toolbar{display:grid;grid-template-columns:minmax(260px,1fr) repeat(3,minmax(140px,auto))}.call-table-wrap{overflow:auto}.call-work-table{margin:0;min-width:960px}.call-work-table th{background:#f8fafc;color:#64748b;font-size:.65rem;text-transform:uppercase;letter-spacing:.04em;padding:.7rem .8rem;white-space:nowrap}.call-work-table td{padding:.75rem .8rem;vertical-align:middle;color:#455a73;font-size:.72rem}.call-work-table td>strong,.call-work-table td>small{display:block}.call-work-table td>strong{color:#173655;font-size:.75rem}.call-work-table td>small{color:#8492a6;margin-top:.15rem}.employee-cell,.duration-cell{display:inline-flex;align-items:center;gap:.4rem;white-space:nowrap}.duration-cell i{color:#7c3aed}.call-result{white-space:nowrap}.call-success{background:#ecfdf5;color:#047857}.call-warning{background:#fff7ed;color:#c2410c}.call-danger{background:#fff1f2;color:#be123c}.call-primary{background:#eff6ff;color:#1d4ed8}.call-neutral{background:#f1f5f9;color:#52647a}.call-note-cell{max-width:280px;white-space:normal}.call-mobile-list{display:none}.call-mobile-card{padding:1rem;border-bottom:1px solid #e9eff6}.call-mobile-card h3{font-size:.86rem;margin:0;color:#173655}.call-mobile-card p{font-size:.67rem;margin:.15rem 0 0;color:#8492a6}.call-mobile-meta{display:flex;flex-wrap:wrap;gap:.7rem;margin-top:.65rem;font-size:.68rem;color:#607289}.call-mobile-meta i{margin-right:.28rem;color:#3b82f6}

@media(max-width:1100px){.team-load-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.followup-item{grid-template-columns:125px minmax(0,1fr)}.followup-actions{grid-column:2;justify-content:flex-start}.calls-toolbar{grid-template-columns:minmax(240px,1fr) repeat(2,minmax(140px,auto))}.calls-toolbar>select:last-child{grid-column:auto}.call-team-item{grid-template-columns:minmax(160px,1.4fr) repeat(4,minmax(65px,1fr))}}
@media(max-width:767px){.workspace-heading{align-items:flex-start;flex-direction:column}.workspace-heading .btn{width:100%}.work-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem}.work-metric{padding:.75rem;gap:.6rem}.work-metric-icon{width:36px;height:36px}.work-metric-value{font-size:1.05rem}.work-metric-help{display:none}.team-load-grid{grid-template-columns:1fr}.workspace-toolbar,.calls-toolbar{display:grid;grid-template-columns:1fr}.workspace-toolbar>.form-select{width:100%;min-width:0}.followup-list{padding:.25rem .85rem .85rem}.followup-item{grid-template-columns:1fr;gap:.7rem}.followup-time{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:.45rem}.followup-time>strong{justify-self:start}.followup-actions{grid-column:auto;justify-content:stretch}.followup-actions .btn{flex:1}.call-table-wrap{display:none}.call-mobile-list{display:block}.call-team-item{grid-template-columns:1fr 1fr}.call-team-name{grid-column:1/-1}.call-team-item>div:last-child{display:none}.workspace-tabs{padding:.55rem .75rem}.team-strip-heading{align-items:flex-start}}
@media(max-width:420px){.work-metric-grid{grid-template-columns:1fr}.followup-title-row{flex-direction:column}.followup-actions{flex-direction:column}.followup-actions .btn{width:100%}.followup-time{grid-template-columns:auto 1fr}.followup-time .state-pill{grid-column:1/-1}.call-team-item{grid-template-columns:1fr 1fr}}
