:root {
  color-scheme: light;
  --ink: #182322;
  --muted: #5f6f6e;
  --line: #d7e3e1;
  --panel: #ffffff;
  --page: #edf5f4;
  --soft: #f7fbfa;
  --teal: #08798a;
  --teal-dark: #045866;
  --teal-soft: #d9eef1;
  --gold: #bd7b43;
  --gold-soft: #f0dfcf;
  --green: #3da35d;
  --blue: #4979d1;
  --amber: #c48621;
  --red: #c44545;
  --shadow: 0 16px 42px rgba(15, 65, 72, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--page);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

body {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.app-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  height: 100vh;
  padding: 12px;
}

.is-android-panel.app-shell {
  height: calc(100dvh - 56px);
}

.brand-header,
.board-view,
.detail-view {
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.brand-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 16px;
  border-top: 7px solid var(--teal);
}

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

.brand-lockup img {
  width: 132px;
  height: 70px;
  object-fit: contain;
  object-position: center;
  border: 2px solid var(--teal);
  background: #f6fbfb;
}

.brand-lockup h1 {
  margin: 0 0 4px;
  color: var(--teal-dark);
  font-size: 32px;
  line-height: 1.05;
}

.header-side {
  display: grid;
  justify-items: end;
  gap: 10px;
  flex: 0 0 auto;
}

.launch-badge {
  display: grid;
  gap: 2px;
  min-width: 250px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.launch-badge span {
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 800;
}

.launch-badge small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.board-view,
.detail-view {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.board-view {
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
}

.detail-view {
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.board-header,
.detail-header,
.section-heading,
.card-topline,
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  font-size: 30px;
  line-height: 1.08;
}

h2 {
  margin-bottom: 0;
  font-size: 22px;
}

h3 {
  margin-bottom: 0;
  font-size: 15px;
}

.subtitle,
.note-panel p,
.card-project,
.card-meta,
.card-footer,
.board-clock,
.date-window {
  color: var(--muted);
}

.board-clock {
  flex: 0 0 auto;
  font-size: 16px;
  font-weight: 800;
}

.summary-row,
.status-band,
.notes-grid {
  display: grid;
  gap: 10px;
}

.summary-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.summary-card,
.status-band article,
.note-panel,
.source-status {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.summary-card,
.status-band article {
  padding: 12px;
}

.summary-card strong,
.status-band strong {
  display: block;
  color: var(--teal-dark);
  font-size: 24px;
  line-height: 1.1;
}

.summary-card span,
.status-band span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.source-status {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-left: 6px solid var(--teal);
}

.source-status.is-stale {
  border-left-color: var(--amber);
  background: #fff8eb;
}

.source-status strong {
  color: var(--teal-dark);
  font-size: 14px;
}

.source-status span,
.timeline-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.board-tools {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(520px, 0.9fr);
  gap: 10px;
  align-items: end;
}

.search-field {
  display: grid;
  gap: 6px;
}

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

.search-field input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: white;
  color: var(--ink);
  font-size: 18px;
}

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

.filter-tab,
.back-button,
.icon-button,
.logout-button,
.login-form button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  font-weight: 800;
}

.filter-tab.is-active,
.back-button,
.login-form button {
  border-color: var(--teal);
  background: var(--teal);
  color: white;
}

.logout-button {
  min-height: 38px;
  padding: 0 12px;
  color: var(--teal-dark);
}

.kanban-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(205px, 1fr);
  gap: 10px;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  scroll-snap-type: x proximity;
}

.kanban-column {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfa;
  scroll-snap-align: start;
}

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

.column-header span {
  display: grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-weight: 800;
}

.job-stack {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  overflow-y: auto;
  padding: 10px;
}

.job-card {
  display: grid;
  gap: 8px;
  width: 100%;
  min-height: 158px;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 12px;
  background: white;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 8px 20px rgba(15, 65, 72, 0.08);
}

.job-card.is-selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(189, 123, 67, 0.2);
}

.card-topline,
.card-footer {
  font-size: 12px;
  font-weight: 800;
}

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

.health-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.health-dot.active {
  background: var(--blue);
}

.health-dot.good {
  background: var(--green);
}

.health-dot.watch {
  background: var(--amber);
}

.health-dot.blocked {
  background: var(--red);
}

.job-card strong {
  font-size: 22px;
  line-height: 1.05;
}

.card-project,
.card-meta {
  display: block;
  font-size: 14px;
  line-height: 1.25;
}

