/* CA Task Pro — 2026 roadmap styles.
 *
 * Loaded after style.css and scoped to rm- prefixed classes, so nothing here
 * can change a screen whose feature flag is off. Colour is always paired with
 * an icon or a word: the KPI strip must read the same to a colour-blind user,
 * and red is reserved for overdue work alone.
 */

/* ---------------------------------------------------------------- KPI strip */
.rm-kpi-host { display: block; }
.rm-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.rm-kpi-grid-office { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }

.rm-kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  box-shadow: var(--shadow);
  --rm-accent: var(--grey);
  --rm-soft: #f1f5f9;
}
.rm-kpi-icon {
  width: 38px; height: 38px; flex: 0 0 38px;
  border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: var(--rm-soft);
  color: var(--rm-accent);
  font-size: 15px;
}
.rm-kpi-body { min-width: 0; }
.rm-kpi-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.rm-kpi-value { font-size: 25px; font-weight: 700; line-height: 1.15; }
.rm-kpi-meta, .rm-kpi-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.rm-kpi-click { cursor: pointer; transition: border-color .12s, box-shadow .12s, transform .12s; }
.rm-kpi-click:hover { border-color: var(--rm-accent); box-shadow: 0 6px 18px rgba(15, 23, 42, .10); transform: translateY(-1px); }

