:root {
  --navy: #0f2742;
  --navy-2: #173a5e;
  --blue: #2c7be5;
  --blue-soft: #eaf3ff;
  --accent: #d98f2b;
  --accent-soft: #fff2df;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-soft: #fbfcfe;
  --line: #dce3ec;
  --text: #172033;
  --ink: #172033;
  --muted: #64748b;
  --success: #16845b;
  --warning: #b76a00;
  --danger: #b42318;
  --shadow: 0 10px 28px rgba(15, 39, 66, 0.06);
  --shadow-soft: 0 6px 18px rgba(15, 39, 66, 0.045);
  --radius-card: 12px;
  --radius-compact: 10px;
  --radius-control: 8px;
  --space-card: 22px;
  --space-card-mobile: 16px;
  --space-compact: 14px;
  --space-gap: 16px;
  --sidebar-width: 280px;
  --sidebar-collapsed-width: 86px;
  --topbar-height: 60px;
  --secondary-header-height: 0px;
  --z-sidebar: 12;
  --z-secondary-header: 45;
  --z-topbar: 50;
  --z-filter-popover: 65;
  --z-modal: 100;
  --z-drawer: 110;
  --z-setup-wizard: 120;
  --z-date-modal: 130;
  --z-notification: 140;
  --z-user-popover: 150;
  --client-primary: #2c7be5;
  --client-secondary: #0f2742;
  --client-accent: #d98f2b;
  --platform-accent: #d98f2b;
  --platform-accent-foreground: #0f172a;
}

* {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select,
input,
textarea {
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #fff;
  color: var(--text);
}

button {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(44, 123, 229, 0.28);
  outline-offset: 2px;
  border-color: var(--blue);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.app-shell {
  display: block;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-sidebar);
  width: var(--sidebar-width);
  height: 100vh;
  padding: 22px 18px;
  overflow-y: auto;
  background: var(--navy);
  color: #fff;
  transition: width 0.2s ease, max-height 0.2s ease, transform 0.2s ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-toggle {
  margin-left: auto;
  min-width: 38px;
  height: 34px;
  padding: 0 8px;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 12px;
  line-height: 1;
}

body.sidebar-collapsed .brand-copy,
body.sidebar-collapsed .role-switcher,
body.sidebar-collapsed .nav-label {
  display: none;
}

body.sidebar-collapsed .sidebar {
  width: var(--sidebar-collapsed-width);
  padding-inline: 14px;
}

body.sidebar-collapsed .nav-item {
  position: relative;
  justify-content: center;
  padding: 0;
}

body.sidebar-collapsed .nav-icon {
  width: auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--platform-accent);
  color: var(--platform-accent-foreground);
  font-weight: 900;
  flex: 0 0 auto;
}

.brand-logo-img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.brand-copy strong,
.brand-copy span {
  display: block;
}

.brand-copy span {
  margin-top: 3px;
  color: #b8c6d6;
  font-size: 12px;
}

.role-switcher {
  margin: 22px 0;
}

.role-switcher label {
  display: block;
  margin-bottom: 8px;
  color: #b8c6d6;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.role-switcher select,
.topbar select,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  display: flex;
  position: relative;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: #dce8f6;
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
}

.nav-label {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: var(--client-accent);
  color: #081a2d;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

body.sidebar-collapsed .nav-badge {
  position: absolute;
  top: 6px;
  right: 8px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  font-size: 10px;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  min-width: 20px;
  color: #93b7dc;
}

.sidebar-svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.main-panel {
  min-width: 0;
  width: auto;
  max-width: 100%;
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  padding-top: var(--topbar-height);
  transition: margin-left 0.2s ease;
}

body.sidebar-collapsed .main-panel {
  margin-left: var(--sidebar-collapsed-width);
}

.topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--sidebar-width);
  z-index: var(--z-topbar);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  height: 60px;
  min-height: 60px;
  padding: 10px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  transition: left 0.2s ease;
}

body.sidebar-collapsed .topbar {
  left: var(--sidebar-collapsed-width);
}

.topbar-brand {
  display: flex;
  align-items: center;
  grid-column: 1;
  gap: 10px;
  min-width: 0;
  max-width: min(520px, 62vw);
}

.topbar-context {
  display: none;
}

.topbar-context span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.topbar-context strong {
  overflow: hidden;
  color: var(--navy);
  font-size: 19px;
  font-weight: 750;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-brand-mark {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--client-accent);
  color: var(--client-accent-foreground);
  font-weight: 900;
  flex: 0 0 auto;
}

.topbar-brand .user-avatar {
  display: none;
}

.topbar > :not(.topbar-actions) .user-avatar,
.topbar > :not(.topbar-actions) .user-avatar-button,
.topbar > :not(.topbar-actions) .user-menu-host {
  display: none !important;
}

.topbar .user-avatar.topbar {
  display: none !important;
}

.topbar-brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.topbar-brand-copy strong {
  overflow: hidden;
  color: var(--navy);
  font-size: 15px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-brand-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-menu-button {
  display: none;
  min-width: 42px;
  min-height: 38px;
  padding: 0 12px;
  border-color: var(--line);
  background: var(--surface);
  color: var(--navy);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
}

h2 {
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 650;
}

h3 {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 650;
}

p {
  font-size: 13.5px;
}

.topbar-actions {
  position: relative;
  display: flex;
  align-items: center;
  grid-column: 2;
  justify-self: end;
  gap: 10px;
  margin-left: 0;
}

.workspace-switcher {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 8px 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.workspace-switcher span,
.workspace-switcher label {
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.workspace-switcher select {
  height: 32px;
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  padding: 0 28px 0 10px;
}

.workspace-context-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  max-width: 240px;
  padding: 0 11px;
  overflow: hidden;
  border: 1px solid rgba(15, 39, 66, 0.12);
  border-radius: 999px;
  background: #f6f8fb;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-context-badge.platform {
  border-color: rgba(15, 39, 66, 0.18);
  background: #eef3f8;
  color: #0f2742;
}

.workspace-context-badge.org-admin {
  border-color: rgba(44, 123, 229, 0.2);
  background: #f2f7ff;
  color: #1d5fb5;
}

.workspace-context-badge.manager {
  border-color: rgba(13, 148, 136, 0.22);
  background: #eefbf8;
  color: #0f766e;
}

.workspace-context-badge.employee {
  border-color: rgba(71, 85, 105, 0.18);
  background: #f8fafc;
  color: #334155;
}

.workspace-context-badge.support-preview {
  border-color: #d7b96d;
  background: #fff8e6;
  color: #7a5a12;
}

.demo-mode-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid rgba(44, 123, 229, 0.26);
  border-radius: var(--radius-control);
  background: #f4f8ff;
  color: var(--navy);
  cursor: pointer;
}

.demo-mode-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.demo-mode-switch {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.16s ease;
}

.demo-mode-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 39, 66, 0.22);
  transition: transform 0.16s ease;
}

.demo-mode-control input:checked + .demo-mode-switch {
  background: var(--blue);
}

.demo-mode-control input:checked + .demo-mode-switch::after {
  transform: translateX(14px);
}

.demo-mode-control span:last-child {
  display: grid;
  gap: 1px;
}

.demo-mode-control strong,
.demo-mode-badge {
  font-size: 12px;
  font-weight: 800;
}

.demo-mode-control small {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
}

.demo-mode-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(44, 123, 229, 0.24);
  border-radius: 999px;
  background: #f4f8ff;
  color: var(--blue);
}

.manager-employee-prompts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

#orgSelect {
  width: 220px;
}

.secondary-context-header {
  position: fixed;
  top: var(--topbar-height);
  right: 0;
  left: var(--sidebar-width);
  z-index: var(--z-secondary-header);
  border-bottom: 1px solid var(--line);
  background: rgba(248, 251, 255, 0.95);
  backdrop-filter: blur(10px);
  transform: translateY(0);
  transition: box-shadow 150ms ease-out, background-color 150ms ease-out, transform 150ms ease-out;
  will-change: box-shadow, transform;
}

body.sidebar-collapsed .secondary-context-header {
  left: var(--sidebar-collapsed-width);
}

.secondary-context-header.is-scrolling-down {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 5px 14px rgba(15, 39, 66, 0.07);
  transform: translateY(-1px);
}

.secondary-context-header.is-scrolling-up {
  background: rgba(248, 251, 255, 0.98);
  box-shadow: 0 3px 10px rgba(15, 39, 66, 0.05);
  transform: translateY(0);
}

.secondary-context-header.scroll-pulse {
  animation: secondaryHeaderPulse 140ms ease-out 1;
}

@keyframes secondaryHeaderPulse {
  0% {
    transform: translateY(0);
  }
  45% {
    transform: translateY(-1px);
  }
  100% {
    transform: translateY(0);
  }
}

.secondary-context-header.is-empty {
  display: none;
}

.secondary-context-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 8px 24px;
}

.secondary-context-left,
.secondary-context-right,
.secondary-filter-left,
.secondary-filter-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}

.secondary-filter-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex: 1 1 auto;
  gap: 12px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.secondary-context-left {
  flex: 0 0 auto;
}

.secondary-filter-right {
  flex: 1 1 auto;
  justify-content: flex-end;
}

.secondary-context-right {
  justify-content: flex-end;
  margin-left: auto;
}

.organization-context-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 8px 6px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.organization-context-select label {
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.organization-context-select select {
  width: min(220px, 34vw);
  height: 32px;
  min-height: 32px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.secondary-context-header .workspace-switcher,
.secondary-context-header .date-filter-panel,
.secondary-context-header .context-filter-controls {
  box-shadow: none;
}

.context-filter-controls {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.filters-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  white-space: nowrap;
}

.filters-menu-trigger .sidebar-svg {
  width: 16px;
  height: 16px;
}

.filter-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.filters-popover-backdrop {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-filter-popover) - 1);
  border: 0;
  background: transparent;
}

.filters-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: var(--z-filter-popover);
  display: grid;
  gap: 12px;
  width: min(420px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 39, 66, 0.16);
}

.filters-popover-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.filters-popover-header h3 {
  margin: 0;
  color: var(--navy);
  font-size: 16px;
}

.filters-popover-header p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.filters-panel-list {
  display: grid;
  gap: 8px;
  max-height: min(52vh, 420px);
  overflow: auto;
  padding-right: 2px;
}

.filter-panel-field {
  display: grid;
  gap: 6px;
}

.filter-panel-field select,
.filter-panel-field input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--navy);
  font-size: 13px;
}

.filters-popover-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.context-filter-controls .filter-bar {
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
  margin: 0;
  gap: 8px;
}

.context-filter-controls .active-filter-chips {
  justify-content: flex-end;
  flex: 1 1 180px;
}

.date-filter-panel {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 188px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.date-filter-icon {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--muted);
}

.date-filter-icon .sidebar-svg {
  width: 18px;
  height: 18px;
}

