:root {
  color-scheme: dark;
  font-family: Inter, Segoe UI, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #090d14;
  color: #eef3ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  line-height: 1.5;
  background:
    radial-gradient(circle at top left, rgba(66, 133, 244, 0.24), transparent 32rem),
    linear-gradient(135deg, #090d14 0%, #111827 55%, #0c111d 100%);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  border-radius: 0.85rem;
  padding: 0.78rem 1.05rem;
  color: #07111f;
  background: #9cc4ff;
  cursor: pointer;
  font-weight: 750;
  min-height: 2.75rem;
}

button:hover:not(:disabled) {
  filter: brightness(1.08);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

button.danger {
  background: #ffb4b4;
  color: #2b0808;
}

button.maintenance-toggle {
  min-width: 11.5rem;
  border: 1px solid transparent;
}

button.maintenance-toggle.ready {
  background: #7de3a3;
  color: #06170c;
}

button.maintenance-toggle.maintenance-active {
  background: #ffca74;
  color: #241400;
}

.shell {
  width: min(1220px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3.5rem;
}

.hero,
.card {
  border: 1px solid rgba(188, 207, 255, 0.16);
  border-radius: 1.2rem;
  background: rgba(11, 18, 32, 0.78);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(20px);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 1.4rem;
  align-items: center;
  padding: 1.6rem;
  margin-bottom: 1.25rem;
}

.eyebrow {
  margin: 0 0 0.4rem;
  color: #9cc4ff;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 850;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.45rem;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.1;
}

h2 {
  font-size: 1.05rem;
  margin-bottom: 1.05rem;
  line-height: 1.25;
}

h3 {
  font-size: 0.96rem;
  margin-bottom: 0.85rem;
}

.muted {
  color: #9aa8bd;
}

.small {
  font-size: 0.84rem;
  margin-bottom: 0.95rem;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
  margin-bottom: 1.15rem;
}

.card {
  padding: 1.35rem;
  margin-bottom: 1.15rem;
}

.card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.2rem;
  margin-bottom: 1.1rem;
}

.card-title-row h2,
.card-title-row p {
  margin-bottom: 0.35rem;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.38rem 0.72rem;
  background: rgba(156, 196, 255, 0.14);
  color: #9cc4ff;
  font-size: 0.78rem;
  font-weight: 750;
  white-space: nowrap;
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin: 0;
}

.facts.single {
  grid-template-columns: 1fr;
}

.facts div {
  min-width: 0;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.045);
  padding: 0.85rem;
}

dt {
  color: #7f8da4;
  font-size: 0.75rem;
  margin-bottom: 0.15rem;
}

dd {
  margin: 0.28rem 0 0;
  overflow-wrap: anywhere;
}

pre {
  border-radius: 0.9rem;
  padding: 0.95rem;
  background: rgba(0, 0, 0, 0.25);
  overflow-x: auto;
  margin-bottom: 0;
}

.manager-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.manager-panel {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  border: 1px solid rgba(188, 207, 255, 0.12);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.035);
  padding: 1rem;
  min-width: 0;
}

.manager-panel button {
  margin-top: auto;
}

.field {
  display: grid;
  gap: 0.45rem;
  color: #9aa8bd;
  font-size: 0.86rem;
  margin: 0.85rem 0;
}

.field.compact {
  margin: 0;
}

input {
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid rgba(188, 207, 255, 0.18);
  border-radius: 0.8rem;
  background: rgba(6, 12, 23, 0.9);
  color: #eef3ff;
  padding: 0.75rem 0.85rem;
}

.packages {
  display: grid;
  gap: 1rem;
}

.package-card {
  border: 1px solid rgba(188, 207, 255, 0.13);
  border-radius: 1.05rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0;
  overflow: hidden;
}

.package-card[open] {
  background: rgba(255, 255, 255, 0.052);
}

.package-summary {
  display: flex;
  justify-content: space-between;
  gap: 1.2rem;
  align-items: flex-start;
  cursor: pointer;
  list-style: none;
  padding: 1.05rem 1.1rem;
}

.package-summary::-webkit-details-marker {
  display: none;
}

.package-summary::before {
  content: '▸';
  color: #9cc4ff;
  margin-top: 0.12rem;
  transition: transform 160ms ease;
}

.package-card[open] .package-summary::before {
  transform: rotate(90deg);
}

.package-summary > span:first-child {
  display: grid;
  grid-template-columns: auto;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
}

.package-summary strong {
  font-size: 1.02rem;
  overflow-wrap: anywhere;
}

.package-summary em {
  color: #9aa8bd;
  font-style: normal;
  font-size: 0.86rem;
}

.package-facts,
.file-list,
.package-actions {
  margin-left: 1.1rem;
  margin-right: 1.1rem;
}

.package-facts {
  margin-bottom: 0.95rem;
}

.file-list {
  border: 1px solid rgba(188, 207, 255, 0.1);
  border-radius: 0.9rem;
  padding: 0.75rem 0.85rem;
  margin-top: 0.95rem;
  margin-bottom: 0.95rem;
  background: rgba(0, 0, 0, 0.16);
}

.file-list summary {
  cursor: pointer;
  font-weight: 750;
  color: #cfe0ff;
}

.file-list ul {
  display: grid;
  gap: 0.45rem;
  list-style: none;
  padding: 0.75rem 0 0;
  margin: 0;
}

.file-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  overflow-wrap: anywhere;
}

.file-list em {
  color: #7f8da4;
  font-style: normal;
  white-space: nowrap;
}

.package-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding-bottom: 1.1rem;
}

.package-actions button {
  background: rgba(156, 196, 255, 0.16);
  color: #d8e6ff;
  border: 1px solid rgba(156, 196, 255, 0.18);
}

.package-actions button.danger {
  background: rgba(255, 180, 180, 0.18);
  color: #ffd0d0;
  border-color: rgba(255, 180, 180, 0.28);
}

.message {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  max-width: min(560px, calc(100% - 2rem));
  margin: 0;
  border-radius: 1rem;
  padding: 0.95rem 1.05rem;
  background: #142238;
  border: 1px solid rgba(188, 207, 255, 0.18);
  color: #eef3ff;
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 160ms ease, transform 160ms ease;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.message.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .grid,
  .manager-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .package-summary,
  .stacked-on-small {
    align-items: stretch;
    flex-direction: column;
  }

  .badge-row {
    justify-content: flex-start;
  }
}

/* Admin Workspace: supplementary Studio sections preserve existing dashboard layout. */
.studio-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:1.15rem;margin-top:1.25rem}
.studio-list{display:grid;gap:.75rem;max-height:36rem;overflow:auto}
.studio-record{border:1px solid var(--border,rgba(255,255,255,.12));border-radius:14px;padding:.85rem;min-width:0}
.studio-record-head,.studio-actions{display:flex;align-items:center;justify-content:space-between;gap:.5rem;flex-wrap:wrap}
.studio-actions{justify-content:flex-start;margin-top:.6rem}
.studio-actions button{font-size:.82rem;padding:.45rem .65rem}
.studio-group{padding:.4rem;border:1px solid var(--border,rgba(255,255,255,.12));border-radius:12px}
.studio-group summary{cursor:pointer;padding:.45rem}
.manager-panel textarea,.manager-panel select{max-width:100%;width:100%;box-sizing:border-box}
