:root {
  color-scheme: light;
  --kaiser-green: #75bd25;
  --kaiser-green-dark: #3f7416;
  --ink: #202821;
  --muted: #657164;
  --line: #dfe5dc;
  --page: #f6f7f3;
  --card: #ffffff;
  --surface: #ffffff;
  --surface-strong: #eef4e9;
  --steel: #42504a;
  --text: var(--ink);
  --blue: #3d7d6f;
  --blue-soft: #e7f3f0;
  --green: var(--kaiser-green-dark);
  --green-soft: #edf8e7;
  --amber: #8c5f16;
  --amber-soft: #fff4db;
  --red: #9d3737;
  --red-soft: #ffe9e7;
  --violet: #5d568f;
  --shadow: 0 18px 42px rgba(36, 45, 34, 0.12);
  --shadow-card: 0 12px 28px rgba(36, 45, 34, 0.08);
  --shadow-card-hover: 0 18px 38px rgba(36, 45, 34, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(145deg, rgba(117, 189, 37, 0.13) 0%, rgba(117, 189, 37, 0) 34%),
    linear-gradient(215deg, rgba(66, 80, 74, 0.1) 0%, rgba(66, 80, 74, 0) 30%),
    linear-gradient(180deg, #ffffff 0%, var(--page) 52%, #eef1ec 100%);
  color: var(--text);
  font-family:
    Quicksand, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 12px 28px;
  border-bottom: 1px solid rgba(66, 80, 74, 0.12);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 28px rgba(36, 45, 34, 0.06);
  backdrop-filter: blur(14px);
}

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

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, #84cf33 0%, var(--kaiser-green) 50%, #4f8e19 100%);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(92, 158, 28, 0.2);
}

.brand h1,
.brand p,
.section-heading h2,
.section-heading p {
  margin: 0;
}

.brand h1 {
  font-size: 20px;
  line-height: 1.15;
}

.brand p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

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

.ghost-link,
.icon-button,
.primary,
.secondary,
.small-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 140ms ease,
    background 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.ghost-link,
.icon-button,
.secondary,
.small-action {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 8px 18px rgba(36, 45, 34, 0.05);
}

.ghost-link,
.primary,
.secondary,
.small-action {
  gap: 8px;
  padding: 0 12px;
  font-weight: 650;
  font-size: 14px;
}

.icon-button {
  width: 38px;
  padding: 0;
}

.ghost-link:hover,
.icon-button:hover,
.secondary:hover,
.small-action:hover {
  border-color: rgba(117, 189, 37, 0.45);
  background: #fbfcf8;
  transform: translateY(-1px);
}

.primary {
  border-color: rgba(81, 143, 26, 0.65);
  background: linear-gradient(180deg, #82c932 0%, #67aa1e 100%);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(92, 158, 28, 0.22);
}

.primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #8bd43a 0%, #5f9e1b 100%);
  transform: translateY(-1px);
}

.primary:focus-visible,
.secondary:focus-visible,
.icon-button:focus-visible,
.small-action:focus-visible,
.segment:focus-visible,
.task-card:focus-visible {
  outline: 3px solid rgba(117, 189, 37, 0.2);
  outline-offset: 2px;
}

svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.health-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(0, 1.25fr);
  gap: 10px;
  width: min(1120px, calc(100% - 56px));
  margin: 14px auto 0;
}

.health-overall,
.health-tile {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(36, 45, 34, 0.05);
}

.health-overall {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 12px 18px;
}

.health-overall::before,
.health-tile::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--amber);
}

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

.health-tile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  padding: 11px 12px 11px 16px;
}

.health-tile svg {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.health-overall span,
.health-tile span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.health-overall strong,
.health-tile strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.2;
}

.health-overall small,
.health-tile small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.health-overall.ok,
.health-tile.ok {
  border-color: rgba(63, 116, 22, 0.22);
  background: var(--green-soft);
}

.health-overall.ok::before,
.health-tile.ok::before {
  background: var(--kaiser-green);
}

.health-overall.ok svg,
.health-tile.ok svg,
.health-overall.ok strong,
.health-tile.ok strong {
  color: var(--kaiser-green-dark);
}

.health-overall.warn,
.health-tile.warn {
  border-color: rgba(140, 95, 22, 0.22);
  background: var(--amber-soft);
}

.health-overall.warn::before,
.health-tile.warn::before {
  background: var(--amber);
}

.health-overall.warn svg,
.health-tile.warn svg,
.health-overall.warn strong,
.health-tile.warn strong {
  color: var(--amber);
}

.health-overall.down,
.health-tile.down {
  border-color: rgba(157, 55, 55, 0.26);
  background: var(--red-soft);
}