.date-filter-panel select {
  width: 100%;
  min-width: 142px;
  height: 38px;
  min-height: 38px;
  padding: 0 22px 0 0;
  border: 0;
  background-color: transparent;
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.user-chip > .user-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--navy);
  font-weight: 900;
}

.user-avatar {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--navy);
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.user-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-avatar:has(img) {
  background: transparent;
}

.user-avatar.has-image {
  background: transparent;
}

.user-avatar.xs {
  width: 24px;
  height: 24px;
  font-size: 10px;
}

.user-avatar.sm {
  width: 34px;
  height: 34px;
  font-size: 12px;
}

.user-avatar.topbar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 40px;
}

.user-avatar.lg {
  width: 46px;
  height: 46px;
  font-size: 14px;
}

.user-identity-inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  vertical-align: middle;
}

.user-chip strong,
.user-chip small {
  display: block;
  white-space: nowrap;
}

.user-chip small {
  color: var(--muted);
}

.notification-trigger {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--navy);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.notification-trigger:hover,
.notification-trigger.active {
  border-color: rgba(44, 123, 229, 0.36);
  background: var(--blue-soft);
}

.notification-trigger:focus-visible {
  outline: 3px solid rgba(44, 123, 229, 0.24);
  outline-offset: 2px;
}

.notification-trigger .sidebar-svg {
  width: 20px;
  height: 20px;
}

.notification-count-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #c2410c;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.user-menu-host {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.header-user-avatar {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.header-user-avatar.has-image {
  background: transparent;
}

.header-user-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-avatar-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.user-avatar-button:hover,
.user-avatar-button.active {
  background: rgba(44, 123, 229, 0.08);
}

.user-avatar-button .user-avatar.topbar {
  width: 40px;
  height: 40px;
}

.user-avatar-button:focus-visible {
  outline: 3px solid rgba(44, 123, 229, 0.24);
  outline-offset: 2px;
}

.user-popover-backdrop {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-user-popover) - 1);
  background: transparent;
}

.user-menu-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: var(--z-user-popover);
  display: grid;
  gap: 10px;
  width: min(320px, calc(100vw - 24px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 39, 66, 0.18);
}

.user-menu-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.user-menu-profile div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.user-menu-profile strong,
.user-menu-profile span,
.user-menu-profile small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-profile strong {
  color: var(--navy);
  font-size: 14px;
}

.user-menu-profile span,
.user-menu-profile small,
.user-menu-reminder span,
.user-menu-workspace label {
  color: var(--muted);
  font-size: 12px;
}

.user-menu-reminder {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid rgba(44, 123, 229, 0.16);
  border-radius: 10px;
  background: var(--blue-soft);
}

.user-menu-reminder strong {
  color: var(--navy);
  font-size: 13px;
}

.user-menu-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.user-menu-actions button,
.user-menu-signout {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--navy);
  font-weight: 800;
  cursor: pointer;
}

.user-menu-actions button:hover,
.user-menu-signout:hover {
  border-color: rgba(44, 123, 229, 0.32);
  background: var(--blue-soft);
}

.user-menu-workspace {
  display: grid;
  gap: 6px;
}

.user-menu-workspace select {
  width: 100%;
  min-height: 38px;
}

.user-menu-signout {
  background: #fff;
}

.content {
  display: grid;
  gap: 24px;
  min-width: 0;
  max-width: 100%;
  padding: calc(26px + var(--secondary-header-height)) 30px 42px;
}

.breadcrumb-nav {
  max-width: 100%;
  min-width: 0;
  margin: -4px 0 -8px;
}

.breadcrumb-nav ol {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
  min-width: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12.5px;
}

