:root {
  --bg: #f7f8f5;
  --surface: #ffffff;
  --surface-muted: #eef3f2;
  --text: #1e2326;
  --text-muted: #687176;
  --line: #dce3e1;
  --cyan: #7ecbd3;
  --lime: #b7e857;
  --danger: #d94b4b;
  --warning: #d99a32;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

.app-shell {
  max-width: 840px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 14px 86px;
}

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

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

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.avatar {
  display: grid;
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  font-size: 24px;
  font-weight: 700;
  overflow: hidden;
}

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

.content {
  display: grid;
  gap: 12px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 14px;
}

.panel h2 {
  margin: 0 0 10px;
  font-size: 17px;
}

.muted {
  color: var(--text-muted);
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.row:first-child {
  border-top: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 3px 9px;
  background: var(--surface-muted);
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
}

.chip.active,
.chip.assigned,
.chip.completed {
  background: var(--lime);
}

.chip.unavailable {
  background: var(--surface-muted);
  color: var(--text-muted);
}

.agent-profile {
  display: flex;
  align-items: center;
  gap: 14px;
}

.agent-profile .avatar {
  width: 96px;
  height: 96px;
  flex-basis: 96px;
}

.metric {
  display: grid;
  gap: 6px;
  margin-top: 9px;
}

.bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-muted);
}

.bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--cyan);
}

form {
  display: grid;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--text-muted);
  font-size: 13px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 11px 12px;
}

textarea {
  min-height: 130px;
  resize: vertical;
}

.primary {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--lime);
  color: var(--text);
  font-weight: 700;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  max-width: 840px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
  background: rgba(247, 248, 245, 0.96);
  padding: 8px;
}

.bottom-nav button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
}

.bottom-nav button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
}

@media (min-width: 900px) {
  .app-shell {
    padding-left: 260px;
  }

  .bottom-nav {
    top: 0;
    right: auto;
    bottom: 0;
    width: 220px;
    grid-template-columns: 1fr;
    align-content: start;
    border-top: 0;
    border-right: 1px solid var(--line);
  }
}
