/*
 * Varadise premium product theme
 *
 * A presentation-only layer shared by the global libraries, setup wizards,
 * tenant galleries and project workbench. Product behaviour remains owned by
 * the existing feature modules.
 */

:root {
  color-scheme: light;
  --ink: #0b1f35;
  --navy: #071a2f;
  --navy-2: #123b60;
  --surface: #f4f7fb;
  --panel: rgba(255, 255, 255, 0.94);
  --line: rgba(18, 52, 82, 0.13);
  --line-strong: rgba(18, 52, 82, 0.22);
  --soft: #eef4f9;
  --muted: #5f7488;
  --brand: #1769ff;
  --brand-strong: #0754e6;
  --brand-soft: #eaf1ff;
  --cyan: #03a8a2;
  --cyan-soft: #e2f8f5;
  --orange: #ee8d31;
  --danger: #b83f4d;
  --success: #08775b;
  --focus: #1769ff;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --shadow-sm: 0 8px 24px rgba(12, 39, 66, 0.06);
  --shadow: 0 20px 55px rgba(12, 39, 66, 0.11);
  --shadow-lift: 0 26px 70px rgba(12, 39, 66, 0.16);
  --content-max: 1480px;
  --control-height: 44px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

html {
  scroll-behavior: smooth;
  background: var(--surface);
}

body {
  min-width: 320px;
  background:
    radial-gradient(circle at 78% -8%, rgba(23, 105, 255, 0.075), transparent 30rem),
    radial-gradient(circle at 8% 92%, rgba(3, 168, 162, 0.055), transparent 33rem),
    var(--surface);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}

::selection {
  color: #fff;
  background: var(--brand);
}

:where(button, input, select, textarea, a):focus-visible {
  outline: 3px solid rgba(23, 105, 255, 0.28);
  outline-offset: 3px;
}

:where(input, select, textarea):focus-visible {
  border-color: var(--focus);
  box-shadow: 0 0 0 4px rgba(23, 105, 255, 0.1);
  outline: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Type hierarchy */

h1, h2, h3 {
  color: inherit;
}

h1, h2, h3 {
  text-wrap: balance;
}

.page-head h1,
.login-card h1,
.tenant-hero h1,
.profile-copy h1,
.dashboard-hero h1 {
  letter-spacing: -0.045em;
}

.page-head h1 {
  max-width: 860px;
  margin: 5px 0 8px;
  font-size: clamp(30px, 3.2vw, 46px);
  line-height: 1.05;
}

.page-head p {
  max-width: 760px;
  font-size: 15px;
  line-height: 1.65;
}

.eyebrow {
  color: var(--brand);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.14em;
}

.muted,
.small-note,
.hint,
label small {
  color: var(--muted);
}

/* Controls */

button {
  min-height: var(--control-height);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-weight: 760;
  letter-spacing: -0.005em;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

button:active:not(:disabled) {
  transform: translateY(0) scale(0.985);
}

button.primary {
  border-color: rgba(5, 76, 214, 0.35);
  background: linear-gradient(135deg, #2273ff, #0757e8);
  color: #fff;
  box-shadow: 0 10px 24px rgba(23, 105, 255, 0.23), inset 0 1px rgba(255, 255, 255, 0.25);
}

button.primary:hover:not(:disabled) {
  box-shadow: 0 14px 30px rgba(23, 105, 255, 0.3), inset 0 1px rgba(255, 255, 255, 0.3);
}

button.secondary {
  border-color: rgba(18, 52, 82, 0.13);
  background: #edf3f8;
  color: #173b5b;
}

button.secondary:hover:not(:disabled) {
  border-color: rgba(23, 105, 255, 0.2);
  background: #e7eff8;
}

button.ghost {
  color: #234c70;
}

button.ghost:hover:not(:disabled) {
  background: rgba(23, 105, 255, 0.07);
  color: var(--brand-strong);
}

button.danger {
  border-color: rgba(184, 63, 77, 0.14);
  background: #fff0f2;
  color: var(--danger);
}

button.small {
  min-height: 36px;
  padding: 7px 11px;
  font-size: 12px;
}

button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  filter: saturate(0.65);
}

button[aria-busy="true"],
button.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

button[aria-busy="true"]::after,
button.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid currentcolor;
  border-top-color: transparent;
  border-radius: 50%;
  color: #fff;
  animation: varadise-spin 700ms linear infinite;
}

button.secondary[aria-busy="true"]::after,
button.secondary.loading::after,
button.ghost[aria-busy="true"]::after,
button.ghost.loading::after {
  color: var(--brand);
}

@keyframes varadise-spin {
  to { transform: rotate(360deg); }
}

input,
select,
textarea {
  min-height: var(--control-height);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(12, 39, 66, 0.025);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input:hover,
select:hover,
textarea:hover {
  border-color: rgba(18, 52, 82, 0.33);
}

input::placeholder,
textarea::placeholder {
  color: #8a9bad;
}

:where(input, select, textarea)[aria-invalid="true"],
:where(input, select, textarea):user-invalid {
  border-color: var(--danger);
  background: #fff9fa;
  box-shadow: 0 0 0 4px rgba(184, 63, 77, 0.08);
}

.error,
[role="alert"] {
  color: var(--danger);
  font-weight: 680;
}

textarea {
  min-height: 116px;
  line-height: 1.55;
}

label {
  gap: 7px;
  color: #213f5b;
  font-size: 13px;
  font-weight: 730;
}

label small,
.hint {
  line-height: 1.5;
}

.simple-form {
  gap: 18px;
}

.form-grid {
  gap: 18px;
}

.choice-grid {
  gap: 12px;
}

.choice {
  min-height: 88px;
  border-color: var(--line);
  border-radius: 14px;
  padding: 15px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, transform 160ms ease;
}

.choice:hover {
  border-color: rgba(23, 105, 255, 0.33);
  transform: translateY(-1px);
}

.choice:has(input:focus-visible) {
  outline: 3px solid rgba(23, 105, 255, 0.24);
  outline-offset: 2px;
}

.choice:has(input:checked) {
  border-color: rgba(23, 105, 255, 0.62);
  background: #f1f6ff;
  box-shadow: inset 0 0 0 1px rgba(23, 105, 255, 0.4), 0 10px 24px rgba(23, 105, 255, 0.08);
}

.component-option:has(input:focus-visible) {
  outline: 3px solid rgba(23, 105, 255, 0.24);
  outline-offset: 2px;
}

.component-option:has(input:checked) {
  border-color: #8cb3ff;
  background: var(--brand-soft);
  color: #104cb8;
}

/* App chrome */

#app {
  grid-template-columns: 264px minmax(0, 1fr);
}

.sidebar {
  z-index: 10;
  gap: 30px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  padding: 25px 17px;
  background:
    radial-gradient(circle at 10% 0, rgba(43, 122, 255, 0.25), transparent 21rem),
    linear-gradient(178deg, #081d33, #061525 74%);
  box-shadow: 14px 0 50px rgba(7, 26, 47, 0.08);
}

.brand {
  padding: 1px 10px;
}

.brand-line {
  gap: 12px;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.brand-mark,
.login-mark {
  background: linear-gradient(135deg, #2c77ff, #02a7a2);
  box-shadow: 0 10px 24px rgba(22, 105, 242, 0.28), inset 0 1px rgba(255, 255, 255, 0.25);
}

.brand small {
  margin: 5px 0 0 41px;
  color: #91a9bd;
}

.nav {
  gap: 6px;
}

.nav button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 11px 13px;
  color: #9db3c7;
  font-weight: 680;
}

.nav button:hover {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.nav button.active {
  border-color: rgba(99, 180, 255, 0.17);
  background: linear-gradient(135deg, rgba(48, 116, 236, 0.29), rgba(9, 164, 161, 0.17));
  color: #fff;
  box-shadow: inset 3px 0 #57e2d2;
}

.nav .nav-icon {
  width: 21px;
  color: #76d9d4;
}

.side-footer {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 15px 13px;
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(14px);
}

.side-footer button {
  min-height: 32px;
}

.topbar {
  position: sticky;
  z-index: 8;
  top: 0;
  height: 76px;
  padding: 0 clamp(20px, 3vw, 44px);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(160%) blur(18px);
  box-shadow: 0 1px rgba(18, 52, 82, 0.04);
}

.breadcrumbs {
  color: #4f657a;
  font-size: 13px;
  font-weight: 680;
}

.admin-avatar {
  background: linear-gradient(135deg, #dce9ff, #dff8f3);
  color: #154979;
}

.content {
  width: 100%;
  max-width: var(--content-max);
  padding: clamp(28px, 4vw, 56px) clamp(20px, 4vw, 56px) 80px;
}

.page-head {
  align-items: flex-end;
  margin-bottom: clamp(26px, 3vw, 38px);
}

.top-page-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Surfaces and statuses */

.card {
  border-color: var(--line);
  border-radius: var(--radius-md);
  padding: 22px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.card h2 {
  font-size: 18px;
  letter-spacing: -0.025em;
}

.card h3 {
  letter-spacing: -0.015em;
}

.tag {
  min-height: 25px;
  border: 1px solid rgba(18, 52, 82, 0.08);
  padding: 4px 9px;
  background: #eef3f7;
  color: #4c6478;
  font-weight: 780;
  letter-spacing: 0.005em;
}

.tag.ok {
  border-color: rgba(8, 119, 91, 0.1);
  background: #e2f8f0;
  color: var(--success);
}

.tag.warn {
  border-color: rgba(169, 96, 17, 0.11);
  background: #fff4e5;
  color: #9b5a12;
}

.status-dot {
  box-shadow: 0 0 0 4px rgba(8, 119, 91, 0.11);
}

.empty {
  border-color: #bfd0de;
  border-radius: var(--radius-md);
  padding: 36px 24px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(240, 246, 251, 0.82));
}

.guide {
  border: 1px solid #c9dff3;
  border-left: 4px solid var(--brand);
  border-radius: 0 12px 12px 0;
  padding: 14px 16px;
  background: #f1f7fd;
  color: #3f5d77;
  line-height: 1.55;
}

.danger-panel,
.wb-danger {
  border-radius: var(--radius-md);
}

/* Dashboard */

.dashboard-hero {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  align-items: center;
  border: 1px solid rgba(139, 211, 255, 0.13);
  border-radius: var(--radius-xl);
  padding: clamp(30px, 5vw, 58px);
  background:
    radial-gradient(circle at 83% 14%, rgba(96, 229, 224, 0.32), transparent 25rem),
    linear-gradient(122deg, #071a30 0%, #103c65 58%, #146681 100%);
  box-shadow: 0 30px 80px rgba(12, 39, 66, 0.22);
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  right: -10%;
  bottom: -70%;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  box-shadow: 0 0 0 54px rgba(255, 255, 255, 0.03), 0 0 0 120px rgba(255, 255, 255, 0.02);
  pointer-events: none;
}

.dashboard-hero > * {
  position: relative;
  z-index: 1;
}

.dashboard-hero h1 {
  max-width: 690px;
  font-size: clamp(36px, 4.5vw, 57px);
  line-height: 1.01;
}

.dashboard-hero p {
  font-size: 15px;
  line-height: 1.65;
}

.hero-steps {
  gap: 10px;
}

.hero-step {
  min-height: 55px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.085);
  backdrop-filter: blur(10px);
}

.step-number {
  width: 28px;
  height: 28px;
  color: #164f75;
}

.metric-grid {
  gap: 15px;
  margin: 24px 0;
}

.metric {
  position: relative;
  overflow: hidden;
  min-height: 120px;
  border-color: var(--line);
  border-radius: 18px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.91);
  box-shadow: var(--shadow-sm);
}

.metric::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--cyan));
  opacity: 0.72;
}

.metric strong {
  font-size: 34px;
}

.journey-grid {
  gap: 18px;
}

.journey-item {
  min-height: 71px;
  padding: 14px 0;
}

.journey-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #e6efff, #def7f3);
  color: #195ebc;
}

.next-tip {
  border-color: #d4e3f1;
  border-radius: 18px;
  padding: 22px;
  background: linear-gradient(145deg, #f5f9ff, #eefbf8);
  box-shadow: var(--shadow-sm);
}

/* Gallery cards */

.expert-grid,
.org-gallery,
.project-gallery {
  gap: 22px;
}

.expert-grid {
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
}

.org-gallery,
.project-gallery {
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
}

.expert-card,
.org-card,
.project-card {
  border-radius: 22px;
  box-shadow: 0 14px 36px rgba(12, 39, 66, 0.075);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.expert-card:hover,
.org-card:hover,
.project-card:hover {
  border-color: rgba(23, 105, 255, 0.25);
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
}

.expert-art {
  min-height: 185px;
  padding: 21px;
  background: linear-gradient(135deg, #133e68, #09a69d);
}

.expert-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(3, 18, 31, 0.35));
  pointer-events: none;
}

.expert-art::after {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.02) 62%, transparent 64%);
}