.health-overall.down::before,
.health-tile.down::before {
  background: var(--red);
}

.health-overall.down svg,
.health-tile.down svg,
.health-overall.down strong,
.health-tile.down strong {
  color: var(--red);
}

.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "feed"
    "report"
    "handoff"
    "todo"
    "news"
    "status"
    "live"
    "board"
    "approval"
    "rules";
  gap: 14px;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 18px 28px 34px;
}

.status-strip {
  grid-area: status;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.work-feed-panel {
  grid-area: feed;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(36, 45, 34, 0.08);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcf8 100%);
  box-shadow: var(--shadow);
  padding: 22px;
}

.work-feed-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--kaiser-green), var(--kaiser-green-dark));
}

.work-feed-panel .section-heading h2 {
  font-size: 30px;
  line-height: 1.12;
}

.work-feed-panel .section-heading p {
  max-width: 720px;
  font-size: 15px;
  line-height: 1.45;
}

.work-summary {
  display: grid;
  grid-template-columns: 2fr minmax(120px, 0.7fr) minmax(160px, 0.8fr);
  gap: 10px;
  margin-bottom: 14px;
}

.work-summary div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
  padding: 12px;
}

.work-summary span,
.work-entry-meta span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.work-summary strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 17px;
  line-height: 1.25;
}

.work-summary small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.35;
}

.work-feed {
  display: grid;
  gap: 10px;
}

.work-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border: 1px solid rgba(36, 45, 34, 0.08);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 12px;
  box-shadow: 0 8px 18px rgba(36, 45, 34, 0.05);
}

.work-entry h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
}

.work-entry-author {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  align-items: baseline;
  max-width: 100%;
  margin-top: 8px;
  border: 1px solid rgba(117, 189, 37, 0.24);
  border-radius: var(--radius);
  background: var(--green-soft);
  color: var(--kaiser-green-dark);
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.25;
}

.work-entry-author span {
  font-weight: 750;
  text-transform: uppercase;
}

.work-entry-author strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.work-entry p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.work-entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.work-entry-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 230px;
}

.work-entry-actions .small-action {
  min-width: 104px;
}

.work-entry-actions a.small-action {
  color: var(--text);
}

.metric,
.live-panel,
.work-report-panel,
.handoff-panel,
.todo-panel,
.news-mail-panel,
.board-panel,
.approval-panel,
.rules-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(36, 45, 34, 0.08);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcf8 100%);
  box-shadow: var(--shadow-card);
}

.metric::before,
.live-panel::before,
.work-report-panel::before,
.handoff-panel::before,
.todo-panel::before,
.news-mail-panel::before,
.board-panel::before,
.approval-panel::before,
.rules-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--kaiser-green), var(--kaiser-green-dark));
}

.metric {
  min-height: 76px;
  padding: 11px 12px;
}

.metric span,
.repo-grid span,
.task-meta span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 16px;
  line-height: 1.15;
  color: var(--ink);
}

.metric small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.live-panel {
  grid-area: live;
  padding: 18px;
}

.work-report-panel {
  grid-area: report;
  padding: 18px;
}

.handoff-panel {
  grid-area: handoff;
  padding: 18px;
}

.todo-panel {
  grid-area: todo;
  padding: 18px;
  box-shadow: var(--shadow);
}

.news-mail-panel {
  grid-area: news;
  padding: 22px;
  box-shadow: var(--shadow);
}

.news-mail-panel .section-heading h2 {
  font-size: 28px;
  line-height: 1.15;
}

.news-mail-panel .section-heading p {
  max-width: 680px;
  font-size: 15px;
  line-height: 1.45;
}

.todo-heading-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.todo-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(0, 1.25fr);
  gap: 14px;
  align-items: start;
}

.todo-form {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.todo-board {
  display: grid;
  min-width: 0;
  gap: 12px;
}

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

.todo-summary div {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
  padding: 10px 12px;
}

.todo-summary span,
.todo-item-meta span,
.todo-item-footer span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.todo-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
  line-height: 1;
}

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

.todo-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(36, 45, 34, 0.08);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 12px 12px 12px 16px;
  box-shadow: 0 8px 18px rgba(36, 45, 34, 0.05);
}

.todo-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--kaiser-green);
}

.todo-item.priority-high::before {
  background: var(--red);
}

.todo-item.priority-medium::before {
  background: #c78314;
}

.todo-item.priority-low::before {
  background: var(--kaiser-green);
}

.todo-item.done {
  background: #fbfcf8;
  opacity: 0.76;
}

.todo-item.done h3 {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(63, 116, 22, 0.35);
}

