@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  /* Aligned with client-connect-hub (shadcn) light tokens */
  --hub-bg: hsl(217 50% 97%);
  --hub-bg-soft: hsl(219 64% 96%);
  --hub-surface: #ffffff;
  --hub-surface-soft: hsl(220 100% 99%);
  --hub-text: hsl(222 47% 11%);
  --hub-text-soft: hsl(220 13% 34%);
  --hub-text-muted: hsl(220 9% 46%);
  --hub-border: hsl(220 13% 91%);
  --hub-accent: hsl(221 83% 53%);
  --hub-accent-strong: hsl(224 76% 48%);
  --hub-accent-soft: hsl(221 83% 53% / 0.1);
  --hub-ok: hsl(160 84% 34%);
  --hub-ok-soft: hsl(160 84% 34% / 0.12);
  --hub-warn: hsl(32 95% 44%);
  --hub-warn-soft: hsl(32 95% 44% / 0.14);
  --hub-danger: hsl(0 72% 51%);
  --hub-danger-soft: hsl(0 72% 51% / 0.12);
  --hub-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  --hub-shadow-sm: 0 12px 28px rgba(15, 23, 42, 0.08);
  --hub-radius-xl: 20px;
  --hub-radius-lg: 16px;
  --hub-radius-md: 12px;
  --hub-radius-sm: 10px;
}

body.hub-app {
  margin: 0;
  min-height: 100vh;
  background: var(--hub-bg);
  color: var(--hub-text);
  font-family: "Manrope", "Inter", sans-serif;
}

body.hub-app * {
  box-sizing: border-box;
}

body.hub-app img {
  max-width: 100%;
}

body.hub-app a {
  color: inherit;
  text-decoration: none;
}

body.hub-app button,
body.hub-app input,
body.hub-app textarea,
body.hub-app select {
  font: inherit;
}

.hub-shell {
  min-height: 100vh;
  display: flex;
  background: var(--hub-bg);
}

.hub-shell:not(.hub-shell--portal) {
  background:
    radial-gradient(circle at top right, hsl(221 83% 53% / 0.06), transparent 24%),
    var(--hub-bg);
}

.hub-sidebar {
  width: 248px;
  flex: 0 0 248px;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.94);
  border-right: 1px solid var(--hub-border);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 20;
  transition: width 180ms ease, transform 180ms ease;
}

.hub-shell.is-collapsed .hub-sidebar {
  width: 84px;
  flex-basis: 84px;
}

.hub-sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px 18px;
}

.hub-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid var(--hub-border);
}

.hub-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--hub-accent) 0%, var(--hub-accent-strong) 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

.hub-brand-mark img {
  width: 20px;
  height: 20px;
  filter: invert(1);
}

.hub-brand-copy {
  min-width: 0;
}

.hub-brand-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--hub-text);
}

.hub-brand-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--hub-text-muted);
}

.hub-shell.is-collapsed .hub-brand-copy,
.hub-shell.is-collapsed .hub-nav-label,
.hub-shell.is-collapsed .hub-nav-section-label,
.hub-shell.is-collapsed .hub-topbar-user-copy {
  display: none;
}

.hub-nav-section-label {
  display: block;
  margin: 6px 0 10px;
  padding: 0 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hub-text-muted);
}

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

.hub-nav-link,
.hub-nav-logout {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--hub-text-soft);
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.hub-nav-link:hover,
.hub-nav-logout:hover {
  background: rgba(15, 23, 42, 0.05);
  color: var(--hub-text);
}

.hub-nav-link.is-active {
  background: var(--hub-accent-soft);
  color: var(--hub-accent);
}

.hub-shell.is-collapsed .hub-nav-link,
.hub-shell.is-collapsed .hub-nav-logout {
  justify-content: center;
  padding-inline: 8px;
}

.hub-nav-icon {
  width: 18px;
  height: 18px;
  opacity: 0.9;
  flex: 0 0 18px;
}

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

