/* PLM Studio Phase 2 functional states and forms */
.studio-phase2-dialog {
  position: fixed;
  inset: 0;
  z-index: 1320;
  display: grid;
  place-items: start center;
  padding: max(72px, 10dvh) 20px 24px;
  overflow-y: auto;
}

.studio-phase2-dialog[hidden] {
  display: none;
}

.studio-phase2-backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  background: rgba(1, 6, 12, 0.78);
  backdrop-filter: blur(10px);
}

.studio-phase2-dialog-panel {
  position: relative;
  width: min(680px, 100%);
  max-height: min(780px, 82dvh);
  overflow-y: auto;
  border: 1px solid rgba(151, 176, 198, 0.2);
  border-radius: 16px;
  background: #0b1219;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.46);
}

.studio-phase2-dialog-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(151, 176, 198, 0.14);
  background: rgba(11, 18, 25, 0.96);
  backdrop-filter: blur(14px);
}

.studio-phase2-dialog-head h2,
.studio-phase2-dialog-head p {
  margin: 0;
}

.studio-phase2-dialog-head h2 {
  color: #f7fbff;
  font-size: 22px;
}

.studio-phase2-dialog-head p {
  margin-top: 6px;
  color: #9aaaba;
  font-size: 14px;
  line-height: 1.5;
}

.studio-phase2-close {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(151, 176, 198, 0.18);
  border-radius: 10px;
  color: #f7fbff;
  background: #101923;
  font: inherit;
  font-size: 24px;
  cursor: pointer;
}

.studio-phase2-form {
  display: grid;
  gap: 18px;
  padding: 24px;
}

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

.studio-phase2-form label {
  display: grid;
  min-width: 0;
  gap: 8px;
  color: #c7d2dc;
  font-size: 14px;
  font-weight: 700;
}

.studio-phase2-form label.is-wide {
  grid-column: 1 / -1;
}

.studio-phase2-form :is(input, select, textarea) {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid rgba(151, 176, 198, 0.22);
  border-radius: 10px;
  padding: 11px 13px;
  color: #f7fbff;
  background: #0e1720;
  font: inherit;
  font-size: 16px;
}

.studio-phase2-form textarea {
  min-height: 126px;
  resize: vertical;
  line-height: 1.5;
}

.studio-phase2-form :is(input, select, textarea):focus-visible {
  outline: 2px solid rgba(55, 192, 255, 0.7);
  outline-offset: 2px;
  border-color: rgba(55, 192, 255, 0.55);
}

.studio-phase2-form-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 0 -24px -24px;
  padding: 16px 24px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(151, 176, 198, 0.14);
  background: rgba(11, 18, 25, 0.97);
}

.studio-phase2-form-message {
  min-height: 20px;
  margin: 0;
  color: #aebdcc;
  font-size: 14px;
}

.studio-phase2-form-message.is-error {
  color: #ff9f9f;
}

.studio-phase2-form-message.is-success {
  color: #71e3b6;
}

.studio-phase2-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1400;
  max-width: min(420px, calc(100% - 32px));
  border: 1px solid rgba(151, 176, 198, 0.2);
  border-radius: 12px;
  padding: 14px 16px;
  color: #f7fbff;
  background: #111b25;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
}

.studio-phase2-toast[hidden] {
  display: none;
}

.studio-phase2-toast.is-error {
  border-color: rgba(255, 112, 112, 0.42);
}

.studio-phase2-workspace-switcher {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  color: #9fb0bf;
  font-size: 12px;
  font-weight: 700;
}

.studio-phase2-workspace-switcher select {
  min-width: 0;
  min-height: 44px;
  border: 1px solid rgba(151, 176, 198, 0.2);
  border-radius: 10px;
  padding: 8px 36px 8px 11px;
  color: #f7fbff;
  background: #0d161e;
  font: inherit;
  font-size: 14px;
}

