/* OPHANIM — light white blurred-glass (Apple-style) + Poppins */
:root {
  --bg: #eef1f6;
  --text: #0b1623;
  --text-muted: #5c6b80;
  --hairline: rgba(255, 255, 255, 0.65);
  --hairline-soft: rgba(15, 23, 42, 0.07);
  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.72);
  --glass-inset: rgba(255, 255, 255, 0.38);
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08), 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.06);
  --radius: 22px;
  --radius-sm: 14px;
  --blur: saturate(170%) blur(22px);
  --accent: #2f7bf6;
  --accent-teal: #18a7b5;
  --accent-green: #2ea66a;
  --accent-amber: #e6932a;
  --danger: #d2453d;
  --font: "Poppins", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.glass-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(42rem 42rem at 8% -8%, rgba(47, 123, 246, 0.16), transparent 60%),
    radial-gradient(38rem 38rem at 102% 4%, rgba(168, 85, 247, 0.14), transparent 60%),
    radial-gradient(46rem 46rem at 78% 108%, rgba(24, 167, 181, 0.14), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.glass {
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  box-shadow: var(--shadow);
}

.glass-inset {
  background: var(--glass-inset);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 440px;
  max-width: 100%;
  padding: 32px;
}

.auth-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 14px;
  margin-bottom: 16px;
}

.auth-title { font-size: 22px; font-weight: 700; margin: 0 0 6px; letter-spacing: -0.02em; }
.auth-subtitle { font-size: 14px; color: var(--text-muted); margin: 0 0 24px; line-height: 1.5; }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-muted);
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--hairline-soft);
  background: var(--glass-strong);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
}
.field input:focus {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 18px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 92%, white), var(--accent));
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  font-family: var(--font);
  cursor: pointer;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 30%, transparent);
}
.btn-secondary {
  display: inline-flex;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--glass-strong);
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  text-decoration: none;
}

.auth-footer { margin-top: 18px; font-size: 12px; color: var(--text-muted); text-align: center; }
.errorlist, .messages { list-style: none; padding: 0; margin: 0 0 14px; }
.errorlist li, .messages .error { color: var(--danger); font-size: 13px; }
.messages .success { color: var(--accent-green); font-size: 13px; }

/* Login — premium wheels mascot */
.auth-shell--premium-dark,
.auth-shell--premium-light {
  min-height: 100vh;
}

.auth-card--premium {
  width: 420px;
  padding: 36px 32px 32px;
  text-align: center;
}

.auth-mascot {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  overflow: visible;
}

.auth-mascot .ophanim-svg {
  width: 128px;
  height: 128px;
  display: block;
  overflow: visible;
}

.auth-mascot .align-ring-wrap {
  transform-box: fill-box;
  transform-origin: center center;
}

.auth-mascot .align-ring-stroke {
  stroke: #ffffff;
  stroke-width: var(--om-ring-width, 3.1);
  stroke-linecap: round;
  opacity: 0.92;
}

html[data-appearance="premium-light"] .auth-mascot .align-ring-stroke {
  stroke: #1e40af;
}

.auth-mascot .align-glow-bg {
  pointer-events: none;
}

.auth-mascot .core-trackable {
  transition: transform 0.16s ease-out;
}