.breadcrumb-nav li {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.breadcrumb-nav li + li::before {
  content: "\203A";
  flex: 0 0 auto;
  margin: 0 8px;
  color: #9aa8b8;
}

.breadcrumb-link,
.breadcrumb-current {
  display: inline-block;
  max-width: min(240px, 28vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.breadcrumb-link {
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.breadcrumb-link:hover,
.breadcrumb-link:focus-visible {
  color: var(--client-primary);
  text-decoration: underline;
  outline: none;
}

.breadcrumb-current {
  color: var(--navy);
  font-weight: 800;
}

.drawer-breadcrumb {
  margin: 0 0 8px;
}

.drawer-breadcrumb ol {
  font-size: 12px;
}

.drawer-breadcrumb .breadcrumb-link,
.drawer-breadcrumb .breadcrumb-current {
  max-width: 180px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(150px, 1fr));
  gap: 16px;
}

.kpi-card,
.panel,
.table-panel,
.metric-card,
.survey-question,
.feedback-item,
.recognition-item {
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow-wrap: break-word;
}

.kpi-card {
  display: flex;
  min-height: 150px;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: var(--space-card);
  overflow-wrap: normal;
}

.kpi-card span,
.kpi-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
}

.kpi-label,
.score-label,
.panel h2,
.benchmark-card h3,
.benchmark-values span {
  overflow: visible;
}

.kpi-label,
.score-label,
.benchmark-card h3,
.heatmap-heading-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.score-label-text {
  min-width: 0;
}

.score-header-cell .score-tooltip {
  margin-left: 5px;
}

.score-tooltip {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 1px solid #c8d5e6;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  cursor: help;
  vertical-align: middle;
}

.score-tooltip .sidebar-svg {
  width: 12px;
  height: 12px;
  stroke-width: 2.2;
}

.score-tooltip-content {
  position: absolute;
  top: calc(100% + 9px);
  left: 50%;
  z-index: var(--z-user-popover);
  display: grid;
  width: min(300px, calc(100vw - 32px));
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: #fff;
  box-shadow: 0 16px 36px rgba(15, 39, 66, 0.18);
  color: #24364b;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  text-transform: none;
  transform: translate(-50%, -4px);
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
  visibility: hidden;
  white-space: normal;
}

.score-tooltip-content::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
}

.score-tooltip-content strong {
  display: block;
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.score-tooltip-content span {
  display: block;
  color: #42546a;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.35;
  text-transform: none;
}

.score-tooltip:hover,
.score-tooltip:focus-visible {
  border-color: var(--primary);
  color: var(--primary);
  outline: none;
}

.score-tooltip:hover .score-tooltip-content,
.score-tooltip:focus .score-tooltip-content,
.score-tooltip:focus-visible .score-tooltip-content {
  opacity: 1;
  transform: translate(-50%, 0);
  visibility: visible;
}

.kpi-card strong,
.kpi-value {
  display: block;
  min-width: 0;
  color: var(--navy);
  font-size: 30px;
  font-weight: 750;
  line-height: 1.1;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.kpi-value.numeric-value {
  white-space: nowrap;
}

.kpi-value.text-value {
  display: -webkit-box;
  overflow: hidden;
  font-size: 25px;
  line-height: 1.12;
  white-space: normal;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.kpi-card small,
.kpi-helper {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.misgana-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
}

.panel-header > .badge {
  flex: 0 0 auto;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 18px;
}

.grid-2 {
  grid-template-columns: 1.2fr 0.8fr;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel {
  padding: var(--space-card);
  overflow-x: clip;
}

.panel .panel,
.panel .table-panel,
.table-panel .panel,
.table-panel .table-panel,
.subpanel .panel,
.subpanel .table-panel {
  box-shadow: none;
}

.panel > table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.table-panel {
  max-width: 100%;
  padding: var(--space-card);
  overflow-x: auto;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-gap);
  margin-bottom: var(--space-gap);
}

.panel-header > * {
  min-width: 0;
}

.panel-header p,
.panel p {
  color: var(--muted);
}

.panel-header p {
  max-width: 680px;
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.45;
}

.chart-placeholder {
  display: grid;
  place-items: center;
  min-height: 230px;
  border: 1px dashed #b7c4d4;
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, #f8fbff, #eef5fc);
  max-width: 100%;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.usage-kpi-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.profile-settings-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.profile-photo-card,
.profile-completion-card {
  min-width: 0;
  padding: var(--space-compact);
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
}

.profile-photo-card {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-photo-preview {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 88px;
  height: 88px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--navy);
  font-size: 24px;
  font-weight: 900;
}

.profile-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-photo-card p {
  max-width: 460px;
  margin: 4px 0;
  color: var(--muted);
}

.profile-photo-card small {
  color: var(--muted);
}

.profile-reminder {
  margin-bottom: 14px;
}

.recognition-people {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
  color: var(--muted);
  font-size: 13px;
}

.active-filter-chips {
  display: flex;
  flex: 1 1 220px;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f6f9fc;
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.usage-chart-grid {
  align-items: stretch;
}

.distribution-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  align-items: stretch;
  gap: 18px;
}

.usage-chart-card {
  min-height: 320px;
  display: grid;
  gap: 12px;
}

.distribution-grid .usage-chart-card {
  align-content: start;
  min-height: 0;
  padding: 20px;
}

.distribution-grid .chart-card-header {
  margin-bottom: 8px;
}

.distribution-grid .chart-card-header h2 {
  line-height: 1.25;
}

.distribution-grid .chart-card-header p {
  max-width: 34rem;
  line-height: 1.4;
}

.chart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.chart-card-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.usage-chart-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.usage-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.usage-chart-legend i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.usage-svg-chart {
  min-width: 0;
}

.usage-svg-chart svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 210px;
}

.chart-axis {
  stroke: #d9e2ec;
  stroke-width: 1;
}

.usage-chart-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.usage-chart-labels strong {
  color: var(--navy);
  font-size: 16px;
}

.usage-stack-chart,
.usage-horizontal-bars,
.usage-paired-chart,
.usage-progress-list {
  display: grid;
  gap: 10px;
}

.usage-stack-row,
.usage-bar-row,
.usage-paired-row,
.usage-progress-row {
  display: grid;
  grid-template-columns: minmax(72px, 140px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.usage-stack-row strong,
.usage-bar-row strong,
.usage-paired-row strong,
.usage-progress-row strong {
  color: var(--navy);
  font-size: 12px;
  white-space: nowrap;
}

.usage-stack-track,
.usage-bar-track,
.usage-progress {
  display: flex;
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: #eef3f8;
}

.usage-stack-track i,
.usage-bar-track i,
.usage-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--client-primary);
}

.usage-paired-bars {
  display: grid;
  gap: 4px;
}

.usage-paired-bars i {
  display: block;
  height: 8px;
  border-radius: 999px;
}

.usage-paired-bars .created {
  background: #2d6cdf;
}

.usage-paired-bars .completed {
  background: #3d6f58;
}

.usage-donut-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.distribution-donut-layout {
  grid-template-columns: minmax(140px, 42%) minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.distribution-donut-layout .simple-donut {
  justify-self: center;
}

.distribution-donut-layout .status-stack {
  min-width: 0;
  width: 100%;
}

.distribution-donut-layout .status-row {
  min-width: 0;
}

.distribution-donut-layout .status-row span {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.distribution-donut-layout .status-row strong {
  flex: 0 0 auto;
  text-align: right;
}

.usage-donut {
  display: grid;
  place-items: center;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: conic-gradient(#d98f2b 0 51%, #2d6cdf 51% 93%, #6d7a89 93% 100%);
}

.usage-donut span {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  font-size: 20px;
  font-weight: 800;
}

.simple-donut {
  display: grid;
  place-items: center;
  width: clamp(136px, 36vw, 168px);
  height: clamp(136px, 36vw, 168px);
  border-radius: 50%;
  background: conic-gradient(var(--client-primary) 0 42%, var(--success) 42% 72%, var(--accent) 72% 90%, var(--line) 90% 100%);
}

.simple-donut span {
  display: grid;
  place-items: center;
  width: 58%;
  height: 58%;
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  font-size: clamp(18px, 2.8vw, 21px);
  font-weight: 800;
}

.misgana-donut {
  display: grid;
  place-items: center;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: conic-gradient(#2d6cdf 0 44%, #3d6f58 44% 82%, #d98f2b 82% 100%);
}

.misgana-donut span {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  font-size: 18px;
  font-weight: 800;
}

.misgana-scatter {
  position: relative;
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background:
    linear-gradient(#eef3f8 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(90deg, #eef3f8 1px, transparent 1px) 0 0 / 25% 100%,
    #fbfcfe;
}

.misgana-scatter::before {
  content: "Misgana participation";
  position: absolute;
  right: 12px;
  bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.misgana-scatter::after {
  content: "Recognition score";
  position: absolute;
  top: 12px;
  left: 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.misgana-scatter span {
  position: absolute;
  width: 12px;
  height: 12px;
  transform: translate(-50%, 50%);
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--client-primary);
  box-shadow: 0 6px 14px rgba(15, 39, 66, 0.16);
}

.compact-status-stack .status-row {
  min-height: 38px;
  padding: 8px 10px;
}

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

.usage-health-grid small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.usage-table th:first-child,
.usage-table td:first-child {
  min-width: 210px;
}

.usage-detail-drawer {
  width: min(620px, 100%);
}

.empty-state,
.loading-state,
.error-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 20px;
  border: 1px dashed #c7d3e1;
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.compact-empty-state {
  padding: 14px;
  gap: 8px;
}

.empty-state strong,
.error-state strong {
  color: var(--navy);
  font-size: 15px;
  line-height: 1.25;
}

.empty-state p,
.error-state p,
.loading-state p {
  margin: 0;
  color: var(--muted);
  max-width: 520px;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-control);
  background: var(--blue-soft);
  color: var(--navy);
  font-weight: 900;
}

.empty-icon svg {
  width: 18px;
  height: 18px;
}

.empty-helper {
  color: var(--muted);
  font-size: 12px;
}

.empty-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 2px;
}

.loading-state {
  border-style: solid;
}

.skeleton-line,
.skeleton-grid span {
  display: block;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef3f8, #f8fbff, #eef3f8);
  background-size: 200% 100%;
  animation: skeleton 1.3s ease-in-out infinite;
}

.skeleton-line {
  width: 64%;
  height: 16px;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(80px, 1fr));
  gap: 10px;
  width: 100%;
}

.skeleton-grid span {
  height: 58px;
  border-radius: var(--radius-control);
}

.error-state {
  border-color: #f0b8b1;
  background: #fff8f7;
}

.error-state {
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
}

.error-state::before {
  content: "!";
  grid-row: 1 / span 4;
  background: #fff0ee;
  color: var(--danger);
}

.error-state > * {
  grid-column: 2;
}

@keyframes skeleton {
  to {
    background-position: -200% 0;
  }
}

.status-stack,
.metric-list,
.hierarchy,
.feedback-list,
.recognition-feed {
  display: grid;
  gap: 10px;
}

.status-row,
.hierarchy-row,
.manager-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
  min-width: 0;
}

.status-row > *,
.hierarchy-row > *,
.manager-row > * {
  min-width: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--navy-2);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.badge.muted {
  background: #eef2f6;
  color: var(--muted);
}

.badge.success {
  background: #e8f6ef;
  color: var(--success);
}

.badge.warning {
  background: var(--accent-soft);
  color: var(--warning);
}

.badge.danger {
  background: #fff0ee;
  color: var(--danger);
}

.action-bar,
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.filter-bar {
  margin-bottom: var(--space-compact);
}

.filter-bar input,
.filter-bar select {
  width: min(190px, 100%);
  max-width: 100%;
  min-height: 42px;
  border-radius: var(--radius-control);
}

.global-filter-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-width: 0;
}

.global-filter-row > * {
  min-width: 0;
}

.global-filter-row.filters-left {
  justify-content: flex-start;
}

.context-filter-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1 1 auto;
  gap: 8px;
  min-height: 44px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.context-filter-card .filter-bar {
  justify-content: flex-start;
  flex: 1 1 auto;
  margin: 0;
  gap: 8px;
}

.filter-action-group {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 8px;
  white-space: nowrap;
}

.filter-action-group button {
  flex: 0 0 auto;
}

.compact-filter-bar input,
.compact-filter-bar select,
.context-filter-card button,
.context-filter-controls button,
.context-filter-controls select,
.context-filter-controls input {
  min-height: 40px;
  font-size: 13px;
}

.compact-filter-bar input,
.compact-filter-bar select {
  width: min(168px, 100%);
}

.compact-action {
  padding-inline: 10px;
  white-space: nowrap;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.success-btn,
.warning-btn,
.danger-btn,
.destructive-btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-control);
  white-space: normal;
}

.primary-btn {
  border-color: var(--client-primary);
  background: var(--client-primary);
  color: var(--client-primary-foreground);
}

.secondary-btn {
  border-color: var(--client-primary);
  background: var(--blue-soft);
  color: var(--client-secondary);
}

.ghost-btn {
  background: #fff;
  color: var(--navy);
}

.success-btn {
  border-color: var(--success);
  background: #eaf8ef;
  color: var(--success);
}

.warning-btn {
  border-color: #d98f2b;
  background: var(--accent-soft);
  color: #7f4a08;
}

.danger-btn,
.destructive-btn {
  border-color: var(--danger);
  background: #fff0ee;
  color: var(--danger);
}

table th,
table td {
  vertical-align: middle;
}

td:last-child,
th:last-child {
  text-align: right;
}

table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

td {
  color: #26364d;
}

td small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
}

.dense-table {
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.dense-table th,
.dense-table td {
  height: 42px;
  padding: 8px 10px;
  white-space: nowrap;
}

.dense-table .wrap-cell {
  white-space: normal;
}

.sticky-first th:first-child,
.sticky-first td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  background: var(--surface);
}

.sticky-actions th:last-child,
.sticky-actions td:last-child {
  position: sticky;
  right: 0;
  z-index: 3;
  background: var(--surface);
  box-shadow: -8px 0 14px rgba(15, 39, 66, 0.05);
}

.client-health-table th:first-child,
.client-health-table td:first-child {
  min-width: 180px;
}

.client-health-table th:nth-child(2),
.client-health-table td:nth-child(2),
.client-health-table th:nth-child(4),
.client-health-table td:nth-child(4) {
  min-width: 120px;
}

.client-health-table th:nth-child(3),
.client-health-table td:nth-child(3) {
  min-width: 80px;
}

.client-health-table th:nth-child(5),
.client-health-table td:nth-child(5),
.client-health-table th:nth-child(7),
.client-health-table td:nth-child(7) {
  min-width: 110px;
}

.client-health-table th:nth-child(6),
.client-health-table td:nth-child(6) {
  min-width: 280px;
}

.risk-flag-stack {
  display: flex;
  max-width: 300px;
  flex-wrap: wrap;
  gap: 5px;
}

.compact-action {
  min-height: 36px;
  padding: 0 10px;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: 0;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.metric-card {
  padding: 18px;
  display: grid;
  gap: 12px;
}

.metric-button {
  display: block;
  width: 100%;
  text-align: left;
}

.metric-button strong {
  display: block;
  margin: 8px 0;
  color: var(--navy);
  font-size: 21px;
}

.metric-result-card {
  align-content: start;
  gap: 10px;
}

.metric-result-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric-sparkline {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: linear-gradient(180deg, #fbfdff, #f4f8fc);
}

.metric-sparkline polyline {
  fill: none;
  stroke: var(--client-primary);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.metric-drilldown-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.4fr);
  gap: 16px;
}

.submetric-breakdown-card,
.trend-comparison-card {
  min-width: 0;
}

.submetric-breakdown-list {
  display: grid;
  gap: 10px;
}

.submetric-breakdown-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px 64px auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 60px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.submetric-breakdown-row:hover,
.submetric-breakdown-row:focus-visible,
.submetric-breakdown-row.selected {
  border-color: var(--client-primary);
  background: #f6f9fc;
  outline: none;
}

.submetric-breakdown-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.submetric-breakdown-row strong {
  color: var(--navy);
}

.submetric-breakdown-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.trend-comparison-chart {
  width: 100%;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: linear-gradient(180deg, #fff, #f8fbff);
}

.trend-grid-lines line {
  stroke: #e8eef5;
  stroke-width: 1;
}

.trend-comparison-chart polyline {
  fill: none;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-comparison-chart .parent-line {
  stroke: #6b7a90;
  stroke-dasharray: 8 8;
}

.trend-comparison-chart .submetric-line {
  stroke: var(--client-primary);
}

.trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.trend-legend span::before {
  content: "";
  width: 18px;
  height: 4px;
  border-radius: 999px;
  background: var(--client-primary);
}

.trend-legend .parent::before {
  background: #6b7a90;
}

.metric-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.metric-card header > div {
  min-width: 0;
}

.metric-status-toggle {
  flex: 0 0 auto;
  align-items: center;
  min-width: max-content;
  white-space: nowrap;
}

.metric-status-toggle span {
  white-space: nowrap;
}

.metric-submetric-stack {
  margin-top: 12px;
  gap: 8px;
}

.submetric-question-row {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.metric-submetric-stack .status-row,
.question-bank-total-row {
  min-height: 48px;
  padding: 12px 16px;
}

.question-bank-total-row {
  margin-top: 0;
}

.question-bank-control-card {
  display: grid;
  gap: 16px;
  padding: var(--space-card);
  overflow-wrap: normal;
  word-break: normal;
}

.question-bank-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}

.question-bank-title {
  min-width: 0;
}

.question-bank-title h2 {
  margin-bottom: 4px;
}

.question-bank-title p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.question-bank-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 12px;
}

.question-bank-actions button {
  min-height: 38px;
  white-space: nowrap;
}

.question-bank-governance-note,
.question-bank-import-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #c9dced;
  border-radius: var(--radius-compact);
  background: #f4f9ff;
  color: var(--navy);
}

.question-bank-governance-note {
  padding: 12px 14px;
}

.question-bank-governance-note p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
}

.governance-icon,
.question-bank-import-note span {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.question-bank-filter-bar {
  gap: 12px;
  margin: 0;
}

.question-bank-filter-bar input,
.question-bank-filter-bar select {
  min-height: 42px;
  margin: 0;
  font-size: 13px;
}

.question-bank-filter-bar .question-search {
  width: min(280px, 100%);
  flex: 1 1 240px;
}

.question-bank-filter-bar .metric-filter {
  width: min(220px, 100%);
  flex: 0 1 200px;
}

.question-bank-filter-bar .submetric-filter {
  width: min(240px, 100%);
  flex: 0 1 220px;
}

.question-bank-filter-bar .question-type-filter,
.question-bank-filter-bar .scale-filter {
  width: min(200px, 100%);
  flex: 0 1 185px;
}

.question-bank-filter-bar .status-filter {
  width: min(180px, 100%);
  flex: 0 1 165px;
}

.question-bank-import-note {
  align-items: center;
  padding: 9px 12px;
  font-size: 12.5px;
  line-height: 1.35;
}

.submetric-question-row:hover,
.submetric-question-row:focus-visible {
  border-color: var(--client-primary);
  background: #f6f9fc;
}

.submetric-question-row strong {
  white-space: nowrap;
}

.question-drawer-toolbar {
  margin-bottom: 12px;
}

.question-list-table .wrap-cell strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  white-space: normal;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: #f6f9fc;
}

.compact-governance-note {
  margin-bottom: 12px;
}

.metric-card ul {
  margin: 12px 0;
  padding-left: 18px;
  color: var(--muted);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.toggle input {
  width: 38px;
  height: 20px;
  accent-color: var(--blue);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.field {
  display: grid;
  gap: 7px;
}

.field input[readonly] {
  background: #f8fafc;
  color: var(--muted);
}

.platform-settings-card {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.subpanel-header h3 {
  margin-bottom: 4px;
}

.subpanel-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.settings-option-list {
  display: grid;
  gap: 12px;
}

.settings-check-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
}

.settings-check-row input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--client-primary);
}

.settings-check-row span,
.settings-select-row label {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.settings-check-row strong,
.settings-select-row strong {
  color: var(--navy);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.25;
}

.settings-check-row small,
.settings-select-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.settings-select-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 180px);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: #fff;
}

.notification-template-card {
  grid-column: 1 / -1;
}

.notification-template-groups {
  display: grid;
  gap: 10px;
}

.notification-template-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: #fff;
}

.notification-template-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--navy);
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
}

