/* Nordenos Client Workspace Hub — Floating SaaS Card Shell + Airy Bento Workspace */

body.client-hub {
  background: var(--shell-bg);
  color: var(--text);
  margin: 0;
  padding: 14px 18px 28px;
  min-height: 100vh;
}

/* Floating Rounded Topbar Card aligned with container */
.hub-topbar {
  position: sticky;
  top: 14px;
  z-index: 100;
  max-width: 1320px;
  margin: 0 auto 14px;
  height: 58px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid var(--shell-border);
  box-shadow: var(--shell-shadow);
}

body.auth-locked.client-hub .hub-topbar {
  max-width: 460px;
}

.hub-topbar-inner {
  height: 100%;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body.client-hub.dark .hub-topbar {
  background: rgba(24, 26, 32, 0.9);
  border-color: var(--shell-border);
}

.hub-topbar .topbar-brand img {
  height: 28px;
  width: auto;
  display: block;
}

.hub-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hub-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--brand-primary);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Floating Left Rail Card + Floating Main Workspace Card */
.hub-shell {
  display: flex;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0;
  gap: 14px;
  align-items: flex-start;
}

body.auth-locked .hub-shell {
  justify-content: center;
  padding-top: 26px;
}

.hub-rail {
  width: 248px;
  flex-shrink: 0;
  position: sticky;
  top: 86px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: calc(100vh - 114px);
  padding: 14px 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--shell-border);
  border-radius: 16px;
  box-shadow: var(--shell-shadow);
}

body.client-hub.dark .hub-rail {
  background: linear-gradient(160deg, #1a1a1a, #151515);
  border-color: #3a3a3a;
  box-shadow: var(--shell-shadow);
}

.hub-rail-label {
  padding: 4px 10px 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--muted);
  border-bottom: 1px solid rgba(15, 28, 52, 0.08);
  margin-bottom: 10px;
}

body.client-hub.dark .hub-rail-label {
  border-bottom-color: var(--line);
}

.hub-rail-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hub-rail-item,
.hub-rail-help {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: #475569;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

body.client-hub.dark .hub-rail-item,
body.client-hub.dark .hub-rail-help {
  color: #b8c2cc;
}

.hub-rail-item svg,
.hub-rail-help svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hub-rail-item:hover,
.hub-rail-help:hover {
  background: #f3f6fa;
  color: #0f172a;
  text-decoration: none;
}

body.client-hub.dark .hub-rail-item:hover,
body.client-hub.dark .hub-rail-help:hover {
  background: #262626;
  color: #ffffff;
}

.hub-rail-item.active {
  background: #eef3fb;
  border-color: #d8e2f1;
  color: #0f172a;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(15, 28, 52, 0.05);
}

.hub-rail-item.active svg {
  color: var(--brand-primary);
}

body.client-hub.dark .hub-rail-item.active {
  background: #2a2a2a;
  border-color: #3e3e3e;
  color: #ffffff;
  box-shadow: none;
}

.hub-rail-footer {
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid rgba(15, 28, 52, 0.08);
}

body.client-hub.dark .hub-rail-footer {
  border-top-color: var(--line);
}

.hub-main {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--shell-border);
  border-radius: 18px;
  box-shadow: var(--shell-shadow);
  padding: 28px 32px 36px;
}

body.auth-locked .hub-main {
  max-width: 460px;
  width: 100%;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

/* Override support.css #viewContainer box in Hub mode so it breathes cleanly */
body.client-hub #viewContainer {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  max-width: none;
}

body.auth-locked.client-hub #viewContainer {
  max-width: 440px;
  padding: 0;
}

/* Auth Card */
.auth-clean-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 18px 44px -22px rgba(15, 28, 52, 0.14);
}

.auth-clean-head {
  text-align: center;
  margin-bottom: 22px;
}

.auth-clean-head h1 {
  margin: 0 0 6px;
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.4px;
}

.auth-clean-head p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
}

.suite-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}

.suite-strip-item {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--soft);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
}

.suite-strip-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-switch-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.auth-switch-footer a {
  color: var(--brand-primary);
  font-weight: 600;
  text-decoration: none;
}