.auth-mascot .align-assembly.is-organic .align-ring-mouse {
  transition: transform 1.15s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-mascot .align-swell-auto-0 { animation: om-swell-ring-0 11s ease-in-out infinite; }
.auth-mascot .align-swell-auto-1 { animation: om-swell-ring-1 13.5s ease-in-out infinite 1.1s; }
.auth-mascot .align-swell-auto-2 { animation: om-swell-ring-2 12s ease-in-out infinite 2.2s; }
.auth-mascot .align-swell-auto-3 { animation: om-swell-ring-3 14.5s ease-in-out infinite 0.5s; }
.auth-mascot .align-assembly.is-swell .align-glow-bg { animation: om-swell-glow 15s ease-in-out infinite; }
.auth-mascot .align-assembly.is-swell .align-core-pulse {
  animation: om-swell-core 12s ease-in-out infinite;
  stroke: var(--om-glow, #38bdf8);
  stroke-width: 0.6;
  opacity: 0.35;
}

.auth-shell--premium-dark .auth-title,
.auth-shell--premium-light .auth-title {
  margin-bottom: 4px;
}

.auth-shell--premium-dark .auth-subtitle,
.auth-shell--premium-light .auth-subtitle {
  margin-bottom: 26px;
}

.auth-shell--premium-dark .field,
.auth-shell--premium-light .field {
  text-align: left;
}

.auth-shell--premium-dark .btn-primary,
.auth-shell--premium-light .btn-primary {
  margin-top: 4px;
}

.auth-shell--premium-dark .errorlist li,
.auth-shell--premium-dark .messages .error {
  color: #ff8f87;
}

.auth-shell--premium-dark .messages .success {
  color: #fcd34d;
}

.auth-shell--premium-light .errorlist li,
.auth-shell--premium-light .messages .error {
  color: var(--danger);
}

.auth-shell--premium-light .messages .success {
  color: var(--accent-green);
}

.auth-footer--links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
  font-size: 13px;
}

.auth-footer--links a {
  color: rgba(147, 197, 253, 0.92);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer--links a:hover {
  color: #dbeafe;
  text-decoration: underline;
}

.auth-footer-sep {
  color: rgba(148, 163, 184, 0.45);
  user-select: none;
}

/* Intel policies — tickable capsules */
.intel-capsule-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.intel-capsule-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.intel-capsule {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--hairline-soft);
  background: var(--glass-inset);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  user-select: none;
}

.intel-capsule::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.35;
  flex-shrink: 0;
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.intel-capsule:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--text);
  transform: translateY(-1px);
}

.intel-capsule.is-selected {
  color: var(--text);
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, var(--glass-strong));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}

.intel-capsule.is-selected::before {
  opacity: 1;
  background: var(--accent);
  transform: scale(1.15);
}

.intel-capsule:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  outline-offset: 2px;
}

.intel-capsule-label {
  white-space: nowrap;
}

html[data-appearance="premium-light"] body.glass-body .intel-capsule.is-selected {
  border: 1.5px solid transparent;
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  background-image: var(--premium-surface-glass), var(--premium-stroke);
  box-shadow: var(--premium-glow);
  color: #0f172a;
}