/* Tones. Amber = today's deadline; red = overdue and nothing else. */
.rm-tone-amber { --rm-accent: #b45309; --rm-soft: #fef3c7; background: #fffbeb; border: 2px solid #f59e0b; }
.rm-tone-amber.rm-tone-late { background: #fef3c7; border-color: #d97706; }
.rm-tone-amber-soft { --rm-accent: #b45309; --rm-soft: #fef9c3; }
.rm-tone-red { --rm-accent: #b91c1c; --rm-soft: #fee2e2; background: #fef2f2; }
.rm-tone-violet { --rm-accent: #6d28d9; --rm-soft: #ede9fe; }
.rm-tone-blue { --rm-accent: #1d4ed8; --rm-soft: #dbeafe; }
.rm-tone-green { --rm-accent: #15803d; --rm-soft: #dcfce7; }
.rm-tone-quiet { --rm-accent: #64748b; --rm-soft: #f1f5f9; }

.rm-updated { font-size: 11.5px; color: var(--text-muted); margin: -4px 0 16px 2px; }

/* Skeletons — never render a zero before the data has arrived. */
.rm-skeleton .rm-kpi-icon { background: #eef2f7; }
.rm-sk-line { height: 10px; width: 70px; border-radius: 5px; background: #eef2f7; margin: 6px 0; animation: rm-pulse 1.2s ease-in-out infinite; }
.rm-sk-line.rm-sk-wide { width: 110px; height: 18px; }
@keyframes rm-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

/* ------------------------------------------------------- readiness banner */
#rm-readiness { margin-bottom: 14px; }
.rm-readiness-inner {
  display: flex; gap: 12px; align-items: flex-start;
  background: #fffbeb; border: 1px solid #fcd34d; border-radius: var(--radius);
  padding: 12px 14px; font-size: 13px;
}
.rm-readiness-inner > i { color: #b45309; margin-top: 2px; }
.rm-readiness-gaps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.rm-gap {
  background: #fff; border: 1px solid #fcd34d; border-radius: 999px;
  padding: 4px 12px; font-size: 12px; cursor: pointer; color: #92400e;
}
.rm-gap:hover { background: #fef3c7; }

/* ------------------------------------------------------------- panels */
.rm-att { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--border); }
.rm-att:last-child { border-bottom: none; }
.rm-att-main { flex: 1; min-width: 0; }
.rm-att-actions { display: flex; gap: 4px; flex: 0 0 auto; }
.rm-att-danger .item-title { color: #b91c1c; }
.rm-att-warn .item-title { color: #b45309; }

.rm-week-row { padding: 9px 0; border-bottom: 1px solid var(--border); }
.rm-week-row:last-child { border-bottom: none; }
.rm-week-date { font-weight: 600; font-size: 13px; margin-bottom: 5px; }
.rm-week-note { font-weight: 400; font-size: 11px; color: var(--text-muted); }
.rm-week-items { display: flex; flex-wrap: wrap; gap: 6px; }
.rm-week-chip {
  background: #fef3c7; color: #92400e; border-radius: 999px;
  padding: 3px 10px; font-size: 12px; cursor: pointer;
}
.rm-week-chip:hover { background: #fde68a; }

/* --------------------------------------------------------------- the feed */
.rm-legacy-hidden { display: none !important; }

.rm-viewswitch { display: flex; align-items: center; gap: 6px; padding: 4px 4px 12px; flex-wrap: wrap; }
.rm-view {
  background: transparent; border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 14px; font-size: 13px; cursor: pointer; color: var(--text-muted);
}
.rm-view.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.rm-mine { margin-left: auto; font-size: 13px; display: flex; align-items: center; gap: 6px; color: var(--text-muted); }

.rm-chip {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 600;
  background: #f1f5f9; color: #475569; white-space: nowrap;
}
.rm-chip-task { background: #e0e7ff; color: #3730a3; }
.rm-chip-gst_return { background: #dcfce7; color: #166534; }
.rm-chip-itr { background: #dbeafe; color: #1d4ed8; }
.rm-chip-tds_stmt { background: #fae8ff; color: #86198f; }
.rm-chip-roc_filing { background: #ffedd5; color: #9a3412; }
.rm-chip-books_period { background: #ccfbf1; color: #115e59; }
.rm-chip-matter_stage { background: #ede9fe; color: #5b21b6; }
.rm-chip-fee_milestone { background: #fef3c7; color: #92400e; }

.rm-badge {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.rm-s-pending { background: #f1f5f9; color: #475569; }
.rm-s-progress { background: #dbeafe; color: #1d4ed8; }
.rm-s-overdue { background: #fee2e2; color: #b91c1c; }
.rm-s-waiting { background: #ede9fe; color: #6d28d9; }
.rm-s-review { background: #cffafe; color: #0e7490; }
.rm-s-done { background: #dcfce7; color: #15803d; }
.rm-s-na { background: #f8fafc; color: #94a3b8; }

.rm-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.rm-late { color: #b91c1c; font-weight: 600; }
.rm-row-overdue td { background: #fffafa; }
.rm-client { color: var(--primary); cursor: pointer; }
.rm-client:hover { text-decoration: underline; }
.rm-more { padding: 10px; text-align: center; font-size: 12px; color: var(--text-muted); }

/* A completed row fades out of the Active view rather than vanishing. */
.rm-fade { transition: opacity .5s ease, background .5s ease; opacity: 0; }

@media (max-width: 720px) {
  .rm-kpi-value { font-size: 21px; }
  .rm-viewswitch { gap: 4px; }
  .rm-mine { margin-left: 0; }
}

/* ------------------------------------------------------- Client 360 drawer */
.c360-drawer { position: fixed; inset: 0; z-index: 1200; }
.c360-drawer.hidden { display: none !important; }
.c360-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .35); }
.c360-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(760px, 96vw); background: var(--surface);
  box-shadow: -8px 0 32px rgba(15, 23, 42, .18);
  display: flex; flex-direction: column;
}
.c360-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 10px; border-bottom: 1px solid var(--border); }
.c360-head h2 { margin: 0; font-size: 19px; }
.c360-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; display: flex; gap: 6px; align-items: center; }
.c360-meta { display: flex; gap: 18px; padding: 12px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.c360-stat { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.c360-stat span { display: block; font-size: 19px; font-weight: 700; color: var(--text); letter-spacing: 0; text-transform: none; }
.c360-stat.c360-bad span { color: #b91c1c; }
.c360-tabs { display: flex; gap: 2px; padding: 8px 14px 0; border-bottom: 1px solid var(--border); overflow-x: auto; }
.c360-tabs button {
  background: transparent; border: none; border-bottom: 2px solid transparent;
  padding: 8px 12px; font-size: 13px; color: var(--text-muted); cursor: pointer; white-space: nowrap;
}
.c360-tabs button.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.c360-body { flex: 1; overflow-y: auto; padding: 16px 20px 40px; }
.c360-loading { padding: 40px; text-align: center; color: var(--text-muted); }
.c360-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.c360-field { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); position: relative; }
.c360-field input, .c360-field select {
  padding: 7px 9px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 13.5px; text-transform: none; letter-spacing: 0; color: var(--text); background: #fff;
}
.c360-field.c360-locked input, .c360-field.c360-locked select { background: #f8fafc; color: var(--text-muted); }
.c360-lock { position: absolute; right: 8px; bottom: 9px; font-size: 10px; color: var(--grey); }
.c360-notes { width: 100%; min-height: 70px; margin-top: 14px; padding: 9px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 13px; }
.c360-services, .c360-sub-block { margin-top: 16px; font-size: 12.5px; }
.c360-svc-list { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.c360-svc { display: flex; gap: 5px; align-items: center; font-size: 13px; }
.c360-sub-block > div { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.c360-none { color: var(--text-muted); font-size: 12.5px; }
.c360-actions { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.c360-warn { background: #fffbeb; border: 1px solid #fcd34d; border-radius: 8px; padding: 9px 12px; font-size: 12.5px; margin-bottom: 14px; }
.c360-warn i { color: #b45309; margin-right: 6px; }
.c360-h { margin: 16px 0 8px; font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.c360-money { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 16px; }
.c360-money > div { font-size: 11px; text-transform: uppercase; color: var(--text-muted); letter-spacing: .04em; }
.c360-money span { display: block; font-size: 20px; font-weight: 700; color: var(--text); text-transform: none; letter-spacing: 0; }
.c360-money .c360-bad span { color: #b91c1c; }
.c360-merge-pick { display: flex; gap: 20px; margin-bottom: 14px; font-size: 13px; }

@media (max-width: 720px) {
  .c360-panel { width: 100vw; }
  .c360-grid { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------- GST board (4.3) */
.gstb-bar { height: 5px; background: #eef2f7; border-radius: 3px; margin: 6px 0 4px; overflow: hidden; }
.gstb-bar span { display: block; height: 100%; background: var(--rm-accent, var(--primary)); border-radius: 3px; }
.gstb-ladder { font-size: 12px; padding: 3px 6px; border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.gstb-legend { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.gstb-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.gstb-filed { background: #16a34a; }
.gstb-pending { background: #cbd5e1; }
.gstb-overdue { background: #dc2626; }
.gstb-na { background: #e2e8f0; border: 1px dashed #94a3b8; }
.gstb-none { background: transparent; border: 1px dashed #cbd5e1; }
.gstb-cell { text-align: center; padding: 6px 4px !important; }
table.gstb-matrix { min-width: 720px; }
table.gstb-matrix th { white-space: nowrap; font-size: 11px; }
.gstb-sticky { position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 190px; }


/* ------------------------------------------------------- Assessments (8) */
.asm-timeline { border-left: 2px solid var(--border); margin-left: 12px; padding-left: 18px; }
.asm-stage { position: relative; display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; }
.asm-dot { position: absolute; left: -29px; top: 8px; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 9px; color: var(--grey); }
.asm-done .asm-dot { border-color: #16a34a; color: #16a34a; }
.asm-open .asm-dot { border-color: var(--primary); color: var(--primary); }
.asm-hearing .asm-dot { border-color: #6d28d9; color: #6d28d9; }
.asm-stage-main { flex: 1; }
.asm-stage-title { font-weight: 600; font-size: 13px; text-transform: capitalize; }
.asm-done .asm-stage-title { color: var(--text-muted); font-weight: 500; }
.asm-stage-actions { display: flex; gap: 4px; }
.asm-history { font-size: 12.5px; color: var(--text-muted); padding-left: 18px; }

/* --------------------------------------------------------- Reminders (6) */
.rem-nocontact td { opacity: .6; }
.rem-inactive td { opacity: .55; }
.rem-preview-body { border: 1px solid var(--border); border-radius: 8px; padding: 14px; font-size: 13.5px; background: #fff; }
.rem-field { cursor: pointer; background: #f1f5f9; padding: 1px 5px; border-radius: 4px; font-size: 11.5px; }
.rem-field:hover { background: #e2e8f0; }

/* ------------------------------------------------------------- Notes (7) */
.nv-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text-muted); padding: 4px 4px 10px; }
.nv-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; }
.nv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.nv-card { border-radius: 10px; padding: 12px 14px; cursor: pointer; box-shadow: var(--shadow); min-height: 110px; display: flex; flex-direction: column; gap: 6px; }
.nv-card.nv-done { opacity: .55; }
.nv-title { font-weight: 600; font-size: 14px; }
.nv-body { font-size: 12.5px; white-space: pre-wrap; flex: 1; }
.nv-meta { font-size: 11px; color: rgba(0,0,0,.55); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.nv-band { background: #b91c1c; color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 4px; }
.nv-date { font-size: 11.5px; color: rgba(0,0,0,.6); }
.nv-review { font-size: 11.5px; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }

/* -------------------------------------------------------------- DSC register */
.badge.dsc-orange { background: #ffedd5; color: #c2410c; }
.dsc-cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.dsc-month { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: #fff; }
.dsc-month-head { font-weight: 600; display: flex; justify-content: space-between; margin-bottom: 6px; }
.dsc-month-head span { color: var(--text-muted); font-weight: 500; }
.dsc-cal-item { font-size: 12.5px; padding: 4px 6px; border-radius: 6px; cursor: pointer; margin: 2px 0; }
.dsc-cal-item:hover { background: #f1f5f9; }
.dsc-cal-item.badge-red { background: #fee2e2; }
.dsc-cal-item.dsc-orange { background: #ffedd5; }
.dsc-cal-item.badge-amber { background: #fef3c7; }
.dsc-out td { background: #fffbeb; }
.dsc-client-block { margin-bottom: 14px; }
.dsc-vault { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: #f8fafc; }
.dsc-vault code { font-size: 14px; letter-spacing: 1px; }
.dsc-purposes { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 4px; }

/* ---------------------------------------------------------------- HR (7) */
.hr-v2-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.hr-v2-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-bottom: 16px; }
.hr-v2-card { border: 1px solid var(--border); border-radius: 10px; padding: 10px; font-size: 12px; background: #fff; }
.hr-v2-day { font-weight: 600; }
.hr-v2-state { margin: 4px 0; }
.hr-v2-rest { background: #f8fafc; color: var(--text-muted); }
.hr-v2-not_marked { border-color: #cbd5e1; }
.hr-v2-pending { background: #fffbeb; border-color: #fcd34d; }
.hr-v2-approved { background: #f0fdf4; border-color: #86efac; }
.hr-v2-rejected { background: #fef2f2; border-color: #fca5a5; }