.studio-phase2-onboarding {
  display: grid;
  gap: 18px;
  margin-top: 20px;
  border: 1px solid rgba(58, 181, 239, 0.24);
  border-radius: 16px;
  padding: 22px;
  background: linear-gradient(135deg, rgba(22, 80, 104, 0.24), rgba(13, 21, 29, 0.94) 56%);
}

.studio-phase2-onboarding h2,
.studio-phase2-onboarding p {
  margin: 0;
}

.studio-phase2-onboarding p {
  color: #a7b6c4;
  line-height: 1.55;
}

.studio-phase2-onboarding ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.studio-phase2-onboarding li {
  min-width: 0;
  border: 1px solid rgba(151, 176, 198, 0.14);
  border-radius: 12px;
  padding: 14px;
  color: #c8d2dc;
  background: rgba(4, 10, 16, 0.42);
}

.studio-phase2-onboarding li span {
  display: inline-grid;
  width: 28px;
  height: 28px;
  margin-bottom: 10px;
  place-items: center;
  border-radius: 8px;
  color: #dff7ff;
  background: rgba(34, 170, 231, 0.18);
}

.studio-phase2-compact-list {
  display: grid;
  gap: 10px;
}

.studio-phase2-record {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(120px, 0.7fr) auto;
  align-items: center;
  min-width: 0;
  gap: 16px;
  border: 1px solid rgba(151, 176, 198, 0.14);
  border-radius: 12px;
  padding: 15px 16px;
  color: #f7fbff;
  background: #0e161f;
}

.studio-phase2-record > * {
  min-width: 0;
}

.studio-phase2-record strong,
.studio-phase2-record span,
.studio-phase2-record small {
  overflow-wrap: anywhere;
}

.studio-phase2-record small {
  display: block;
  margin-top: 4px;
  color: #91a2b1;
}

.studio-phase2-record-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.studio-phase2-record select {
  min-height: 44px;
  border: 1px solid rgba(151, 176, 198, 0.2);
  border-radius: 9px;
  padding: 8px 32px 8px 10px;
  color: #f7fbff;
  background: #0b131b;
  font: inherit;
  font-size: 14px;
}

.studio-phase2-setup-state {
  display: grid;
  justify-items: start;
  gap: 12px;
  border: 1px dashed rgba(151, 176, 198, 0.24);
  border-radius: 14px;
  padding: 24px;
  color: #a7b6c4;
  background: rgba(11, 18, 25, 0.55);
}

.studio-phase2-setup-state h3,
.studio-phase2-setup-state p {
  margin: 0;
}

.studio-phase2-file-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(151, 176, 198, 0.14);
}

.studio-phase2-file-progress span {
  display: block;
  width: var(--file-progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: #32bff4;
  transition: width 180ms ease;
}

.studio-phase2-notification-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 0 0 12px;
}

.studio-v2-notification[data-notification-id] {
  width: 100%;
  text-align: left;
}

.studio-phase2-unavailable {
  color: #93a5b5;
}

body:not(.is-demo-workspace) .studio-v2-demo-section,
body:not(.is-demo-workspace) [data-studio-demo-only] {
  display: none !important;

body:not(.has-studio-site) #overview > .dashboard-stat-grid,
body:not(.has-studio-site) #overview > .studio-v2-secondary-metrics,
body:not(.has-studio-site) #overview #dashboardSiteCard,
body:not(.has-studio-site) #overview #dashboardProjectCard,
body:not(.has-studio-site) #overview .studio-v2-upcoming-panel,
body:not(.has-studio-site) #overview .studio-v2-overview-apps {
  display: none;
}

body:not(.has-studio-site) #overview .studio-v2-dashboard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body:not(.has-studio-site) #overview .studio-v2-quick-actions,
body:not(.has-studio-site) #overview #dashboardActivityCard {
  grid-column: span 1;
}


/* Shared private site-logo presentation. Signed URLs remain in memory only. */
.studio-v2-site-logo {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(194, 215, 234, 0.13);
  border-radius: 9px;
  color: #bceeff;
  background: #0a1118;
}

.studio-v2-site-logo img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 5px;
  object-fit: contain;
}

.studio-v2-site-logo-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: #bceeff;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
}