.notification-template-list {
  display: grid;
  border-top: 1px solid var(--line);
}

.notification-template-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) minmax(180px, 0.9fr) auto auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 11px 12px;
}

.notification-template-row + .notification-template-row {
  border-top: 1px solid var(--line);
}

.template-row-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.template-row-main strong {
  color: var(--navy);
  font-size: 13.5px;
}

.template-row-main small,
.template-recipient {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.template-row-actions,
.variable-chip-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.template-preview-body div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.branding-settings-card {
  overflow-x: clip;
}

.branding-card-header {
  align-items: flex-start;
}

.branding-card-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.branding-controls,
.branding-section {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.branding-logo-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
}

.logo-preview-box {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 160px;
  height: 56px;
  border: 1px solid #d9e2ec;
  border-radius: var(--radius-control);
  background:
    linear-gradient(45deg, #f3f6fa 25%, transparent 25%),
    linear-gradient(-45deg, #f3f6fa 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #f3f6fa 75%),
    linear-gradient(-45deg, transparent 75%, #f3f6fa 75%);
  background-color: #fff;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  color: var(--navy);
  font-weight: 900;
}

.compact-logo-box {
  width: 56px;
  height: 56px;
}

.login-logo-box {
  width: 180px;
  height: 60px;
}

.logo-preview-box img {
  max-width: 92%;
  max-height: 88%;
  object-fit: contain;
}

.logo-upload-copy,
.brand-color-control {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}

.logo-upload-copy strong {
  color: var(--navy);
  font-size: 13.5px;
}

.logo-upload-copy p {
  margin: 0;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.35;
}

.logo-upload-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.logo-upload-actions button {
  min-height: 34px;
  padding: 0 11px;
  white-space: nowrap;
}

.branding-logo-row small,
.brand-color-control small,
.contrast-warning {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.branding-color-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(140px, 1fr));
  gap: 10px;
}

.brand-color-control {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: #fff;
}

.brand-color-inputs {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.brand-color-inputs input[type="color"] {
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 2px;
}

.brand-color-inputs input:not([type="color"]) {
  width: 100%;
  text-transform: uppercase;
}

.advanced-branding-options {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
}

.advanced-branding-options summary {
  cursor: pointer;
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
}

.compact-theme-grid {
  margin-top: 12px;
}

.branding-live-preview {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: #fff;
}

.preview-title-row,
.branding-card-header .action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mini-product-preview {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  min-height: 160px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
}

.mini-sidebar {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 12px;
  background: var(--preview-secondary);
}

.mini-logo {
  display: grid;
  place-items: center;
  overflow: hidden;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-control);
  background: var(--preview-accent);
  color: var(--preview-accent-fg);
  font-weight: 900;
}

.mini-logo img {
  max-width: 92%;
  max-height: 92%;
  object-fit: contain;
}

.mini-sidebar span {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--preview-secondary-fg) 32%, transparent);
}

.mini-sidebar span.active {
  background: var(--preview-accent);
}

.mini-content {
  display: grid;
  gap: 12px;
  align-content: center;
  padding: 14px;
  background: var(--surface-soft);
}

.mini-content button {
  justify-self: start;
  min-height: 34px;
  border: 1px solid var(--preview-primary);
  border-radius: var(--radius-control);
  background: var(--preview-primary);
  color: var(--preview-primary-fg);
}

.mini-kpi {
  max-width: 170px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: #fff;
}

.mini-kpi small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.mini-kpi strong {
  display: block;
  margin-top: 4px;
  color: var(--navy);
  font-size: 24px;
}

.mini-badge {
  justify-self: start;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--preview-accent);
  color: var(--preview-accent-fg);
  font-size: 12px;
  font-weight: 800;
}

.contrast-warning {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid #ecd1a8;
  border-radius: var(--radius-compact);
  background: var(--accent-soft);
  color: #7f4a08;
  font-size: 12.5px;
  line-height: 1.4;
}

.contrast-warning::before {
  content: "!";
  background: #ffe4bd;
  color: var(--warning);
}

.is-hidden {
  display: none !important;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  min-height: 42px;
  padding: 10px 12px;
  max-width: 100%;
  font-size: 13.5px;
  border-radius: var(--radius-control);
}

.rule-callout {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #ecd1a8;
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-compact);
  background: var(--accent-soft);
  color: #5a3710;
  font-size: 13px;
  font-weight: 700;
}

.rule-callout::before {
  content: "!";
  background: #ffe4bd;
  color: var(--warning);
}

.rule-callout > *,
.contrast-warning > * {
  grid-column: 2;
}

.survey-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dde6f0;
}

.survey-progress span {
  display: block;
  width: 40%;
  height: 100%;
  background: var(--blue);
}

.survey-progress-wrap {
  display: grid;
  gap: 8px;
}

.survey-progress-wrap small,
.survey-mobile-title small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.survey-question {
  display: grid;
  gap: 16px;
  padding: var(--space-card);
}

.survey-start-card {
  display: grid;
  gap: 16px;
}

.survey-mobile-title {
  display: none;
}

.survey-question-text {
  max-width: 720px;
  color: var(--navy);
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.22;
  letter-spacing: 0;
}

.scale {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(52px, 1fr));
  gap: 8px;
}

.scale.enps-scale {
  grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
}

.scale button {
  min-height: 48px;
  border-radius: var(--radius-control);
  background: #f8fafc;
  font-size: 15px;
  font-weight: 800;
}

.scale button:hover,
.scale button.selected {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.scale-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.survey-actions {
  align-items: center;
}

.survey-actions .primary-btn,
.survey-actions .secondary-btn,
.survey-actions .ghost-btn {
  min-height: 44px;
}

.survey-anonymity-toggle {
  justify-content: flex-start;
  width: fit-content;
  max-width: 100%;
}

.form-error {
  margin: 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 800;
}

.feedback-item,
.recognition-item {
  display: grid;
  gap: 10px;
  padding: var(--space-compact);
  border-radius: var(--radius-card);
}

.feedback-meta,
.recognition-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 0;
}

.response-box {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.response-box textarea,
.misgana-form textarea {
  min-height: 82px;
  resize: vertical;
}

.misgana-layout {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 18px;
}

.misgana-form {
  display: grid;
  gap: 12px;
}

.misgana-card {
  display: grid;
  gap: 10px;
}

.misgana-card h3 {
  margin: 0;
  color: var(--navy);
}

.value-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--value-color) 14%, #ffffff);
  color: var(--value-color);
  font-size: 12px;
  font-weight: 900;
}

.reaction-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding-top: 2px;
}

.reaction-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 0 9px;
  border-color: var(--line);
  background: #fff;
  color: var(--muted);
}

.reaction-button:hover,
.reaction-button.active {
  border-color: var(--client-primary);
  background: var(--blue-soft);
  color: var(--client-secondary);
}

.reaction-button .sidebar-svg {
  width: 16px;
  height: 16px;
}

.reaction-total {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.compact-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: #fff;
  font-size: 13px;
  line-height: 1.45;
}

.compact-notice p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.demo-qa-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.qa-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.qa-summary span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  white-space: nowrap;
}

.qa-checklist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.demo-mode-banner {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(44, 123, 229, 0.22);
  border-radius: var(--radius-compact);
  background: #f4f8ff;
  color: var(--navy);
}

.demo-mode-banner p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}

.demo-empty-panel {
  min-height: 320px;
}

.demo-guide-drawer {
  width: min(760px, 100%);
}

.survey-review-backdrop {
  z-index: var(--z-setup-wizard);
  align-items: stretch;
  padding: 22px;
}

.survey-review-drawer {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(1180px, 100%);
  max-height: calc(100vh - 44px);
  margin: auto;
  overflow: hidden;
  border-radius: 16px;
}

.survey-review-header,
.survey-review-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.survey-review-footer {
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.survey-review-kicker {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.survey-review-header h2,
.survey-review-section h3,
.survey-review-alert h3 {
  margin: 0;
}

.survey-review-header p,
.survey-review-section-header p,
.survey-review-summary p {
  margin: 4px 0 0;
  color: var(--muted);
}

.survey-review-header-actions,
.survey-review-counts,
.survey-review-footer .action-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.survey-review-body {
  display: grid;
  gap: 14px;
  min-height: 0;
  padding: 16px 22px 20px;
  overflow: auto;
  background: #f8fbff;
}

.survey-review-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: #fff;
}

.survey-review-summary h3 {
  margin: 8px 0 0;
  color: var(--navy);
}

.survey-review-counts span {
  display: grid;
  min-width: 92px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.survey-review-counts strong {
  color: var(--navy);
  font-size: 20px;
}

.survey-review-alert {
  padding: 12px 14px;
  border-radius: var(--radius-compact);
}

.survey-review-alert.blocked {
  border: 1px solid #f4b8b8;
  background: #fff3f3;
}

.survey-review-alert.warning {
  border: 1px solid #efd18d;
  background: #fff9eb;
}

.survey-review-alert ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--navy);
}

