:root {
  --color-primary: #ff6d00;
  --color-primary-strong: #e85f00;
  --color-primary-soft: #fff3e2;
  --color-secondary: #ffb000;
  --color-accent: #ff8c1a;
  --color-background: #fffaf4;
  --color-surface: rgba(255, 255, 255, 0.9);
  --color-surface-solid: #ffffff;
  --color-surface-muted: #fff7ed;
  --color-border: rgba(255, 149, 0, 0.24);
  --color-border-strong: #ffd3a1;
  --color-text: #2a1600;
  --color-text-muted: #6d3900;
  --color-text-soft: #9a4a00;
  --color-success: #1f9d55;
  --color-warning: #d97706;
  --color-danger: #d64545;
  --shadow-soft: 0 16px 42px rgba(255, 117, 0, 0.13);
  --shadow: 0 24px 70px rgba(255, 117, 0, 0.18);
  --shadow-hover: 0 30px 80px rgba(255, 109, 0, 0.28);
  --radius: 22px;
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 34px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 166, 0, 0.28), transparent 34%),
    var(--color-background);
  color: var(--color-text);
  min-height: 100vh;
}

button {
  font: inherit;
}

.app {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  padding: 28px 20px;
  border-right: 1px solid var(--color-border);
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand-copy strong {
  display: block;
  font-size: 15px;
  letter-spacing: -0.02em;
}

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

.nav-label {
  margin: 0 8px 10px;
  color: #9ca3af;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.task-nav {
  display: grid;
  gap: 9px;
}

.task-tab {
  border: 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 14px;
  color: #4b5563;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: 0.2s ease;
}

.task-tab:hover {
  background: #f3f4f6;
  color: var(--color-text);
}

.task-tab.active {
  background: var(--color-primary-soft);
  color: var(--color-primary-strong);
  font-weight: 700;
}

.task-dot {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #f1f5f9;
  color: var(--color-secondary);
  font-size: 12px;
  font-weight: 800;
}

.task-tab.active .task-dot {
  background: var(--color-accent);
  color: #fff;
}

.main {
  padding: 34px;
  width: min(1500px, 100%);
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 26px;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.score-pill {
  padding: 13px 15px;
  border-radius: 18px;
  background: var(--color-surface-solid);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 149, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.score-pill-copy {
  min-width: 0;
}

.score-pill small {
  display: block;
  color: var(--color-text-muted);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.score-pill strong {
  display: block;
  margin-top: 3px;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.score-pill-visuals {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.score-pill-ring {
  --score: 0;
  width: 56px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(closest-side, white 73%, transparent 74% 100%),
    conic-gradient(var(--color-accent) calc(var(--score) * 1%), #eceff3 0);
}

.score-pill-ring span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.score-pill-smiley {
  font-size: 30px;
  line-height: 1;
  filter: drop-shadow(0 3px 5px rgba(15,23,42,.10));
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 410px);
  gap: 22px;
  align-items: start;
}

.left-stack {
  display: grid;
  gap: 22px;
}

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

.card {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(255, 149, 0, 0.2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.metric-card {
  padding: 22px;
  min-height: 205px;
}

.card-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card-label h2,
.users-card h2,
.detail-card h2 {
  margin: 0;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.metric-card p {
  margin: 0;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.7;
}

.markdown-content {
  color: #475569;
  font-size: 14px;
  line-height: 1.7;
}

.markdown-content > :first-child {
  margin-top: 0;
}

.markdown-content > :last-child {
  margin-bottom: 0;
}

.markdown-content p {
  margin: 0 0 12px;
}

.markdown-content h3,
.markdown-content h4 {
  margin: 16px 0 7px;
  color: var(--color-text);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.markdown-content h3 {
  font-size: 16px;
}

.markdown-content h4 {
  font-size: 14px;
}

.markdown-content ul,
.markdown-content ol {
  margin: 8px 0 13px;
  padding-left: 21px;
}

.markdown-content li {
  margin: 4px 0;
}

.markdown-content strong {
  color: #334155;
}

.markdown-content code {
  padding: 2px 5px;
  border-radius: 6px;
  background: var(--color-primary-soft);
  color: var(--color-primary-strong);
  font-size: .92em;
}

.markdown-content blockquote {
  margin: 12px 0;
  padding: 10px 12px;
  border-left: 3px solid #a5b4fc;
  border-radius: 0 10px 10px 0;
  background: rgba(255, 243, 226, 0.7);
  color: #525f73;
}

.markdown-content blockquote p {
  margin: 0;
}

.markdown-content a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.summary-markdown {
  min-height: 0;
}

.persons-cell img {
  display: inline !important;
}

.users-card {
  padding: 22px;
}

.users-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}

.users-head p {
  margin: 6px 0 0;
  color: var(--color-text-muted);
  font-size: 12px;
}

.users-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(46px, 1fr));
  gap: 13px;
}

.user-button {
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  position: relative;
}

.user-button img {
  width: 100%;
  max-width: 58px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  border: 3px solid transparent;
  box-shadow: 0 6px 14px rgba(15,23,42,.12);
  transition: .2s ease;
}

.user-button:hover img {
  transform: translateY(-2px);
}

.user-button.active img {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px var(--color-primary-soft), 0 8px 18px rgba(255, 109, 0, 0.18);
}

.sentiment-badge {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #fff;
  box-shadow: 0 4px 10px rgba(15,23,42,.16);
  font-size: 18px;
  line-height: 1;
  pointer-events: none;
}

.dashboard-input-card {
  margin-top: 22px;
  padding: 20px 22px;
}

.dashboard-input-card label {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.dashboard-input {
  width: 100%;
  min-height: calc(2 * 1.55em + 22px);
  padding: 11px 13px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-surface-muted);
  color: var(--color-text);
  font: inherit;
  font-size: 14px;
  line-height: 1.55;
  resize: vertical;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.dashboard-input:focus {
  border-color: var(--color-accent);
  background: #fff;
  box-shadow: 0 0 0 4px var(--color-primary-soft);
}

.dashboard-input::placeholder {
  color: #9ca3af;
}

.dashboard-send-button {
  margin-top: 12px;
  border: 0;
  border-radius: 12px;
  padding: 10px 18px;
  background: var(--color-accent);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(255, 109, 0, 0.22);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.dashboard-send-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(255, 109, 0, 0.28);
}

.dashboard-send-button:active {
  transform: translateY(0);
  opacity: .92;
}

.detail-card {
  padding: 24px;
  position: sticky;
  top: 28px;
  min-height: 475px;
  overflow: hidden;
}

.detail-inner {
  position: relative;
  z-index: 1;
}

.detail-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.detail-profile-copy {
  min-width: 0;
}

.detail-sentiment {
  margin-left: auto;
  align-self: center;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.82);
  border: 1px solid var(--color-border);
  box-shadow: 0 6px 16px rgba(15,23,42,.08);
  white-space: nowrap;
}

.detail-sentiment-score {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.detail-sentiment .detail-smiley {
  font-size: 30px;
  line-height: 1;
}

.detail-profile img {
  width: 86px;
  height: 86px;
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(15,23,42,.16);
}

.detail-profile h3 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.detail-profile p {
  margin: 5px 0 0;
  color: var(--color-text-muted);
  font-size: 13px;
}

.detail-copy {
  padding: 18px;
  border-radius: 16px;
  background: var(--color-surface-muted);
  color: #475569;
  font-size: 14px;
  line-height: 1.7;
  min-height: 150px;
  border: 1px solid #eef2f7;
}

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

  .sidebar {
    height: auto;
    position: static;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    overflow-x: auto;
  }

  .nav-label {
    display: none;
  }

  .task-nav {
    display: flex;
    min-width: max-content;
  }

  .task-tab {
    width: auto;
  }

  .main {
    padding: 24px;
  }

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

  .detail-card {
    position: static;
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .topbar {
    flex-direction: column;
  }

  .score-pill {
    width: 100%;
  }

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

  .users-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .main {
    padding: 18px;
  }
}