.hub-shell.is-collapsed .hub-badge-count {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 10px;
  height: 10px;
  padding: 0;
  font-size: 0;
}

.hub-sidebar-footer {
  border-top: 1px solid var(--hub-border);
  padding: 12px 14px 18px;
}

.hub-main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hub-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--hub-border);
  backdrop-filter: blur(16px);
}

.hub-topbar-spacer {
  flex: 1;
}

.hub-menu-btn,
.hub-collapse-btn,
.hub-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--hub-border);
  background: rgba(255, 255, 255, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.hub-menu-btn:hover,
.hub-collapse-btn:hover,
.hub-icon-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.2);
  background: var(--hub-surface);
}

.hub-menu-btn img,
.hub-collapse-btn img,
.hub-icon-btn img {
  width: 18px;
  height: 18px;
}

.hub-topbar-user {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.hub-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--hub-accent-soft);
  color: var(--hub-accent);
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hub-topbar-user-copy {
  text-align: right;
}

.hub-topbar-user-copy p {
  margin: 0;
}

.hub-topbar-user-copy p:first-child {
  font-size: 14px;
  font-weight: 800;
  color: var(--hub-text);
}

.hub-topbar-user-copy p:last-child {
  font-size: 12px;
  color: var(--hub-text-muted);
  margin-top: 2px;
}

.hub-page {
  padding: 28px 24px 40px;
}

.hub-page-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.hub-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.hub-overline {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--hub-accent);
}

.hub-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.05;
  font-weight: 800;
}

.hub-subtitle {
  margin: 8px 0 0;
  color: var(--hub-text-muted);
  font-size: 15px;
  max-width: 720px;
  line-height: 1.6;
}

.hub-meta-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
  color: var(--hub-text-muted);
  font-size: 13px;
}

.hub-card,
.hub-panel,
.hub-alert,
.hub-stat-card,
.hub-list-panel {
  border-radius: var(--hub-radius-xl);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--hub-border);
  box-shadow: var(--hub-shadow-sm);
}

.hub-card.is-unread,
.hub-panel.is-unread,
.hub-list-panel.is-unread {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow:
    0 12px 28px rgba(15, 23, 42, 0.08),
    0 0 0 4px rgba(37, 99, 235, 0.06);
}

.hub-card,
.hub-panel,
.hub-alert,
.hub-stat-card {
  padding: 22px;
}

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

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

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

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

.hub-kpi-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hub-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hub-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: var(--hub-accent-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hub-kpi-icon img {
  width: 18px;
  height: 18px;
}

.hub-kpi-icon.is-warn {
  background: var(--hub-warn-soft);
}

.hub-kpi-icon.is-danger {
  background: var(--hub-danger-soft);
}

.hub-kpi-value {
  font-size: 34px;
  line-height: 1;
  font-weight: 800;
  margin: 0;
}

.hub-kpi-label {
  font-size: 13px;
  color: var(--hub-text-muted);
  margin: 6px 0 0;
}

.hub-kpi-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--hub-text-soft);
  margin-top: 2px;
}

.hub-kpi-note img {
  width: 14px;
  height: 14px;
  opacity: 0.75;
}

.hub-section {
  margin-top: 24px;
}

.hub-section:first-child {
  margin-top: 0;
}

.hub-section-head,
.hub-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.hub-section-title,
.hub-panel-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.hub-section-link,
.hub-inline-link {
  color: var(--hub-accent);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hub-section-link img,
.hub-inline-link img {
  width: 14px;
  height: 14px;
}

.hub-table-wrap {
  overflow-x: auto;
}

.hub-table {
  width: 100%;
  border-collapse: collapse;
}

.hub-table thead th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--hub-text-muted);
  padding: 14px 18px;
  border-bottom: 1px solid var(--hub-border);
  background: rgba(241, 245, 249, 0.64);
}

.hub-table tbody td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  vertical-align: middle;
}

.hub-table tbody tr:last-child td {
  border-bottom: 0;
}