.progress-track {
  display: block;
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e3ecea;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.empty-column {
  display: grid;
  place-items: center;
  min-height: 120px;
  border: 1px dashed #cbd6ce;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.back-button {
  padding: 0 18px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  color: var(--teal-dark);
  font-size: 34px;
  font-weight: 800;
}

.status-band {
  grid-template-columns: repeat(4, 1fr);
}

.timeline-card {
  min-height: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  overflow: hidden;
}

.gantt {
  height: calc(100% - 48px);
  min-height: 430px;
  margin-top: 8px;
}

.gantt-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.gantt-labels,
.gantt-timeline {
  display: grid;
  grid-template-rows: 42px repeat(var(--rows), minmax(74px, 1fr));
  min-height: 0;
}

.gantt-axis-spacer,
.gantt-axis {
  background: #eaf4f3;
  border-bottom: 1px solid var(--line);
}

.gantt-axis {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 14px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.task-label,
.gantt-row {
  min-height: 74px;
  border-bottom: 1px solid #edf1ee;
}

.task-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
}

.task-label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.gantt-row {
  position: relative;
  background-image: linear-gradient(to right, rgba(8, 121, 138, 0.08) 1px, transparent 1px);
  background-size: 12.5% 100%;
}

.gantt-bar {
  position: absolute;
  top: 50%;
  height: 26px;
  min-width: 18px;
  overflow: hidden;
  transform: translateY(-50%);
  border-radius: 6px;
  background: #d8e5e3;
}

.gantt-bar span {
  display: block;
  height: 100%;
}

.gantt-bar.complete span {
  background: var(--green);
}

.gantt-bar.active span {
  background: var(--blue);
}

.gantt-bar.blocked span {
  background: var(--red);
}

.gantt-bar.planned span {
  background: #9ba7a0;
}

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

.note-panel {
  padding: 14px;
}

.note-panel h2 {
  margin-bottom: 6px;
}

.note-panel p {
  margin-bottom: 0;
  line-height: 1.35;
}

.timeline-note {
  margin: 8px 0 0;
}

.login-page {
  overflow: auto;
}

.login-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.login-panel {
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-top: 7px solid var(--teal);
  border-radius: 8px;
  padding: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-panel img {
  width: 150px;
  height: 80px;
  object-fit: contain;
  border: 2px solid var(--teal);
  background: #f6fbfb;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.login-form label {
  display: grid;
  gap: 6px;
}

.login-form label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.login-form input {
  width: 100%;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: white;
  color: var(--ink);
  font-size: 18px;
}

.login-error {
  min-height: 20px;
  margin: 0;
  color: var(--red);
  font-weight: 800;
}

.is-android-panel .app-shell {
  height: calc(100dvh - 56px);
  padding: 8px;
}

.is-android-panel .brand-header {
  padding: 8px 12px;
}

.is-android-panel .header-side {
  gap: 6px;
}

.is-android-panel .launch-badge {
  min-width: 220px;
  padding: 7px 9px;
}

.is-android-panel .brand-lockup img {
  width: 96px;
  height: 52px;
}

.is-android-panel .brand-lockup h1 {
  font-size: 26px;
}

.is-android-panel .board-view,
.is-android-panel .detail-view {
  padding: 12px;
}

.is-android-panel .job-card {
  min-height: 146px;
}

.is-android-panel .gantt {
  min-height: 330px;
}

.is-android-panel .task-label,
.is-android-panel .gantt-row {
  min-height: 58px;
}

@media (max-width: 1180px) {
  body {
    overflow: auto;
  }

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

  .board-tools,
  .summary-row,
  .status-band,
  .notes-grid {
    grid-template-columns: 1fr 1fr;
  }

  .board-view,
  .detail-view {
    min-height: 760px;
  }

  .brand-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-side {
    width: 100%;
    justify-items: stretch;
  }
}

@media (max-width: 760px) {
  .brand-header,
  .detail-header,
  .board-header,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-lockup {
    align-items: flex-start;
    flex-direction: column;
  }

  .summary-row,
  .status-band,
  .notes-grid,
  .board-tools,
  .filter-tabs,
  .launch-badge {
    grid-template-columns: 1fr;
  }

  .kanban-board {
    grid-auto-columns: minmax(260px, 86vw);
  }

  .gantt-grid {
    grid-template-columns: 160px minmax(440px, 1fr);
    overflow-x: auto;
  }
}
