/* ==========================================================================
   HNV Command Center â€” v1.0.10.3
   Layout: hero (full-width) â†’ .hnv-layout (sidebar | workspace)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens & root reset
   -------------------------------------------------------------------------- */
.hnv-command-center {
  --hnv-bg: #f0f4fa;
  --hnv-panel: #ffffff;
  --hnv-ink: #0d1f35;
  --hnv-muted: #5a6e85;
  --hnv-line: #d6e2f0;
  --hnv-blue: #1056c8;
  --hnv-blue-light: #3b82f6;
  --hnv-navy: #0a2240;
  --hnv-navy-mid: #0e3060;
  --hnv-cyan: #0ea5e9;
  --hnv-green: #0f7a56;
  --hnv-yellow: #a16207;
  --hnv-red: #b91c1c;
  --hnv-grey: #64748b;
  --hnv-shadow-sm: 0 2px 8px rgba(10, 34, 64, 0.08);
  --hnv-shadow: 0 8px 32px rgba(10, 34, 64, 0.12);
  --hnv-shadow-hero: 0 12px 40px rgba(7, 20, 45, 0.24);
  --hnv-radius: 12px;
  --hnv-radius-hero: 20px;
  --hnv-sidebar-w: 270px;
  color: var(--hnv-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  isolation: isolate;
  margin: 0 auto;
  max-width: 1560px;
  min-width: 0;
  overflow-x: hidden;
  padding: 0 0 32px;
  position: relative;
  width: 100%;
  z-index: 1;
}

.hnv-command-center,
.hnv-command-center *,
.hnv-command-center *::before,
.hnv-command-center *::after {
  box-sizing: border-box;
}

/* Prevent page-level horizontal scroll caused by dashboard */
html,
body:has(.hnv-command-center),
body:has(.hnv-command-center-fullwrap) {
  overflow-x: hidden;
}

body.hnv-command-center-page {
  overflow-x: hidden;
}

/* Allow dashboard to use full content width by overriding theme container limits */
body:has(.hnv-command-center) .wp-site-blocks,
body:has(.hnv-command-center) main,
body:has(.hnv-command-center) .entry-content,
body:has(.hnv-command-center) .wp-block-post-content,
body:has(.hnv-command-center) .entry-content-wrap,
body:has(.hnv-command-center) .container,
body:has(.hnv-command-center) .site-content,
body:has(.hnv-command-center) .content-area,
body:has(.hnv-command-center) .content-container,
body:has(.hnv-command-center) .grid-container,
body:has(.hnv-command-center) .ast-container,
body:has(.hnv-command-center-fullwrap) .wp-site-blocks,
body:has(.hnv-command-center-fullwrap) main,
body:has(.hnv-command-center-fullwrap) .entry-content,
body:has(.hnv-command-center-fullwrap) .wp-block-post-content,
body:has(.hnv-command-center-fullwrap) .entry-content-wrap,
body:has(.hnv-command-center-fullwrap) .container,
body:has(.hnv-command-center-fullwrap) .site-content,
body:has(.hnv-command-center-fullwrap) .content-area,
body:has(.hnv-command-center-fullwrap) .content-container,
body:has(.hnv-command-center-fullwrap) .grid-container,
body:has(.hnv-command-center-fullwrap) .ast-container {
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  width: 100% !important;
}

body.hnv-command-center-page .wp-site-blocks,
body.hnv-command-center-page .site,
body.hnv-command-center-page main,
body.hnv-command-center-page article,
body.hnv-command-center-page .entry-content,
body.hnv-command-center-page .wp-block-post-content,
body.hnv-command-center-page .entry-content-wrap,
body.hnv-command-center-page .container,
body.hnv-command-center-page .site-content,
body.hnv-command-center-page .content-area,
body.hnv-command-center-page .content-container,
body.hnv-command-center-page .grid-container,
body.hnv-command-center-page .is-layout-constrained,
body.hnv-command-center-page .is-layout-flow,
body.hnv-command-center-page .wp-block-group,
body.hnv-command-center-page .wp-block-group__inner-container,
body.hnv-command-center-page .alignwide,
body.hnv-command-center-page .alignfull,
body.hnv-command-center-page .ast-container {
  max-width: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  width: 100% !important;
}

body.hnv-command-center-page .entry-content,
body.hnv-command-center-page .wp-block-post-content,
body.hnv-command-center-page .is-layout-constrained,
body.hnv-command-center-page .wp-block-group,
body.hnv-command-center-page .wp-block-group__inner-container {
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
}

body.hnv-command-center-page .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: none !important;
}

