:root {
  color-scheme: light;
  --ink: #1f2933;
  --muted: #62717d;
  --line: #d8e0e6;
  --soft: #f4f7f9;
  --panel: #ffffff;
  --teal: #007c7a;
  --teal-dark: #005f5d;
  --coral: #c94f3d;
  --amber: #b87900;
  --green: #2f7d45;
  --violet: #6152a3;
  --shadow: 0 14px 34px rgba(31, 41, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #eef3f5;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.4;
}

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

button {
  cursor: pointer;
}

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

.sidebar {
  background: #12333c;
  color: #f8fbfc;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand {
  display: grid;
  gap: 4px;
}

.brand strong {
  font-size: 18px;
}

.brand span {
  color: #bfd5dc;
  font-size: 13px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav button {
  border: 0;
  background: transparent;
  color: #dbe9ed;
  text-align: left;
  padding: 11px 12px;
  border-radius: 8px;
}

.nav button.active,
.nav button:hover {
  background: #1d4d58;
  color: #ffffff;
}

.meeting-card {
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
}

.meeting-card p {
  margin: 5px 0 0;
  color: #c7dce2;
  font-size: 13px;
}

.content {
  min-width: 0;
  padding: 28px;
}

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

.topbar h1 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 0;
}

.topbar p {
  margin: 6px 0 0;
  color: var(--muted);
}

.sync-line {
  font-size: 13px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.button {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  border-radius: 8px;
  padding: 9px 12px;
  min-height: 40px;
}

.button.primary {
  border-color: var(--teal);
  background: var(--teal);
  color: #ffffff;
}

.button.danger {
  border-color: #e3b3aa;
  background: #fff5f3;
  color: #9f3327;
}

.button:hover {
  border-color: var(--teal);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
  min-width: 0;
}

.panel h2,
.panel h3 {
  margin: 0 0 12px;
  font-size: 17px;
}

.metric {
  display: grid;
  gap: 8px;
}

.metric b {
  font-size: 30px;
}

.metric span {
  color: var(--muted);
}

.progress {
  height: 10px;
  background: #e6edf0;
  border-radius: 999px;
  overflow: hidden;
}

.progress i {
  display: block;
  height: 100%;
  width: var(--value);
  background: var(--teal);
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 720px;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 11px 10px;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

td {
  font-size: 14px;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status.ready,
.status.done,
.status.submitted,
.status.solved,
.status.approved {
  color: #1f6a37;
  background: #e7f4eb;
}

.status.needs-input,
.status.open,
.status.draft {
  color: #875a00;
  background: #fff4d8;
}

.status.live,
.status.high {
  color: #94372a;
  background: #ffe7e2;
}

.status.medium {
  color: #675100;
  background: #fff2bf;
}

.status.low,
.status.parked {
  color: #4a6070;
  background: #e7eef2;
}

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

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

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px 11px;
  width: 100%;
}

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

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

.live-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 16px;
}

.live-stage {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 24px;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.live-stage h2 {
  margin: 0;
  font-size: 32px;
}

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

.meta-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  background: #f8fafb;
  font-size: 13px;
}

.timer {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 18px;
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.timer strong {
  font-size: 48px;
  color: var(--teal-dark);
}

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

.compact-list {
  display: grid;
  gap: 10px;
}

.compact-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

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

.compact-item p {
  margin: 0;
  color: var(--muted);
}

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

.lane {
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  min-height: 260px;
}

.lane h3 {
  font-size: 14px;
}

.issue-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.issue-card p {
  margin: 0;
}

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

.empty {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #ffffff;
}

.auth-panel,
.demo-banner {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 16px;
}

.auth-panel {
  max-width: 620px;
}

.auth-panel h2 {
  margin: 0 0 8px;
}

.auth-panel p {
  color: var(--muted);
}

.error-line {
  border: 1px solid #e3b3aa;
  border-radius: 8px;
  background: #fff5f3;
  color: #9f3327 !important;
  padding: 10px 11px;
}

.demo-banner {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #fff9e8;
  border-color: #ecd79d;
}

.demo-banner span {
  color: #675100;
}

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

  .sidebar {
    position: static;
  }

  .nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .meeting-card {
    margin-top: 0;
  }

  .grid.two,
  .grid.three,
  .live-shell,
  .kanban {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .content {
    padding: 18px;
  }

  .topbar {
    display: grid;
  }

  .toolbar {
    justify-content: flex-start;
  }

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

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

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

  .timer strong {
    font-size: 40px;
  }
}
