:root {
  --bg: #f4f6fb;
  --panel: #ffffff;
  --text: #101a2b;
  --muted: #55607a;
  --line: #d9e0f2;
  --primary: #1d4ed8;
  --primary-dark: #1e40af;
  --accent: #0ea5e9;
  --good: #10b981;
  --warn: #f59e0b;
  --bad: #ef4444;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 1rem;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 0%, #dbeafe 0%, transparent 30%),
    radial-gradient(circle at 95% 10%, #ede9fe 0%, transparent 28%),
    var(--bg);
  color: var(--text);
}

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

.app-shell {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1rem;
}

.left-nav {
  display: grid;
  gap: 0.8rem;
  align-content: start;
  position: sticky;
  top: 1rem;
  height: fit-content;
}

.right-panels {
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  padding: 1rem;
}

.eyebrow {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0;
  color: var(--primary);
  font-size: 0.8rem;
}

h1 {
  margin: 0.25rem 0;
  font-size: clamp(1.55rem, 2.5vw, 2.1rem);
}

.lead {
  margin: 0;
  color: var(--muted);
}

.brand-pill {
  background: linear-gradient(135deg, #ebf4ff, #dbeafe);
  color: var(--primary-dark);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  width: fit-content;
  font-weight: 600;
  border: 1px solid #bfdbfe;
}

.section-head p,
.muted {
  color: var(--muted);
}

.inline-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  font-size: 0.85rem;
  color: #334155;
}

input,
select,
textarea,
button {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.72rem 0.75rem;
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
}

button {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  filter: brightness(0.98);
}

select[multiple] {
  min-height: 90px;
}

.notice {
  margin-top: 0.8rem;
  min-height: 1.3rem;
  color: #334155;
}

.inline-label {
  display: block;
  margin-top: 0.2rem;
}

.inline-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.inline-actions button {
  flex: 1 1 140px;
}

.inline-actions.compact button,
.inline-actions.compact,
.panel-actions button {
  flex: 0 1 auto;
}

.panel-shell {
  margin-top: 0.9rem;
  border-top: 1px dashed var(--line);
  padding-top: 0.8rem;
}

.status-grid {
  margin-top: 0.75rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
}

.status-grid .stat-card {
  padding: 0.7rem;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fbff, #eef4ff);
}

.status-grid .stat-card strong {
  display: block;
  font-size: 1.35rem;
}

.status-grid .stat-card span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.vote-board,
#recommendation-list {
  display: grid;
  gap: 0.7rem;
}

#vote-board .recommendation {
  display: grid;
  gap: 0.45rem;
}

.panel-actions {
  margin-top: 0.85rem;
}

.split-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.row-item,
#contacts-list li,
#groups-list li,
#availability-list li,
#recommendation-list li,
.vote-board > .recommendation {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
  border: 1px solid var(--line);
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
}

.recommendation {
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 0.65rem;
  background: #f8fbff;
}

.vote-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.vote-buttons button {
  border-radius: 999px;
  font-size: 0.84rem;
  padding: 0.4rem 0.45rem;
}

.vote-buttons button[data-vote="yes"] {
  background: var(--good);
}

.vote-buttons button[data-vote="maybe"] {
  background: var(--warn);
}

.vote-buttons button[data-vote="no"] {
  background: var(--bad);
}

.vote-buttons button[data-vote="conflict"] {
  background: #64748b;
}

.vote-buttons button.is-active {
  outline: 3px solid rgba(15, 23, 42, 0.12);
  outline-offset: 2px;
}

.vote-comment {
  width: 100%;
  min-height: 2.25rem;
  resize: vertical;
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 0.55rem 0.65rem;
  font-family: inherit;
}

.vote-comment:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #f8fafc;
}

.vote-time {
  font-weight: 700;
}

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

  .left-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
  }

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

  .split-2 {
    grid-template-columns: 1fr;
  }

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

  .inline-actions button {
    flex: 1 1 auto;
  }

  .status-card {
    order: -1;
  }

  .panel-shell,
  .status-card,
  .card {
    overflow-wrap: anywhere;
  }
}