html[data-appearance="premium-light"] body.glass-body .intel-capsule.is-selected::before {
  background: linear-gradient(135deg, #3b82f6, #a855f7);
}

html[data-appearance="premium-dark"] body.glass-body .intel-capsule.is-selected {
  border: 1.5px solid transparent;
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  background-image: var(--premium-surface-dark), var(--premium-stroke);
  box-shadow: var(--premium-glow);
  color: #f5f3ff;
}

html[data-appearance="premium-dark"] body.glass-body .intel-capsule.is-selected::before {
  background: linear-gradient(135deg, #d4af37, #a78bfa);
}

.intel-role-block {
  padding: 16px;
  margin-bottom: 14px;
  border-radius: var(--radius-sm);
}

.intel-tab.active {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent) !important;
  background: color-mix(in srgb, var(--accent) 10%, var(--glass-strong)) !important;
  color: var(--text) !important;
}

@media (prefers-reduced-motion: reduce) {
  .auth-mascot .align-swell-auto-0,
  .auth-mascot .align-swell-auto-1,
  .auth-mascot .align-swell-auto-2,
  .auth-mascot .align-swell-auto-3,
  .auth-mascot .align-assembly.is-swell .align-glow-bg,
  .auth-mascot .align-assembly.is-swell .align-core-pulse {
    animation: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-shell--dark .ecl-glow-bg,
  .auth-shell--dark .ecl-drift,
  .auth-shell--dark .ecl-core-dot,
  .auth-shell--dark .ecl-core-bloom,
  .auth-shell--dark .ecl-overlay-a,
  .auth-shell--dark .ecl-overlay-b {
    animation: none !important;
  }
}

.subdomain-row { display: flex; align-items: center; gap: 8px; }
.subdomain-suffix { font-size: 13px; color: var(--text-muted); white-space: nowrap; }

/* Fixed map pill — same position as .user-profile-btn on the map (upper-left, sidebar-aligned) */
.dash-map-pill {
  position: fixed;
  top: 12px;
  left: 20px;
  right: auto;
  z-index: 100010;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.12);
  font-family: var(--font);
  text-decoration: none;
  color: #0f172a;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  max-width: min(220px, calc(100vw - 40px));
}
.dash-map-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.16);
  background: rgba(255, 255, 255, 0.92);
  color: #4a68d0;
  text-decoration: none;
}
.dash-map-pill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  color: #fff;
  flex-shrink: 0;
}
.dash-map-pill-icon svg {
  width: 18px;
  height: 18px;
}
.dash-map-pill-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.dash-map-pill-label {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.dash-map-pill-back {
  margin-right: 2px;
  font-weight: 700;
}

.dash-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
  padding-top: 72px;
  align-items: start;
}
.dash-sidebar { position: sticky; top: 72px; padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.dash-brand { display: flex; align-items: center; gap: 12px; }
.dash-brand img { width: 40px; height: 40px; object-fit: contain; border-radius: 10px; }
.dash-nav { display: flex; flex-direction: column; gap: 4px; }
.dash-nav a {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
}
.dash-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
}
.dash-nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.75;
}
.dash-nav a:hover .dash-nav-icon,
.dash-nav a.active .dash-nav-icon {
  opacity: 1;
}
.dash-nav a:hover, .dash-nav a.active {
  background: var(--glass-strong);
  color: var(--text);
  text-decoration: none;
}
.dash-nav-spacer {
  display: block;
  height: 10px;
  flex-shrink: 0;
}
.dash-nav-signout {
  margin-top: 4px;
  color: var(--danger) !important;
}
.dash-nav-signout:hover {
  background: color-mix(in srgb, var(--danger) 10%, transparent) !important;
  color: var(--danger) !important;
}
.dash-security-status {
  padding: 16px;
  margin-top: 8px;
}
.dash-security-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
}
.dash-security-badge.ready {
  background: color-mix(in srgb, var(--accent-green) 16%, transparent);
  color: var(--accent-green);
}
.dash-security-badge.pending {
  background: color-mix(in srgb, var(--accent-amber) 18%, transparent);
  color: var(--accent-amber);
}
.dash-security-toggle {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  margin-top: 8px;
  cursor: pointer;
}
.dash-security-toggle input {
  margin-top: 4px;
  flex-shrink: 0;
  accent-color: var(--accent);
}
.dash-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dash-hero-title { margin: 0 0 6px; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.dash-hero-sub { margin: 0 0 20px; font-size: 14px; color: var(--text-muted); }
.dash-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.dash-section-head .block-title { margin: 0; }
.dash-link { font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; }
.dash-link:hover { text-decoration: underline; }
.dash-btn-inline { width: auto; display: inline-flex; padding: 10px 18px; font-size: 13px; }

.dash-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.dash-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--hairline-soft);
  background: var(--glass-strong);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.dash-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--hairline-soft));
  text-decoration: none;
  color: var(--text);
}
.dash-tile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}
.dash-tile-icon svg { width: 22px; height: 22px; }
.dash-tile-icon-map { background: color-mix(in srgb, var(--accent-teal) 14%, transparent); color: var(--accent-teal); }
.dash-tile-icon-cloud { background: color-mix(in srgb, #3b82f6 14%, transparent); color: #2563eb; }
.dash-tile-icon-users { background: color-mix(in srgb, #8b5cf6 14%, transparent); color: #7c3aed; }
.dash-tile-icon-usage { background: color-mix(in srgb, var(--accent-amber) 18%, transparent); color: var(--accent-amber); }
.dash-tile-icon-billing { background: color-mix(in srgb, var(--accent-green) 14%, transparent); color: var(--accent-green); }
.dash-tile-icon-help { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.dash-tile-label { font-size: 14px; font-weight: 700; }
.dash-tile-meta { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: capitalize; }

.dash-help-search-wrap { position: relative; margin-bottom: 16px; }
.dash-help-search {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px 12px 42px;
  border-radius: 14px;
  border: 1px solid var(--hairline);
  background: var(--glass-inset);
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
}
.dash-help-search:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 50%, var(--hairline));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}
.dash-help-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.dash-help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}
.dash-help-grid-full { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.dash-help-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  text-align: left;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--hairline-soft);
  background: var(--glass-strong);
  cursor: pointer;
  font-family: var(--font);
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.dash-help-card:hover,
.dash-help-card[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--hairline-soft));
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
.dash-help-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  flex-shrink: 0;
}
.dash-help-card-icon svg { width: 22px; height: 22px; }
.dash-help-card-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dash-help-card-kicker { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.dash-help-card-title { font-size: 14px; font-weight: 700; }
.dash-help-card-summary { font-size: 12px; color: var(--text-muted); line-height: 1.45; }
.dash-help-detail {
  margin-top: 20px;
  padding: 20px;
  border-radius: 16px;
}
.dash-help-detail h3 { margin: 0 0 12px; font-size: 17px; }
.dash-help-article-body { font-size: 14px; color: var(--text-muted); line-height: 1.55; }
.dash-help-article-body ul { margin: 8px 0; padding-left: 20px; }
.dash-help-article-body strong { color: var(--text); }

.dash-project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.dash-project-grid-full {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.dash-project-tile {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  border-radius: 18px;
  border: 1px solid var(--hairline-soft);
  background: linear-gradient(145deg, var(--glass-strong) 0%, color-mix(in srgb, var(--accent) 4%, var(--glass-strong)) 100%);
  text-decoration: none;
  color: var(--text);
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.dash-project-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
  text-decoration: none;
  color: var(--text);
}
.dash-project-tile-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  overflow: hidden;
}
.dash-project-tile-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dash-project-tile-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
}
.dash-project-tile-fallback span {
  font-size: 32px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.88);
  letter-spacing: 0.02em;
}
.dash-project-tile-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  padding: 14px 16px 16px;
}
.dash-project-tile-name { font-size: 15px; font-weight: 700; line-height: 1.3; }
.dash-project-tile-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dash-project-tile-meta { font-size: 11px; color: var(--text-muted); }
.dash-project-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-amber) 18%, transparent);
  color: var(--accent-amber);
}
.dash-project-badge.ready {
  background: color-mix(in srgb, var(--accent-green) 16%, transparent);
  color: var(--accent-green);
}
.dash-project-badge.failed {
  background: color-mix(in srgb, #ef4444 16%, transparent);
  color: #ef4444;
}

.dash-empty, .dash-empty-state { font-size: 14px; color: var(--text-muted); text-align: center; padding: 24px 12px; }

.dash-field-hint { font-size: 13px; color: var(--text-muted); margin: 0 0 14px; line-height: 1.45; }

.invite-external-warning {
  padding: 18px;
  margin-bottom: 16px;
  border: 1px solid color-mix(in srgb, #d97706 35%, transparent);
  background: color-mix(in srgb, #f59e0b 8%, var(--glass-inset));
}
.invite-external-warning-text {
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 10px;
}
.invite-external-warning a { color: var(--accent); font-weight: 600; }

.invite-create-form { padding: 16px; margin-bottom: 16px; }
.invite-form-title { font-size: 14px; margin: 0 0 10px; font-weight: 600; }
.invite-delivery-panel {
  padding: 18px;
  margin-bottom: 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  background: color-mix(in srgb, var(--accent) 5%, var(--glass-inset));
}
.invite-delivery-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 12px 0 6px;
}
.invite-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.invite-link-input {
  flex: 1 1 220px;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--hairline-soft);
  background: rgba(255, 255, 255, 0.72);
  font-family: var(--font);
  font-size: 12px;
  color: var(--text);
}
.invite-delivery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.invite-mailto-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  width: auto;
  white-space: nowrap;
}
.invite-mailto-btn--compact {
  padding: 8px 14px;
  font-size: 13px;
}
.invite-email-preview {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
}
.invite-email-preview summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
}
.invite-email-preview-body {
  margin: 10px 0 0;
  padding: 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--hairline-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 280px;
  overflow: auto;
}
.invite-email-body-source {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.invite-pending-list { display: flex; flex-direction: column; gap: 10px; }
.invite-pending-card { padding: 14px 16px; }
.invite-pending-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: baseline;
  margin-bottom: 10px;
  font-size: 13px;
}
.invite-pending-meta strong { font-size: 14px; }
.invite-pending-meta span { color: var(--text-muted); font-size: 12px; }