.survey-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.survey-review-section {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: #fff;
}

.survey-review-section.full {
  grid-column: 1 / -1;
}

.survey-review-section-header {
  display: grid;
  gap: 2px;
}

.survey-review-row-stack {
  display: grid;
  gap: 8px;
}

.survey-review-row,
.survey-review-check {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid #e5edf6;
  border-radius: 8px;
  background: var(--surface-soft);
}

.survey-review-row span,
.survey-review-check span {
  min-width: 0;
  color: var(--muted);
  font-size: 12.5px;
}

.survey-review-row strong {
  color: var(--navy);
  font-size: 13px;
  text-align: right;
}

.survey-review-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.survey-review-check {
  grid-template-columns: minmax(0, 1fr) auto;
}

.survey-review-check small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

.final-checklist .survey-review-check {
  min-height: 48px;
}

.survey-readiness-card {
  display: grid;
  gap: 12px;
}

.survey-readiness-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.survey-readiness-note,
.survey-review-footer-note {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}

.compact-survey-readiness {
  box-shadow: var(--shadow-soft);
}

.survey-confirm-backdrop {
  z-index: var(--z-date-modal);
}

.survey-confirm-modal {
  width: min(520px, calc(100vw - 32px));
}

.design-system-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.design-system-hero h2 {
  margin: 4px 0 6px;
  font-size: 30px;
}

.design-system-section {
  display: grid;
  gap: 16px;
}

.design-swatch-grid,
.design-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.design-swatch {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: #fff;
}

.design-swatch span {
  display: grid;
  place-items: center;
  min-height: 54px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.design-swatch strong,
.design-type-scale span {
  color: var(--navy);
  font-size: 13px;
}

.design-swatch small {
  color: var(--muted);
  line-height: 1.35;
}

.design-type-scale {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.design-type-scale > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
}

.design-type-scale h1,
.design-type-scale h2,
.design-type-scale h3,
.design-type-scale p {
  margin: 0;
}

.design-kpi-value {
  color: var(--navy);
  font-size: 34px;
  line-height: 1;
}

.design-component-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.design-filter-demo {
  justify-content: flex-start;
  width: 100%;
}

.design-static-control {
  pointer-events: none;
}

.date-filter-panel.design-static-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
}

.date-filter-panel.design-static-control .sidebar-svg {
  width: 17px;
  height: 17px;
}

.design-table-demo {
  padding: 0;
  overflow-x: auto;
}

.design-table-demo table {
  min-width: 680px;
}

.design-header-example {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: #fff;
}

.design-system-section .empty-state {
  min-height: 160px;
}

.design-system-section .breadcrumb-nav {
  margin: 0 0 8px;
}

.design-system-section .heatmap-cell {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 38px;
  margin-right: 8px;
  border-radius: 8px;
  background: #e8f6ef;
  color: var(--success);
  font-weight: 900;
}

.design-system-section .heatmap-cell.hidden {
  background: #f1f5f9;
  color: var(--muted);
}

.demo-guide-body {
  display: grid;
  gap: 12px;
  padding: 16px 0;
}

.demo-scenario-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
}

.demo-scenario-card.is-active {
  border-color: rgba(44, 123, 229, 0.45);
  background: #f4f8ff;
}

.scenario-header {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.scenario-header h3 {
  margin: 0;
  color: var(--navy);
  font-size: 15px;
}

.scenario-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}

.demo-step-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 22px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.demo-reset-modal {
  width: min(560px, calc(100vw - 32px));
}

.support-preview-banner {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #d7b96d;
  border-radius: var(--radius-compact);
  background: #fff8e6;
  color: var(--navy);
}

.support-preview-banner p {
  margin: 2px 0 0;
  color: #665322;
  font-size: 12.5px;
  line-height: 1.35;
}

.notice-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-control);
  background: var(--blue-soft);
  color: var(--client-primary);
  flex: 0 0 auto;
}

.comment-stack {
  display: grid;
  gap: 8px;
}

.color-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border-radius: 999px;
  vertical-align: middle;
}

.tenant-note {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #bfd5ee;
  border-radius: var(--radius-compact);
  background: #f0f7ff;
  color: var(--navy);
  font-size: 13px;
  line-height: 1.45;
}

.tenant-note::before,
.rule-callout::before,
.contrast-warning::before,
.error-state::before {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  flex: 0 0 auto;
}

.tenant-note::before {
  content: "i";
  background: #dbeeff;
  color: var(--blue);
}

.tenant-note.warning-note {
  border-color: #ecd1a8;
  background: var(--accent-soft);
  color: #5a3710;
}

.tenant-note.warning-note::before {
  content: "!";
  background: #ffe4bd;
  color: var(--warning);
}

.setup-stepper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.setup-step {
  display: grid;
  align-items: center;
  justify-items: center;
  gap: 6px;
  min-height: 74px;
  padding: 8px;
  background: #f8fafc;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.setup-step span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #dbe7f4;
  color: var(--navy);
  font-weight: 900;
}

.setup-step.active {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--navy);
}

.setup-step.complete span {
  background: #e8f6ef;
  color: var(--success);
}

.setup-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.setup-progress-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.setup-progress-card.compact-notice-card {
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
}

.setup-complete-inline {
  margin-bottom: 16px;
}

.compact-header {
  margin-bottom: 10px;
}

.compact-header h2 {
  margin: 0;
}

.setup-meter {
  margin: 0;
}

.setup-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12.5px;
}

.setup-card-meta strong {
  color: var(--navy);
}

.setup-progress-actions {
  justify-self: end;
}

.setup-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.setup-stat {
  display: grid;
  gap: 4px;
  min-height: 86px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
}

.setup-stat span,
.setup-stat small {
  color: var(--muted);
  font-size: 12px;
}

.setup-stat strong {
  color: var(--navy);
  font-size: 20px;
}

.modal-backdrop.setup-wizard-backdrop {
  z-index: var(--z-setup-wizard);
  align-items: stretch;
  padding: 24px;
}

.setup-wizard {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(1180px, 100%);
  max-height: calc(100vh - 48px);
  margin: auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.setup-wizard-header,
.setup-wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.setup-wizard-header h2,
.setup-wizard-header p {
  margin: 0;
}

.setup-wizard-header p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.setup-wizard-header-actions,
.setup-wizard-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.setup-wizard-progress {
  display: grid;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
}

.setup-wizard-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 0;
}

.setup-wizard-stepper {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  border-right: 1px solid var(--line);
  background: #f8fafc;
}

.setup-wizard-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-compact);
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.setup-wizard-step span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #dbe7f4;
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
}

.setup-wizard-step strong,
.setup-wizard-step small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setup-wizard-step strong {
  color: var(--navy);
  font-size: 13px;
}

.setup-wizard-step small {
  grid-column: 2;
  color: var(--muted);
  font-size: 11.5px;
}

.setup-wizard-step.active {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.setup-wizard-content {
  min-width: 0;
  overflow-y: auto;
  padding: 18px;
}

.wizard-step-panel {
  display: grid;
  gap: 14px;
}

.setup-brand-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
}

.setup-color-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.setup-color-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12.5px;
}

.setup-color-row i {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
}

.setup-confirm {
  width: fit-content;
}

.table-scroll {
  overflow-x: auto;
}

.setup-wizard-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.field.wide {
  grid-column: 1 / -1;
}

.field small,
.email-preview small,
td small {
  color: var(--muted);
}

.validation-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.validation-list li + li {
  margin-top: 8px;
}

.subpanel {
  padding: var(--space-compact);
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
  min-width: 0;
  box-shadow: none;
  overflow-wrap: break-word;
}

.nested-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
}

.nested-panel h3 {
  margin: 0;
  color: var(--navy);
  font-size: 14px;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
}

.readiness-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.readiness-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
}

.readiness-item span {
  color: var(--muted);
  font-weight: 700;
}

.setup-shortcut-card {
  width: 100%;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.setup-shortcut-card span {
  display: grid;
  gap: 4px;
  color: var(--navy);
}

.setup-shortcut-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
}

.setup-shortcut-card:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.readiness-meter {
  height: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  border-radius: 999px;
  background: #dde6f0;
}

.readiness-meter span {
  display: block;
  height: 100%;
  background: var(--success);
}

.email-preview {
  display: grid;
  gap: 12px;
  padding: var(--space-compact);
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
}

.toast {
  position: sticky;
  top: 94px;
  z-index: 6;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border: 1px solid #b8dfce;
  border-radius: var(--radius-compact);
  background: #e8f6ef;
  color: var(--success);
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}

.toast::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #d6f1e3;
  color: var(--success);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.compact-panel {
  padding: 14px 18px;
}

.date-range-modal {
  display: grid;
  width: min(640px, calc(100vw - 40px));
  max-height: min(90vh, 560px);
  overflow: hidden;
  padding: 0;
  border-radius: 16px;
}

.modal-backdrop.date-range-modal-backdrop {
  z-index: var(--z-date-modal);
}

.date-range-modal .modal-header {
  align-items: flex-start;
  padding: 24px 32px;
  border-bottom: 1px solid var(--line);
}

.date-range-modal .modal-header > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.date-range-modal .modal-header h2 {
  margin: 0;
  color: var(--navy);
  font-size: 24px;
  line-height: 1.18;
}

.date-range-modal .modal-header p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.date-range-modal .modal-header .icon-only {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}

.date-range-modal > .settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 20px 32px 0;
}

.date-range-modal .field {
  gap: 8px;
}

.date-range-modal .field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.date-range-modal .field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--navy);
  font-size: 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.date-range-modal .compact-error {
  margin: 16px 32px 0;
}

.date-range-modal .modal-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  padding: 20px 32px 28px;
}

.date-range-modal .modal-actions button {
  min-width: 96px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 39, 66, 0.45);
}

.notification-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-notification);
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 74px 22px 20px;
  background: rgba(15, 39, 66, 0.14);
}

.notification-center {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(420px, 100%);
  max-height: calc(100vh - 96px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 22px 55px rgba(15, 39, 66, 0.22);
}

.notification-center-header,
.notification-controls,
.notification-footer {
  padding: 14px 16px;
}

.notification-center-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.notification-center-header h2 {
  margin: 0;
  color: var(--navy);
  font-size: 18px;
}

.notification-center-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.notification-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 8px;
}

.icon-button .sidebar-svg {
  width: 18px;
  height: 18px;
}