.hub-table tbody tr.is-clickable:hover {
  background: rgba(37, 99, 235, 0.04);
}

.hub-person {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hub-person-copy {
  min-width: 0;
}

.hub-person-name {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
}

.hub-person-meta {
  margin: 4px 0 0;
  color: var(--hub-text-muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hub-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.hub-status.ok {
  background: var(--hub-ok-soft);
  color: var(--hub-ok);
}

.hub-status.warn {
  background: var(--hub-warn-soft);
  color: var(--hub-warn);
}

.hub-status.danger {
  background: var(--hub-danger-soft);
  color: var(--hub-danger);
}

.hub-status.muted {
  background: rgba(148, 163, 184, 0.14);
  color: var(--hub-text-muted);
}

.hub-search-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.hub-search {
  position: relative;
  width: min(420px, 100%);
}

.hub-search img {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  opacity: 0.55;
}

.hub-input,
.hub-textarea,
.hub-select,
.hub-search input {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--hub-border);
  background: rgba(255, 255, 255, 0.92);
  color: var(--hub-text);
  padding: 12px 14px;
  outline: 0;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.hub-search input {
  padding-left: 42px;
}

.hub-textarea {
  min-height: 116px;
  resize: vertical;
}

.hub-input:focus,
.hub-textarea:focus,
.hub-select:focus,
.hub-search input:focus {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.hub-form-grid {
  display: grid;
  gap: 14px;
}

.hub-form-grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.hub-form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--hub-text);
}

.hub-filter-pills,
.hub-tab-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hub-pill,
.hub-tab-button {
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.13);
  color: var(--hub-text-soft);
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.hub-pill.is-active,
.hub-tab-button.is-active {
  background: var(--hub-accent);
  color: #fff;
}

.hub-tab-panel[hidden] {
  display: none;
}

.hub-list-panel {
  overflow: hidden;
}

.hub-list {
  display: grid;
}

.hub-list-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.hub-list-row:last-child {
  border-bottom: 0;
}

.hub-list-row:hover {
  background: rgba(37, 99, 235, 0.04);
}

.hub-list-copy {
  min-width: 0;
  flex: 1;
}

.hub-list-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
}

.hub-list-subtitle {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--hub-text-muted);
}

.hub-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--hub-text-muted);
}

.hub-empty strong {
  display: block;
  color: var(--hub-text);
  margin-bottom: 8px;
}

.hub-chat-shell {
  display: flex;
  flex-direction: column;
  min-height: 440px;
}

.hub-chat-messages {
  display: grid;
  gap: 14px;
  padding: 18px 0;
}

.hub-chat-day {
  text-align: center;
  font-size: 11px;
  color: var(--hub-text-muted);
}

.hub-chat-day span {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
}

.hub-chat-row {
  display: flex;
}

.hub-chat-row.client {
  justify-content: flex-end;
}

.hub-chat-bubble {
  max-width: min(84%, 520px);
  border-radius: 20px;
  padding: 14px 16px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--hub-text);
}

.hub-chat-row.client .hub-chat-bubble {
  background: linear-gradient(135deg, var(--hub-accent) 0%, var(--hub-accent-strong) 100%);
  color: #fff;
}

.hub-chat-bubble p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.hub-chat-meta {
  margin-top: 8px;
  font-size: 11px;
  opacity: 0.7;
}

.hub-chat-form {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--hub-border);
}

.hub-chat-form .hub-textarea {
  min-height: 54px;
  max-height: 140px;
}

.hub-icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--hub-border);
  background: rgba(255, 255, 255, 0.94);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
}

.hub-icon-circle img {
  width: 18px;
  height: 18px;
}

.hub-upload-drop {
  border: 2px dashed rgba(37, 99, 235, 0.24);
  border-radius: 18px;
  background: rgba(37, 99, 235, 0.04);
  padding: 26px 20px;
  text-align: center;
}

.hub-upload-drop strong {
  display: block;
  margin-top: 12px;
  font-size: 14px;
}

