:root {
  color-scheme: light;
  --bg: #f4f6f6;
  --surface: #ffffff;
  --surface-strong: #111414;
  --ink: #161818;
  --muted: #5c6664;
  --line: #d8dfdd;
  --line-strong: #aeb9b6;
  --teal: #087f74;
  --teal-soft: #dff4ef;
  --red: #e34949;
  --red-soft: #ffe8e5;
  --yellow: #f4c542;
  --yellow-soft: #fff4c7;
  --green: #178f55;
  --green-soft: #dff5e9;
  --shadow: 0 18px 48px rgba(17, 20, 20, 0.1);
  --radius: 8px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
}

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 246, 246, 0.94);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: #fff;
  font-weight: 800;
}

.brand-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.brand-subtitle {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.role-pill,
.status-pill,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.role-pill {
  padding: 9px 11px;
  background: var(--surface-strong);
  color: #fff;
}

.status-pill {
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}

.link-button,
.ghost-button,
.primary-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  border-radius: var(--radius);
  font-weight: 760;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.link-button,
.ghost-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.primary-button {
  background: var(--teal);
  color: #fff;
  box-shadow: 0 10px 24px rgba(8, 127, 116, 0.22);
}

.danger-button {
  background: var(--red-soft);
  color: #9b2020;
}

.link-button:hover,
.ghost-button:hover,
.primary-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
}

.workspace {
  width: min(1380px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 54px;
}

.command-strip {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.event-visual {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: #fff;
}

.event-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.04);
}

.event-visual::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(17, 20, 20, 0.78), rgba(17, 20, 20, 0.34) 58%, rgba(17, 20, 20, 0.12));
}

.event-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 300px;
  max-width: 700px;
  padding: 28px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--yellow);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 13ch;
  font-size: 46px;
  line-height: 0.98;
}

h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}

.lead {
  margin: 16px 0 0;
  max-width: 70ch;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  line-height: 1.7;
}

.brief-panel,
.panel,
.metric,
.team-card,
.person-card,
.notice,
.direction-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.brief-panel {
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 22px;
}

.brief-panel .focus {
  display: grid;
  gap: 12px;
}

.brief-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.kpi {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f9fbfb;
}

.kpi strong {
  display: block;
  font-size: 22px;
}

.kpi span {
  color: var(--muted);
  font-size: 12px;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.75fr) minmax(0, 1.25fr);
  gap: 18px;
  align-items: start;
}

.participant-grid {
  display: grid;
  grid-template-columns: minmax(360px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: start;
}

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

.panel {
  padding: 20px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-header p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 780;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 10px 11px;
  outline: none;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.55;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segmented label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.segmented input {
  width: auto;
  min-height: 0;
  margin: 0;
  accent-color: var(--teal);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.metric {
  padding: 16px;
}

.metric strong {
  display: block;
  font-size: 28px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.timeline {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.timeline li {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f9fbfb;
}

.timeline time {
  color: var(--teal);
  font-size: 12px;
  font-weight: 850;
}

.timeline strong {
  display: block;
  margin-bottom: 4px;
}

.timeline span {
  color: var(--muted);
  line-height: 1.5;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  padding: 7px 9px;
  background: var(--teal-soft);
  color: #075e57;
}

.chip.warn {
  background: var(--yellow-soft);
  color: #755c00;
}

.chip.risk {
  background: var(--red-soft);
  color: #8c2828;
}

.roster {
  display: grid;
  gap: 10px;
}

.person-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
}

.avatar {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: #fff;
  font-weight: 850;
}

.person-card p,
.team-card p,
.notice p,
.direction-panel p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.team-list {
  display: grid;
  gap: 14px;
}

.team-card {
  padding: 16px;
}

.team-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.score-badge {
  display: grid;
  min-width: 72px;
  min-height: 58px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: #fff;
  text-align: center;
}

.score-badge strong {
  display: block;
  font-size: 23px;
}

.score-badge span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  opacity: 0.78;
}

.team-members {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.member-mini {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f9fbfb;
}

.member-mini strong {
  display: block;
}

.member-mini span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.bar-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.bar-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 42px;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.bar-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eeee;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--teal);
}

.direction-panel {
  margin-top: 14px;
  padding: 14px;
  background: #fbfdfd;
}

.action-list {
  display: grid;
  gap: 8px;
  padding-left: 18px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.notice {
  padding: 16px;
  border-color: var(--line-strong);
  background: #fbfdfd;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  max-width: min(420px, calc(100vw - 32px));
  padding: 13px 15px;
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: #fff;
  box-shadow: var(--shadow);
  transform: translateY(16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.empty-state {
  display: grid;
  gap: 8px;
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
}

.privacy-note {
  padding: 12px;
  border-left: 4px solid var(--teal);
  background: var(--teal-soft);
  color: #075e57;
  line-height: 1.55;
}

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

  h1 {
    max-width: 16ch;
    font-size: 38px;
  }
}

@media (max-width: 720px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 16px;
  }

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

  .workspace {
    width: min(100% - 24px, 1380px);
    padding-top: 14px;
  }

  .event-copy {
    padding: 20px;
  }

  h1 {
    font-size: 32px;
  }

  .brief-kpis,
  .metrics-grid,
  .form-grid,
  .team-members {
    grid-template-columns: 1fr;
  }

  .timeline li,
  .bar-row {
    grid-template-columns: 1fr;
  }

  .bar-row {
    gap: 5px;
  }
}