.studio-v2-site-logo-fallback svg {
  width: 54%;
  height: 54%;
  color: currentColor;
  opacity: 1;
}

.studio-product-site-logo {
  width: 44px;
  height: 44px;
}

.studio-product-site-heading {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.studio-product-site-heading > div {
  min-width: 0;
}

.studio-v2-site-thumb.studio-v2-site-logo {
  width: 64px;
  height: 64px;
  border: 1px solid rgba(194, 215, 234, 0.13);
  background: #0a1118;
}

@media (max-width: 767px) {
  body:not(.has-studio-site) #overview .studio-v2-dashboard-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
}

.studio-phase2-form-grid.is-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.studio-product-detail-copy {
  margin: 0;
  color: #c8d3dd;
  font-size: 15px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.studio-product-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border: 1px solid rgba(151, 176, 198, 0.16);
  border-radius: 12px;
  overflow: hidden;
}

.studio-product-detail-list > div {
  min-width: 0;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(151, 176, 198, 0.12);
}

.studio-product-detail-list > div:nth-child(odd) {
  border-right: 1px solid rgba(151, 176, 198, 0.12);
}

.studio-product-detail-list dt {
  margin: 0 0 5px;
  color: #8497a8;
  font-size: 12px;
  font-weight: 700;
}

.studio-product-detail-list dd {
  margin: 0;
  color: #f5f8fb;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.studio-product-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.studio-product-detail-actions .studio-v2-button {
  min-height: 44px;
}

.studio-v2-button.is-danger {
  border-color: rgba(255, 115, 115, 0.34);
  color: #ffb0b0;
}

.studio-product-detail-section {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.studio-product-detail-section h3,
.studio-product-detail-section p {
  margin: 0;
}

.studio-product-detail-section > article {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(151, 176, 198, 0.13);
  border-radius: 10px;
  background: rgba(8, 14, 20, 0.58);
}

.studio-product-detail-section :is(span, time, p) {
  color: #93a5b5;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.studio-product-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(151, 176, 198, 0.14);
}

.studio-product-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #28baf2;
}

.studio-product-record-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.studio-product-record-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  min-width: 0;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(151, 176, 198, 0.14);
  border-radius: 12px;
  color: #f7fbff;
  background: #0e161f;
  text-align: left;
}

button.studio-product-record-row {
  width: 100%;
  min-height: 56px;
  cursor: pointer;
}

.studio-product-record-row > * {
  min-width: 0;
}

.studio-product-record-row strong,
.studio-product-record-row small {
  display: block;
  overflow-wrap: anywhere;
}

.studio-product-record-row small {
  margin-top: 4px;
  color: #91a2b1;
}

.studio-v2-site-visual {
  aspect-ratio: 16 / 9;
}

.studio-v2-site-visual::after {
  display: none;
}

.studio-product-preview-slot {
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 0;
  grid-template-rows: 34px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(194, 215, 234, 0.12);
  border-radius: 8px;
  background: #091118;
}

.studio-v2-site-visual > .studio-product-preview-slot {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 0;
}

.studio-v2-site-visual .studio-v2-status {
  top: 46px;
  right: 12px;
  left: auto;
}

.studio-product-detail-preview {
  min-height: 0;
  aspect-ratio: 16 / 9;
}

.studio-product-preview-toolbar {
  display: grid;
  min-width: 0;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border-bottom: 1px solid rgba(194, 215, 234, 0.1);
  color: #8496a5;
  background: #0c151d;
}

.studio-product-preview-dots {
  display: flex;
  align-items: center;
  gap: 5px;
}

.studio-product-preview-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(194, 215, 234, 0.34);
}

.studio-product-preview-domain {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #91a3b2;
  font-size: 11px;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-product-preview-viewport {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #091118;
}

.studio-product-preview-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 180px;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 22px;
  color: #a9b8c5;
  background: #091118;
  text-align: center;
}

.studio-product-preview-fallback-icon,
.studio-product-preview-fallback-icon svg {
  width: 32px;
  height: 32px;
  color: #c8d7e2;
}