.hub-upload-drop p {
  margin: 8px 0 0;
  color: var(--hub-text-muted);
  font-size: 12px;
}

.hub-chip-list {
  display: grid;
  gap: 8px;
}

.hub-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.hub-chip span {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--hub-text);
}

.hub-chip small {
  color: var(--hub-text-muted);
  font-size: 12px;
}

.hub-button,
.hub-button-secondary,
.hub-button-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 14px;
  padding: 0 18px;
  min-height: 46px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.hub-button {
  background: linear-gradient(135deg, var(--hub-accent) 0%, var(--hub-accent-strong) 100%);
  color: #fff;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.22);
}

.hub-button:hover,
.hub-button-secondary:hover,
.hub-button-ghost:hover {
  transform: translateY(-1px);
}

.hub-button-secondary {
  background: rgba(255, 255, 255, 0.92);
  color: var(--hub-text);
  border-color: var(--hub-border);
}

.hub-button-ghost {
  background: transparent;
  color: var(--hub-text-soft);
  border-color: var(--hub-border);
}

.hub-button img,
.hub-button-secondary img,
.hub-button-ghost img {
  width: 16px;
  height: 16px;
  filter: currentColor;
}

.hub-alert {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.hub-alert-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: var(--hub-warn-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 46px;
}

.hub-alert-icon img {
  width: 20px;
  height: 20px;
}

.hub-alert h3 {
  margin: 0;
  font-size: 16px;
}

.hub-alert p {
  margin: 8px 0 0;
  color: var(--hub-text-soft);
  font-size: 14px;
  line-height: 1.6;
}

.hub-login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 18px;
}

.hub-login-card {
  width: min(100%, 420px);
  border-radius: 28px;
  border: 1px solid var(--hub-border);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--hub-shadow);
  padding: 36px 30px 28px;
}

.hub-login-logo {
  text-align: center;
  margin-bottom: 28px;
}

.hub-login-logo .hub-brand-mark {
  margin: 0 auto 16px;
}

.hub-login-logo h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.08;
}

.hub-login-logo p {
  margin: 8px 0 0;
  color: var(--hub-text-muted);
  font-size: 14px;
}

.hub-form-stack {
  display: grid;
  gap: 16px;
}

.hub-helper {
  margin-top: 14px;
  text-align: center;
  color: var(--hub-text-muted);
  font-size: 12px;
}

.hub-login-links {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.hub-login-link-card {
  display: block;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--hub-border);
  background: rgba(248, 250, 255, 0.96);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.hub-login-link-card:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.22);
  box-shadow: var(--hub-shadow-sm);
}

.hub-login-link-card strong,
.hub-login-link-card span {
  display: block;
}

.hub-login-link-card strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--hub-text);
}

.hub-login-link-card span {
  margin-top: 4px;
  font-size: 12px;
  color: var(--hub-text-muted);
  line-height: 1.55;
}

.hub-note-block {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(14, 159, 110, 0.08);
  color: var(--hub-ok);
  font-size: 13px;
  font-weight: 700;
}

.hub-note-block img {
  width: 16px;
  height: 16px;
}

.hub-mobile-bottom-nav {
  display: none;
}

.hub-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(5px);
  z-index: 15;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.hub-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

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

