:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e5e7eb;
  background: #0f172a;
  color-scheme: dark;
  --card: #172033;
  --muted: #94a3b8;
  --line: #263449;
  --accent: #38bdf8;
  --good: #22c55e;
  --bad: #fb7185;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(circle at top, #1e293b, #0f172a 55%);
  min-height: 100vh;
}
button,
a,
input,
select,
textarea {
  font: inherit;
}
button,
.row-card,
.primary-action,
.ghost-action {
  border: 0;
  border-radius: 14px;
  background: #23314a;
  color: #e5e7eb;
  padding: 11px 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
button {
  cursor: pointer;
}
.app-shell {
  min-height: 100vh;
  padding: 16px 14px 88px;
  max-width: 1200px;
  margin: auto;
}
.topbar,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.topbar h1,
.section-head h2 {
  margin: 0.1rem 0;
  font-size: clamp(1.5rem, 5vw, 2.4rem);
}
.eyebrow {
  margin: 0;
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}
.build {
  font-size: 0.72rem;
  color: var(--muted);
}
.main {
  margin-top: 18px;
}
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  padding: 8px max(8px, env(safe-area-inset-left))
    calc(8px + env(safe-area-inset-bottom));
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  z-index: 20;
}
.bottom-nav a {
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  font-size: 1.1rem;
}
.bottom-nav small {
  font-size: 0.58rem;
}
.bottom-nav a.active {
  color: white;
}
.alert {
  background: rgba(251, 113, 133, 0.16);
  color: #fecdd3;
  padding: 12px;
  border: 1px solid rgba(251, 113, 133, 0.3);
  border-radius: 14px;
}
.info {
  background: rgba(56, 189, 248, 0.12);
  color: #bae6fd;
  border-color: rgba(56, 189, 248, 0.3);
}
.kanban-board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.kanban-col,
.settings-card,
.hero-card,
.dashboard-card,
.modal {
  background: rgba(23, 32, 51, 0.92);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 14px;
}
.kanban-col h3 {
  display: flex;
  justify-content: space-between;
  margin: 0 0 12px;
}
.kanban-card,
.row-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 8px;
  margin: 8px 0;
  border: 1px solid transparent;
}
.kanban-card:hover,
.row-card:hover {
  border-color: var(--accent);
}
small,
.row-card small {
  color: var(--muted);
}
.filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 12px 0;
}
.pills {
  display: flex;
  flex-wrap: wrap;
}
.pills .active {
  background: var(--accent);
  color: #082f49;
}
input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #0b1220;
  color: #e5e7eb;
  border-radius: 14px;
  padding: 12px;
}
textarea {
  min-height: 110px;
}
.card-list {
  display: grid;
  gap: 8px;
}
.badge {
  align-self: flex-start;
  border-radius: 999px;
  padding: 4px 8px;
  background: #334155;
}
.sev-critical,
.sev-high {
  background: #7f1d1d;
}
.timeline article {
  position: relative;
  margin: 0 0 10px;
  padding: 14px 14px 14px 34px;
  background: var(--card);
  border-radius: 18px;
  border: 1px solid var(--line);
}
.dot {
  position: absolute;
  left: 14px;
  top: 20px;
  width: 9px;
  height: 9px;
  background: var(--accent);
  border-radius: 99px;
}
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.62);
  z-index: 40;
  display: grid;
  place-items: end;
}
.detail-drawer,
.modal {
  width: min(100%, 540px);
  max-height: 92vh;
  overflow: auto;
  background: #111827;
  border: 1px solid var(--line);
  border-radius: 24px 24px 0 0;
  padding: 18px;
}
.close {
  float: right;
}
.ghost {
  background: transparent;
  border: 1px solid var(--line);
}
.actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 12px;
  flex-wrap: wrap;
}
.inline-actions {
  margin-top: 0;
}
.danger {
  border-color: rgba(251, 113, 133, 0.5);
  color: #fecdd3;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.compact-form input,
.compact-form select {
  padding: 10px 12px;
}
.compact-head {
  margin-bottom: 8px;
}
.compact-head h3 {
  margin: 0;
}
.user-list {
  display: grid;
  gap: 8px;
}
.user-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.58);
}
.user-row div:first-child {
  display: grid;
  gap: 4px;
}
.wide {
  width: 100%;
  margin-top: 12px;
}
.prewrap {
  white-space: pre-wrap;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tags span {
  background: #243047;
  padding: 5px 8px;
  border-radius: 999px;
}
.toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}
.toggle input {
  width: auto;
}
.search {
  margin: 12px 0;
}
.primary-action {
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  color: #f8fafc;
  font-weight: 800;
}
.empty-state {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 18px;
  background: rgba(15, 23, 42, 0.45);
}
.chat-log {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}
.chat-bubble {
  max-width: 88%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(30, 41, 59, 0.9);
  box-shadow: var(--shadow);
}
.chat-bubble.user {
  align-self: flex-end;
  background: rgba(37, 99, 235, 0.28);
}
.chat-bubble.assistant {
  align-self: flex-start;
}
.chat-bubble p {
  margin: 6px 0 0;
  white-space: pre-wrap;
}
.chat-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: end;
}
.chat-form textarea {
  min-height: 90px;
  resize: vertical;
}
.chat-sendbox {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
}
.chat-toolbar {
  margin: 12px 0;
}
.chat-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}
.command-pills,
.attachment-list {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 0;
}
.command-pills button,
.attachment-list button,
.file-button {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.72);
  color: #e5e7eb;
  padding: 9px 11px;
  white-space: nowrap;
}
.command-pills button {
  display: grid;
  gap: 2px;
  text-align: left;
}
.command-pills small,
.attachment-list.compact span {
  color: var(--muted);
}
.attachment-list.compact {
  flex-wrap: wrap;
  overflow: visible;
}
.file-button input {
  display: none;
}
.paste-hint {
  color: var(--muted);
  font-size: 0.82rem;
  margin: -2px 0 0;
}
.ghost-action {
  border: 1px solid var(--line);
  background: transparent;
}
.hero-card {
  margin-bottom: 14px;
  background: linear-gradient(
    135deg,
    rgba(56, 189, 248, 0.18),
    rgba(23, 32, 51, 0.94) 45%,
    rgba(34, 197, 94, 0.12)
  );
}
.hero-card h2 {
  margin: 8px 0;
  font-size: clamp(2rem, 9vw, 3.4rem);
}
.hero-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 16px;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 14px 0;
}
.dashboard-card {
  color: #e5e7eb;
  text-decoration: none;
}
.dashboard-card span {
  font-size: 1.6rem;
}
.dashboard-card strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
  margin: 8px 0;
}
.compact h3 {
  margin: 0;
}
.mini article {
  margin-bottom: 8px;
}
.line-clamp {
  color: #cbd5e1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.open-hint {
  color: var(--accent);
  font-weight: 700;
}
.inline {
  margin-top: 0;
  flex-wrap: wrap;
}
.detail-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 14px;
  padding: 12px;
  background: #020617;
  border-radius: 14px;
}
.detail-list dt {
  color: var(--muted);
}
.detail-list dd {
  margin: 0;
}
.wide-link {
  width: 100%;
  margin: 8px 0 12px;
}
pre {
  white-space: pre-wrap;
  background: #020617;
  padding: 12px;
  border-radius: 12px;
  overflow: auto;
}
@media (min-width: 720px) {
  .kanban-board {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .dashboard-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .hero-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .filters {
    grid-template-columns: 1fr 180px 180px;
  }
  .detail-drawer {
    border-radius: 24px 0 0 24px;
    height: 100vh;
  }
  .bottom-nav {
    left: 50%;
    transform: translateX(-50%);
    max-width: 760px;
    border-radius: 20px 20px 0 0;
  }
  .app-shell {
    padding-bottom: 96px;
  }
}

.login-page {
  min-height: calc(100vh - 130px);
  display: grid;
  place-items: center;
}
.login-card {
  width: min(100%, 440px);
  background: linear-gradient(
    180deg,
    rgba(23, 32, 51, 0.98),
    rgba(15, 23, 42, 0.98)
  );
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
}
.login-card h2 {
  margin: 8px 0;
  font-size: clamp(1.8rem, 8vw, 2.6rem);
}
.login-card form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.muted {
  color: var(--muted);
}
button:disabled {
  opacity: 0.65;
  cursor: wait;
}
