/* Compliance module: tracker heat-map, calendar grid, rule chips. Uses core design tokens. */

/* ---------- tracker heat-map ---------- */
.hm-wrap { overflow-x: auto; }
.hm-table { border-collapse: separate; border-spacing: 4px; width: max-content; min-width: 100%; }
.hm-table th { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: .35rem .4rem; white-space: nowrap; text-align: center; }
.hm-table th.hm-client, .hm-table td.hm-client { text-align: left; position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 200px; max-width: 260px; }
.hm-table td.hm-client { font-weight: 560; font-size: .88rem; padding: .25rem .5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-table td.hm-client small { display: block; color: var(--muted); font-weight: 500; font-size: .72rem; }
.hm-cell { width: 74px; height: 40px; border-radius: 9px; border: 1px solid transparent; display: grid; place-items: center; font-size: .68rem; font-weight: 650;
  cursor: pointer; transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast), outline-color var(--dur-fast); animation: pop-in var(--dur) var(--ease) both; line-height: 1.1; text-align: center; padding: 0 .2rem; }
.hm-cell:hover { transform: translateY(-1px) scale(1.04); box-shadow: var(--shadow); }
.hm-cell:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.hm-cell small { display: block; font-weight: 500; font-size: .62rem; opacity: .85; }
.hm-empty { width: 74px; height: 40px; border-radius: 9px; background: repeating-linear-gradient(45deg, transparent 0 6px, var(--surface-hover) 6px 8px); opacity: .6; }
.hm-filed { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.hm-filed_late { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.hm-overdue { background: var(--bad); color: #fff; }
.hm-due_soon { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.hm-pending { background: var(--surface-hover); color: var(--text-2); border-color: var(--border); }
.hm-in_progress { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.hm-not_applicable, .hm-waived { background: transparent; color: var(--faint); border: 1px dashed var(--border-strong); }
.hm-cell.selected { outline: 3px solid var(--brand); outline-offset: 1px; }
.hm-legend { display: flex; flex-wrap: wrap; gap: .75rem; font-size: .78rem; color: var(--muted); }
.hm-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.hm-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid var(--border-strong); }
.bulk-bar { position: sticky; bottom: 1rem; z-index: 20; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding: .7rem 1rem; border-radius: var(--radius);
  background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); animation: toast-in 320ms var(--ease-spring); margin-top: 1rem; }
.bulk-bar .btn-soft { background: transparent; color: var(--bg); border-color: color-mix(in srgb, var(--bg) 35%, transparent); }

/* ---------- calendar ---------- */
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.cal-head div { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-day { min-height: 116px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: .4rem .45rem; display: flex; flex-direction: column; gap: 3px;
  cursor: pointer; transition: border-color var(--dur-fast), box-shadow var(--dur-fast), transform var(--dur-fast) var(--ease); animation: rise var(--dur) var(--ease) both; min-width: 0; }
.cal-day:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.cal-day.other { background: var(--surface-2); opacity: .6; }
.cal-day.today { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.cal-day .num { font-size: .78rem; font-weight: 650; color: var(--text-2); display: flex; justify-content: space-between; }
.cal-day.today .num b { background: var(--brand); color: var(--brand-ink); border-radius: 999px; padding: 0 .45rem; }
.cal-chip { display: block; font-size: .7rem; line-height: 1.25; padding: .14rem .4rem; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 560; }
.cal-chip.t-compliance { background: var(--violet-soft); color: var(--violet); }
.cal-chip.t-task { background: var(--info-soft); color: var(--info); }
.cal-chip.t-notice { background: var(--bad-soft); color: var(--bad); }
.cal-chip.t-event { background: var(--brand-soft); color: var(--brand); }
.cal-chip.done { text-decoration: line-through; opacity: .55; }
.cal-more { font-size: .68rem; color: var(--muted); font-weight: 600; padding-left: .3rem; }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(130px, 1fr)); gap: 8px; overflow-x: auto; }
.cal-week .cal-day { min-height: 320px; }
.agenda-date { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; padding: .9rem 0 .3rem; border-bottom: 1px solid var(--border); }
.agenda-date.today { color: var(--brand); }
.type-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.type-dot.t-compliance { background: var(--violet); } .type-dot.t-task { background: var(--info); } .type-dot.t-notice { background: var(--bad); } .type-dot.t-event { background: var(--brand); }
.cal-legend { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .78rem; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: .35rem; }

/* ---------- misc ---------- */
.verify-note { font-size: .74rem; color: var(--warn); display: inline-flex; align-items: center; gap: .3rem; }
.rule-cond { display: inline-flex; flex-wrap: wrap; gap: .25rem; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .25rem 1rem; }
.check-list { max-height: 220px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: .4rem .6rem; }

@media (max-width: 767.98px) {
  .cal-grid, .cal-head { gap: 3px; }
  .cal-grid .cal-day { min-height: 64px; padding: .25rem; }
  .cal-grid .cal-day .cal-chip { font-size: 0; padding: 0; height: 6px; border-radius: 3px; }
  .cal-day .cal-more { font-size: .6rem; }
  .cal-grid .cal-day .num span { display: none; }
  .cal-grid .cal-chip.t-compliance { background: var(--violet); } .cal-grid .cal-chip.t-task { background: var(--info); }
  .cal-grid .cal-chip.t-notice { background: var(--bad); } .cal-grid .cal-chip.t-event { background: var(--brand); }
  .hm-table th.hm-client, .hm-table td.hm-client { min-width: 130px; max-width: 150px; }
  .hm-cell, .hm-empty { width: 58px; height: 36px; }
}