@media (max-width: 1180px) {
  .hub-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (max-width: 920px) {
  .hub-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    width: min(280px, 86vw);
    flex-basis: auto;
    box-shadow: var(--hub-shadow);
  }

  .hub-shell.is-sidebar-open .hub-sidebar {
    transform: translateX(0);
  }

  .hub-collapse-btn {
    display: none;
  }

  .hub-topbar {
    padding-inline: 18px;
  }

  .hub-page {
    padding: 22px 18px 108px;
  }

  .hub-page-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .hub-topbar-user-copy {
    display: none;
  }

  .hub-mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(var(--hub-mobile-count, 4), minmax(0, 1fr));
    gap: 4px;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 12;
    padding: 8px;
    border-radius: 22px;
    border: 1px solid var(--hub-border);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--hub-shadow);
    backdrop-filter: blur(20px);
  }

  .hub-mobile-bottom-nav a {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 10px 6px;
    border-radius: 16px;
    color: var(--hub-text-muted);
    font-size: 10px;
    font-weight: 800;
  }

  .hub-mobile-bottom-nav a.is-active {
    background: var(--hub-accent-soft);
    color: var(--hub-accent);
  }

  .hub-mobile-bottom-nav img {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 760px) {
  .hub-grid-4,
  .hub-grid-3,
  .hub-grid-2,
  .hub-form-grid.cols-2,
  .hub-form-grid.cols-3 {
    grid-template-columns: 1fr;
  }

  .hub-table thead {
    display: none;
  }

  .hub-table,
  .hub-table tbody,
  .hub-table tr,
  .hub-table td {
    display: block;
    width: 100%;
  }

  .hub-table tbody tr {
    padding: 12px 0;
  }

  .hub-table tbody td {
    padding: 8px 18px;
    border-bottom: 0;
  }

  .hub-person {
    align-items: flex-start;
  }

  .hub-login-card {
    padding-inline: 20px;
  }
}

@media (max-width: 560px) {
  .hub-title {
    font-size: 30px;
  }

  .hub-page {
    padding-inline: 14px;
  }

  .hub-card,
  .hub-panel,
  .hub-alert,
  .hub-stat-card {
    padding: 18px;
  }

  .hub-topbar {
    min-height: 66px;
    padding-inline: 14px;
  }

  .hub-chat-bubble {
    max-width: 100%;
  }
}

/* —— Client portal shell (matches React PortalLayout: top bar + mobile flyout) —— */

.hub-shell--portal {
  flex-direction: column;
}

.hub-main--portal {
  width: 100%;
  min-width: 0;
}

.hub-page-inner--portal {
  max-width: 64rem;
  margin: 0 auto;
}

.hub-portal-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 16px;
  background: var(--hub-surface);
  border-bottom: 1px solid var(--hub-border);
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .hub-portal-topbar {
    padding: 0 32px;
  }
}

.hub-portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 8px;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .hub-portal-brand {
    margin-right: 20px;
  }
}

.hub-portal-brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--hub-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hub-portal-brand-mark img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.hub-portal-brand-text {
  font-size: 14px;
  font-weight: 800;
  color: var(--hub-text);
}

@media (max-width: 639px) {
  .hub-portal-brand-text {
    display: none;
  }
}

.hub-portal-nav-desktop {
  display: none;
  align-items: center;
  gap: 2px;
}

@media (min-width: 768px) {
  .hub-portal-nav-desktop {
    display: flex;
  }
}

.hub-portal-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--hub-text-muted);
  transition: background 0.14s ease, color 0.14s ease;
}

.hub-portal-nav-link img {
  width: 16px;
  height: 16px;
  opacity: 0.85;
}

.hub-portal-nav-link:hover {
  background: hsl(220 14% 96%);
  color: var(--hub-text);
}

.hub-portal-nav-link.is-active {
  background: var(--hub-accent-soft);
  color: var(--hub-accent);
}

.hub-portal-nav-badge {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--hub-danger);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hub-portal-topbar-spacer {
  flex: 1;
  min-width: 8px;
}

.hub-portal-bell {
  flex-shrink: 0;
}

.hub-portal-profile {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 4px 12px;
  margin-left: 4px;
  border-left: 1px solid var(--hub-border);
  border-radius: 0 10px 10px 0;
  transition: background 0.14s ease;
}

.hub-portal-profile:hover {
  background: hsl(220 14% 96%);
}

.hub-avatar--portal-header {
  width: 32px;
  height: 32px;
  font-size: 11px;
}

.hub-portal-profile-text {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  line-height: 1.2;
}

@media (min-width: 1024px) {
  .hub-portal-profile-text {
    display: flex;
  }
}

.hub-portal-profile-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--hub-text);
}