.notification-controls {
  display: grid;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfdff;
}

.notification-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.notification-tabs button {
  min-height: 32px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.notification-tabs button.active {
  border-color: rgba(44, 123, 229, 0.36);
  background: var(--blue-soft);
  color: var(--navy);
}

.notification-list {
  display: grid;
  gap: 14px;
  overflow-y: auto;
  padding: 14px 16px;
}

.notification-date-group {
  display: grid;
  gap: 8px;
}

.notification-date-group h3 {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.notification-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.notification-card.unread {
  border-color: rgba(44, 123, 229, 0.28);
  background: #f5f9ff;
}

.notification-card:focus-visible {
  outline: 3px solid rgba(44, 123, 229, 0.22);
  outline-offset: 2px;
}

.notification-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--navy);
}

.notification-icon.warning {
  background: #fff7ed;
  color: #9a3412;
}

.notification-icon.danger {
  background: #fef2f2;
  color: #991b1b;
}

.notification-icon .sidebar-svg {
  width: 18px;
  height: 18px;
}

.notification-card-main {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.notification-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.notification-title-row strong {
  color: var(--navy);
  font-size: 13.5px;
  line-height: 1.3;
}

.notification-dot {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--blue);
}

.notification-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.notification-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11.5px;
}

.notification-action {
  justify-self: start;
  margin-top: 2px;
}

.notification-footer {
  border-top: 1px solid var(--line);
  background: #fbfdff;
}

.modal {
  width: min(720px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--space-card);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(15, 39, 66, 0.22);
}

.drawer-backdrop {
  z-index: var(--z-drawer);
  place-items: stretch end;
  padding: 0;
}

.detail-drawer {
  width: min(520px, 100%);
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
}

.question-request-drawer {
  width: min(720px, 100%);
}

.drawer-section {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.drawer-section h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.detail-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.detail-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.detail-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.detail-list dd {
  margin: 0;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.modal * {
  max-width: 100%;
}

.ui-modal {
  width: min(760px, calc(100vw - 32px));
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-card);
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px var(--space-card);
  background: #fff;
}

.modal-header {
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0 0 4px;
  font-size: 19px;
}

.modal-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.modal-grid {
  max-height: min(62vh, 620px);
  overflow-y: auto;
  padding: 18px var(--space-card);
}

.modal-footer {
  position: sticky;
  bottom: 0;
  border-top: 1px solid var(--line);
  justify-content: flex-end;
}

.compact-error {
  margin: 14px 20px 0;
  padding: 12px;
}

.sr-only {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  margin: -1px;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.import-modal {
  width: min(920px, calc(100vw - 32px));
}

.import-flow {
  display: grid;
  gap: 14px;
  max-height: min(66vh, 680px);
  overflow-y: auto;
  padding: 18px var(--space-card);
  background: var(--surface-soft);
}

.import-step-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: #fff;
}

.import-step-card.wide {
  min-width: 0;
}

.import-step-heading {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.import-step-heading > span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--client-primary);
  font-size: 12px;
  font-weight: 900;
}

.import-step-heading h3 {
  margin: 0 0 3px;
  font-size: 14px;
}

.import-step-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}

.import-dropzone {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 18px;
  border: 1px dashed #b8c8da;
  border-radius: var(--radius-compact);
  background: #f8fbff;
  color: var(--navy);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.import-dropzone:hover,
.import-dropzone:focus-visible,
.import-dropzone.is-dragging {
  border-color: var(--client-primary);
  background: var(--blue-soft);
  outline: none;
}

.import-dropzone strong {
  font-size: 13.5px;
}

.import-dropzone small {
  color: var(--muted);
  font-size: 12px;
}

.import-file-chip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface-soft);
}

.import-file-chip .sidebar-svg {
  width: 18px;
  height: 18px;
}

.import-file-chip strong {
  color: var(--navy);
  font-size: 13px;
}

.import-file-chip small {
  color: var(--muted);
}

.import-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 10px;
}

.import-summary-grid article {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
}

.import-summary-grid span {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
}

.import-summary-grid strong {
  color: var(--navy);
  font-size: 24px;
}

.import-summary-grid .success {
  border-color: #b9dfc5;
  background: #f0fbf3;
}

.import-summary-grid .warning {
  border-color: #ecd1a8;
  background: #fff8e6;
}

.import-summary-grid .danger {
  border-color: #efb3b3;
  background: #fff5f5;
}

.import-valid-only {
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
  max-width: max-content;
  padding: 8px 10px;
  border: 1px solid #ecd1a8;
  border-radius: var(--radius-control);
  background: #fff8e6;
}

.import-valid-only small {
  color: #7f4a08;
  font-size: 12px;
}

.import-preview-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: #fff;
}

.import-preview-table {
  min-width: 760px;
}

.import-preview-table td {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-row-invalid {
  background: #fff8f8;
}

.import-row-warning {
  background: #fffaf0;
}

.import-error-text {
  color: #8a2b2b;
  font-size: 12px;
  font-weight: 700;
  white-space: normal;
}

.import-complete-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #b9dfc5;
  border-radius: var(--radius-compact);
  background: #f0fbf3;
}

.import-complete-card h3,
.import-complete-card p {
  margin: 0;
}

.import-complete-card p {
  margin-top: 2px;
  color: var(--ink);
  font-size: 13px;
}

.import-complete-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.import-footer {
  flex-wrap: wrap;
}

.compact-permissions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.action-modal {
  width: min(920px, 100%);
}

.cycle-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.cycle-tabs button {
  min-height: 36px;
  padding: 0 12px;
  background: #f8fafc;
}

.cycle-tabs button.active {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.survey-preview-list {
  display: grid;
  gap: 10px;
}

.survey-preview-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
}

.survey-preview-item small {
  color: var(--muted);
  font-size: 12px;
}

.survey-shell {
  width: min(860px, 100%);
  margin: 0 auto;
}

body.survey-focus-mode {
  --secondary-header-height: 0px;
}

body.survey-focus-mode .secondary-context-header {
  display: none;
}

.survey-shell textarea {
  min-height: 150px;
  padding: 12px;
  resize: vertical;
}

.completion-panel {
  display: grid;
  gap: 14px;
}

.manager-response {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
  font-size: 13px;
  line-height: 1.45;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.insight-card {
  display: grid;
  gap: 10px;
  padding: var(--space-compact);
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
}

.insight-card p {
  font-size: 13px;
}

.insight-card.success {
  border-color: #b8dfce;
}

.insight-card.warning {
  border-color: #ecd1a8;
}

.insight-card.danger {
  border-color: #f0b8b1;
}

.insight-action-section {
  display: grid;
  gap: 14px;
}

.report-story-section {
  display: grid;
  gap: 14px;
}

.report-story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.report-story-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
}

.report-story-card.success {
  border-color: #b8dfce;
  background: #f7fcfa;
}

.report-story-card.warning {
  border-color: #ecd1a8;
  background: #fffaf2;
}

.report-story-card.danger {
  border-color: #f0b8b1;
  background: #fff7f5;
}

.report-story-card strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
}

.report-story-card p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.story-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.next-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.next-action-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
}

.next-action-card.success {
  border-color: #b8dfce;
  background: #f7fcfa;
}

.next-action-card.warning {
  border-color: #ecd1a8;
  background: #fffaf2;
}

.next-action-card.danger {
  border-color: #f0b8b1;
  background: #fff7f5;
}

.next-action-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--navy);
}

.next-action-icon.success {
  background: #e9f8f1;
  color: #166534;
}

.next-action-icon.warning {
  background: #fff3db;
  color: #92400e;
}

.next-action-icon.danger {
  background: #fee8e5;
  color: #991b1b;
}

.next-action-icon .sidebar-svg {
  width: 18px;
  height: 18px;
}

.next-action-body {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.next-action-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.next-action-card h3 {
  margin: 0;
  color: var(--navy);
  font-size: 14px;
  line-height: 1.3;
}

.next-action-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}

.next-action-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.next-action-recommendation {
  display: grid;
  gap: 2px;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.next-action-recommendation strong {
  color: var(--navy);
  font-size: 11.5px;
}

.next-action-recommendation span {
  color: var(--muted);
  font-size: 12px;
}

.next-action-card > button {
  grid-column: 2;
  justify-self: start;
  align-self: end;
}

.action-card-list {
  display: grid;
  gap: 12px;
}

.action-card {
  display: grid;
  gap: 10px;
  padding: var(--space-compact);
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
}

.action-card h3 {
  margin: 0;
  color: var(--navy);
  font-size: 14px;
}

.action-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 14px;
}

.action-detail .subpanel {
  min-width: 0;
}

.source-context {
  display: grid;
  gap: 10px;
  padding: var(--space-compact);
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 12px 12px 12px 18px;
  border-left: 3px solid var(--blue);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
}

.template-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.benchmark-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.benchmark-card {
  padding: var(--space-compact);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.benchmark-explainer-card {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid #bfd5ee;
  border-radius: var(--radius-compact);
  background: #f6fbff;
}

.benchmark-explainer-card strong {
  display: block;
  color: var(--navy);
  font-size: 14px;
}

.benchmark-explainer-card p,
.benchmark-explainer-card small {
  display: block;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}

.benchmark-gap {
  color: var(--muted);
  font-weight: 800;
}

.benchmark-gap.positive {
  color: var(--success);
}

.benchmark-gap.negative {
  color: var(--danger);
}

.benchmark-gap.aligned {
  color: var(--blue);
}

.benchmark-unavailable {
  color: var(--muted);
  font-weight: 800;
  text-decoration: underline dotted #94a3b8;
  text-underline-offset: 3px;
}

.benchmark-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: #fff;
}

.benchmark-legend span {
  min-height: 24px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 800;
}

.benchmark-card p {
  min-height: 36px;
  color: var(--muted);
  font-size: 12.5px;
}

.benchmark-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.benchmark-values span {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: var(--radius-control);
  background: #f8fafc;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}

.benchmark-values strong {
  color: var(--navy);
  font-size: 17px;
}

.report-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.report-nav button,
.link-button {
  border: 0;
  background: transparent;
  color: var(--navy);
}

.report-nav button {
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-control);
}

.report-nav button.active,
.report-nav button:hover {
  background: var(--blue-soft);
}

.link-button {
  padding: 0;
  font-weight: 800;
  text-align: left;
}

.heatmap-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.heatmap-table {
  min-width: 980px;
  width: max-content;
  border-collapse: separate;
  border-spacing: 0;
}

.heatmap-table th {
  background: #f8fafc;
}

.heatmap-table th:first-child,
.heatmap-table td:first-child {
  position: sticky;
  left: 0;
  min-width: 190px;
  z-index: 4;
  background: #f8fafc;
  box-shadow: 8px 0 14px rgba(15, 39, 66, 0.05);
}

.heatmap-table .metric-heading {
  height: 118px;
  min-width: 62px;
  max-width: 72px;
  padding: 6px 4px;
  vertical-align: bottom;
}