.demo-helper-box {
  margin-top: 16px;
  padding: 12px;
  border-radius: 12px;
  background: var(--soft);
  border: 1px dashed var(--line-strong);
}

.demo-helper-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-primary);
  margin-bottom: 8px;
}

.demo-helper-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.demo-helper-btn {
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  justify-content: space-between;
  font-size: 12px;
}

/* Greeting Header (ElevenLabs style) */
.greeting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.workspace-eyebrow {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 4px;
}

.greeting-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.6px;
  color: var(--text);
}

.ask-help-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: var(--muted);
}

.ask-help-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(15, 28, 52, 0.05);
  transition: border-color 0.14s ease, transform 0.12s ease;
}

.ask-help-pill:hover {
  border-color: var(--brand-primary);
  transform: translateY(-1px);
  text-decoration: none;
}

.ask-help-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1b44fe 0%, #6366f1 100%);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Quick Launch Tiles Strip (Image 1 & 2 square soft bento tiles) */
.quick-tiles-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 34px;
}

.quick-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 9px;
  background: transparent;
  border: 0;
  padding: 0;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
}

.quick-tile-box {
  width: 100%;
  aspect-ratio: 1 / 0.86;
  border-radius: 18px;
  background: #f5f6f9;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

body.client-hub.dark .quick-tile-box {
  background: #1a1d25;
}

.quick-tile:hover .quick-tile-box {
  transform: translateY(-3px);
  background: #ffffff;
  border-color: var(--line);
  box-shadow: 0 12px 28px -16px rgba(15, 28, 52, 0.18);
}

body.client-hub.dark .quick-tile:hover .quick-tile-box {
  background: #212530;
  border-color: #343949;
}

.quick-tile-icon {
  width: 66px;
  height: 66px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(15, 28, 52, 0.07);
  box-shadow: 0 8px 20px -10px rgba(15, 28, 52, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px;
}

body.client-hub.dark .quick-tile-icon {
  background: #272b38;
  border-color: rgba(255, 255, 255, 0.08);
}

.quick-tile-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.quick-tile-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--brand-primary);
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quick-tile-badge {
  position: absolute;
  top: 9px;
  right: 9px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  background: #e8f8f0;
  color: #15803d;
}

.quick-tile-badge.pending {
  background: #fffbeb;
  color: #b45309;
}

.quick-tile-badge.paused {
  background: #fef2f2;
  color: #dc2626;
}

.quick-tile-badge.lock {
  background: #eef2f8;
  color: #64748b;
}

.quick-tile-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}

/* Home 2-Column Split (Clean List on Left + Bento Cards on Right) */
.home-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 32px;
  align-items: start;
}

.home-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 36px;
  margin-bottom: 14px;
}

.home-column-head .section-heading {
  margin: 0;
}

.section-heading {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 14px;
}

.clean-app-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.clean-app-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 13px;
  border-radius: 14px;
  transition: background 0.14s ease;
}

.clean-app-row:hover {
  background: var(--soft);
}

.clean-app-row-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.clean-app-avatar {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: var(--soft);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  flex-shrink: 0;
}

.clean-app-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.clean-app-copy {
  min-width: 0;
}

.clean-app-copy strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.clean-app-copy span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Right Column: Bento Feature / Shortcut Cards */
.bento-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bento-action-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 16px;
  background: #f5f6f9;
  border: 1px solid transparent;
  text-align: left;
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  width: 100%;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

body.client-hub.dark .bento-action-card {
  background: #1a1d25;
}

.bento-action-card:hover {
  transform: translateY(-2px);
  background: var(--card);
  border-color: var(--line);
  box-shadow: 0 10px 24px -14px rgba(15, 28, 52, 0.16);
  text-decoration: none;
}