.hub-portal-profile-role {
  font-size: 10px;
  color: var(--hub-text-muted);
}

.hub-menu-btn--portal {
  display: none;
  margin-left: 4px;
}

@media (max-width: 767px) {
  .hub-menu-btn--portal {
    display: inline-flex;
  }
}

.hub-portal-flyout {
  display: none;
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  z-index: 29;
  padding: 12px;
  background: var(--hub-surface);
  border-bottom: 1px solid var(--hub-border);
  box-shadow: var(--hub-shadow-sm);
  max-height: min(70vh, 420px);
  overflow-y: auto;
}

.hub-portal-flyout.is-open {
  display: block;
}

.hub-portal-flyout-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hub-portal-flyout-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--hub-text-muted);
  text-align: left;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.hub-portal-flyout-link:hover {
  background: hsl(220 14% 96%);
  color: var(--hub-text);
}

.hub-portal-flyout-link.is-active {
  background: var(--hub-accent-soft);
  color: var(--hub-accent);
}

.hub-portal-flyout-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.hub-portal-flyout-icon img {
  width: 20px;
  height: 20px;
}

.hub-portal-flyout-link .hub-portal-nav-badge {
  margin-left: auto;
}

.hub-portal-flyout-divider {
  height: 1px;
  background: var(--hub-border);
  margin: 8px 0;
}

.hub-page--portal {
  padding-top: 20px;
}

@media (min-width: 768px) {
  .hub-page--portal {
    padding-top: 24px;
  }
}

/* Dashboard home: greeting + KPI tiles (PortalDashboard) */
.hub-page-head--portal-dashboard {
  margin-bottom: 20px;
  align-items: flex-start;
}

.hub-page-head--portal-dashboard .hub-title--greeting {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 700;
}

@media (min-width: 768px) {
  .hub-page-head--portal-dashboard .hub-title--greeting {
    font-size: 1.5rem;
  }
}

.hub-subtitle--tight {
  margin-top: 6px;
  font-size: 14px;
  max-width: 36rem;
}

.hub-alert--prominent {
  border: 1px solid hsl(32 95% 44% / 0.2);
  background: hsl(32 95% 44% / 0.05);
  box-shadow: none;
}

.hub-kpi-icon.is-success {
  background: var(--hub-ok-soft);
}

.hub-kpi-icon.is-success img {
  opacity: 1;
  filter: none;
}

.hub-stat-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hub-stat-tile-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hub-stat-tile-icon img {
  width: 16px;
  height: 16px;
}

.hub-stat-tile-icon--primary {
  background: var(--hub-accent-soft);
}

.hub-stat-tile-icon--danger {
  background: var(--hub-danger-soft);
}

.hub-stat-tile-icon--warn {
  background: var(--hub-warn-soft);
}

.hub-shell--portal .hub-grid-2.hub-section > .hub-panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.hub-shell--portal .hub-grid-2.hub-section .hub-panel-head {
  margin-bottom: 10px;
}

.hub-shell--portal .hub-grid-2.hub-section .hub-panel-title {
  font-size: 16px;
  font-weight: 600;
}

.hub-shell--portal .hub-grid-2.hub-section .hub-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hub-shell--portal .hub-grid-2.hub-section .hub-list-row {
  border: 1px solid var(--hub-border);
  border-radius: var(--hub-radius-lg);
  border-bottom: 1px solid var(--hub-border);
  background: var(--hub-surface);
  box-shadow: none;
}

.hub-shell--portal .hub-grid-2.hub-section .hub-list-row:hover {
  border-color: hsl(221 83% 53% / 0.22);
  box-shadow: 0 1px 3px hsl(222 47% 11% / 0.06);
}

.hub-shell--portal .hub-grid-4 a.hub-card {
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.hub-shell--portal .hub-grid-4 a.hub-card:hover {
  border-color: hsl(221 83% 53% / 0.22);
  box-shadow: 0 1px 3px hsl(222 47% 11% / 0.06);
}
