:root {
  color-scheme: light;
  --ink: #0f131a;
  --muted: #4d5666;
  --paper: #f7f1e8;
  --accent: #ef6c38;
  --accent-strong: #c6461c;
  --accent-soft: #ffd7c2;
  --cool: #314457;
  --panel: rgba(255, 255, 255, 0.8);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --stroke: rgba(18, 22, 28, 0.1);
  --shadow: 0 30px 60px rgba(18, 22, 28, 0.15);
  --radius: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

*[hidden] {
  display: none !important;
}

body {
  min-height: 100vh;
  font-family: "Bricolage Grotesque", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

.backdrop {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(239, 108, 56, 0.2), transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(49, 68, 87, 0.18), transparent 48%),
    radial-gradient(circle at 65% 85%, rgba(255, 215, 194, 0.7), transparent 42%),
    linear-gradient(140deg, #f7f1e8 0%, #f1e6d7 45%, #f9f5ee 100%);
  z-index: -2;
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    135deg,
    rgba(15, 19, 26, 0.05) 0px,
    rgba(15, 19, 26, 0.05) 1px,
    transparent 1px,
    transparent 7px
  );
  opacity: 0.25;
}

.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  display: grid;
  gap: 32px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
}

.brand__mark {
  width: 14px;
  height: 14px;
  border-radius: 6px;
  background: var(--accent);
  box-shadow: 10px 0 0 rgba(49, 68, 87, 0.5);
}

.topbar__actions {
  display: flex;
  gap: 10px;
}

.eyebrow {
  font-family: "Space Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 11px;
  color: var(--muted);
}

.hero {
  display: grid;
  gap: 16px;
  animation: fadeUp 0.7s ease;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.05;
  max-width: 760px;
}

.hero__subtitle {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 620px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.panel {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--stroke);
  backdrop-filter: blur(10px);
  animation: fadeUp 0.6s ease;
}

.panel__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel__meta {
  font-size: 14px;
  color: var(--muted);
}

.team-panel {
  display: grid;
  gap: 24px;
}

.team-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.team-header__main {
  display: grid;
  gap: 10px;
  width: 100%;
}

.team-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  position: relative;
}

.team-actions {
  display: flex;
  gap: 10px;
}

.team-meta {
  font-size: 14px;
  color: var(--muted);
}

.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.card {
  background: var(--panel-strong);
  border-radius: 20px;
  padding: 20px;
  border: 1px solid rgba(18, 22, 28, 0.08);
  display: grid;
  gap: 16px;
}

.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card__header--row {
  align-items: flex-start;
}

.team-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.team-card {
  text-decoration: none;
  background: var(--panel-strong);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(18, 22, 28, 0.08);
  display: grid;
  gap: 10px;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.team-card__meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.team-card__icon {
  width: 16px;
  height: 16px;
}


.member-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  margin-top: 10px;
  justify-content: space-between;
}

.member-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
}

.member-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 100%;
}

.member-tag {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(49, 68, 87, 0.1);
  color: var(--cool);
}

.team-link {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.link-copy {
  border: 1px solid rgba(18, 22, 28, 0.12);
  border-radius: 999px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  max-width: 100%;
}

.link-copy--accent {
  background: rgba(255, 215, 194, 0.6);
  border-color: rgba(239, 108, 56, 0.4);
}

.link-copy:hover {
  background: rgba(255, 215, 194, 0.9);
  border-color: rgba(239, 108, 56, 0.6);
}

.link-copy__text {
  font-family: "Space Mono", monospace;
  font-size: 12px;
  color: var(--ink);
  word-break: break-all;
}

.link-copy__hint {
  font-size: 11px;
  color: var(--muted);
}

.link-copy__icon {
  width: 16px;
  height: 16px;
  color: var(--accent-strong);
}

.link-copy__icon svg {
  width: 16px;
  height: 16px;
}

.team-copy-status {
  font-size: 12px;
  color: var(--accent-strong);
  position: absolute;
  right: 0;
  top: -18px;
  white-space: nowrap;
}

.pill {
  font-family: "Space Mono", monospace;
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(18, 22, 28, 0.12);
  background: rgba(255, 255, 255, 0.6);
}

.toggle {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(18, 22, 28, 0.1);
  background: rgba(255, 255, 255, 0.6);
}

.toggle button {
  border: none;
  background: transparent;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--muted);
}

.toggle button:hover {
  background: rgba(49, 68, 87, 0.08);
  color: var(--ink);
}

.toggle button.is-active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.btn {
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn,
.btn:hover,
.btn:active,
.link-copy,
.link-copy:hover,
.link-copy:active,
.toggle button,
.toggle button:hover,
.toggle button:active {
  transform: none !important;
}

.btn:disabled {
  opacity: 0.65;
  cursor: default;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 24px rgba(239, 108, 56, 0.3);
}

.btn--primary:hover:not(:disabled) {
  background: #f07a4c;
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(18, 22, 28, 0.12);
  color: var(--ink);
}

.btn--ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.9);
}

.form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.field input,
.field textarea {
  border-radius: 14px;
  border: 1px solid rgba(18, 22, 28, 0.16);
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
}

.field textarea {
  min-height: 90px;
  resize: vertical;
}

.slots {
  display: grid;
  gap: 18px;
}

.day-group {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(18, 22, 28, 0.06);
}

.day-group__title {
  font-weight: 600;
  font-size: 16px;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 260px));
  justify-content: flex-start;
  gap: 10px;
}

.slot-card {
  width: 260px;
  border-radius: 14px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid rgba(18, 22, 28, 0.08);
  box-shadow: 0 10px 20px rgba(36, 30, 20, 0.08);
  font-size: 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
  text-align: left;
  cursor: pointer;
}

.slot-card span {
  font-family: "Space Mono", monospace;
  font-size: 12px;
  color: var(--muted);
}

.slot-card strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.slot-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 215, 194, 0.7);
  color: var(--accent-strong);
}

.slot-icon svg {
  width: 12px;
  height: 12px;
}

.danger-zone {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  border: 1px dashed rgba(199, 74, 74, 0.4);
  background: rgba(255, 235, 235, 0.6);
}

.btn--danger {
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.35);
  color: #b91c1c;
}

.btn--danger:hover:not(:disabled) {
  background: rgba(220, 38, 38, 0.2);
}

.slot-card:hover {
  border-color: rgba(239, 108, 56, 0.45);
  background: rgba(255, 215, 194, 0.25);
}

.status {
  min-height: 22px;
  font-size: 14px;
  color: var(--accent-strong);
}

.empty-state {
  padding: 18px;
  border-radius: 16px;
  background: rgba(239, 108, 56, 0.1);
  border: 1px dashed rgba(239, 108, 56, 0.4);
  color: var(--accent-strong);
  font-size: 14px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 19, 26, 0.55);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal__card {
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  width: min(520px, 100%);
  display: grid;
  gap: 16px;
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal__close {
  border: none;
  background: transparent;
  font-size: 26px;
  cursor: pointer;
  color: var(--muted);
}

.modal__meta {
  font-size: 14px;
  color: var(--muted);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .shell {
    padding: 36px 18px 60px;
  }

  .panel {
    padding: 20px;
  }

  .hero__actions,
  .topbar__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .member-inline {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .slot-card {
    width: 100%;
  }
}