.bento-color-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bento-color-icon svg {
  width: 25px;
  height: 25px;
  stroke: #ffffff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bento-color-icon.blue { background: linear-gradient(135deg, #2563eb, #1b44fe); }
.bento-color-icon.emerald { background: linear-gradient(135deg, #10b981, #059669); }
.bento-color-icon.violet { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.bento-color-icon.amber { background: linear-gradient(135deg, #f59e0b, #d97706); }

.bento-action-copy strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.bento-action-copy span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.45;
}

/* Notices & Pills */
.notice-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--soft);
  margin-bottom: 20px;
  font-size: 13px;
}

.notice-banner.success {
  background: var(--success-soft);
  border-color: #bbf7d0;
  color: var(--success);
}

.notice-banner.warning {
  background: var(--warning-soft);
  border-color: #fde68a;
  color: var(--warning);
}

.notice-banner.danger {
  background: var(--danger-soft);
  border-color: #fecaca;
  color: var(--danger);
}

.friendly-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: var(--soft);
  color: var(--muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.friendly-pill.approved {
  background: var(--success-soft);
  border-color: #bbf7d0;
  color: var(--success);
}

.friendly-pill.requested {
  background: var(--warning-soft);
  border-color: #fde68a;
  color: var(--warning);
}

.friendly-pill.blocked {
  background: var(--danger-soft);
  border-color: #fecaca;
  color: var(--danger);
}

/* Dedicated My Apps Grid */
.client-apps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.client-app-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.client-app-card.is-active {
  border-color: rgba(27, 68, 254, 0.28);
}

.client-app-head {
  display: flex;
  align-items: center;
  gap: 13px;
}

.client-app-icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--soft);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  flex-shrink: 0;
}

.client-app-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.feature-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.feature-chip {
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--soft);
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
}

.inline-request-drawer {
  margin-top: 14px;
  padding: 13px;
  border-radius: 12px;
  background: var(--soft);
  border: 1px solid var(--line);
}

.client-app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* Profile & Devices Cards */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.bento-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
}

.device-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.device-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 12px;
  background: var(--soft);
}

.btn.sm {
  min-height: 32px;
  padding: 5px 12px;
  font-size: 12px;
}

.btn.danger-soft {
  background: var(--danger-soft);
  border-color: #fecaca;
  color: var(--danger);
}

@media (max-width: 1040px) {
  .quick-tiles-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .home-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .hub-shell {
    flex-direction: column;
    padding: 0;
    gap: 14px;
  }
  .hub-rail {
    width: 100%;
    position: static;
    min-height: 0;
    padding: 10px 12px;
  }
  .hub-rail-label {
    display: none;
  }
  .hub-rail-nav {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .hub-rail-item {
    white-space: nowrap;
    width: auto;
  }
  .hub-rail-footer {
    display: none;
  }
  .hub-main {
    width: 100%;
    padding: 20px 18px 28px;
  }
  .client-apps-grid,
  .profile-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .quick-tiles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .greeting-title {
    font-size: 24px;
  }
  .ask-help-wrap span {
    display: none;
  }
}

/* Client Specific Alerts & Nordenos General Announcements */
.client-alerts-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.client-alert-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--soft);
}

.client-alert-card.warning {
  background: var(--warning-soft);
  border-color: #fde68a;
}

.client-alert-card.urgent {
  background: var(--danger-soft);
  border-color: #fecaca;
}

.client-alert-card.info {
  background: var(--accent-soft);
  border-color: rgba(27, 68, 254, 0.24);
}

.client-alert-card.success {
  background: var(--success-soft);
  border-color: #bbf7d0;
}

.client-alert-left {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  min-width: 0;
}

.client-alert-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
  font-weight: 700;
  background: var(--card);
  border: 1px solid rgba(15, 28, 52, 0.08);
}

.client-alert-card.warning .client-alert-icon { color: var(--warning); }
.client-alert-card.urgent .client-alert-icon { color: var(--danger); }
.client-alert-card.info .client-alert-icon { color: var(--brand-primary); }
.client-alert-card.success .client-alert-icon { color: var(--success); }

.client-alert-copy strong {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
}

.client-alert-copy p {
  margin: 3px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.client-alert-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.announcements-section {
  margin-top: 26px;
}

.announcement-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 17px;
  border-radius: 16px;
  background: #f5f6f9;
  border: 1px solid transparent;
  margin-bottom: 10px;
}

body.client-hub.dark .announcement-card {
  background: #1a1d25;
}

.announcement-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.announcement-card strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.announcement-card p {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 720px) {
  .client-alert-card,
  .announcement-card {
    flex-direction: column;
    align-items: stretch;
  }
  .client-alert-actions {
    justify-content: flex-end;
  }
}
