/**
 * Module Styles: Kanban Boards, Performance Dials, CRM Pipeline, Org Charts, Attendance Grid
 */

/* Kanban Board */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
  align-items: start;
}

.kanban-column {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 220px);
}

.kanban-header {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kanban-column-title {
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.kanban-count {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-elevated);
  color: var(--text-muted);
}

.kanban-cards {
  padding: var(--space-3);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}

/* Kanban Card */
.task-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.task-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.task-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.task-code {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--brand-500);
}

.task-card-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.task-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-2);
  margin-top: 2px;
}

.task-countdown {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
}

.task-countdown.overdue {
  color: var(--rose-500);
  font-weight: 700;
}

/* Performance Scorecard & Tier Dial */
.performance-gauge-card {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.gauge-circle {
  width: 110px;
  height: 110px;
  border-radius: var(--radius-full);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 6px solid var(--emerald-500);
  background: var(--emerald-bg);
  flex-shrink: 0;
}

.gauge-circle.very-good { border-color: var(--brand-500); background: rgba(37, 99, 235, 0.1); }
.gauge-circle.good { border-color: var(--sky-500); background: var(--sky-bg); }
.gauge-circle.needs-improvement { border-color: var(--amber-500); background: var(--amber-bg); }
.gauge-circle.poor { border-color: var(--rose-500); background: var(--rose-bg); }

.gauge-score {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1;
}

.gauge-tier {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Weight Breakdown Bars */
.score-breakdown-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  flex: 1;
}

.breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.breakdown-info {
  width: 160px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.breakdown-bar-bg {
  flex: 1;
  height: 8px;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.breakdown-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--brand-500);
}

.breakdown-val {
  width: 50px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* CRM Deals Pipeline Column */
.deal-card {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.deal-amount {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--emerald-500);
}

/* Overdue Risk Box */
.risk-alert-box {
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid var(--rose-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.risk-alert-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--rose-500);
  font-weight: 700;
  font-size: 0.88rem;
}

/* Roster Grid */
.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-4);
}

.roster-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