.studio-product-preview-fallback strong,
.studio-product-preview-fallback small,
.studio-product-preview-fallback em {
  display: block;
  max-width: 420px;
  overflow-wrap: anywhere;
}

.studio-product-preview-fallback strong {
  color: #eff7fc;
  font-size: 15px;
}

.studio-product-preview-fallback em {
  color: #b7c8d5;
  font-size: 13px;
  font-style: normal;
  font-weight: 650;
}

.studio-product-preview-fallback small {
  color: #7f91a0;
  font-size: 12px;
  line-height: 1.45;
}

.studio-product-preview-skeleton {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #0a131b;
}

.studio-product-preview-skeleton::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 24%, rgba(184, 217, 236, 0.08) 45%, transparent 66%);
  content: "";
  transform: translateX(-100%);
  animation: studio-preview-shimmer 1.25s ease-in-out infinite;
}

@keyframes studio-preview-shimmer {
  to {
    transform: translateX(100%);
  }
}

.studio-product-site-preview {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  background: #091118;
  animation: studio-preview-enter 160ms ease-out both;
}

@keyframes studio-preview-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .studio-product-preview-skeleton::after,
  .studio-product-site-preview {
    animation: none;
  }
}

@media (max-width: 767px) {
  .studio-product-preview-slot {
    grid-template-rows: 32px minmax(0, 1fr);
  }

  .studio-product-preview-toolbar {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    padding: 0 8px;
  }

  .studio-product-preview-fallback {
    min-height: 0;
    padding: 16px;
  }

  .studio-product-preview-fallback small {
    max-width: 260px;
  }
}

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

.studio-product-activity-toolbar {
  margin-bottom: 16px;
}

.studio-phase2-setup-state.is-error {
  border-color: rgba(255, 115, 115, 0.34);
  color: #d4b4b4;
}@media (max-width: 767px) {
  .studio-phase2-dialog {
    align-items: stretch;
    padding: 0;
  }

  .studio-phase2-dialog-panel {
    width: 100%;
    max-height: 100dvh;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    padding-top: env(safe-area-inset-top);
  }

  .studio-phase2-dialog-head {
    padding: 14px 16px;
  }

  .studio-phase2-form {
    gap: 16px;
    padding: 18px 16px calc(96px + env(safe-area-inset-bottom));
  }

  .studio-phase2-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .studio-phase2-form label.is-wide {
    grid-column: auto;
  }

  .studio-phase2-form-actions {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    margin: 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  }

  .studio-phase2-form-actions .studio-v2-button {
    min-height: 48px;
    flex: 1;
  }

  .studio-phase2-toast {
    right: 16px;
    bottom: calc(88px + env(safe-area-inset-bottom));
    left: 16px;
    max-width: none;
  }

  .studio-phase2-onboarding {
    padding: 18px;
  }

  .studio-phase2-onboarding ol {
    grid-template-columns: minmax(0, 1fr);
  }

  .studio-phase2-record {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .studio-phase2-record-actions {
    justify-content: stretch;
  }

  .studio-phase2-record-actions > * {
    flex: 1;
  }

  .studio-product-detail-list,
  .studio-product-billing-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .studio-product-detail-list > div:nth-child(odd) {
    border-right: 0;
  }

  .studio-product-record-row {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .studio-product-record-row > .studio-v2-button {
    width: 100%;
  }

  .studio-product-detail-actions > * {
    flex: 1 1 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .studio-phase2-file-progress span {
    transition: none;
  }
}
body:not(.has-studio-workspace) #overview #studioOverviewHealth,
body:not(.has-studio-workspace) #overview .studio-v2-dashboard-grid {
  display: none;
}

.plm-studio-system-notice.is-info {
  border-color: rgba(99, 213, 255, 0.16);
  background: rgba(33, 190, 245, 0.07);
}

.plm-studio-system-notice.is-info strong {
  color: #dff7ff;
}

.plm-studio-system-notice.is-info span {
  color: #a9c3d2;
}
