:root {
  --ink: #f6f8fb;
  --muted: #9ca8b8;
  --line: rgba(255, 255, 255, 0.1);
  --panel: rgba(17, 23, 32, 0.9);
  --page: #070b10;
  --brand: #2dd4bf;
  --brand-dark: #14b8a6;
  --accent: #f2b84b;
  --danger: #f04452;
  --navy: #0b111a;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(115deg, rgba(45, 212, 191, 0.18) 0 9%, transparent 9% 31%, rgba(242, 184, 75, 0.1) 31% 35%, transparent 35% 70%, rgba(240, 68, 82, 0.13) 70% 74%, transparent 74%),
    linear-gradient(180deg, #08111a 0%, var(--page) 46%, #090d13 100%);
  font-family: "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 42px 42px;
}

.dashboard-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 32px 0;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 22px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 32%),
    linear-gradient(135deg, rgba(45, 212, 191, 0.18), transparent 32%),
    linear-gradient(135deg, #101722, #121820 58%, #1d1417);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 6px;
  color: #f3b36b;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 8px;
  font-size: 34px;
}

h2 {
  margin-bottom: 6px;
  font-size: 24px;
}

.hero-text {
  max-width: 680px;
  margin-bottom: 0;
  color: #d7dee8;
}

.studio-card {
  min-width: 260px;
  display: grid;
  align-content: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.studio-card span {
  color: #b9c2cf;
  font-size: 14px;
}

.studio-card strong {
  font-size: 20px;
}

.studio-card small {
  color: #9ca8b8;
  font-weight: 700;
}

.save-button {
  width: fit-content;
  border: 0;
  border-radius: 999px;
  margin-top: 8px;
  padding: 10px 16px;
  color: #06120f;
  background: linear-gradient(135deg, #2dd4bf, #f2b84b);
  box-shadow: 0 12px 28px rgba(45, 212, 191, 0.18);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.save-button:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.stats article,
.app-tile {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.stats article {
  padding: 18px;
}

.stats span,
.app-tile span,
.section-title p {
  color: var(--muted);
}

.stats strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.app-tile b {
  color: var(--brand-dark);
}

.section-title {
  margin-bottom: 16px;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 16px;
}

.app-tile {
  min-height: 168px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 20px;
  text-decoration: none;
  color: var(--ink);
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.app-tile.available {
  border-color: rgba(27, 111, 104, 0.35);
}

.app-tile.available:hover {
  transform: translateY(-2px);
  outline: 3px solid rgba(27, 111, 104, 0.16);
  box-shadow: 0 24px 60px rgba(18, 32, 52, 0.14);
}

.app-tile.pending {
  background: #f8fafc;
}

.app-code {
  width: 42px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff !important;
  background: linear-gradient(135deg, var(--brand), #1a9087);
  font-weight: 800;
}

.app-tile.pending .app-code {
  background: #98a2b3;
}

.app-tile strong {
  font-size: 21px;
}

.cloud-tile {
  border-color: rgba(242, 184, 75, 0.38);
}

.cloud-tile .app-code {
  color: #06120f !important;
  background: linear-gradient(135deg, #f2b84b, #2dd4bf);
}

.cloud-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 16px;
}

.cloud-panel {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.cloud-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.cloud-field input {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  padding: 9px 11px;
  color: var(--ink);
  background: rgba(4, 7, 13, 0.72);
  font: inherit;
}

.ghost-button {
  width: fit-content;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 9px 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.save-button:disabled,
.ghost-button:disabled {
  cursor: not-allowed;
  filter: grayscale(1) brightness(0.75);
  opacity: 0.65;
}

.simple-list {
  display: grid;
  gap: 10px;
}

.simple-item {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--panel);
}

.simple-item span {
  color: var(--muted);
}

.back-link {
  display: inline-block;
  margin-top: 18px;
  color: var(--brand-dark);
  font-weight: 700;
}

@media (max-width: 900px) {
  .hero,
  .stats,
  .app-grid,
  .cloud-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    display: grid;
  }

  .studio-card {
    min-width: 0;
  }
}