/* Reduce gap below WordPress theme header on dashboard page */
body:has(.hnv-command-center) .wp-block-post-content,
body:has(.hnv-command-center) .entry-content,
body:has(.hnv-command-center-fullwrap) .wp-block-post-content,
body:has(.hnv-command-center-fullwrap) .entry-content {
  margin-top: 0 !important;
}

body.hnv-command-center-page .entry-title,
body.hnv-command-center-page .wp-block-post-title,
body.hnv-command-center-page .entry-header,
body.hnv-command-center-page .page-header,
body.hnv-command-center-page h1.wp-block-post-title {
  display: none !important;
}

body.hnv-command-center-page .site-main,
body.hnv-command-center-page main,
body.hnv-command-center-page .content-area,
body.hnv-command-center-page .site-content,
body.hnv-command-center-page .wp-site-blocks,
body.hnv-command-center-page .is-layout-constrained,
body.hnv-command-center-page .is-layout-flow,
body.hnv-command-center-page .wp-block-post-content,
body.hnv-command-center-page .entry-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body.hnv-command-center-page .wp-block-spacer:has(+ .hnv-command-center-fullwrap),
body.hnv-command-center-page .wp-block-group:empty,
body.hnv-command-center-page .wp-block-post-content > .wp-block-spacer:first-child,
body.hnv-command-center-page .entry-content > .wp-block-spacer:first-child {
  display: none !important;
}

/* Fullwrap outer container */
.hnv-command-center-fullwrap {
  width: calc(100vw - var(--hnv-scrollbar-compensation, 0px));
  max-width: none;
  box-sizing: border-box;
  margin-left: 50%;
  overflow-x: hidden;
  overflow-x: clip;
  padding: 0 24px 40px;
  transform: translateX(-50%);
}

body.hnv-command-center-page .hnv-command-center-fullwrap.alignfull {
  margin-left: 50% !important;
  margin-right: 0 !important;
  max-width: none !important;
  width: calc(100vw - var(--hnv-scrollbar-compensation, 0px)) !important;
}

/* Hide utility */
[hidden] {
  display: none !important;
}
.hnv-dashboard-shell[hidden] {
  display: none !important;
}
.hnv-access-gate[hidden] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   2. Login / test notices
   -------------------------------------------------------------------------- */