.mascot-picker-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
@media (min-width: 960px) {
  .mascot-picker-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .mascot-picker-cards { grid-template-columns: 1fr; }
}

.mascot-picker-card-option {
  display: block;
  cursor: pointer;
  min-width: 0;
}
.mascot-picker-card-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.mascot-picker-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  padding: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline-soft);
  background: var(--glass-inset);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.mascot-picker-card-option:hover .mascot-picker-card {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.mascot-picker-card-option.is-selected .mascot-picker-card,
.mascot-picker-card-option input:checked + .mascot-picker-card {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent), 0 10px 28px rgba(74, 104, 208, 0.12);
}
.mascot-card-preview-host {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  height: 120px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.28) 100%);
  border-bottom: 1px solid var(--hairline-soft);
  overflow: hidden;
}
.mascot-picker-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 12px 14px 14px;
  text-align: center;
}
.mascot-picker-copy strong { font-size: 14px; }
.mascot-picker-desc { font-size: 12px; color: var(--text-muted); }

.mascot-live-preview-inner {
  width: 100%;
  height: 120px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.mascot-live-preview-inner .ophanim-svg {
  width: 100%;
  height: 100%;
  max-width: 180px;
  max-height: 120px;
  filter: drop-shadow(0 2px 8px rgba(15, 23, 42, 0.12));
}
.mascot-live-preview-inner.is-wheels-mascot .ophanim-svg {
  filter: none;
}
.mascot-live-preview-inner .ophanim-custom-mascot,
.mascot-live-preview-inner .ophanim-text-mascot {
  width: 100%;
  height: 100%;
  max-width: 180px;
  max-height: 120px;
}
.mascot-live-preview-inner .ophanim-custom-mascot {
  object-fit: cover;
  object-position: center;
}
.mascot-live-preview-inner .ophanim-custom-mascot.mask-circle { border-radius: 50%; }
.mascot-live-preview-inner .ophanim-custom-mascot.mask-rounded { border-radius: 16px; }
.mascot-live-preview-inner .ophanim-custom-mascot.mask-none { border-radius: 0; }
.mascot-live-preview-inner .ophanim-text-mascot {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  text-align: center;
  font-size: clamp(10px, 2.4vw, 13px);
  font-weight: 600;
  line-height: 1.25;
  color: #1e293b;
  word-break: break-word;
  overflow: hidden;
}
.mascot-card-preview-placeholder {
  font-size: 12px;
  color: var(--text-muted);
  padding: 12px;
  text-align: center;
  animation: mascot-placeholder-pulse 2.4s ease-in-out infinite;
}
@keyframes mascot-placeholder-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

/* Ophanim rings — live card previews */
.mascot-live-preview-inner .ring {
  fill: none;
  stroke: #64748b;
  stroke-width: 1;
  transform-origin: center;
}
.mascot-live-preview-inner .ring-outer { animation: mascot-rotate 24s linear infinite; }
.mascot-live-preview-inner .ring-middle { animation: mascot-rotate-reverse 18s linear infinite; }
.mascot-live-preview-inner .ring-inner { animation: mascot-rotate 12s linear infinite; }
.mascot-live-preview-inner .eye { fill: #fff; stroke: #475569; stroke-width: 0.1; }
.mascot-live-preview-inner .eye-pupil { fill: #1e293b; }
.mascot-live-preview-inner .central-eye { fill: #fff; stroke: #94a3b8; stroke-width: 0.5; }
.mascot-live-preview-inner .central-eye-pupil { fill: #0f172a; stroke: #4a68d0; stroke-width: 3; }
@keyframes mascot-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes mascot-rotate-reverse {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}
.mascot-text-count {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  margin-top: 4px;
}

/* Wheels mascot — live card previews */
.mascot-live-preview-inner .align-ring-wrap {
  transform-box: fill-box;
  transform-origin: center center;
}
.mascot-live-preview-inner .align-ring-stroke {
  stroke: #1e40af;
  stroke-width: var(--om-ring-width, 3.1);
  stroke-linecap: round;
  opacity: 0.92;
  filter: none;
}

html[data-appearance="dark"] .mascot-live-preview-inner.is-wheels-mascot .align-ring-stroke,
html[data-appearance="dark-blue"] .mascot-live-preview-inner.is-wheels-mascot .align-ring-stroke,
html[data-appearance="premium-dark"] .mascot-live-preview-inner.is-wheels-mascot .align-ring-stroke {
  stroke: #ffffff;
  opacity: 0.96;
}
.mascot-live-preview-inner .align-glow-bg { pointer-events: none; }
.mascot-live-preview-inner .core-trackable { transition: transform 0.16s ease-out; }
.mascot-live-preview-inner .align-assembly.is-organic .align-ring-mouse {
  transition: transform 1.15s cubic-bezier(0.22, 1, 0.36, 1);
}
.mascot-live-preview-inner .align-swell-auto-0 { animation: om-swell-ring-0 11s ease-in-out infinite; }
.mascot-live-preview-inner .align-swell-auto-1 { animation: om-swell-ring-1 13.5s ease-in-out infinite 1.1s; }
.mascot-live-preview-inner .align-swell-auto-2 { animation: om-swell-ring-2 12s ease-in-out infinite 2.2s; }
.mascot-live-preview-inner .align-swell-auto-3 { animation: om-swell-ring-3 14.5s ease-in-out infinite 0.5s; }
.mascot-live-preview-inner .align-assembly.is-swell .align-glow-bg { animation: om-swell-glow 15s ease-in-out infinite; }
.mascot-live-preview-inner .align-assembly.is-swell .align-core-pulse {
  animation: om-swell-core 12s ease-in-out infinite;
  stroke: var(--om-glow, #38bdf8);
  stroke-width: 0.6;
  opacity: 0.35;
}
@media (prefers-reduced-motion: reduce) {
  .mascot-live-preview-inner .ring-outer,
  .mascot-live-preview-inner .ring-middle,
  .mascot-live-preview-inner .ring-inner,
  .mascot-live-preview-inner .align-swell-auto-0,
  .mascot-live-preview-inner .align-swell-auto-1,
  .mascot-live-preview-inner .align-swell-auto-2,
  .mascot-live-preview-inner .align-swell-auto-3,
  .mascot-live-preview-inner .align-assembly.is-swell .align-glow-bg,
  .mascot-live-preview-inner .align-assembly.is-swell .align-core-pulse {
    animation: none !important;
  }
}
@keyframes om-swell-ring-0 { 0%, 100% { transform: translate(0,0) rotate(0deg) scale(1); } 32% { transform: translate(-15px,5px) rotate(-5deg) scale(1.03); } 58% { transform: translate(11px,-4px) rotate(3deg) scale(1.05); } }
@keyframes om-swell-ring-1 { 0%, 100% { transform: translate(0,0) rotate(0deg) scale(1); } 24% { transform: translate(17px,3px) rotate(6deg) scale(1.04); } 51% { transform: translate(-9px,7px) rotate(-4deg) scale(1.02); } 76% { transform: translate(13px,-6px) rotate(4deg) scale(1.06); } }
@keyframes om-swell-ring-2 { 0%, 100% { transform: translate(0,0) rotate(0deg) scale(1); } 28% { transform: translate(-12px,-6px) rotate(-3deg) scale(1.035); } 64% { transform: translate(8px,9px) rotate(5deg) scale(1.045); } }
@keyframes om-swell-ring-3 { 0%, 100% { transform: translate(0,0) rotate(0deg) scale(1); } 20% { transform: translate(14px,-7px) rotate(7deg) scale(1.025); } 48% { transform: translate(-16px,2px) rotate(-6deg) scale(1.055); } 72% { transform: translate(6px,8px) rotate(2deg) scale(1.03); } }
@keyframes om-swell-glow { 0%, 100% { transform: scale(1); opacity: 0.84; } 38% { transform: scale(1.08); opacity: 0.91; } 66% { transform: scale(1.13); opacity: 0.87; } }
@keyframes om-swell-core { 0%, 100% { transform: scale(1); opacity: 0.28; } 44% { transform: scale(1.28); opacity: 0.48; } 70% { transform: scale(1.12); opacity: 0.36; } }

/* Eclipse mascot — live card previews (Solar Align · Void) */
.mascot-live-preview-inner.is-eclipse-mascot .ophanim-svg {
  filter: none;
}
.mascot-live-preview-inner .ecl-glow-bg {
  pointer-events: none;
  opacity: 0.82;
  animation: om-alive-glow 13s ease-in-out infinite;
}
.mascot-live-preview-inner .ecl-drift {
  animation: ecl-align-drift 16s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
.mascot-live-preview-inner .ecl-sun-body,
.mascot-live-preview-inner .ecl-sun-disc {
  animation: ecl-sun-breathe 14s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
.mascot-live-preview-inner .ecl-moon-disc,
.mascot-live-preview-inner .ecl-moon-veil {
  animation: ecl-moon-drift 16s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
.mascot-live-preview-inner .ecl-corona-ring,
.mascot-live-preview-inner .ecl-crescent-edge,
.mascot-live-preview-inner .ecl-annular-glow {
  animation: ecl-corona-pulse 10s ease-in-out infinite;
}
.mascot-live-preview-inner .ecl-core-dot,
.mascot-live-preview-inner .ecl-core-bloom {
  animation: om-alive-dot 8s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
@keyframes om-alive-glow {
  0%, 100% { opacity: 0.78; transform: scale(1); transform-origin: 100px 100px; transform-box: view-box; }
  50% { opacity: 0.9; transform: scale(1.05); transform-origin: 100px 100px; transform-box: view-box; }
}
@keyframes om-alive-dot {
  0%, 100% { opacity: 0.82; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}
@keyframes ecl-align-drift {
  0%, 100% { transform: translate(10px, 0); }
  45%, 55% { transform: translate(-1px, 0); }
}
@keyframes ecl-sun-breathe {
  0%, 100% { transform: scale(1); opacity: 0.95; }
  50% { transform: scale(1.03); opacity: 1; }
}
@keyframes ecl-moon-drift {
  0%, 100% { transform: translate(6px, 0); }
  50% { transform: translate(-4px, 0); }
}
@keyframes ecl-corona-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 0.95; }
}
@media (prefers-reduced-motion: reduce) {
  .mascot-live-preview-inner .ecl-glow-bg,
  .mascot-live-preview-inner .ecl-drift,
  .mascot-live-preview-inner .ecl-sun-body,
  .mascot-live-preview-inner .ecl-sun-disc,
  .mascot-live-preview-inner .ecl-moon-disc,
  .mascot-live-preview-inner .ecl-moon-veil,
  .mascot-live-preview-inner .ecl-corona-ring,
  .mascot-live-preview-inner .ecl-crescent-edge,
  .mascot-live-preview-inner .ecl-annular-glow,
  .mascot-live-preview-inner .ecl-core-dot,
  .mascot-live-preview-inner .ecl-core-bloom {
    animation: none !important;
  }
}

.mascot-custom-panel {
  margin-top: 4px;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline-soft);
  background: var(--glass-inset);
}
.mascot-current-upload {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.mascot-current-thumb {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--hairline-soft);
}
.mascot-remove-upload { font-size: 13px; color: var(--text-muted); display: flex; gap: 8px; align-items: center; }
.dash-empty-state { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dash-empty-icon { width: 56px; height: 56px; color: var(--text-muted); opacity: 0.5; }
.dash-empty-icon svg { width: 100%; height: 100%; }
.dash-sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline-soft);
}
.dash-sidebar-footer .btn-secondary {
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  text-decoration: none;
}
.dash-sidebar-footer .dash-footer-signout {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 28%, transparent);
  background: color-mix(in srgb, var(--danger) 8%, var(--glass-strong));
}
.dash-sidebar-footer .dash-footer-signout:hover {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 14%, var(--glass-strong));
  text-decoration: none;
}
.block { padding: 22px; margin-bottom: 16px; }
.block-title { font-size: 17px; font-weight: 700; margin: 0 0 14px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--hairline-soft);
  vertical-align: top;
}
.data-table th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }

.usage-meter { margin: 16px 0; }
.usage-meter-label { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; }
.usage-meter-track {
  height: 10px;
  border-radius: 999px;
  background: var(--glass-inset);
  overflow: hidden;
}
.usage-meter-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-teal), var(--accent));
  transition: width 0.3s ease;
}

.tier-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}
.tier-badge.premium { background: color-mix(in srgb, var(--accent-teal) 18%, transparent); color: var(--accent-teal); }

.qr-wrap { text-align: center; margin: 20px 0; }
.qr-wrap img { border-radius: 12px; background: #fff; padding: 8px; }

@media (max-width: 900px) {
  .dash-shell { grid-template-columns: 1fr; }
  .dash-sidebar { position: static; }
  .dash-project-grid,
  .dash-project-grid-full {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 540px) {
  .dash-project-grid,
  .dash-project-grid-full {
    grid-template-columns: 1fr;
  }
}
