/* CARDS */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.card-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text2);
  margin-bottom: 14px;
}
.card-title-lg {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.card-sub {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

/* STAT */
.stat-val {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
  color: var(--text);
  letter-spacing: -0.02em;
}
.stat-label { font-size: 11px; color: var(--muted); font-weight: 500; }

/* DOTS */
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 7px; flex-shrink: 0; }
.dot-green { background: var(--mint); }
.dot-yellow { background: var(--sunny); }
.dot-red { background: var(--berry); }
.dot-blue { background: var(--blue); }

/* PILL */
.pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pill-green { background: #E8F3D8; color: #5B8540; }
.pill-yellow { background: #FEF3CD; color: #8C6E18; }
.pill-red { background: #FFE0E7; color: #C85968; }
.pill-blue { background: #DFE8FA; color: #4E63A6; }
.pill-purple { background: #EBDDF1; color: #7D5A8F; }
.pill-pink { background: #FFDDE8; color: #A85A78; }
.pill-gray { background: #F0E2D0; color: #8A7060; }

/* DISPOSITION CARDS */
.disp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 14px;
}
.disp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--muted);
  border-radius: 14px;
  padding: 18px 18px 16px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s;
  box-shadow: var(--shadow-sm);
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
}
.disp-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.disp-card-skill_gap    { border-left-color: var(--pink); }
.disp-card-skill_gap:hover    { border-left-color: #FF9EC5; }
.disp-card-recurrence   { border-left-color: var(--lavender); }
.disp-card-recurrence:hover   { border-left-color: #8A85D8; }
.disp-card-client_rule  { border-left-color: var(--plum); }
.disp-card-client_rule:hover  { border-left-color: #C58ECB; }
.disp-card-verification { border-left-color: var(--blue); }
.disp-card-verification:hover { border-left-color: #7FA0E0; }
.disp-card-unclassified { border-left-color: var(--taupe); }
.disp-card-unclassified:hover { border-left-color: #B89A82; }

.disp-label {
  font-size: 11px;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  margin-bottom: 10px;
}
.disp-count {
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
  color: var(--text);
  letter-spacing: -0.02em;
}
.disp-desc { font-size: 12px; color: var(--text2); line-height: 1.55; margin-bottom: 12px; }
.disp-preview {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
  line-height: 1.7;
  border-top: 1px dashed var(--border);
  padding-top: 10px;
  margin-top: 4px;
}
.disp-preview-empty {
  color: #6B9B4A;
  font-family: var(--sans);
  font-style: italic;
  font-size: 12px;
}

/* FLAG FILTER BAR */
.flags-filter {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.flags-filter-btn {
  font-size: 12px;
  font-weight: 500;
  padding: 7px 13px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text2);
  cursor: pointer;
  font-family: var(--sans);
  transition: all 0.15s;
}
.flags-filter-btn:hover {
  border-color: var(--lavender);
  color: var(--text);
  background: var(--surface2);
}
.flags-filter-btn.active {
  background: var(--pink);
  color: var(--text);
  border-color: var(--pink);
  font-weight: 600;
}
.flags-filter-count {
  font-family: var(--mono);
  font-size: 11px;
  opacity: 0.7;
  margin-left: 4px;
}

/* TABLE */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  vertical-align: top;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--surface2); }

/* AUDIT CARD */
.audit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 16px;
  overflow: hidden;
}
.audit-header {
  padding: 14px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.audit-header:hover { background: var(--surface2); }
.audit-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.audit-meta { flex: 1; }
.audit-title { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.audit-desc { font-size: 11px; color: var(--text2); line-height: 1.5; }
.audit-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.audit-body {
  display: none;
  padding: 0 18px 18px;
  border-top: 1px solid var(--border);
}
.audit-body.open { display: block; }
.audit-section { margin-top: 14px; }
.audit-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.audit-where {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text2);
  line-height: 1.8;
  margin-bottom: 10px;
}
.audit-where span { color: var(--accent); }
.prompt-box {
  background: var(--surface3);
  border: 1px solid var(--border2);
  border-radius: 6px;
  padding: 12px 14px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text);
  line-height: 1.7;
  position: relative;
  white-space: pre-wrap;
  word-break: break-word;
}
.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--muted);
  font-size: 10px;
  font-family: var(--mono);
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s;
}
.copy-btn:hover { color: var(--text); border-color: var(--accent); }
.audit-checks { list-style: none; }
.audit-checks li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
  font-size: 12px;
  color: var(--text2);
  border-bottom: 1px solid var(--border);
}
.audit-checks li:last-child { border-bottom: none; }
.check-icon { flex-shrink: 0; margin-top: 1px; }

/* HEALTH */
.health-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.health-row:last-child { border-bottom: none; }
.health-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 3px;
  flex-shrink: 0;
}
.health-main { flex: 1; }
.health-label { font-size: 12px; font-weight: 600; margin-bottom: 2px; }
.health-detail { font-size: 11px; color: var(--text2); line-height: 1.5; }
.health-action {
  font-size: 11px;
  color: var(--accent);
  margin-top: 4px;
  font-style: italic;
}

/* WEEK ROW */
.week-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.week-row:last-child { border-bottom: none; }
.week-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.week-date { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.week-rating { display: flex; gap: 3px; }
.star { font-size: 11px; }
.week-clients { font-size: 11px; color: var(--text2); margin-bottom: 8px; }
.week-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.week-col-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 4px;
}
.week-col-text { font-size: 11px; color: var(--text2); line-height: 1.5; }
.skill-bars { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.skill-bar {
  font-size: 10px;
  font-family: var(--mono);
  color: var(--muted);
  background: var(--surface2);
  padding: 2px 7px;
  border-radius: 4px;
}
.skill-bar span { color: var(--accent); }

/* TASK ROW */
.task-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.task-row:last-child { border-bottom: none; }
.task-checkbox {
  width: 14px;
  height: 14px;
  border: 1px solid var(--border2);
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  position: relative;
}
.task-checkbox::before {
  content: '';
  position: absolute;
  top: -11px;
  left: -11px;
  right: -11px;
  bottom: -11px;
}
.task-checkbox:hover { border-color: var(--green); background: rgba(100, 180, 120, 0.08); }
.task-checkbox.done { background: var(--green); border-color: var(--green); cursor: default; }
.task-checkbox.done:hover { background: var(--green); }
.task-text { flex: 1; font-size: 12px; line-height: 1.5; }
.task-text.done { text-decoration: line-through; color: var(--muted); }
.task-meta { display: flex; gap: 6px; margin-top: 4px; align-items: center; }

/* FLAG ROW */
.flag-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.flag-row:last-child { border-bottom: none; }
.flag-id { font-family: var(--mono); font-size: 10px; color: var(--muted); margin-bottom: 3px; }
.flag-desc { font-size: 12px; color: var(--text); margin-bottom: 4px; line-height: 1.5; }
.flag-notes { font-size: 11px; color: var(--text2); font-style: italic; line-height: 1.5; }
.flag-meta { display: flex; gap: 8px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.flag-date { font-family: var(--mono); font-size: 10px; color: var(--muted); }
.btn-resolve {
  margin-top: 8px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  border: 1.5px solid #5B8540;
  background: transparent;
  color: #5B8540;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn-resolve:hover { background: #5B8540; color: #fff; }
.btn-resolve:disabled { opacity: 0.45; cursor: not-allowed; }

/* RESOLVE MODAL */
#resolveModal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
#resolveModal.open { display: flex; }
#resolveModalBox {
  background: var(--surface);
  border-radius: 10px;
  padding: 24px 28px;
  width: min(480px, 92vw);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
#resolveModalBox h3 { margin: 0 0 4px; font-size: 15px; color: var(--text); }
#resolveModalBox .modal-sub {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 14px;
  font-family: var(--mono);
}
#resolveModalNotes {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  resize: vertical;
  min-height: 72px;
  margin-bottom: 14px;
}
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.modal-btn-cancel {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text2);
  border-radius: 5px;
  cursor: pointer;
}
.modal-btn-confirm {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid #5B8540;
  background: #5B8540;
  color: #fff;
  border-radius: 5px;
  cursor: pointer;
}
.modal-btn-confirm:disabled { opacity: 0.5; cursor: not-allowed; }

/* SEARCH */
.search-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 12px;
  width: 100%;
  margin-bottom: 16px;
  outline: none;
}
.search-box:focus { border-color: var(--accent); }
.search-box::placeholder { color: var(--muted); }

/* ALERT BAR */
.alert-bar {
  background: rgba(245,166,35,0.08);
  border: 1px solid rgba(245,166,35,0.2);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--ochre);
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}
.alert-bar.red {
  background: rgba(242,78,78,0.08);
  border-color: rgba(242,78,78,0.2);
  color: var(--red);
}

/* LOADING */
.loading {
  color: var(--muted);
  font-size: 12px;
  padding: 20px 0;
  text-align: center;
  font-family: var(--mono);
}

/* DIVIDER */
.divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* ENTRY CHECKLIST */
.entry-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.entry-row:last-child { border-bottom: none; }
.entry-id { font-family: var(--mono); font-size: 10px; color: var(--accent); min-width: 80px; padding-top: 2px; }
.entry-label { font-size: 11px; font-weight: 600; color: var(--text2); margin-bottom: 2px; }
.entry-text { font-size: 12px; color: var(--text); line-height: 1.5; }
.entry-check {
  width: 14px;
  height: 14px;
  border: 1px solid var(--border2);
  border-radius: 3px;
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.entry-check.checked { background: var(--mint); border-color: var(--mint); }

/* AGING */
.aging-14 {
  border-left: 3px solid var(--pink);
  padding-left: 10px;
  margin-left: -13px;
}
.aging-30 {
  border-left: 3px solid var(--lavender);
  padding-left: 10px;
  margin-left: -13px;
  background: linear-gradient(90deg, var(--pink-soft) 0%, transparent 60%);
}

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 24px 16px;
  color: var(--text2);
}
.empty-state-icon { font-size: 36px; margin-bottom: 8px; opacity: 0.8; }
.empty-state-text { font-size: 14px; color: var(--text); font-weight: 500; margin-bottom: 4px; }
.empty-state-sub { font-size: 12px; color: var(--muted); }

/* FRESHNESS */
.freshness {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