.heatmap-table .metric-heading .link-button {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  font-size: 11px;
  line-height: 1.1;
}

.heatmap-table .team-row th {
  color: var(--muted);
  font-weight: 600;
}

.heatmap-table .team-row .row-label {
  padding-left: 18px;
}

.heatmap-table .department-row th {
  color: var(--navy);
}

.heatmap-table .org-row th {
  color: var(--navy);
  font-weight: 800;
}

.heatmap-table td,
.heatmap-table th {
  min-width: 62px;
  padding: 6px 8px;
  border-bottom: 1px solid #edf1f6;
  border-right: 1px solid #edf1f6;
  text-align: center;
  vertical-align: middle;
}

.heatmap-cell {
  display: inline-grid;
  place-items: center;
  width: 100%;
  min-height: 30px;
  padding: 0 6px;
  border-radius: 4px;
  border: 1px solid transparent;
  color: #0b1d31;
  font-size: 12px;
  font-weight: 800;
}

.heatmap-cell.strong,
.heatmap-legend .strong {
  background: #e6f4ed;
  color: #17613f;
}

.heatmap-cell.moderate,
.heatmap-legend .moderate {
  background: #fff4db;
  color: #855d0c;
}

.heatmap-cell.low,
.heatmap-legend .low {
  background: #fdecea;
  color: #9e2f24;
}

.heatmap-cell.hidden,
.heatmap-legend .hidden {
  background: #eef2f6;
  color: var(--muted);
}

.heatmap-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.heatmap-legend span {
  min-height: 24px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
}

.benchmark-values .score-tooltip-content span,
.heatmap-legend .score-tooltip-content span {
  display: block;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #42546a;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.35;
  text-transform: none;
}

.benchmark-values .score-tooltip-content strong,
.heatmap-legend .score-tooltip-content strong {
  display: block;
  color: var(--navy);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.pulse-detail-drawer {
  width: clamp(560px, 50vw, 820px);
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
}

.pulse-detail-drawer .kpi-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pulse-detail-drawer .kpi-card {
  padding: 12px;
}

.pulse-detail-drawer .kpi-card strong {
  margin-top: 6px;
  font-size: 23px;
}

.pulse-modal-header {
  align-items: flex-start;
  gap: 12px;
}

.pulse-modal-actions {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.pulse-date-filter {
  min-width: min(360px, 100%);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
}

.pulse-date-main,
.pulse-date-custom {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 8px;
}

.pulse-date-main label {
  width: 100%;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.pulse-date-main select {
  width: 150px;
  min-height: 32px;
  font-size: 12.5px;
}

.pulse-date-custom {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.pulse-date-custom .field {
  width: 130px;
}

.pulse-inline-error {
  margin: 8px 0 0;
}

.compact-drawer-header {
  margin-bottom: 10px;
}

.metric-trend-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metric-trend-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
  color: var(--navy);
  text-align: left;
}

.metric-trend-card span {
  font-size: 12.5px;
  font-weight: 800;
}

.metric-trend-card strong {
  font-size: 20px;
}

.metric-trend-card small {
  color: var(--muted);
  font-size: 11.5px;
}

.sparkline {
  position: relative;
  display: block;
  height: 24px;
  overflow: hidden;
  border-radius: var(--radius-control);
  background: linear-gradient(90deg, #e9eef5, #f7f9fc);
}

.sparkline::after {
  content: "";
  position: absolute;
  inset: 7px 8px;
  width: var(--spark);
  border-top: 3px solid var(--blue);
  border-radius: 999px;
  transform: skewX(-18deg);
}

.drawer-table {
  padding: 0;
  box-shadow: none;
}

.submetric-drawer-accordion {
  display: grid;
  gap: 8px;
}

.submetric-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: #fff;
}

.submetric-group-header {
  display: grid;
  grid-template-columns: 22px minmax(160px, 1fr) 74px 58px 84px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  background: var(--surface-soft);
  color: var(--navy);
  text-align: left;
  cursor: pointer;
}

.submetric-toggle-symbol {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid #c7d3e1;
  border-radius: 5px;
  background: #fff;
  font-size: 13px;
  font-weight: 900;
}

.submetric-group-header strong {
  font-size: 13.5px;
}

.submetric-group-header span,
.submetric-group-header small {
  font-size: 12px;
}

.submetric-group-body {
  overflow-x: auto;
}

.submetric-grid-head,
.submetric-grid-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.4fr) repeat(6, minmax(74px, 0.7fr));
  align-items: center;
  gap: 8px;
  min-width: 720px;
  padding: 7px 10px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
}

.submetric-grid-head {
  color: var(--muted);
  background: #f8fafc;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.submetric-grid-row .link-button {
  justify-content: flex-start;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-notice-stack {
  display: grid;
  gap: 8px;
}

.dashboard-priority-section {
  display: grid;
  gap: 14px;
}

.dashboard-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.dashboard-action-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 98px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
}

.dashboard-action-card.danger {
  border-color: #e8bdba;
  background: #fff7f5;
}

.dashboard-action-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.dashboard-action-title strong {
  color: var(--navy);
  font-size: 14px;
}

.dashboard-action-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}

.dashboard-summary-card {
  display: grid;
  align-content: start;
  gap: 14px;
}

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

.dashboard-mini-kpis .kpi-card {
  min-height: 118px;
}

.mini-trend-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
}

.mini-trend-card strong {
  display: block;
  color: var(--navy);
  font-size: 14px;
}

.mini-trend-card small {
  color: var(--muted);
}

.mini-trend-bars {
  display: flex;
  align-items: end;
  gap: 6px;
  height: 92px;
}

.mini-trend-bars span {
  flex: 1;
  min-width: 8px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #2d6cdf, #9db8ee);
}

.mini-trend-card.green .mini-trend-bars span {
  background: linear-gradient(180deg, #3d6f58, #a9d3bd);
}

.employee-hero-actions {
  display: grid;
  gap: 12px;
}

.compact-notice-card {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
}

.notice-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-control);
  background: var(--blue-soft);
  color: var(--blue);
}

.notice-icon svg {
  width: 16px;
  height: 16px;
}

.compact-notice-card strong {
  display: block;
  color: var(--navy);
  font-size: 13.5px;
}

.compact-notice-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.notice-badge,
.notice-action {
  justify-self: end;
}

.notice-action {
  grid-column: 2 / -1;
}

.drawer-tabs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.drawer-tabs article {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-compact);
  background: var(--surface-soft);
}

@media (max-width: 1180px) {
  .global-filter-row {
    align-items: stretch;
    flex-direction: column;
  }

  .question-bank-header-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .question-bank-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .date-filter-panel,
  .context-filter-card,
  .context-filter-controls {
    width: 100%;
  }

  .context-filter-card,
  .context-filter-card .filter-bar,
  .context-filter-controls,
  .context-filter-controls .filter-bar {
    justify-content: flex-start;
  }

  .filter-action-group {
    margin-left: auto;
  }

  .pulse-detail-drawer {
    width: min(85vw, 760px);
  }

  .pulse-modal-header {
    flex-direction: column;
  }

  .pulse-modal-actions {
    width: 100%;
  }

  .pulse-date-filter {
    flex: 1;
  }

  .kpi-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .misgana-kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  }

  .grid-2,
  .grid-3,
  .profile-settings-layout,
  .misgana-layout,
  .action-detail-grid {
    grid-template-columns: 1fr;
  }

  .usage-donut-layout {
    grid-template-columns: 1fr;
  }

  .distribution-donut-layout {
    justify-items: center;
    gap: 16px;
  }

  .distribution-donut-layout .status-stack {
    width: min(100%, 360px);
  }

  .setup-stepper,
  .permission-grid,
  .readiness-list,
  .benchmark-grid,
  .insight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .branding-card-layout {
    grid-template-columns: 1fr;
  }

  .setup-wizard-layout {
    grid-template-columns: 1fr;
  }

  .setup-wizard-stepper {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .setup-progress-card,
  .setup-progress-card.compact-notice-card,
  .setup-brand-row {
    grid-template-columns: 1fr;
  }

  .setup-progress-actions {
    justify-self: start;
  }
}

