:root {
  color-scheme: light;
  --ink: #1e3036;
  --muted: #52636a;
  --faint: #5c6e74;
  --line: #d5dfe0;
  --surface: #fff;
  --background: #f3f6f6;
  --rail: #eaf0f0;
  --accent: #155665;
  --accent-hover: #0e4350;
  --selected: #d9e9e9;
  --error: #9a302b;
  --warning: #7c5915;
  --success: #356b50;
  --radius: 4px;
  font-family:
    "Segoe UI",
    system-ui,
    -apple-system,
    sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--background);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.65;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 3px solid #468996;
  outline-offset: 2px;
}
a {
  color: var(--accent);
}
.topbar {
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
}
.brand {
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  background: var(--accent);
  color: white;
  font-size: 15px;
}
.topbar-note {
  color: var(--faint);
  border-left: 1px solid var(--line);
  padding-left: 16px;
  font-size: 12px;
}
.topbar #logout {
  margin-left: auto;
}
.workspace {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: calc(100vh - 56px);
}
.rail {
  padding: 28px 12px;
  background: var(--rail);
  border-right: 1px solid var(--line);
  min-width: 0;
}
.rail-heading {
  padding: 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.project-heading {
  margin-top: 32px;
  margin-bottom: 10px;
}
.nav-item,
.project-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  min-height: 36px;
  padding: 8px 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rail-heading + .nav-item {
  margin-top: 10px;
}
.nav-item:hover,
.project-item:hover {
  background: #dfe9e9;
}
.nav-item.selected,
.project-item.selected {
  background: var(--selected);
  color: var(--accent);
  font-weight: 650;
}
.project-list {
  display: grid;
  gap: 2px;
}
.project-empty {
  font-size: 12px;
  color: var(--muted);
  padding: 8px 12px;
}
.mobile-project {
  display: none;
}
.content {
  min-width: 0;
  padding: 36px 36px 48px;
}
.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
h1,
h2,
p {
  margin-top: 0;
}
h1 {
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 6px;
}
h2 {
  font-size: 14px;
  margin-bottom: 0;
}
.muted {
  color: var(--muted);
  margin-bottom: 0;
}
.primary,
.secondary,
.text-button,
.icon-button {
  border-radius: var(--radius);
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid transparent;
  font-weight: 600;
}
.primary {
  background: var(--accent);
  color: #fff;
}
.primary:hover {
  background: var(--accent-hover);
}
.secondary {
  background: var(--surface);
  border-color: #bfcdcf;
  color: var(--ink);
}
.secondary:hover {
  background: #f1f6f6;
}
.text-button,
.icon-button {
  background: transparent;
  color: var(--muted);
}
.text-button:hover,
.icon-button:hover {
  background: var(--selected);
  color: var(--ink);
}
kbd {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  border: 1px solid #7eaaaf;
  border-radius: 3px;
  padding: 1px 4px;
  margin-left: 10px;
  color: #e1f0f0;
}
.toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  margin: 32px 0 24px;
}
.search-wrap {
  width: min(340px, 100%);
}
label {
  display: block;
  font-weight: 600;
  font-size: 12px;
  margin-bottom: 7px;
}
input,
textarea,
select {
  width: 100%;
  border: 1px solid #b9c9cb;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 8px 10px;
  min-height: 36px;
}
textarea {
  resize: vertical;
  line-height: 1.5;
}
input::placeholder {
  color: var(--faint);
}
.result-count {
  margin-left: auto;
  padding-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.column {
  min-width: 0;
}
.column-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #bfcfd1;
  padding: 0 0 12px;
}
.column-heading h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-dot {
  height: 8px;
  width: 8px;
  border-radius: 50%;
  background: #87999d;
}
.sent-dot {
  background: #367b8a;
}
.done-dot {
  background: #5d886c;
}
.count {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.ticket-list {
  display: grid;
  align-content: start;
  gap: 8px;
  padding-top: 12px;
}
.ticket {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  color: var(--ink);
  min-width: 0;
}
.ticket:hover {
  border-color: #7ba5aa;
}
.ticket-title {
  display: block;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.ticket-excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin-top: 7px;
  overflow-wrap: anywhere;
}
.ticket-bottom {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
  color: var(--muted);
  font-size: 12px;
}
.ticket-id {
  font-family: ui-monospace, monospace;
  color: var(--faint);
}
.ticket-project {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 150px;
}
.ticket-date {
  margin-left: auto;
}
.badge {
  background: #fbf1dc;
  color: var(--warning);
  border-radius: 3px;
  padding: 2px 5px;
  font-size: 11px;
  font-weight: 700;
}
.column-empty {
  color: var(--faint);
  font-size: 12px;
  padding: 10px 2px;
}
.board-message {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 20px;
  margin-bottom: 24px;
  color: var(--muted);
  line-height: 1.5;
}
.board-message p {
  margin: 0;
}
.board-message button {
  margin-top: 12px;
}
.more-wrap {
  text-align: center;
  margin-top: 24px;
}
.login-view {
  min-height: calc(100vh - 56px);
  display: grid;
  place-items: start center;
  padding: 100px 16px;
}
.login-panel {
  width: min(100%, 380px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 32px;
}
.login-panel form {
  margin-top: 28px;
}
.login-panel .primary {
  width: 100%;
  margin-top: 16px;
}
.error {
  color: var(--error);
  font-size: 13px;
  line-height: 1.4;
  margin: 10px 0 0;
  white-space: pre-wrap;
}
.error:empty {
  display: none;
}
dialog {
  width: min(620px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 16px 55px #1d343d38;
  color: var(--ink);
}
dialog::backdrop {
  background: #19313ab3;
}
dialog form {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 34px);
}
.dialog-header {
  padding: 22px 24px 16px;
  display: flex;
  align-items: start;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.dialog-header h2 {
  font-size: 20px;
}
.dialog-header .eyebrow {
  margin-bottom: 5px;
}
.icon-button {
  font-size: 24px;
  line-height: 1;
  padding: 0;
  width: 36px;
}
.dialog-body {
  padding: 20px 24px;
  overflow: auto;
}
.dialog-body label:not(:first-child) {
  margin-top: 18px;
}
.required,
.optional {
  font-weight: 400;
  color: var(--muted);
  margin-left: 5px;
}
.required {
  color: var(--accent);
}
.field-hint,
.ticket-meta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin: 8px 0 0;
}
.conversation-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 13px;
}
.dialog-footer {
  border-top: 1px solid var(--line);
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.footer-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.archive-button {
  color: var(--error);
  padding-left: 0;
}
@media (max-width: 900px) {
  .workspace {
    grid-template-columns: 180px minmax(0, 1fr);
  }
  .content {
    padding: 28px 24px;
  }
  .board {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .ticket {
    padding: 11px;
  }
  .ticket-date {
    margin-left: 0;
  }
}
@media (max-width: 650px) {
  .topbar {
    padding: 0 16px;
  }
  .topbar-note {
    display: none;
  }
  .workspace {
    display: block;
  }
  .rail {
    padding: 10px 16px;
    display: flex;
    align-items: end;
    gap: 8px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .rail-heading,
  .project-list {
    display: none;
  }
  .rail-heading + .nav-item {
    margin: 0;
  }
  .nav-item {
    width: auto;
    white-space: nowrap;
    padding: 8px;
  }
  .mobile-project {
    display: block;
    min-width: 0;
    flex: 1;
  }
  .mobile-project label {
    margin-bottom: 4px;
  }
  .content {
    padding: 24px 16px 40px;
  }
  .page-heading {
    align-items: start;
    gap: 12px;
  }
  .page-heading .primary {
    white-space: nowrap;
  }
  .page-heading kbd {
    display: none;
  }
  .toolbar {
    flex-wrap: wrap;
    margin: 24px 0;
  }
  .search-wrap {
    width: 100%;
  }
  .result-count {
    margin-left: auto;
  }
  .board {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .ticket-date {
    margin-left: auto;
  }
  .dialog-header,
  .dialog-body,
  .dialog-footer {
    padding-left: 16px;
    padding-right: 16px;
  }
  .dialog-footer {
    flex-direction: column-reverse;
  }
  .dialog-footer button {
    white-space: nowrap;
    min-height: 44px;
  }
  .footer-actions {
    width: 100%;
  }
  .footer-actions button {
    flex: 1;
  }
  .archive-button {
    align-self: flex-start;
  }
}
@media (pointer: coarse) {
  button,
  input,
  select {
    min-height: 44px;
  }
  .icon-button {
    width: 44px;
  }
  .nav-item,
  .project-item {
    min-height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
