/* ============================================================
   GovProtocol / GDPRLedger — dashboard.css
   Dashboard tab styles — posture, deadlines, activity feed
   ============================================================ */

/* ── Tab switcher ──────────────────────────────────────────── */
.main-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 28px;
}

.main-tab {
  padding: 10px 20px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--dim);
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  text-decoration: none;
  transition: color var(--t);
}

.main-tab:hover { color: var(--ink); }

.main-tab.active { color: var(--ink); }

.main-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--green);
}

.main-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 6px;
}

.main-tab-badge-red   { background: var(--red-lt);   color: var(--red); }
.main-tab-badge-green { background: var(--green-lt); color: var(--green); }

/* ── Posture headline ──────────────────────────────────────── */
.posture-headline {
  display: flex;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.posture-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.posture-stat-value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}

.posture-stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dim);
  font-weight: 600;
}

.posture-stat-value.green { color: var(--green); }
.posture-stat-value.amber { color: var(--amber); }
.posture-stat-value.red   { color: var(--red); }
.posture-stat-value.ink   { color: var(--ink); }
.posture-stat-value.dim   { color: var(--dim); }

.posture-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  align-self: center;
}

/* ── Section headers ───────────────────────────────────────── */
.db-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.db-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

/* ── Phase posture cards ───────────────────────────────────── */
.phase-posture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

.phase-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 16px;
  transition: box-shadow var(--t), border-color var(--t);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.phase-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--green);
}

.phase-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.phase-card-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.phase-signal {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.phase-signal-green { background: var(--green-md); }
.phase-signal-amber { background: var(--amber-md); }
.phase-signal-red   { background: var(--red-md); }

.phase-card-bar {
  height: 4px;
  background: var(--mid);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 8px;
}

.phase-card-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}

.phase-card-bar-fill.green { background: var(--green-md); }
.phase-card-bar-fill.amber { background: var(--amber-md); }
.phase-card-bar-fill.red   { background: var(--red-md); }

.phase-card-meta {
  font-size: 11px;
  color: var(--dim);
  font-family: var(--font-mono);
}

/* ── Deadlines ─────────────────────────────────────────────── */
.deadline-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  overflow: hidden;
  margin-bottom: 32px;
}

.deadline-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--mid);
  font-size: 13px;
  transition: background var(--t-fast);
}

.deadline-row:last-child { border-bottom: none; }
.deadline-row:hover { background: var(--mid); }

.deadline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.deadline-dot-overdue  { background: var(--red-md); }
.deadline-dot-due      { background: var(--amber-md); }
.deadline-dot-upcoming { background: var(--green-md); }

.deadline-task {
  flex: 1;
  font-weight: 500;
  color: var(--ink);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deadline-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
  flex-shrink: 0;
}

.deadline-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 3px;
  flex-shrink: 0;
  white-space: nowrap;
}

.deadline-badge-overdue  { background: var(--red-lt);   color: var(--red); }
.deadline-badge-due      { background: var(--amber-lt); color: var(--amber); }
.deadline-badge-upcoming { background: var(--green-lt); color: var(--green); }

/* ── Activity feed ─────────────────────────────────────────── */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 32px;
}

.activity-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--mid);
  font-size: 13px;
}

.activity-row:last-child { border-bottom: none; }

.activity-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
  margin-top: 1px;
}

.activity-icon-complete   { background: var(--green-lt); color: var(--green); }
.activity-icon-upload     { background: var(--blue-lt);  color: var(--blue); }
.activity-icon-profile    { background: var(--amber-lt); color: var(--amber); }
.activity-icon-assessment { background: var(--mid);      color: var(--dim); }
.activity-icon-default    { background: var(--mid);      color: var(--dim); }

.activity-body { flex: 1; min-width: 0; }

.activity-text {
  color: var(--ink);
  line-height: 1.4;
}

.activity-text strong { font-weight: 600; }

.activity-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.activity-time {
  font-size: 11px;
  color: var(--dim);
  font-family: var(--font-mono);
}

.activity-hash {
  font-size: 10px;
  color: var(--green);
  font-family: var(--font-mono);
  opacity: 0.7;
}

/* ── Empty state ───────────────────────────────────────────── */
.empty-deadlines {
  padding: 24px;
  text-align: center;
  color: var(--dim);
  font-size: 13px;
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: var(--r-sm);
  margin-bottom: 32px;
}