.hnv-command-center-login-notice,
.hnv-command-center-test {
  align-items: center;
  background: linear-gradient(135deg, #09213f 0%, #123f7c 60%, #1e3a8a 100%);
  border-radius: var(--hnv-radius);
  color: #fff;
  display: flex;
  font: 700 16px/1.5 Inter, ui-sans-serif, system-ui, sans-serif;
  justify-content: center;
  min-height: 120px;
  padding: 32px 24px;
  width: 100%;
}

/* --------------------------------------------------------------------------
   3. Access gate
   -------------------------------------------------------------------------- */
.hnv-access-gate {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(8, 34, 70, 0.94) 0%, rgba(34, 43, 82, 0.84) 46%, rgba(153, 31, 36, 0.84) 100%),
    radial-gradient(circle at 72% 36%, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(135deg, #071b3a 0%, #0f3d75 55%, #8d1d27 100%);
  border-radius: var(--hnv-radius);
  display: flex;
  justify-content: center;
  margin-top: 0;
  min-height: 430px;
  padding: 40px 20px;
  width: 100%;
}

.hnv-access-card {
  background: var(--hnv-panel);
  border-radius: var(--hnv-radius);
  box-shadow: var(--hnv-shadow-hero);
  margin: 0 auto;
  max-width: 560px;
  padding: 36px 32px;
  width: min(560px, 100%);
}

.hnv-access-card h2 {
  font-size: 22px;
  letter-spacing: 0;
  margin: 0 0 6px;
}

.hnv-access-card p {
  color: var(--hnv-muted);
  margin: 0;
}

.hnv-access-card label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin: 22px 0 8px;
}

.hnv-access-card input {
  border: 1.5px solid var(--hnv-line);
  border-radius: 8px;
  font: inherit;
  min-height: 44px;
  padding: 10px 14px;
  transition: border-color 0.15s;
  width: 100%;
}

.hnv-access-card input:focus {
  border-color: var(--hnv-blue);
  outline: none;
}

.hnv-access-card button {
  align-items: center;
  background: var(--hnv-blue);
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  display: flex;
  font: 700 14px/1 Inter, sans-serif;
  justify-content: center;
  margin-top: 16px;
  min-height: 44px;
  padding: 12px 16px;
  transition: background 0.15s;
  width: 100%;
}

.hnv-access-card button:hover {
  background: var(--hnv-navy-mid);
}

.hnv-access-card small {
  color: var(--hnv-muted);
  display: block;
  font-size: 11px;
  margin-top: 12px;
  text-align: center;
}

.hnv-form-error {
  color: var(--hnv-red);
  font-size: 13px;
  min-height: 20px;
  margin-top: 8px;
}

/* --------------------------------------------------------------------------
   4. Dashboard shell â€” flex-column so hero is full-width above layout
   -------------------------------------------------------------------------- */
.hnv-dashboard-shell {
  background: var(--hnv-bg);
  border: 1px solid var(--hnv-line);
  border-radius: var(--hnv-radius);
  display: flex;
  flex-direction: column;
  margin-top: 0;
  min-height: 780px;
  overflow: hidden;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

/* --------------------------------------------------------------------------
   5. HERO â€” full width, at top of dashboard shell
   -------------------------------------------------------------------------- */
.hnv-hero,
.hnv-cc-hero {
  background: var(--hnv-hero-bg-image, linear-gradient(135deg, #061528 0%, #0d3464 45%, #1248a0 80%, #163e7c 100%));
  background-position: center;
  background-size: cover;
  border-radius: 0;           /* shell already has border-radius */
  box-shadow: none;
  color: #fff;
  display: block;
  flex: 0 0 auto;             /* don't grow, don't shrink */
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  position: relative;
  margin-top: 0;
  width: 100%;
}

/* Dark overlay when banner image is set */
.hnv-hero.has-banner-image::before,
.hnv-cc-hero.has-banner-image::before {
  background: rgba(3, 14, 32, 0.60);
  content: "";
  inset: 0;
  position: absolute;
}

.hnv-hero p,
.hnv-hero h1 {
  color: inherit;
  margin: 0;
}

.hnv-cc-hero-inner {
  align-items: center;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  min-width: 0;
  padding: 28px 32px;
  position: relative;
  width: 100%;
  z-index: 1;
}

.hnv-hero-brand,
.hnv-cc-hero-brand {
  align-items: center;
  display: flex;
  gap: 16px;
  min-width: 0;
}

/* Logo box inside hero */
.hnv-hero-logo,
.hnv-cc-hero-logo {
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 14px;
  color: var(--hnv-navy);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 18px;
  font-weight: 900;
  height: 68px;
  justify-content: center;
  overflow: hidden;
  width: 80px;
}

.hnv-cc-hero-logo-img,
.hnv-cc-brand-logo-img {
  display: block;
  height: 100%;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  width: 100%;
}

.hnv-cc-hero-logo-text,
.hnv-cc-brand-logo-text {
  align-items: center;
  display: inline-flex;
  height: 100%;
  justify-content: center;
  width: 100%;
}

.hnv-cc-hero-content {
  min-width: 0;
}

.hnv-eyebrow {
  color: rgba(147, 197, 253, 0.9);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 6px;
  text-transform: uppercase;
}

/* Override eyebrow color outside hero */
.hnv-topbar .hnv-eyebrow,
.hnv-section .hnv-eyebrow {
  color: var(--hnv-blue);
}

.hnv-cc-hero-title {
  font-size: clamp(20px, 2.4vw, 34px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
}

.hnv-cc-hero-subtitle {
  color: rgba(219, 234, 254, 0.85);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 6px;
}

.hnv-hero-copy {
  display: grid;
  gap: 10px;
  justify-items: end;
  max-width: 480px;
  min-width: 0;
}

.hnv-hero-copy > p {
  color: rgba(219, 234, 254, 0.75);
  font-size: 13px;
  text-align: right;
}

.hnv-hero-badges,
.hnv-cc-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

/* Hero-specific badge style (glass pill) */
.hnv-cc-badge,
.hnv-hero .hnv-time-pill {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
  color: #fff !important;
}

/* --------------------------------------------------------------------------
   6. Layout â€” the 2-column grid (sidebar | workspace)
   -------------------------------------------------------------------------- */
.hnv-layout {
  display: grid;
  flex: 1 1 auto;
  gap: 0;
  grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  max-width: 100%;
  min-height: 0;
  min-width: 0;
  width: 100%;
}

/* --------------------------------------------------------------------------
   7. Sidebar
   -------------------------------------------------------------------------- */
.hnv-sidebar {
  background: var(--hnv-navy);
  color: #fff;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
  padding: 20px 14px;
  width: 100%;
}

.hnv-brand {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}

.hnv-brand-mark {
  align-items: center;
  background: #fff;
  border-radius: 8px;
  color: var(--hnv-navy);
  display: inline-flex;
  flex: 0 0 auto;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  overflow: hidden;
  width: 50px;
}

.hnv-brand strong {
  display: block;
  font-size: 13px;
  line-height: 1.3;
}

.hnv-brand small {
  color: #7ba8d4;
  display: block;
  font-size: 11px;
  margin-top: 2px;
}

/* Sidebar nav groups */
.hnv-module-nav {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 2px;
}

.hnv-nav-group {
  margin-bottom: 10px;
}

.hnv-nav-group-label {
  color: #5a8ab8;
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.10em;
  margin: 0 0 4px 4px;
  text-transform: uppercase;
}

.hnv-nav-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: #b8d4ef;
  cursor: pointer;
  display: flex;
  font: inherit;
  font-size: 13px;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  text-align: left;
  transition: background 0.12s, color 0.12s;
  width: 100%;
}

.hnv-nav-button .hnv-nav-icon {
  flex: 0 0 auto;
  font-size: 15px;
  line-height: 1;
  width: 18px;
  text-align: center;
}

.hnv-nav-button:hover {
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
}

.hnv-nav-button.is-active {
  background: rgba(255, 255, 255, 0.96);
  color: var(--hnv-navy);
  font-weight: 700;
}

.hnv-cc-brand-logo {
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   8. Workspace (topbar + content + footer)
   -------------------------------------------------------------------------- */
.hnv-workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  width: 100%;
}

/* Topbar */
.hnv-topbar {
  align-items: center;
  background: var(--hnv-panel);
  border-bottom: 1px solid var(--hnv-line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  min-width: 0;
  padding: 14px 22px;
  width: 100%;
}

.hnv-topbar-breadcrumb {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hnv-topbar-breadcrumb strong {
  color: var(--hnv-ink);
  font-size: 15px;
  font-weight: 800;
}

.hnv-topbar-breadcrumb .hnv-eyebrow {
  font-size: 10px;
  margin: 0;
}

.hnv-topbar-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

/* Status / time pills */
.hnv-status-pill,
.hnv-time-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  white-space: nowrap;
}

.hnv-time-pill {
  background: #edf3fb;
  color: #35506f;
}

.hnv-status-ok    { background: #dcfce7; color: #166534; }
.hnv-status-warning { background: #fef9c3; color: #854d0e; }
.hnv-status-error  { background: #fee2e2; color: #991b1b; }
.hnv-status-unknown { background: #f1f5f9; color: #475569; }

/* Buttons */
.hnv-primary-button,
.hnv-ghost-button {
  align-items: center;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  min-height: 36px;
  padding: 8px 14px;
  transition: background 0.12s;
}

.hnv-primary-button {
  background: var(--hnv-blue);
  color: #fff;
}

.hnv-primary-button:hover {
  background: var(--hnv-navy-mid);
}

.hnv-ghost-button {
  background: #e8f0fe;
  color: var(--hnv-navy);
}

.hnv-ghost-button:hover {
  background: #d1e3fc;
}

/* Content area */
.hnv-content {
  display: grid;
  flex: 1;
  gap: 18px;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  padding: 22px 24px;
  width: 100%;
}

/* Footer */
.hnv-footer {
  background: var(--hnv-panel);
  border-top: 1px solid var(--hnv-line);
  color: var(--hnv-muted);
  font-size: 11px;
  padding: 12px 24px;
}

/* --------------------------------------------------------------------------
   9. Badges â€” data-source status labels
   -------------------------------------------------------------------------- */
.hnv-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  white-space: nowrap;
}

/* Real / active / ok / running / success */
.hnv-badge.ok,
.hnv-badge.active,
.hnv-badge.success,
.hnv-badge.running,
.hnv-badge.real {
  background: #dcfce7;
  color: #15803d;
}

/* Mock / dá»¯ liá»‡u máº«u */
.hnv-badge.mock,
.hnv-badge.mock_until_report_api,
.hnv-badge.du_lieu_mau {
  background: #fef3c7;
  color: #92400e;
}

/* Warning / paused */
.hnv-badge.warning,
.hnv-badge.paused {
  background: #fef9c3;
  color: #854d0e;
}

/* Error / critical */
.hnv-badge.error,
.hnv-badge.critical {
  background: #fee2e2;
  color: #991b1b;
}

/* Not configured / chÆ°a cáº¥u hÃ¬nh / chÆ°a kÃ­ch hoáº¡t */
.hnv-badge.not_configured,
.hnv-badge.chua_cau_hinh,
.hnv-badge.chua_kich_hoat,
.hnv-badge.unknown,
.hnv-badge.khong_ap_dung {
  background: #f1f5f9;
  color: #475569;
}

/* Coming soon / sáº¯p triá»ƒn khai */
.hnv-badge.sap_trien_khai,
.hnv-badge.coming_soon,
.hnv-badge.sap_mo_rong {
  background: #ede9fe;
  color: #5b21b6;
}

/* Info */
.hnv-badge.info,
.hnv-badge.queued,
.hnv-badge.rendering,
.hnv-badge.pending,
.hnv-badge.scheduled,
.hnv-badge.done {
  background: #e0f2fe;
  color: #0369a1;
}

/* --------------------------------------------------------------------------
   10. Source notice banner (top of each module)
   -------------------------------------------------------------------------- */
.hnv-source-notice {
  align-items: center;
  background: #fffbeb;
  border: 1.5px solid #fcd34d;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 11px 14px;
}

.hnv-source-notice.is-real {
  background: #f0fdf4;
  border-color: #86efac;
}

.hnv-source-notice strong,
.hnv-source-notice span {
  font-size: 13px;
  overflow-wrap: anywhere;
}

/* --------------------------------------------------------------------------
   11. Section layout
   -------------------------------------------------------------------------- */
.hnv-section {
  display: grid;
  gap: 16px;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  width: 100%;
}

.hnv-section-header {
  align-items: flex-end;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.hnv-section-header h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
}

/* --------------------------------------------------------------------------
   12. Grid helpers
   -------------------------------------------------------------------------- */
.hnv-grid {
  display: grid;
  gap: 14px;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.hnv-grid.kpis   { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.hnv-grid.two    { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.hnv-grid.three  { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* --------------------------------------------------------------------------
   13. Cards â€” KPI, panel, link
   -------------------------------------------------------------------------- */
.hnv-kpi-card,
.hnv-panel,
.hnv-link-card {
  background: var(--hnv-panel);
  border: 1px solid var(--hnv-line);
  border-radius: var(--hnv-radius);
  box-shadow: var(--hnv-shadow-sm);
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 16px 18px;
  width: 100%;
}

.hnv-kpi-card p {
  color: var(--hnv-muted);
  font-size: 12px;
  margin: 0;
}

.hnv-kpi-value {
  color: var(--hnv-navy);
  display: block;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.15;
  margin-top: 8px;
}

.hnv-status-value {
  font-size: 14px;
  font-weight: 700;
}

.hnv-panel h3 {
  font-size: 14px;
  font-weight: 800;
  margin: 0 0 12px;
}

/* --------------------------------------------------------------------------
   14. Table
   -------------------------------------------------------------------------- */
.hnv-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.hnv-table {
  border-collapse: collapse;
  min-width: 600px;
  width: 100%;
}

.hnv-table th,
.hnv-table td {
  border-bottom: 1px solid var(--hnv-line);
  font-size: 13px;
  overflow-wrap: anywhere;
  padding: 10px 10px;
  text-align: left;
  vertical-align: top;
  word-break: break-word;
}

.hnv-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.hnv-table tbody tr:hover td {
  background: #f8fafd;
}

/* --------------------------------------------------------------------------
   15. Lists, alerts, health items
   -------------------------------------------------------------------------- */
.hnv-actions-list,
.hnv-alert-list,
.hnv-health-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.hnv-actions-list li,
.hnv-alert-item,
.hnv-health-item {
  align-items: flex-start;
  background: #f8fbff;
  border: 1px solid var(--hnv-line);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  list-style: none;
  padding: 12px 14px;
}

/* --------------------------------------------------------------------------
   16. Bar chart
   -------------------------------------------------------------------------- */
.hnv-chart {
  display: grid;
  gap: 10px;
}

.hnv-bar-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 150px) minmax(0, 1fr) 38px;
  min-width: 0;
}

.hnv-bar-row strong {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hnv-bar-track {
  background: #e2e8f0;
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}

.hnv-bar-fill {
  background: linear-gradient(90deg, var(--hnv-blue), var(--hnv-cyan));
  border-radius: inherit;
  height: 100%;
  transition: width 0.4s ease;
}

/* --------------------------------------------------------------------------
   17. Revenue form
   -------------------------------------------------------------------------- */
.hnv-revenue-form {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  max-width: 100%;
  min-width: 0;
}

.hnv-revenue-form input,
.hnv-revenue-form select {
  border: 1px solid var(--hnv-line);
  border-radius: 7px;
  font: inherit;
  font-size: 13px;
  min-height: 40px;
  padding: 8px 12px;
  width: 100%;
}

/* --------------------------------------------------------------------------
   18. Control Links grid
   -------------------------------------------------------------------------- */
.hnv-link-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.hnv-link-card {
  color: var(--hnv-navy);
  display: grid;
  gap: 6px;
  min-height: 80px;
  overflow-wrap: anywhere;
  padding: 14px 16px;
  text-decoration: none;
  transition: box-shadow 0.14s, transform 0.10s;
  word-break: break-word;
}

.hnv-link-card:hover {
  box-shadow: var(--hnv-shadow);
  transform: translateY(-1px);
}

.hnv-link-card strong {
  font-size: 13px;
}

.hnv-link-card small {
  color: var(--hnv-muted);
  font-size: 11px;
}

.hnv-link-card.is-disabled {
  color: var(--hnv-muted);
  cursor: not-allowed;
  opacity: 0.65;
}

.hnv-link-card.is-disabled:hover {
  box-shadow: var(--hnv-shadow-sm);
  transform: none;
}

/* --------------------------------------------------------------------------
   19. Data Quality score ring
   -------------------------------------------------------------------------- */
.hnv-score {
  align-items: center;
  display: flex;
  gap: 16px;
}

.hnv-score-ring {
  align-items: center;
  background: conic-gradient(var(--hnv-blue) var(--score, 0%), #e2e8f0 0);
  border-radius: 50%;
  display: flex;
  font-size: 22px;
  font-weight: 900;
  height: 110px;
  justify-content: center;
  position: relative;
  width: 110px;
}

.hnv-score-ring::after {
  background: #fff;
  border-radius: 50%;
  content: "";
  height: 78px;
  position: absolute;
  width: 78px;
}

.hnv-score-ring span {
  position: relative;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   20. Responsive â€” 1100px (sidebar narrows)
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  :root { --hnv-sidebar-w: 230px; }

  .hnv-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }
}

/* --------------------------------------------------------------------------
   21. Responsive â€” 900px (single column, sidebar becomes horizontal)
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .hnv-command-center {
    padding: 0 0 16px;
    width: 100%;
  }

  .hnv-layout {
    grid-template-columns: 1fr;
  }

  .hnv-sidebar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 14px;
  }

  .hnv-brand {
    margin-bottom: 14px;
    padding-bottom: 14px;
  }

  .hnv-module-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .hnv-nav-group {
    margin-bottom: 4px;
  }

  .hnv-nav-group-label {
    display: none;
  }

  .hnv-nav-button {
    flex: 0 1 auto;
    min-width: 0;
    padding: 7px 12px;
    width: auto;
  }

  .hnv-revenue-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --------------------------------------------------------------------------
   22. Responsive â€” 720px (hero stacks, topbar stacks)
   -------------------------------------------------------------------------- */
@media (max-width: 720px) {
  .hnv-cc-hero-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px 20px;
  }

  .hnv-hero-copy {
    justify-items: flex-start;
    max-width: 100%;
  }

  .hnv-hero-copy > p {
    text-align: left;
  }

  .hnv-hero-badges,
  .hnv-cc-hero-badges {
    justify-content: flex-start;
  }

  .hnv-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hnv-section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .hnv-content {
    padding: 16px;
  }

  .hnv-grid.kpis,
  .hnv-grid.three,
  .hnv-grid.two,
  .hnv-link-grid,
  .hnv-revenue-form {
    grid-template-columns: 1fr;
  }

  .hnv-bar-row {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   23. Responsive â€” 520px (very small)
   -------------------------------------------------------------------------- */
@media (max-width: 520px) {
  .hnv-command-center {
    width: 100%;
  }

  .hnv-access-gate {
    min-height: 380px;
    padding: 28px 12px;
  }

  .hnv-access-card {
    padding: 24px 18px;
  }

  .hnv-cc-hero-inner {
    padding: 18px 16px;
  }

  .hnv-hero-logo,
  .hnv-cc-hero-logo {
    height: 54px;
    width: 64px;
  }

  .hnv-cc-hero-title {
    font-size: 20px;
  }

  .hnv-topbar {
    padding: 12px 14px;
  }

  .hnv-content {
    padding: 12px;
  }

  .hnv-kpi-value {
    font-size: 22px;
  }

  .hnv-module-nav {
    gap: 4px;
  }

  .hnv-nav-button {
    font-size: 11px;
    padding: 6px 8px;
  }

  .hnv-grid.kpis,
  .hnv-grid.three,
  .hnv-grid.two,
  .hnv-link-grid,
  .hnv-revenue-form {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   25. Final readability/layout override - keep after legacy responsive rules
   -------------------------------------------------------------------------- */
@media (min-width: 901px) {
  .hnv-command-center {
    --hnv-font-size-base: 15px;
    --hnv-card-padding: 20px;
    --hnv-sidebar-w: 288px;
    --hnv-radius: 16px;
    font-size: var(--hnv-font-size-base);
    line-height: 1.55;
    max-width: none;
    min-width: 0;
    overflow-x: hidden;
  }

  .hnv-layout {
    column-gap: 20px;
    grid-template-columns: var(--hnv-sidebar-w) minmax(0, 1fr);
    min-width: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .hnv-sidebar {
    padding: 24px 18px;
    width: var(--hnv-sidebar-w);
  }

  .hnv-workspace,
  .hnv-content,
  .hnv-section,
  .hnv-panel,
  .hnv-kpi-card,
  .hnv-link-card,
  .hnv-topbar {
    min-width: 0;
    max-width: 100%;
  }

  .hnv-brand {
    gap: 14px;
    margin-bottom: 28px;
    padding-bottom: 22px;
  }

  .hnv-brand strong {
    font-size: 15px;
    line-height: 1.35;
  }

  .hnv-brand small {
    font-size: 12.5px;
  }

  .hnv-module-nav {
    gap: 8px;
  }

  .hnv-nav-group {
    margin-bottom: 18px;
  }

  .hnv-nav-group-label {
    color: #93c5fd;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin: 0 0 8px 6px;
  }

  .hnv-nav-button {
    border-radius: 10px;
    font-size: 15px;
    gap: 11px;
    min-height: 44px;
    padding: 10px 13px;
    min-width: 0;
  }

  .hnv-nav-button .hnv-nav-icon {
    font-size: 17px;
    width: 24px;
  }

  .hnv-nav-button.is-active {
    box-shadow: inset 4px 0 0 var(--hnv-blue-light);
    font-weight: 750;
  }

  .hnv-topbar {
    gap: 16px;
    padding: 20px 24px;
  }

  .hnv-topbar-breadcrumb {
    gap: 4px;
  }

  .hnv-topbar-breadcrumb strong {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
  }

  .hnv-topbar-breadcrumb .hnv-eyebrow,
  .hnv-section .hnv-eyebrow {
    font-size: 12.5px;
    font-weight: 700;
  }

  .hnv-topbar-actions {
    gap: 10px;
  }

  .hnv-status-pill,
  .hnv-time-pill,
  .hnv-badge {
    font-size: 12.5px;
    font-weight: 700;
    padding: 6px 10px;
  }

  .hnv-primary-button,
  .hnv-ghost-button {
    border-radius: 10px;
    font-size: 14px;
    min-height: 40px;
    padding: 9px 15px;
  }

  .hnv-content {
    gap: 22px;
    padding: 24px 28px;
  }

  .hnv-footer {
    font-size: 12.5px;
    padding: 16px 24px;
  }

  .hnv-section {
    gap: 20px;
  }

  .hnv-section-header h2 {
    font-size: 20px;
    font-weight: 750;
    line-height: 1.25;
  }

  .hnv-grid {
    gap: 18px;
    min-width: 0;
  }

  .hnv-grid.kpis {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .hnv-grid.two {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }

  .hnv-grid.three {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  .hnv-kpi-card,
  .hnv-panel,
  .hnv-link-card {
    border-radius: var(--hnv-radius);
    padding: var(--hnv-card-padding) 22px;
    overflow-wrap: anywhere;
  }

  .hnv-kpi-card p {
    font-size: 13.5px;
    line-height: 1.45;
  }

  .hnv-kpi-card p:first-child {
    color: #334155;
    font-size: 14.5px;
    font-weight: 700;
  }

  .hnv-kpi-value {
    font-size: clamp(30px, 2.1vw, 34px);
    font-weight: 800;
    line-height: 1.08;
    margin: 10px 0 8px;
  }

  .hnv-status-value {
    font-size: 15px;
  }

  .hnv-panel h3 {
    font-size: 17px;
    font-weight: 750;
    line-height: 1.3;
    margin-bottom: 16px;
  }

  .hnv-source-notice {
    border-radius: 12px;
    gap: 12px;
    padding: 14px 16px;
  }

  .hnv-source-notice strong,
  .hnv-source-notice span {
    font-size: 13.5px;
    line-height: 1.45;
  }

  .hnv-table {
    min-width: 680px;
  }

  .hnv-table-wrap {
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .hnv-table th,
  .hnv-table td {
    font-size: 14px;
    line-height: 1.45;
    padding: 14px 14px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .hnv-table th {
    color: #334155;
    font-size: 13.5px;
    font-weight: 750;
    letter-spacing: 0.02em;
  }

  .hnv-actions-list,
  .hnv-alert-list,
  .hnv-health-list {
    gap: 12px;
  }

  .hnv-actions-list li,
  .hnv-alert-item,
  .hnv-health-item {
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.45;
    padding: 14px 15px;
  }

  .hnv-bar-row {
    gap: 12px;
    grid-template-columns: minmax(0, 170px) minmax(0, 1fr) 52px;
    min-width: 0;
  }

  .hnv-bar-row strong {
    font-size: 14px;
  }

  .hnv-link-card strong {
    font-size: 14.5px;
    font-weight: 700;
  }

  .hnv-link-card small {
    font-size: 12.5px;
  }
}

@media (min-width: 901px) and (max-width: 1180px) {
  .hnv-command-center {
    --hnv-sidebar-w: 272px;
  }

  .hnv-layout {
    column-gap: 16px;
  }

  .hnv-content {
    padding: 20px;
  }

  .hnv-topbar,
  .hnv-footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hnv-grid.kpis,
  .hnv-grid.two,
  .hnv-grid.three {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }
}

@media (max-width: 900px) {
  .hnv-command-center {
    font-size: 14.5px;
    overflow-x: hidden;
  }

  .hnv-layout {
    gap: 16px;
  }

  .hnv-nav-button {
    font-size: 14.5px;
    min-height: 42px;
  }

  .hnv-topbar-breadcrumb strong {
    font-size: 21px;
  }

  .hnv-grid.kpis,
  .hnv-grid.three,
  .hnv-grid.two {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

@media (max-width: 520px) {
  .hnv-command-center {
    font-size: 14px;
  }

  .hnv-command-center-fullwrap {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hnv-content {
    padding: 14px;
  }

  .hnv-kpi-value {
    font-size: 28px;
  }

  .hnv-grid.kpis,
  .hnv-grid.two,
  .hnv-grid.three {
    grid-template-columns: 1fr;
  }

  .hnv-table {
    min-width: 640px;
  }
}

