/* ============================================================
   Clarity Value — Component primitives (CSS layer)
   Class prefix: cv-
   Maps 1:1 to common/clarity/* React primitives.
   ============================================================ */

/* ---- Reset within scope ---- */
.cv-app *, .cv-app *::before, .cv-app *::after { box-sizing: border-box; }

/* ============================================================
   App shell
   ============================================================ */
.cv-app {
  display: flex;
  min-height: 100vh;
  background: var(--cv-surface-page);
  font-family: var(--cv-font-sans);
  color: var(--cv-text-primary);
  -webkit-font-smoothing: antialiased;
}
.cv-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ============================================================
   Sidebar (gov-side, dark navy)
   ============================================================ */
.cv-sb {
  width: 64px;
  flex-shrink: 0;
  background: var(--cv-surface-sidebar);
  display: flex;
  flex-direction: column;
  color: var(--cv-text-on-dark);
  border-right: 1px solid #0E1430;
}
.cv-sb-logo {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 0.5px solid rgba(255,255,255,0.06);
}
.cv-sb-logo-mark {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, #3B82F6, #185FA5);
  display: flex; align-items: center; justify-content: center;
  font-weight: 500; font-size: 13px; color: #fff;
  letter-spacing: -0.02em;
}
.cv-sb-nav { flex: 1; overflow-y: auto; padding: 6px 0; }
.cv-sb-item {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 40px; margin: 1px 8px;
  border-radius: var(--cv-r-2);
  cursor: pointer;
  color: var(--cv-text-on-dark-muted);
  transition: background var(--cv-dur-fast), color var(--cv-dur-fast);
}
.cv-sb-item:hover { background: var(--cv-surface-sidebar-hover); color: #fff; }
.cv-sb-item.is-active { background: var(--cv-surface-sidebar-active); color: #fff; }
.cv-sb-item.is-active::before {
  content: ""; position: absolute; left: -9px; top: 8px; bottom: 8px;
  width: 2.5px; background: #3B82F6; border-radius: 0 2px 2px 0;
}
.cv-sb-item svg { width: 18px; height: 18px; }
.cv-sb-divider { height: 0.5px; background: rgba(255,255,255,0.07); margin: 6px 14px; }
.cv-sb-foot {
  padding: 8px 0;
  border-top: 0.5px solid rgba(255,255,255,0.07);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.cv-sb-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #3B82F6; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 500; font-size: 11px; cursor: pointer;
  position: relative;
}
.cv-sb-avatar::after {
  content: ""; position: absolute; bottom: 0; right: -1px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #3B6D11; border: 1.5px solid var(--cv-surface-sidebar);
}

/* ============================================================
   Page header (cv-ph)
   ============================================================ */
.cv-ph {
  background: var(--cv-surface-card);
  border-bottom: 1px solid var(--cv-line-hairline);
  padding: var(--cv-pad-page-v) var(--cv-pad-page-h) 0;
  flex-shrink: 0;
}
.cv-ph-bc {
  font-size: 11px; line-height: 1.45;
  color: var(--cv-text-tertiary);
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 7px;
}
.cv-ph-bc a { color: var(--cv-text-tertiary); text-decoration: none; cursor: pointer; }
.cv-ph-bc a:hover { color: var(--cv-brand-blue); }
.cv-ph-bc-sep { opacity: 0.4; }
.cv-ph-bc-current { color: var(--cv-text-primary); font-weight: 500; }
.cv-ph-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; padding-bottom: 14px;
}
.cv-ph-titles { min-width: 0; }
.cv-ph-title {
  font-size: 20px; font-weight: 500; line-height: 1.2; letter-spacing: -0.01em;
  color: var(--cv-text-primary);
  display: flex; align-items: center; gap: 10px;
}
.cv-ph-title-meta {
  font-size: 11px; font-weight: 500; line-height: 1.45;
  color: var(--cv-text-tertiary);
  background: var(--cv-surface-page);
  padding: 3px 8px;
  border-radius: var(--cv-r-pill);
  border: 0.5px solid var(--cv-line-strong);
}
.cv-ph-sub { font-size: 12px; color: var(--cv-text-tertiary); margin-top: 3px; }
.cv-ph-actions { display: flex; align-items: center; gap: 8px; }
.cv-ph-divider { width: 0.5px; height: 20px; background: var(--cv-line-strong); margin: 0 4px; }

/* ============================================================
   Action panel (cv-ap)
   ============================================================ */
.cv-ap {
  background: var(--cv-surface-card);
  border-bottom: 1px solid var(--cv-line-hairline);
  padding: 10px var(--cv-pad-page-h);
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.cv-ap-left { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; flex-wrap: wrap; }
.cv-ap-right { display: flex; align-items: center; gap: 8px; }

/* ============================================================
   Content area
   ============================================================ */
.cv-cn { flex: 1; overflow-y: auto; padding: 18px var(--cv-pad-page-h) 24px; position: relative; }
