/* TeamAct CRM — Member Reports V1 */

.sidebar-report-group{display:grid;gap:2px}
.sidebar-report-parent{position:relative}
.sidebar-report-parent b{margin-left:auto;font-size:15px;transition:transform .16s ease}
.sidebar-report-group.open .sidebar-report-parent b{transform:rotate(180deg)}
.sidebar-report-children{display:none;padding-left:15px}
.sidebar-report-group.open .sidebar-report-children{display:grid;gap:2px}
.sidebar-report-children button{min-height:39px!important;font-size:13px!important}
.sidebar-report-children button svg{width:16px!important;height:16px!important}
.sidebar-report-parent.active{background:#f2efff!important;color:#5d3fd3!important}
.sidebar.collapsed .sidebar-report-parent span,.sidebar.collapsed .sidebar-report-parent b,.sidebar.collapsed .sidebar-report-children{display:none!important}

.mr{--mr-purple:#5d3fd3;--mr-soft:#f7f8fb;--mr-line:#dde5eb;--mr-ink:#17354a;--mr-muted:#687f90;display:grid;gap:14px}
.mr-head{display:flex;align-items:center;justify-content:space-between}
.mr-head h2{margin:0!important;padding:0!important;border:0!important;font-size:24px!important;color:var(--mr-ink)!important}
.mr-head h2:before{display:none!important}
.mr-head p{margin:4px 0 0;color:var(--mr-muted)!important}
.mr-tabs{display:grid;grid-template-columns:repeat(5,1fr);background:#fff;border:1px solid var(--mr-line);border-radius:11px;padding:4px;max-width:620px}
.shell #view .mr .mr-tabs button{background:transparent!important;color:#667782!important;border:0!important;border-radius:8px!important;box-shadow:none!important;font-weight:850!important}
.shell #view .mr .mr-tabs button.active{background:#f1edff!important;color:var(--mr-purple)!important}
.mr-range{display:flex;align-items:center;gap:8px}
.mr-range input{max-width:160px}
.mr-range strong{margin-left:6px;color:#4b6172!important}
.mr-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.mr-kpis>div{position:relative;background:#fff;border:1px solid var(--mr-line);border-radius:13px;padding:14px;box-shadow:0 6px 18px rgba(24,57,80,.05)}
.mr-kpis span{display:block;color:#657a8a!important;font-size:12px!important;font-weight:750}
.mr-kpis b{display:block;margin:6px 0 4px;font-size:26px!important;color:var(--mr-ink)!important}
.mr-kpis.compact b{font-size:22px!important}
.mr-delta{display:inline-block!important;width:max-content;padding:3px 7px;border-radius:99px;font-size:11px!important}
.mr-delta.up{background:#e4f6ec;color:#0d7851!important}.mr-delta.down{background:#ffe8eb;color:#bb2d3b!important}.mr-delta.neutral{background:#eef2f5;color:#5f7383!important}
.mr-grid{display:grid;grid-template-columns:1.5fr .8fr;gap:14px}
.mr-card{background:#fff;border:1px solid var(--mr-line);border-radius:14px;padding:15px}
.mr-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}
.mr-card-head h3{margin:0!important;color:var(--mr-ink)!important}
.mr-card-head span{color:#7a8b98!important;font-size:12px!important}
.mr-chart{height:250px;display:flex;align-items:end;gap:10px;padding:16px 8px 0;border-left:1px solid #e7edf1;border-bottom:1px solid #e7edf1}
.mr-chart-col{flex:1;min-width:24px;display:grid;grid-template-rows:1fr 26px;gap:6px;height:100%;text-align:center}
.mr-bar-wrap{height:100%;display:flex;align-items:flex-end;justify-content:center}
.mr-bar{position:relative;display:block;width:min(42px,72%);min-height:4px;background:linear-gradient(180deg,#8f78eb,#5d3fd3);border-radius:7px 7px 2px 2px}
.mr-bar b{position:absolute;top:-19px;left:50%;transform:translateX(-50%);font-size:11px!important;color:#3f5262!important}
.mr-chart-col small{font-size:11px!important;color:#6f8290!important}
.mr-score-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.mr-score-grid>div{padding:14px;border-radius:11px;background:#f7f8fb;border:1px solid #e5ebef;text-align:center}
.mr-score-grid b{display:block;font-size:23px!important;color:#5137c0!important}
.mr-score-grid span{color:#647989!important;font-size:12px!important}
.mr-first-last{display:grid;gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid #e8edf1}
.mr-first-last span{display:flex;justify-content:space-between;color:#6a7f8e!important}
.mr-filterbar{display:flex;gap:8px;flex-wrap:wrap;padding:11px;background:#fff;border:1px solid var(--mr-line);border-radius:12px}
.mr-filterbar input{flex:1 1 220px}.mr-filterbar select{min-width:150px}
.mr-table-wrap{overflow:auto;background:#fff;border:1px solid var(--mr-line);border-radius:12px}
.mr-table{width:100%;min-width:850px;border-collapse:collapse}
.mr-table th{background:#f2f4f6;color:#3c5668!important;text-align:left;padding:10px;border-bottom:1px solid #d8e1e7}
.mr-table td{padding:10px;border-bottom:1px solid #e9eef2;color:#203e53!important}
.mr-table tbody tr:hover td{background:#faf9ff}
.shell #view .mr button.mr-lead-link{background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;color:#4f36c2!important;font-weight:800!important}
.shell #view .mr button.mr-lead-link:hover{text-decoration:underline}
.mr-call-type{display:inline-block;padding:4px 7px;border-radius:7px;background:#eef4f8;color:#3e5b6e!important}
.mr-pager{display:flex;justify-content:space-between;align-items:center}
.mr-download-card{background:linear-gradient(145deg,#fff,#faf8ff);border:1px solid #ddd5fb;border-radius:14px;padding:17px}
.mr-download-card form{display:flex;align-items:end;gap:10px;flex-wrap:wrap}
.mr-download-card label{display:grid;gap:5px;min-width:210px}
.mr-download-card p{margin:12px 0 0;color:#647a8b!important}
.mr-recent{display:grid}
.mr-recent>div{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid #ebeff2}
.mr-recent>div:last-child{border-bottom:0}
.mr-recent span{display:grid;gap:3px}.mr-recent small{color:#748794!important}
.mr-empty{padding:28px;text-align:center;color:#738797!important}

@media(max-width:1100px){.mr-kpis{grid-template-columns:repeat(3,1fr)}.mr-grid{grid-template-columns:1fr}}
@media(max-width:700px){.mr-kpis{grid-template-columns:repeat(2,1fr)}.mr-tabs{max-width:none}.mr-range{flex-wrap:wrap}.mr-download-card form{display:grid}.mr-filterbar{display:grid}.mr-score-grid{grid-template-columns:1fr 1fr}}

/* ==========================================================
   MEMBER REPORTS V1 — SIDEBAR + PERIOD TABS VISUAL FIX
   2026-10-11
   Fixes global CRM button overrides repainting report controls.
   ========================================================== */

/* My Reports parent must NEVER become red on normal dashboard/pages. */
html body #root .shell .sidebar .sidebar-report-parent{
  background:#ffffff!important;
  background-image:none!important;
  color:#29485f!important;
  border:1px solid transparent!important;
  box-shadow:none!important;
}
html body #root .shell .sidebar .sidebar-report-parent:hover{
  background:#f4f8fb!important;
  color:#087d93!important;
  border-color:#dbe7ee!important;
}
html body #root .shell .sidebar .sidebar-report-parent.active{
  background:#eef8fa!important;
  background-image:none!important;
  color:#087d93!important;
  border-color:#cfe7ec!important;
}
html body #root .shell .sidebar .sidebar-report-parent b{
  color:inherit!important;
}

/* Report child items stay clean. Only current child gets a soft accent. */
html body #root .shell .sidebar .sidebar-report-children button{
  background:transparent!important;
  background-image:none!important;
  color:#355269!important;
  border:1px solid transparent!important;
  box-shadow:none!important;
}
html body #root .shell .sidebar .sidebar-report-children button:hover{
  background:#f6f8fb!important;
  color:#5d3fd3!important;
}
html body #root .shell .sidebar .sidebar-report-children button.active{
  background:#f1edff!important;
  background-image:none!important;
  color:#5d3fd3!important;
  border-color:#e1d9ff!important;
}

/* DAY / WEEK / MONTH / YEAR:
   all tabs white; selected tab uses purple text + bottom accent only. */
html body #root .shell #view .mr .mr-tabs{
  background:#ffffff!important;
  border:1px solid #dbe4ea!important;
  border-radius:10px!important;
  padding:0!important;
  overflow:hidden!important;
}
html body #root .shell #view .mr .mr-tabs button{
  position:relative!important;
  min-height:44px!important;
  background:#ffffff!important;
  background-image:none!important;
  color:#566b7b!important;
  border:0!important;
  border-right:1px solid #e5ebef!important;
  border-radius:0!important;
  box-shadow:none!important;
  font-weight:850!important;
}
html body #root .shell #view .mr .mr-tabs button:last-child{
  border-right:0!important;
}
html body #root .shell #view .mr .mr-tabs button:hover:not(:disabled){
  background:#faf9ff!important;
  color:#5d3fd3!important;
}
html body #root .shell #view .mr .mr-tabs button.active{
  background:#ffffff!important;
  background-image:none!important;
  color:#5d3fd3!important;
  box-shadow:inset 0 -4px 0 #5d3fd3!important;
}

/* Dark mode keeps the same selection logic. */
html.theme-dark body #root .shell #view .mr .mr-tabs,
html.theme-dark body #root .shell #view .mr .mr-tabs button{
  background:#173142!important;
  border-color:#385366!important;
}
html.theme-dark body #root .shell #view .mr .mr-tabs button{
  color:#c3d1db!important;
}
html.theme-dark body #root .shell #view .mr .mr-tabs button.active{
  color:#cdbfff!important;
  box-shadow:inset 0 -4px 0 #8f78eb!important;
}

/* ==========================================================
   MEMBER REPORTS V2 — CUSTOM DATE RANGE
   DAY/WEEK/MONTH/YEAR/CUSTOM tabs stay WHITE.
   ========================================================== */

html body #root .shell #view .mr .mr-tabs{
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  background:#ffffff!important;
}
html body #root .shell #view .mr .mr-tabs button,
html body #root .shell #view .mr .mr-tabs button:hover:not(:disabled),
html body #root .shell #view .mr .mr-tabs button.active{
  background:#ffffff!important;
  background-image:none!important;
}
html body #root .shell #view .mr .mr-tabs button.active{
  color:#5d3fd3!important;
  box-shadow:inset 0 -4px 0 #5d3fd3!important;
}

.mr-custom-range{
  display:flex;
  align-items:end;
  gap:9px;
  flex-wrap:wrap;
}
.mr-custom-range>label{
  display:grid;
  gap:5px;
  min-width:165px;
  color:#536b7c!important;
  font-weight:800;
}
.mr-custom-range>label>span{
  font-size:12px!important;
  color:#536b7c!important;
}
.mr-custom-range-arrow{
  align-self:center;
  padding-top:17px;
  color:#718392!important;
  font-weight:900;
}
.mr-custom-range>strong{
  align-self:center;
  margin-left:5px;
  padding-top:17px;
  color:#3f586a!important;
}

/* Date proxy controls on report pages are explicitly WHITE. */
html body #root .shell #view .mr .crm-date-proxy{
  background:#ffffff!important;
  background-image:none!important;
  color:#243f53!important;
  border:1px solid #cbdce6!important;
  box-shadow:none!important;
}
html body #root .shell #view .mr .crm-date-proxy:hover,
html body #root .shell #view .mr .crm-date-proxy:focus-visible{
  background:#ffffff!important;
  color:#243f53!important;
}

/* Custom range calendar:
   Start/end = purple, middle = light grey, Apply Range confirms. */
html body .crm-date-picker button.crm-date-day.in-range{
  background:#e9edf0!important;
  color:#263f52!important;
}
html body .crm-date-picker button.crm-date-day.range-start,
html body .crm-date-picker button.crm-date-day.range-end{
  background:#5d3fd3!important;
  color:#ffffff!important;
}

@media(max-width:700px){
  .mr-tabs{overflow-x:auto!important}
  html body #root .shell #view .mr .mr-tabs{
    grid-template-columns:repeat(5,minmax(92px,1fr))!important;
  }
  .mr-custom-range{
    display:grid;
    grid-template-columns:1fr;
  }
  .mr-custom-range-arrow{
    display:none;
  }
  .mr-custom-range>strong{
    padding-top:0;
    margin-left:0;
  }
}