@media (max-width: 820px) {
  :root {
    --topbar-height: 56px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 30;
    width: min(280px, 85vw);
    height: 100vh;
    max-height: 100vh;
    padding: 14px 16px;
    overflow-y: auto;
    box-shadow: 18px 0 34px rgba(15, 39, 66, 0.22);
    transform: translateX(0);
  }

  body.sidebar-collapsed .sidebar {
    width: min(280px, 85vw);
    max-height: 100vh;
    overflow-y: auto;
    transform: translateX(-105%);
  }

  .main-panel,
  body.sidebar-collapsed .main-panel {
    margin-left: 0;
    padding-top: var(--topbar-height);
  }

  .mobile-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    grid-column: 1;
  }

  .topbar-brand {
    display: flex;
    grid-column: 2;
    min-width: 0;
    flex: 1 1 auto;
    max-width: none;
  }

  .topbar-brand-mark {
    width: 32px;
    height: 32px;
  }

  .context-filter-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .filters-popover {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    top: auto;
    width: auto;
    max-height: calc(100vh - 96px);
    border-radius: 14px;
  }

  .filters-panel-list {
    max-height: 55vh;
  }

  .topbar {
    position: fixed;
    right: 0;
    left: 0;
    grid-template-columns: auto minmax(0, 1fr) auto;
    height: var(--topbar-height);
    min-height: var(--topbar-height);
    padding: 10px 12px;
    gap: 10px;
  }

  .topbar-actions {
    grid-column: 3;
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }

  body.sidebar-collapsed .topbar {
    left: 0;
  }

  .topbar-context {
    display: none;
  }

  .topbar-context span {
    font-size: 10px;
  }

  .topbar-context strong {
    font-size: 15px;
  }

  .secondary-context-header {
    top: var(--topbar-height);
    right: 0;
    left: 0;
  }

  body.sidebar-collapsed .secondary-context-header {
    left: 0;
  }

  .secondary-context-header.is-scrolling-down,
  .secondary-context-header.is-scrolling-up {
    transform: translateY(0);
  }

  .secondary-context-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 8px 12px;
  }

  .secondary-context-left,
  .secondary-context-right,
  .secondary-filter-card,
  .secondary-filter-left,
  .secondary-filter-right,
  .context-filter-controls {
    align-items: stretch;
    width: 100%;
  }

  .secondary-context-right,
  .secondary-filter-right {
    margin-left: 0;
    justify-content: flex-start;
  }

  .secondary-filter-card {
    flex-direction: column;
  }

  .date-filter-panel {
    width: 100%;
  }

  .organization-context-select {
    width: 100%;
    justify-content: space-between;
  }

  .organization-context-select select {
    flex: 1;
    width: auto;
    min-width: 0;
  }

  h1 {
    font-size: 24px;
  }

  .user-chip {
    justify-content: flex-start;
  }

  .workspace-switcher {
    justify-content: space-between;
    width: 100%;
  }

  .workspace-context-badge {
    justify-content: center;
    width: 100%;
    max-width: none;
  }

  .workspace-switcher select {
    flex: 1;
    min-width: 0;
  }

  .notification-trigger {
    width: 40px;
    height: 40px;
  }

  .user-avatar-button {
    width: 40px;
    height: 40px;
  }

  .user-menu-popover {
    position: fixed;
    top: 66px;
    right: 12px;
    left: 12px;
    width: auto;
  }

  .notification-backdrop {
    z-index: var(--z-notification);
    align-items: stretch;
    padding: 0;
  }

  .notification-center {
    width: 100%;
    min-height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .notification-controls {
    padding: 12px;
  }

  #orgSelect {
    width: 100%;
  }

  .content {
    padding: calc(20px + var(--secondary-header-height)) 16px 34px;
  }

  .compact-filter-bar input,
  .compact-filter-bar select,
  .context-filter-controls button {
    width: 100%;
  }

  .filter-action-group {
    width: 100%;
    margin-left: 0;
  }

  .active-filter-chips {
    width: 100%;
  }

  .breadcrumb-nav {
    margin: -2px 0 -8px;
  }

  .breadcrumb-nav ol {
    flex-wrap: nowrap;
  }

  .breadcrumb-nav li:not(:first-child):not(:last-child) {
    display: none;
  }

  .breadcrumb-nav li:last-child::before {
    content: "\203A";
    margin: 0 8px;
  }

  .breadcrumb-link,
  .breadcrumb-current {
    max-width: 42vw;
  }

  .filter-action-group button {
    width: auto;
    flex: 1 1 0;
  }

  .kpi-grid,
  .metric-grid,
  .metric-drilldown-layout,
  .settings-grid,
  .action-detail-grid,
  .setup-stepper,
  .permission-grid,
  .readiness-list,
  .benchmark-grid,
  .insight-grid,
  .branding-color-grid {
    grid-template-columns: 1fr;
  }

  .benchmark-explainer-card {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .settings-select-row,
  .notification-template-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .template-row-actions {
    justify-content: flex-start;
  }

  .branding-logo-row,
  .mini-product-preview {
    grid-template-columns: 1fr;
  }

  .logo-preview-box {
    width: 100%;
    max-width: 220px;
  }

  .compact-logo-box {
    width: 56px;
  }

  .login-logo-box {
    width: 100%;
    max-width: 220px;
  }

  .scale,
  .scale.enps-scale {
    grid-template-columns: repeat(5, minmax(48px, 1fr));
  }

  .scale button {
    min-height: 52px;
    font-size: 16px;
  }

  .survey-shell {
    width: 100%;
  }

  .survey-question,
  .survey-start-card,
  .completion-panel {
    min-height: calc(100vh - var(--topbar-height) - 48px);
  }

  .survey-question-header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .survey-mobile-title {
    display: grid;
    gap: 2px;
    padding-bottom: 2px;
  }

  .survey-mobile-title span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }

  .survey-mobile-title strong {
    color: var(--navy);
    font-size: 16px;
  }

  .survey-question-text {
    font-size: 22px;
  }

  .scale,
  .scale.enps-scale {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .scale-labels {
    flex-direction: column;
  }

  .survey-shell .survey-actions {
    position: sticky;
    right: 0;
    bottom: 0;
    z-index: 4;
    margin-inline: -16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -10px 24px rgba(15, 39, 66, 0.08);
  }

  .survey-shell .survey-actions button {
    flex: 1 1 0;
  }

  .table-panel {
    overflow-x: auto;
  }

  .action-modal {
    width: 100%;
    max-height: 94vh;
  }

  .action-card,
  .timeline-item,
  .source-context {
    padding: 12px;
  }

  .panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .action-bar,
  .filter-bar,
  .setup-actions {
    align-items: stretch;
  }

  .filter-bar input,
  .filter-bar select,
  .question-bank-filter-bar input,
  .question-bank-filter-bar select,
  .date-filter-actions select,
  .date-filter-actions button,
  .date-filter-popover .field,
  .date-filter-popover button,
  .action-bar button,
  .setup-actions button {
    width: 100%;
  }

  .survey-shell .survey-actions button {
    width: auto;
    min-width: 0;
  }

  .status-row,
  .hierarchy-row,
  .manager-row,
  .readiness-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: 96vh;
    border-radius: 8px 8px 0 0;
  }

  .date-range-modal {
    width: 100%;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
  }

  .date-range-modal .modal-header {
    padding: 20px;
  }

  .date-range-modal > .settings-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px 20px 0;
  }

  .date-range-modal .compact-error {
    margin: 14px 20px 0;
  }

  .date-range-modal .modal-actions {
    align-items: stretch;
    padding: 18px 20px 22px;
  }

  .date-range-modal .modal-actions button {
    flex: 1 1 0;
    min-width: 0;
  }

  .pulse-detail-drawer {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
  }

  .usage-stack-row,
  .usage-bar-row,
  .usage-paired-row,
  .usage-progress-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .usage-donut {
    width: 136px;
    height: 136px;
  }

  .simple-donut {
    width: clamp(130px, 52vw, 150px);
    height: clamp(130px, 52vw, 150px);
  }

  .misgana-donut {
    width: 136px;
    height: 136px;
  }

  .pulse-detail-drawer .kpi-grid,
  .metric-trend-grid {
    grid-template-columns: 1fr;
  }

  .pulse-modal-actions,
  .pulse-date-main,
  .pulse-date-custom {
    align-items: stretch;
    flex-direction: column;
  }

  .pulse-date-main select,
  .pulse-date-main button,
  .pulse-date-custom .field,
  .pulse-date-custom button {
    width: 100%;
  }

  .submetric-group-header {
    grid-template-columns: 22px minmax(0, 1fr) auto;
  }

  .submetric-group-header small,
  .submetric-group-header > .badge {
    display: none;
  }

  .compact-notice-card {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .dashboard-action-card {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .dashboard-action-card button {
    grid-column: 2;
    justify-self: start;
    width: 100%;
  }

  .next-action-card {
    grid-template-columns: 32px minmax(0, 1fr);
    padding: 12px;
  }

  .next-action-icon {
    width: 32px;
    height: 32px;
  }

  .next-action-card > button {
    grid-column: 2;
    width: 100%;
  }

  .demo-qa-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .qa-summary {
    justify-content: flex-start;
  }

  .demo-mode-banner,
  .scenario-header {
    grid-template-columns: 1fr;
  }

  .demo-guide-drawer {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .survey-review-backdrop {
    align-items: stretch;
    padding: 0;
  }

  .survey-review-drawer {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .survey-review-header,
  .survey-review-footer,
  .survey-review-summary {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .survey-review-body {
    padding: 14px;
  }

  .survey-review-grid,
  .survey-review-summary {
    grid-template-columns: 1fr;
  }

  .survey-review-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .survey-review-row .badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .survey-review-footer .action-bar,
  .survey-review-footer button,
  .survey-review-header-actions {
    width: 100%;
  }

  .design-system-hero,
  .design-header-example {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .design-system-hero h2 {
    font-size: 24px;
  }

  .design-card-grid,
  .design-swatch-grid,
  .design-type-scale {
    grid-template-columns: 1fr;
  }

  .support-preview-banner {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .support-preview-banner .primary-btn {
    grid-column: 2;
    justify-self: start;
  }

  .notice-badge,
  .notice-action {
    grid-column: 2;
    justify-self: start;
  }

  .ui-modal {
    width: 100%;
    max-height: 96vh;
  }

  .import-modal {
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .import-flow {
    max-height: calc(100vh - 210px);
    padding: 14px;
  }

  .import-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .import-file-chip,
  .import-valid-only,
  .import-complete-card {
    align-items: stretch;
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .import-complete-card button {
    grid-column: 2;
    justify-self: start;
  }

  .modal-header,
  .modal-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .modal-footer button {
    width: 100%;
  }

  .modal-grid {
    max-height: 68vh;
    grid-template-columns: 1fr;
  }

  .setup-wizard-backdrop {
    padding: 0;
  }

  .setup-wizard {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .setup-wizard-header,
  .setup-wizard-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .setup-wizard-footer {
    position: sticky;
    bottom: 0;
    z-index: 3;
    background: var(--surface);
  }

  .setup-wizard-header-actions,
  .setup-wizard-footer button {
    width: 100%;
  }

  .setup-wizard-stepper {
    grid-template-columns: repeat(9, minmax(170px, 1fr));
  }

  .setup-summary-grid {
    grid-template-columns: 1fr;
  }

  .toast {
    top: 8px;
  }
}

@media (max-width: 560px) {
  .brand {
    padding-bottom: 14px;
  }

  .topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .topbar-brand {
    grid-column: 2;
    flex: 1 1 auto;
  }

  .topbar-context {
    display: none;
  }

  .topbar-actions {
    grid-column: 3;
  }

  .topbar-brand-copy span {
    display: none;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .role-switcher {
    margin: 14px 0;
  }

  .content {
    gap: 16px;
    padding: calc(16px + var(--secondary-header-height)) 12px 30px;
  }

  .panel,
  .table-panel,
  .kpi-card,
  .metric-card,
  .survey-question,
  .feedback-item,
  .recognition-item {
    box-shadow: 0 10px 24px rgba(15, 39, 66, 0.06);
  }

  .panel,
  .table-panel {
    padding: var(--space-card-mobile);
  }

  .profile-photo-card {
    align-items: center;
    flex-direction: column;
    text-align: center;
  }

  .kpi-card strong {
    font-size: 23px;
  }

  .scale,
  .scale.enps-scale {
    grid-template-columns: repeat(5, minmax(44px, 1fr));
    gap: 7px;
  }

  .heatmap-table {
    min-width: 920px;
  }

  .heatmap-table td,
  .heatmap-table th {
    min-width: 58px;
  }

  .heatmap-table th:first-child,
  .heatmap-table td:first-child {
    min-width: 150px;
  }

  .detail-drawer {
    width: 100%;
    border-radius: 8px 8px 0 0;
  }

  .skeleton-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .metric-submetric-stack .status-row,
  .submetric-question-row,
  .question-bank-total-row {
    align-items: center;
    flex-direction: row;
  }

  .submetric-breakdown-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .submetric-breakdown-row small,
  .submetric-breakdown-row .badge {
    grid-column: 1 / -1;
  }

  .submetric-question-row strong,
  .question-bank-total-row strong {
    margin-left: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .secondary-context-header {
    transition: none;
    animation: none;
    transform: none;
    will-change: auto;
  }

  .secondary-context-header.is-scrolling-down,
  .secondary-context-header.is-scrolling-up,
  .secondary-context-header.scroll-pulse {
    animation: none;
    transform: none;
  }
}