.expert-art .helmet {
  right: 24px;
  bottom: -10px;
  font-size: 132px;
}

.expert-art .art-label {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 99px;
  padding: 6px 10px;
  background: rgba(3, 18, 31, 0.48);
  backdrop-filter: blur(8px);
}

.expert-body,
.tenant-card-body {
  padding: 21px;
}

.expert-title h2,
.tenant-card-body h2 {
  font-size: 20px;
  letter-spacing: -0.03em;
}

.expert-card p,
.tenant-card-body p {
  line-height: 1.55;
}

.expert-footer,
.tenant-card-footer {
  padding-top: 15px;
}

.org-banner,
.project-banner {
  min-height: 150px;
  padding: 21px;
  background:
    radial-gradient(circle at 80% 20%, rgba(109, 232, 220, 0.36), transparent 14rem),
    linear-gradient(130deg, #0b2948, #12627b);
}

.project-banner {
  background:
    radial-gradient(circle at 80% 20%, rgba(108, 171, 255, 0.42), transparent 14rem),
    linear-gradient(130deg, #0b2948, #185287);
}

.tenant-logo {
  width: 58px;
  height: 58px;
  border-radius: 17px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.17);
}

.tenant-region {
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 5px 9px;
  backdrop-filter: blur(8px);
}

/* Expert profile and component library */

.detail-layout {
  grid-template-columns: minmax(280px, 350px) minmax(0, 1fr);
  gap: 24px;
}

.member-profile {
  border-radius: 24px;
}

.member-profile .expert-art {
  min-height: 255px;
}

.profile-copy {
  padding: 25px;
}

.stat-row,
.kit-grid {
  gap: 13px;
}

.stat-row .card {
  min-height: 106px;
  padding: 19px;
}

.stat-row strong {
  font-size: 29px;
}

.kit {
  min-height: 77px;
  border-radius: 13px;
  padding: 15px;
  background: linear-gradient(145deg, #fff, #f7faff);
}

.tabs {
  gap: 4px;
  margin-bottom: 24px;
  scrollbar-width: thin;
}

.tabs button {
  min-height: 45px;
  padding: 11px 15px;
  white-space: nowrap;
}

.tabs button.active {
  color: var(--brand);
  box-shadow: inset 0 -3px var(--brand);
}

.component-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.component-card {
  display: flex;
  min-height: 205px;
  flex-direction: column;
  gap: 9px;
}

.component-card p {
  flex: 1;
  min-height: 0;
  line-height: 1.55;
}

.component-card footer {
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid #edf1f5;
}

/* Tenant and project framing */

.tenant-hero {
  overflow: hidden;
  border: 1px solid rgba(149, 218, 255, 0.14);
  border-radius: 26px;
  padding: 30px;
  background:
    radial-gradient(circle at 82% 10%, rgba(105, 228, 218, 0.31), transparent 18rem),
    linear-gradient(120deg, #081f38, #174d72 72%, #087f7b);
  box-shadow: 0 24px 64px rgba(12, 39, 66, 0.18);
}

.tenant-stat-grid {
  gap: 14px;
}

.tenant-stat {
  min-height: 104px;
  padding: 20px;
}

.tenant-stat strong {
  font-size: 29px;
}

.project-page-grid,
.tenant-content {
  gap: 18px;
}

.wide-cta {
  border: 1px solid #c6dff2;
  border-radius: 17px;
  padding: 22px;
  background: linear-gradient(130deg, #f3f8ff, #eefaf7);
}

.inline-list > div,
.assignment,
.project-row,
.file-row {
  min-height: 68px;
  padding: 15px 0;
}

.connector-row {
  min-height: 68px;
  border-radius: 14px;
  padding: 15px;
}

/* Wizards and dialogs */

.wizard-shell,
.dialog-shell {
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 24px;
  box-shadow: 0 34px 100px rgba(5, 25, 45, 0.27);
}

.wizard-top {
  padding: 22px 28px;
  background: #f8fbfe;
}

.wizard-content,
.dialog-body {
  padding: 30px;
}

.wizard-content h2,
.dialog-head h2 {
  font-size: clamp(23px, 2.5vw, 29px);
  letter-spacing: -0.035em;
}

.wizard-actions,
.dialog-footer {
  min-height: 74px;
  align-items: center;
  padding: 16px 28px;
  background: #f8fbfd;
}

.dialog-backdrop {
  padding: clamp(16px, 5vh, 48px) 20px;
  background: rgba(4, 20, 36, 0.62);
  backdrop-filter: blur(10px) saturate(120%);
}

.dialog-head {
  padding: 24px 28px;
  background: rgba(255, 255, 255, 0.97);
}

.stepper {
  gap: 10px;
}

.step {
  position: relative;
  min-height: 32px;
  color: #71869a;
  font-weight: 680;
}

.step b {
  width: 27px;
  height: 27px;
  background: #e6edf4;
}

.step.active b,
.step.complete b {
  background: linear-gradient(135deg, var(--brand), #0b93d9);
  box-shadow: 0 7px 14px rgba(23, 105, 255, 0.2);
}

.review-box,
.wizard-summary {
  border: 1px solid #dce7f0;
  border-radius: 15px;
  padding: 8px 17px;
  background: #f6f9fc;
}

.review-row,
.wizard-summary > div {
  min-height: 53px;
  align-items: center;
  padding: 11px 0;
}

.assist-card {
  border-color: #bfddec;
  border-radius: 16px;
  padding: 18px;
  background:
    radial-gradient(circle at 95% 0, rgba(23, 105, 255, 0.11), transparent 12rem),
    linear-gradient(145deg, #f1fbfa, #f2f6ff);
}

/* Project workbench alignment. These selectors intentionally outrank the
 * feature-local stylesheet injected later by project-workbench.js. */

body .project-workbench {
  --wb-ink: var(--ink);
  --wb-muted: var(--muted);
  --wb-cyan: var(--cyan);
  --wb-blue: var(--brand);
  --wb-line: var(--line);
}

body .project-workbench .wb-hero {
  border: 1px solid rgba(149, 218, 255, 0.14);
  background: linear-gradient(127deg, #071a30 0%, #103c65 57%, #176b88 100%);
}

body .project-workbench .wb-card,
body .confidence-card {
  border-color: var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

body .project-workbench .wb-tabs button.active,
body .project-workbench .wb-score-ring {
  --wb-cyan: var(--cyan);
}

body .project-workbench .wb-tabs button.active {
  background: linear-gradient(135deg, var(--brand), #0a8ed7);
}

body .project-workbench .wb-check,
body .project-workbench .wb-row {
  min-height: 69px;
}

body .project-workbench .wb-empty,
body .confidence-empty {
  background: linear-gradient(145deg, #fff, #f5f9fc);
}

/* Login */

#login {
  background:
    radial-gradient(circle at 77% 16%, rgba(54, 121, 255, 0.17), transparent 29rem),
    radial-gradient(circle at 18% 92%, rgba(5, 174, 164, 0.13), transparent 31rem),
    #f4f7fb;
}

.login-card {
  width: min(470px, 100%);
  border-color: rgba(18, 52, 82, 0.1);
  border-radius: 26px;
  padding: clamp(30px, 5vw, 46px);
  box-shadow: 0 34px 90px rgba(12, 39, 66, 0.14);
}

.login-mark {
  width: 52px;
  height: 52px;
  border-radius: 16px;
}

.login-card h1 {
  margin-top: 7px;
  font-size: 36px;
}

.login-card form {
  gap: 18px;
  margin-top: 29px;
}

.login-note {
  border: 1px solid #e1e8ef;
  border-radius: 12px;
  padding: 13px 14px;
}

.toast {
  z-index: 50;
  max-width: min(420px, calc(100vw - 32px));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  padding: 13px 16px;
  box-shadow: 0 20px 60px rgba(5, 25, 45, 0.28);
}

/* Responsive behaviour */

@media (max-width: 1180px) {
  #app {
    grid-template-columns: 236px minmax(0, 1fr);
  }

  .content {
    padding-right: 30px;
    padding-left: 30px;
  }

  .dashboard-hero {
    min-height: 300px;
    grid-template-columns: 1.15fr 0.85fr;
  }
}

@media (max-width: 1050px) {
  .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .dashboard-hero h1 {
    max-width: 760px;
  }

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

@media (max-width: 800px) {
  #app {
    display: block;
  }

  .sidebar {
    position: sticky;
    z-index: 12;
    top: 0;
    height: auto;
    gap: 11px;
    padding: 12px 14px 10px;
  }

  .brand {
    padding: 0 3px;
  }

  .brand small {
    display: none;
  }

  .brand-mark {
    width: 31px;
    height: 31px;
  }

  .nav {
    margin: 0 -4px;
    padding: 0 4px 2px;
    gap: 4px;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav button {
    min-height: 39px;
    padding: 8px 11px;
  }

  .nav button.active {
    box-shadow: inset 0 -3px #57e2d2;
  }

  .topbar {
    position: static;
    height: 62px;
  }

  .content {
    padding: 28px 18px 64px;
  }

  .page-head {
    gap: 18px;
    margin-bottom: 26px;
  }

  .page-head h1 {
    font-size: clamp(29px, 8vw, 38px);
  }

  .top-page-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .dashboard-hero {
    min-height: 0;
    border-radius: 23px;
    padding: 29px 24px;
  }

  .dashboard-hero h1 {
    font-size: clamp(34px, 9vw, 45px);
  }

  .hero-steps {
    grid-template-columns: 1fr;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .dialog-backdrop {
    align-items: end;
    padding: 12px;
  }

  .dialog-shell {
    max-height: calc(100vh - 24px);
    overflow: auto;
    border-radius: 22px;
  }

  .dialog-head,
  .wizard-top,
  .dialog-body,
  .dialog-footer {
    padding-right: 20px;
    padding-left: 20px;
  }

  .wizard-actions,
  .dialog-footer {
    position: sticky;
    z-index: 2;
    bottom: 0;
  }
}

@media (max-width: 620px) {
  .topbar .tag {
    display: none;
  }

  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }

  .metric {
    min-height: 105px;
    padding: 17px;
  }

  .metric strong {
    font-size: 29px;
  }

  .expert-grid,
  .org-gallery,
  .project-gallery,
  .component-grid {
    grid-template-columns: 1fr;
  }

  .stepper {
    grid-template-columns: 1fr;
  }

  .step {
    display: none;
  }

  .step.active {
    display: flex;
  }

  .step.active::after {
    content: "Current step";
    margin-left: auto;
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .wizard-actions,
  .dialog-footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .dialog-footer > div,
  .dialog-footer > div button,
  .dialog-footer > button,
  .wizard-actions > div,
  .wizard-actions button {
    width: 100%;
  }

  .tenant-hero {
    padding: 24px;
  }

  .wide-cta,
  .connector-row,
  .file-row,
  .project-row,
  .assignment {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .top-page-actions,
  .top-page-actions button,
  .page-head > button {
    width: 100%;
  }

  .dashboard-hero h1 {
    font-size: 34px;
  }

  .card,
  .expert-body,
  .tenant-card-body {
    padding: 18px;
  }
}

@media print {
  .sidebar,
  .topbar,
  button,
  .dialog-backdrop,
  .toast {
    display: none !important;
  }

  #app {
    display: block;
  }

  .content {
    max-width: none;
    padding: 0;
  }

  .card,
  .wb-card,
  .confidence-card {
    box-shadow: none !important;
  }
}

.library-controls {
  align-items: end;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 0.35fr) auto;
  margin-bottom: 20px;
  padding: 16px;
}

.library-controls.tenant-search {
  grid-template-columns: minmax(260px, 1fr) auto;
}

.library-result {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.environment-hero {
  align-items: center;
  background: linear-gradient(120deg, #08243e, #135177 70%, #078c7d 140%);
  border-radius: 24px;
  color: #fff;
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 26px;
}

.environment-hero h2 {
  color: #fff;
  font-size: 25px;
  margin: 4px 0;
}

.environment-hero p {
  color: #d4e5ef;
  margin: 0;
  max-width: 760px;
}

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

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

.environment-grid .card h3,
.environment-grid .card p {
  margin: 0;
}

.environment-grid .card .tag {
  justify-self: start;
}

.environment-grid .card > strong {
  font-size: 20px;
  letter-spacing: -0.03em;
}

@media (max-width: 700px) {
  .library-controls,
  .library-controls.tenant-search,
  .environment-grid {
    grid-template-columns: 1fr;
  }

  .environment-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
}

/* Curated demo workspace — visible only when metadata-backed demo records exist. */
.demo-inline-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.demo-workspace-badge,
.demo-maturity,
.demo-evidence {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  display: inline-flex;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.035em;
  line-height: 1.1;
  padding: 5px 8px;
  white-space: nowrap;
}

.demo-workspace-badge {
  background: rgba(116, 88, 255, 0.1);
  border-color: rgba(103, 75, 221, 0.18);
  color: #5b43bb;
}

.demo-maturity-live_value {
  background: #e4f8ef;
  border-color: #bde8d5;
  color: #087257;
}

.demo-maturity-ready_to_launch {
  background: #eaf2ff;
  border-color: #cbdcff;
  color: #245ac7;
}

.demo-maturity-expansion_opportunity {
  background: #fff4e4;
  border-color: #f2d8ad;
  color: #9a5b15;
}

.demo-evidence-live {
  background: #dff8ee;
  border-color: #afe3cd;
  color: #087257;
}

.demo-evidence-recorded {
  background: #f2f0fb;
  border-color: #d8d0ef;
  color: #655687;
}

.portfolio-next-actions {
  display: grid;
  gap: 8px;
}

.portfolio-next .demo-start-button {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.portfolio-next .demo-start-button:hover {
  background: rgba(255, 255, 255, 0.16);
}

.demo-proof-strip {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.demo-proof-strip article {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 255, 0.94));
  border: 1px solid rgba(35, 83, 125, 0.11);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  padding: 17px 18px;
}

.demo-proof-strip span {
  color: #647a8d;
  display: block;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.demo-proof-strip strong {
  display: block;
  font-size: 28px;
  letter-spacing: -0.055em;
  line-height: 1;
  margin-top: 8px;
}

.demo-proof-strip p {
  color: var(--muted);
  font-size: 11px;
  margin: 6px 0 0;
}

.project-workbench .demo-workspace-badge,
.project-workbench .demo-maturity,
.project-workbench .demo-evidence {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: #f1f8ff;
}

.project-workbench .demo-evidence-live {
  background: rgba(33, 206, 148, 0.18);
  border-color: rgba(117, 245, 201, 0.3);
  color: #bff9e5;
}

.project-workbench .demo-evidence-recorded {
  background: rgba(204, 190, 255, 0.13);
  border-color: rgba(219, 209, 255, 0.22);
  color: #e4ddff;
}

.wb-demo-evidence {
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  margin-top: 14px;
  padding-top: 13px;
}

.wb-demo-evidence strong {
  color: #fff;
  margin-bottom: 3px;
}

.wb-demo-evidence p {
  font-size: 11px;
}

.demo-settings-hero {
  align-items: center;
  background: linear-gradient(120deg, #151c41, #3d3d91 65%, #0a8c8b 145%);
  border-radius: 24px;
  color: #fff;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 26px;
}

.demo-settings-hero h2 {
  color: #fff;
  margin: 4px 0;
}

.demo-settings-hero p {
  color: #dbe4f5;
  margin: 0;
  max-width: 720px;
}

.demo-settings-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
}

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

.demo-settings-grid h3,
.demo-settings-grid p {
  margin: 0;
}

.demo-settings-grid .demo-workspace-badge,
.demo-settings-grid .tag {
  justify-self: start;
}

.demo-settings-list {
  display: grid;
  gap: 7px;
}

.demo-settings-list > div {
  align-items: center;
  background: #f5f8fc;
  border-radius: 11px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 12px;
}

.demo-settings-list span {
  color: var(--muted);
  font-size: 11px;
  text-transform: capitalize;
}

.demo-reset-panel {
  border: 1px solid #ead8d8;
  border-radius: 16px;
  margin-top: 16px;
  overflow: hidden;
}

.demo-reset-panel > summary {
  background: #fffafa;
  color: #8c3b3b;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 14px 16px;
}

.demo-reset-panel form {
  padding: 16px;
}

.demo-presenter-backdrop {
  align-items: stretch;
  background: rgba(4, 17, 31, 0.52);
  display: flex;
  inset: 0;
  justify-content: flex-end;
  position: fixed;
  z-index: 80;
}

.demo-presenter-panel {
  background: linear-gradient(180deg, #fbfdff, #f4f7fb);
  box-shadow: -28px 0 80px rgba(4, 24, 43, 0.28);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  height: 100%;
  max-width: 100%;
  overflow: auto;
  width: min(470px, 100%);
}

.demo-presenter-panel > header,
.demo-presenter-panel > footer {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 20px 22px;
}

.demo-presenter-panel > header {
  border-bottom: 1px solid rgba(25, 52, 80, 0.1);
}

.demo-presenter-panel > header > div {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.demo-presenter-panel > header .eyebrow {
  margin: 0;
}

.demo-presenter-panel > footer {
  background: rgba(255, 255, 255, 0.86);
  border-top: 1px solid rgba(25, 52, 80, 0.1);
}

.demo-presenter-panel > footer > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.demo-presenter-progress {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 16px 22px 0;
}

.demo-presenter-progress button {
  align-items: center;
  background: transparent;
  border: 0;
  color: #74889b;
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 7px 3px;
}

.demo-presenter-progress button > span {
  align-items: center;
  background: #e7edf4;
  border-radius: 50%;
  display: flex;
  font-size: 10px;
  font-weight: 900;
  height: 25px;
  justify-content: center;
  width: 25px;
}

.demo-presenter-progress button.active,
.demo-presenter-progress button.complete {
  color: #255cc8;
}

.demo-presenter-progress button.active > span {
  background: #255cf6;
  box-shadow: 0 7px 18px rgba(37, 92, 246, 0.25);
  color: #fff;
}

.demo-presenter-progress button.complete > span {
  background: #dff6ee;
  color: #087257;
}

.demo-presenter-progress small {
  font-size: 9px;
}

.demo-presenter-body {
  align-content: start;
  display: grid;
  gap: 16px;
  padding: 28px 28px 36px;
}

.demo-presenter-body h2 {
  font-size: clamp(27px, 5vw, 38px);
  letter-spacing: -0.055em;
  line-height: 1.05;
  margin: 0;
}

.demo-presenter-body > p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
  margin: 0;
}

.demo-presenter-proof {
  align-items: flex-start;
  background: #f1f5fa;
  border: 1px solid #dce5ed;
  border-radius: 15px;
  display: grid;
  gap: 11px;
  grid-template-columns: 28px 1fr;
  padding: 14px;
}

.demo-presenter-proof-live {
  background: #e8faf3;
  border-color: #bde8d6;
  color: #087257;
}

.demo-presenter-proof-recorded {
  background: #f4f1fb;
  border-color: #dcd4ef;
  color: #645786;
}

.demo-presenter-proof > span {
  font-size: 18px;
  text-align: center;
}

.demo-presenter-proof p {
  color: currentColor;
  font-size: 11px;
  margin: 3px 0 0;
  opacity: 0.8;
}

.demo-presenter-project {
  background: #fff;
  border: 1px solid #dfe7ee;
  border-radius: 15px;
  display: grid;
  gap: 3px;
  padding: 14px;
}

.demo-presenter-project span,
.demo-presenter-project small {
  color: var(--muted);
  font-size: 10px;
  text-transform: capitalize;
}

.demo-presenter-body .demo-visit {
  justify-self: start;
}

@media (max-width: 900px) {
  .demo-proof-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .demo-settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .demo-proof-strip {
    grid-template-columns: 1fr;
  }

  .demo-settings-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .demo-settings-hero button {
    width: 100%;
  }

  .demo-presenter-backdrop {
    align-items: flex-end;
  }

  .demo-presenter-panel {
    border-radius: 22px 22px 0 0;
    height: min(92vh, 820px);
    width: 100%;
  }

  .demo-presenter-body {
    padding: 22px 20px 28px;
  }

  .demo-presenter-panel > header,
  .demo-presenter-panel > footer {
    padding-left: 18px;
    padding-right: 18px;
  }
}