.todo-item h3 {
  margin: 6px 0 0;
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.28;
}

.todo-item p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.todo-item-meta,
.todo-item-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.todo-item-footer {
  margin-top: 10px;
}

.todo-priority {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: var(--radius);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
}

.todo-priority.high {
  background: var(--red-soft);
  color: var(--red);
}

.todo-priority.medium {
  background: var(--amber-soft);
  color: var(--amber);
}

.todo-priority.low {
  background: var(--green-soft);
  color: var(--kaiser-green-dark);
}

.todo-complete-button {
  min-width: 112px;
}

.board-panel {
  grid-area: board;
  padding: 18px;
}

.approval-panel {
  grid-area: approval;
  position: static;
  align-self: stretch;
  max-height: none;
  overflow: visible;
  padding: 18px;
}

.rules-panel {
  grid-area: rules;
  padding: 18px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.section-heading.tight {
  margin-bottom: 12px;
}

.section-heading h2 {
  font-size: 18px;
  line-height: 1.25;
}

.section-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.status-pill,
.tag,
.risk,
.owner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.status-pill {
  border: 1px solid var(--line);
  background: #fbfcf8;
  color: var(--steel);
}

.status-pill.ok {
  border-color: rgba(117, 189, 37, 0.36);
  background: var(--green-soft);
  color: var(--kaiser-green-dark);
}

.status-pill.warn {
  border-color: #f4ce86;
  background: var(--amber-soft);
  color: var(--amber);
}

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

.repo-grid div {
  min-width: 0;
  min-height: 68px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
}

.repo-grid strong {
  display: block;
  min-width: 0;
  margin-top: 8px;
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.35;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.report-summary div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
  padding: 10px 12px;
}

.report-summary span,
.report-preview span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.report-summary strong {
  display: block;
  margin-top: 4px;
  color: var(--kaiser-green-dark);
  font-size: 24px;
  line-height: 1;
}

.report-preview {
  display: grid;
  gap: 7px;
}

.report-preview pre {
  min-height: 134px;
  max-height: 250px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
  color: var(--text);
  padding: 12px;
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
}

.report-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.handoff-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 8px;
  margin-bottom: 12px;
}

.handoff-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
  padding: 11px 12px;
}

.handoff-card span,
.handoff-preview span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.handoff-card strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.4;
}

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

.handoff-preview {
  display: grid;
  gap: 7px;
}

.handoff-preview pre {
  min-height: 184px;
  max-height: 310px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
  color: var(--text);
  padding: 12px;
  font: inherit;
  font-size: 12px;
  line-height: 1.45;
}

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

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  min-height: 36px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
}

.segment {
  min-width: 0;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.segment:last-child {
  border-right: 0;
}

.segment.active {
  background: linear-gradient(180deg, #82c932 0%, #67aa1e 100%);
  color: #ffffff;
}

.board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: start;
}

.column {
  min-width: 0;
  min-height: 128px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
}

.column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.column-header h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.2;
}

.count {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--kaiser-green-dark);
  font-size: 12px;
  font-weight: 800;
}

.task-list {
  display: grid;
  gap: 8px;
  padding: 8px;
}

.task-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  min-width: 0;
  min-height: 88px;
  border: 1px solid rgba(36, 45, 34, 0.08);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcf8 100%);
  color: inherit;
  text-align: left;
  padding: 10px;
  box-shadow: 0 8px 18px rgba(36, 45, 34, 0.05);
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    transform 140ms ease;
}

.task-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--kaiser-green);
}

.task-card:hover,
.task-card.selected {
  border-color: rgba(117, 189, 37, 0.38);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}

.task-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.task-title {
  margin: 0;
  font-size: 14px;
  line-height: 1.3;
}

.task-desc {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.task-tags {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag {
  background: var(--blue-soft);
  color: #2d635a;
}

.risk.low {
  background: var(--green-soft);
  color: var(--kaiser-green-dark);
}

.risk.medium {
  background: var(--amber-soft);
  color: var(--amber);
}

.risk.high {
  background: var(--red-soft);
  color: var(--red);
}

.task-meta {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.task-meta strong {
  display: block;
  margin-top: 4px;
  font-size: 13px;
}

.owner {
  background: #eef0f7;
  color: var(--violet);
}

.selected-task {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
  padding: 14px;
}

.selected-task h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.selected-task p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.detail-grid div {
  min-width: 0;
}

.detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.detail-grid strong {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 120px;
  color: var(--muted);
  text-align: center;
}

.empty-state p {
  margin: 8px 0 0;
}

.approval-checklist {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.approval-checklist label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  transition:
    border-color 140ms ease,
    background 140ms ease;
}

.approval-checklist label:has(input:checked) {
  border-color: rgba(117, 189, 37, 0.4);
  background: var(--green-soft);
}

.approval-checklist input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  accent-color: var(--kaiser-green);
}

.approval-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 14px;
}

.news-mail-form {
  display: grid;
  gap: 10px;
}

.identity-banner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.identity-banner div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
  padding: 10px 12px;
}

