:root {
  color-scheme: dark;
  --bg: #061326;
  --bg-deep: #03101f;
  --panel: rgba(9, 27, 51, 0.78);
  --panel-strong: rgba(10, 34, 61, 0.92);
  --line: rgba(128, 218, 255, 0.18);
  --text: #edf8ff;
  --muted: #9fb9cf;
  --cyan: #7ee7ff;
  --lime: #b7ff71;
  --coral: #ff7c8d;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  letter-spacing: 0;
  background:
    linear-gradient(rgba(126, 231, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(126, 231, 255, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 20% 10%, rgba(126, 231, 255, 0.13), transparent 28%),
    linear-gradient(135deg, #07152c 0%, #061e33 42%, #08173a 100%);
  background-size: 44px 44px, 44px 44px, auto, auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 16, 31, 0.86);
  backdrop-filter: blur(18px);
}

.nav {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  font-size: 1.05rem;
  font-weight: 800;
}

.brand span {
  color: var(--cyan);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
}

.nav-links a:hover {
  color: var(--text);
}

.app-shell {
  padding: clamp(42px, 8vh, 84px) 0 56px;
}

.hero-panel {
  display: grid;
  min-height: 58vh;
  align-content: center;
  justify-items: start;
}

.hero-panel.compact {
  min-height: 46vh;
}

.eyebrow,
.kicker {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 780px;
  margin-bottom: 18px;
  font-size: clamp(3rem, 8vw, 6.8rem);
  line-height: 0.94;
}

h2 {
  margin-bottom: 0;
  font-size: 1.55rem;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.subtitle {
  max-width: 640px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.6;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 44px;
  border: 1px solid rgba(126, 231, 255, 0.28);
  border-radius: 8px;
  cursor: pointer;
}

.primary-button {
  padding: 0 20px;
  color: #03101f;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), #b8f5ff);
  box-shadow: 0 12px 34px rgba(126, 231, 255, 0.2);
}

.ghost-button {
  padding: 0 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.secondary-button {
  padding: 0 16px;
  color: var(--text);
  font-weight: 800;
  background: rgba(126, 231, 255, 0.1);
}

.ghost-button.danger {
  border-color: rgba(255, 124, 141, 0.32);
  color: #ffd7dd;
}

.dashboard {
  display: grid;
  gap: 28px;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 22px;
}

.profile-head h1 {
  margin-bottom: 10px;
  font-size: clamp(2.4rem, 6vw, 5.1rem);
}

.profile-head .subtitle {
  margin-bottom: 0;
}

.avatar {
  display: grid;
  width: clamp(84px, 12vw, 132px);
  aspect-ratio: 1;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(126, 231, 255, 0.34);
  border-radius: 50%;
  color: #03101f;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  font-weight: 900;
  background:
    linear-gradient(135deg, rgba(126, 231, 255, 0.95), rgba(183, 255, 113, 0.88)),
    var(--cyan);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-line {
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.panel-line.lime {
  background: linear-gradient(90deg, var(--lime), transparent);
}

.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 24px 8px;
}

.status-pill,
.tool-status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid rgba(126, 231, 255, 0.24);
  border-radius: 999px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
}

.status-pill {
  padding: 0 10px;
}

.profile-form {
  display: grid;
  gap: 16px;
  padding: 20px 24px 24px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.field-title {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.avatar-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(126, 231, 255, 0.16);
  border-radius: 8px;
  padding: 14px;
  background: rgba(3, 16, 31, 0.28);
}

.avatar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.avatar-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.input {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(126, 231, 255, 0.22);
  border-radius: 8px;
  padding: 0 13px;
  color: var(--text);
  background: rgba(3, 16, 31, 0.56);
  outline: none;
}

.input:focus {
  border-color: rgba(126, 231, 255, 0.78);
  box-shadow: 0 0 0 3px rgba(126, 231, 255, 0.12);
}

.input:disabled {
  color: #b8cad9;
  cursor: not-allowed;
}

.details {
  border-top: 1px solid var(--line);
  padding: 16px 24px 22px;
  color: var(--muted);
}

.details summary {
  cursor: pointer;
  font-weight: 800;
}

dl {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
}

dl div {
  display: grid;
  gap: 4px;
}

dt {
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

.tools-panel {
  display: grid;
}

.tool-card {
  display: flex;
  min-height: 178px;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  padding: 24px;
  border-top: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(183, 255, 113, 0.08), rgba(126, 231, 255, 0.04));
}

.tool-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.tool-status {
  margin-bottom: 14px;
  padding: 0 9px;
  color: var(--lime);
  border-color: rgba(183, 255, 113, 0.26);
}

.arrow {
  color: var(--lime);
  font-size: 2rem;
}

[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 28px, 1120px);
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 14px 0;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 12px;
  }

  h1 {
    font-size: clamp(2.7rem, 15vw, 4.5rem);
  }

  .profile-head {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .panel-head {
    flex-direction: column;
  }

  .avatar-control {
    align-items: stretch;
    flex-direction: column;
  }

  .avatar-actions {
    justify-content: flex-start;
  }
}