.identity-banner span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.identity-banner strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 16px;
}

.identity-banner small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.35;
}

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

.field,
.approval-checkbox {
  display: grid;
  gap: 7px;
  min-width: 0;
  font-size: 13px;
}

.field span,
.mail-preview span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  padding: 10px 12px;
  outline: none;
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease;
}

.field textarea {
  min-height: 116px;
  resize: vertical;
  line-height: 1.45;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(117, 189, 37, 0.55);
  box-shadow: 0 0 0 3px rgba(117, 189, 37, 0.16);
}

.static-field {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
  padding: 10px 12px;
}

.static-field strong {
  font-size: 18px;
}

.static-field small {
  color: var(--muted);
}

.approval-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 10px 12px;
  line-height: 1.35;
}

.approval-checkbox input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  accent-color: var(--kaiser-green);
}

.mail-preview {
  display: grid;
  gap: 7px;
}

.mail-preview pre {
  min-height: 116px;
  max-height: 190px;
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcf8;
  color: var(--text);
  padding: 12px;
  font: inherit;
  font-size: 13px;
  line-height: 1.45;
}

.news-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.queue-panel {
  margin-top: 20px;
}

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

.queue-item {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(36, 45, 34, 0.08);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcf8 100%);
  padding: 12px;
}

.queue-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--kaiser-green);
}

.queue-item h3 {
  margin: 0;
  font-size: 14px;
}

.queue-item textarea {
  width: 100%;
  min-height: 120px;
  margin-top: 10px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  color: var(--text);
  background: #fbfcf8;
  font-size: 12px;
  line-height: 1.45;
}

.queue-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

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

.rule {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  font-size: 13px;
  line-height: 1.4;
  background: #ffffff;
}

.live-panel,
.work-report-panel,
.handoff-panel,
.board-panel,
.approval-panel,
.rules-panel,
.status-strip .metric {
  box-shadow: 0 8px 18px rgba(36, 45, 34, 0.05);
}

.live-panel,
.board-panel,
.approval-panel,
.rules-panel {
  opacity: 0.88;
}

.live-panel .section-heading h2,
.board-panel .section-heading h2,
.approval-panel .section-heading h2,
.rules-panel .section-heading h2 {
  font-size: 15px;
}

.live-panel .section-heading p,
.board-panel .section-heading p,
.approval-panel .section-heading p,
.rules-panel .section-heading p {
  font-size: 12px;
}

.rule svg {
  flex: 0 0 auto;
}

.rule.ok {
  background: var(--green-soft);
  color: var(--kaiser-green-dark);
}

.rule.warn {
  background: var(--amber-soft);
  color: #7d4e00;
}

.rule.stop {
  background: var(--red-soft);
  color: #812525;
}

.hidden {
  display: none !important;
}

@media (max-width: 1180px) {
  .dashboard {
    grid-template-columns: 1fr;
  grid-template-areas:
      "feed"
      "report"
      "handoff"
      "todo"
      "news"
      "status"
      "live"
      "board"
      "approval"
      "rules";
  }

  .approval-panel {
    position: static;
    max-height: none;
  }

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

  .health-panel {
    grid-template-columns: 1fr;
  }

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

  .board {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }

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

  .work-summary,
  .report-summary,
  .handoff-grid,
  .handoff-columns,
  .todo-layout {
    grid-template-columns: 1fr;
  }

  .work-entry,
  .todo-item {
    grid-template-columns: 1fr;
  }

  .work-entry-actions,
  .todo-heading-actions {
    justify-content: flex-start;
    min-width: 0;
  }
}

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

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .dashboard {
    padding: 16px;
  }

  .health-panel {
    width: calc(100% - 32px);
    margin-top: 12px;
  }

  .status-strip,
  .health-grid,
  .work-summary,
  .report-summary,
  .handoff-grid,
  .handoff-columns,
  .todo-layout,
  .todo-summary,
  .repo-grid,
  .board,
  .rules-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    display: grid;
  }

  .segmented {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .segment {
    min-height: 38px;
    padding: 0 6px;
  }

  .detail-grid,
  .field-grid,
  .identity-banner,
  .task-meta {
    grid-template-columns: 1fr;
  }

  .news-actions,
  .report-actions,
  .handoff-actions {
    grid-template-columns: 1fr;
  }
}
