:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  --ink: #162033;
  --muted: #677489;
  --line: #d8dee8;
  --panel: #ffffff;
  --bg: #f4f7fb;
  --accent: #007c78;
  --accent-2: #cc5c00;
  --board-bg: #071421;
  --board-panel: rgba(17, 37, 56, 0.82);
  --board-line: rgba(74, 153, 190, 0.25);
  --cyan: #5fd4ec;
  --green: #49c084;
  --amber: #dca848;
  --red: #dc5f56;
  --daily-dogear: #ff0033;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  padding: 0 14px;
  font-weight: 700;
}

button.ghost {
  background: #e8edf3;
  color: var(--ink);
}

button.active {
  background: var(--accent-2);
}

button.danger {
  background: #b42318;
  color: #fff;
}

button.warning {
  background: #d97706;
  color: #fff;
}

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

.panel {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 12px 40px rgba(22, 31, 42, 0.08);
}

.login-logo {
  display: block;
  width: min(320px, 100%);
  height: auto;
  margin: 0 0 24px;
}

.buildprogress-login-logo {
  width: min(420px, 100%);
}

.system-login-panel {
  width: min(520px, 100%);
}

.company-login-title {
  margin: 0 0 6px;
  font-size: 34px;
  line-height: 1.05;
}

.login-scope {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.login-directory {
  display: grid;
  gap: 10px;
}

.login-directory a {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fc;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.login-directory a:hover,
.login-directory a:focus-visible {
  border-color: var(--accent);
  outline: none;
}

.login-directory img {
  max-width: 112px;
  max-height: 32px;
  object-fit: contain;
}

.login-directory-main {
  background: #e8f5f4 !important;
  color: var(--accent) !important;
}

.login-footer {
  margin: 18px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 8px;
  row-gap: 4px;
  width: 100%;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  text-align: center;
}

.login-footer img {
  width: auto;
  height: 16px;
  object-fit: contain;
  display: block;
  flex: 0 0 auto;
  transform: translateY(-1px);
}

.login-footer span {
  display: block;
  line-height: 16px;
}

.login-footer .login-version {
  flex: 0 0 100%;
  color: var(--accent);
  font-weight: 800;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  font-weight: 700;
}

input,
select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: #fff;
}

.password-control {
  gap: 7px;
}

.password-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
}

.password-input-row input {
  min-width: 0;
  margin: 0;
}

.password-tool-button {
  min-width: 42px;
  width: 42px;
  min-height: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  background: #e8edf3;
  color: var(--ink);
}

.password-generate-button {
  width: auto;
  min-width: 92px;
  padding: 0 12px;
}

.password-tool-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-tool-button.copied {
  background: #d9f7ec;
  color: #007c78;
}

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

.topbar {
  min-height: 52px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 14px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand-button {
  background: transparent;
  color: var(--ink);
  padding: 0;
  display: flex;
  align-items: center;
  min-height: 0;
}

.brand-button img {
  width: min(220px, 42vw);
  max-height: 42px;
  height: auto;
  display: block;
  object-fit: contain;
}

.topbar .user-strip span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.user-strip {
  display: flex;
  align-items: center;
  gap: 9px;
}

.app-version {
  color: #8b98aa;
  font-size: 12px;
  font-weight: 700;
}

.icon-button {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  padding: 0;
  background: #e8edf3;
  color: var(--ink);
  font-size: 18px;
}

.project-arrange-toggle {
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.project-arrange-toggle.active {
  background: #63d094;
  color: #071324;
}

.board-shell {
  min-height: calc(100vh - 52px);
  padding: 18px;
  background:
    linear-gradient(rgba(28, 74, 102, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(28, 74, 102, 0.22) 1px, transparent 1px),
    radial-gradient(circle at top right, rgba(36, 136, 164, 0.12), transparent 42%),
    var(--board-bg);
  background-size: 28px 28px, 28px 28px, auto, auto;
  color: #dbeaf2;
}

.compact-board {
  padding-top: 18px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 16px;
}

.sysadmin-dashboard-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 18px;
}

.sysadmin-dashboard-nav button {
  min-width: 120px;
  min-height: 34px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: #e8edf3;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.sysadmin-dashboard-nav button.active {
  background: #4fd39b;
  color: #06121f;
}

.system-board {
  padding: 20px 26px;
  min-width: 0;
  overflow-x: hidden;
}

.system-overview-board {
  height: calc(100dvh - 58px);
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.system-overview-board .system-hero {
  flex: 0 0 auto;
  margin-bottom: 12px;
  padding-bottom: 10px;
}

.system-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(74, 153, 190, 0.35);
}

.system-hero p {
  margin: 0 0 6px;
  color: #6ee6ff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 4px;
}

.system-hero h1 {
  margin: 0;
  color: #ffffff;
  font-size: 31px;
  line-height: 1.05;
}

.system-totals {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 22px;
  text-align: right;
}

.system-totals span,
.company-stat-grid span {
  color: #8aa4ba;
  font-size: 13px;
  font-weight: 700;
}

.system-totals strong,
.company-stat-grid strong {
  display: block;
  color: #ffffff;
  font-size: 22px;
}

.company-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 16px;
}

.company-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(74, 153, 190, 0.42);
}

.company-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.company-section-head h2 {
  margin: 0;
  color: #ffffff;
  font-size: 24px;
}

.company-section-head span {
  color: #8aa4ba;
  font-size: 13px;
  font-weight: 800;
}

.system-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  align-items: stretch;
  gap: 16px;
  margin-bottom: 18px;
  min-width: 0;
}

.system-overview-board .system-insights {
  flex: 1 1 auto;
  grid-template-rows: minmax(0, clamp(252px, 30dvh, 320px)) minmax(0, 1fr);
  margin-bottom: 0;
  overflow: hidden;
}

.system-insight-card {
  min-width: 0;
  min-height: 136px;
  padding: 16px;
  border: 1px solid rgba(74, 153, 190, 0.35);
  border-radius: 8px;
  background: rgba(17, 37, 56, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.storage-card,
.network-card {
  min-height: 250px;
}

.system-overview-board .system-insight-card {
  min-height: 0;
  overflow: hidden;
}

.storage-card {
  grid-column: 1;
  grid-row: 1;
}

.system-overview-board .storage-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
}

.system-overview-board .storage-card .system-insight-head {
  margin-bottom: 0;
}

.system-overview-board .storage-card .system-insight-head h2 {
  font-size: 17px;
}

.system-overview-board .storage-card .system-insight-head strong {
  font-size: 22px;
}

.health-card {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.health-card .response-time-status {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.health-card .server-status-history {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
}

.network-card {
  grid-column: 3;
  grid-row: 1;
}

.processing-card {
  grid-column: 1;
  grid-row: 2;
}

.system-overview-board .processing-card {
  display: grid;
  grid-template-rows: auto minmax(64px, 0.85fr) minmax(64px, 0.85fr) minmax(112px, 1.2fr);
  gap: 6px;
  padding: 10px;
  overflow: hidden;
}

.online-now-card {
  grid-column: 2;
  grid-row: 2;
  min-height: 270px;
}

.system-overview-board .online-now-card,
.system-overview-board .system-feed-card {
  height: auto;
  min-height: 0;
}

.system-overview-board .system-feed-card {
  align-self: stretch;
  overflow: hidden;
}

.system-insight-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  min-width: 0;
}

.system-insight-head h2 {
  min-width: 0;
  margin: 0;
  color: #ffffff;
  font-size: 18px;
  overflow-wrap: anywhere;
}

.system-insight-head strong {
  color: #69d08e;
  font-size: 26px;
}

.system-activity-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 0;
  color: #8aa4ba;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.system-activity-toggle input {
  width: 14px;
  min-height: 0;
  height: 14px;
  margin: 0;
  padding: 0;
  accent-color: #0b8b80;
}

.system-insight-card p,
.system-muted {
  margin: 0;
  color: #8aa4ba;
  font-size: 13px;
  font-weight: 700;
}

.system-row-grid,
.system-feed {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.system-row,
.system-feed-item,
.system-mini-stats span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 30px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(6, 17, 30, 0.38);
  color: #a9c4d8;
  font-size: 12px;
  font-weight: 700;
  min-width: 0;
}

.system-row span,
.system-feed-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.system-row strong,
.system-mini-stats strong {
  color: #ffffff;
  font-size: 17px;
}

.poppler-status {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(74, 153, 190, 0.28);
}

.system-overview-board .processing-card .poppler-status {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}

.system-overview-board .processing-card .system-mini-stats-compact {
  margin-bottom: 0;
}

.system-overview-board .processing-card .system-mini-stats-compact span {
  min-height: 34px;
  padding: 4px 8px;
}

.system-overview-board .processing-card .poppler-status {
  gap: 5px;
  min-height: 0;
  padding: 6px 10px;
}

.system-overview-board .processing-card .infotech-status {
  justify-content: start;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.system-overview-board .processing-card .poppler-status-head {
  font-size: 11px;
}

.system-overview-board .processing-card .poppler-state {
  padding: 2px 8px;
  font-size: 10px;
}

.system-overview-board .processing-card .poppler-grid {
  gap: 5px;
}

.system-overview-board .processing-card .poppler-grid span {
  min-height: 30px;
  padding: 3px 5px;
  font-size: 10px;
}

.system-overview-board .processing-card .poppler-grid strong {
  font-size: 15px;
}

.system-overview-board .processing-card .system-row {
  min-height: 20px;
  padding: 3px 8px;
  font-size: 10px;
}

.system-insight-card > .poppler-status:first-child,
.system-insight-card > .storage-status:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.processing-card .poppler-status {
  min-height: 132px;
  margin-top: 0;
  padding: 12px;
  border: 1px solid rgba(74, 153, 190, 0.28);
  border-radius: 8px;
  background: rgba(6, 17, 30, 0.16);
  align-content: start;
}

.poppler-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  min-width: 0;
}

.poppler-state {
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(138, 164, 186, 0.16);
  color: #a9c4d8;
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

.poppler-state.active {
  background: rgba(255, 183, 0, 0.18);
  color: #ffc928;
}

.poppler-state.warn {
  background: rgba(190, 34, 25, 0.18);
  color: #ff938a;
}

.poppler-state.muted {
  background: rgba(100, 116, 139, 0.18);
  color: #cbd5e1;
}

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

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

.poppler-grid span {
  min-width: 0;
  min-height: 48px;
  padding: 6px;
  border-radius: 6px;
  background: rgba(6, 17, 30, 0.34);
  color: #a9c4d8;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.poppler-grid strong {
  display: block;
  color: #ffffff;
  font-size: 17px;
  line-height: 1;
}

.storage-status {
  display: grid;
  gap: 8px;
}

.system-overview-board .storage-card .storage-status {
  gap: 4px;
}

.storage-meter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.storage-meter-head strong {
  color: #8ee8d8;
  white-space: nowrap;
}

.storage-meter {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(6, 17, 30, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.system-overview-board .storage-card .storage-meter {
  height: 8px;
}

.storage-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #19c6a7, #f7c948);
}

.response-gauge {
  display: grid;
  gap: 8px;
}

.response-gauge-track {
  position: relative;
  height: 18px;
  overflow: visible;
  border-radius: 999px;
  background: linear-gradient(90deg, #28d4a6 0%, #f7c948 54%, #ef6a5a 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.response-gauge-needle {
  position: absolute;
  top: -6px;
  width: 4px;
  height: 30px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(6, 18, 31, 0.92), 0 4px 12px rgba(0, 0, 0, 0.36);
  transform: translateX(-50%);
}

.response-gauge-labels {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #a9c4d8;
  font-size: 12px;
  font-weight: 900;
}

.response-gauge-note {
  margin-top: 2px;
}

.server-status-history {
  display: grid;
  align-content: start;
  gap: 3px;
  max-height: 72px;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

.server-status-history::-webkit-scrollbar {
  width: 8px;
}

.server-status-history::-webkit-scrollbar-track {
  background: rgba(6, 17, 30, 0.22);
  border-radius: 999px;
}

.server-status-history::-webkit-scrollbar-thumb {
  background: rgba(110, 230, 255, 0.42);
  border-radius: 999px;
}

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

.storage-grid span {
  min-width: 0;
  padding: 6px;
  border-radius: 6px;
  background: rgba(6, 17, 30, 0.34);
  color: #a9c4d8;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.system-overview-board .storage-card .storage-grid span {
  padding: 3px 6px;
  font-size: 9px;
}

.storage-grid strong {
  display: block;
  color: #ffffff;
  font-size: 17px;
  line-height: 1;
}

.system-overview-board .storage-card .storage-grid strong {
  font-size: 14px;
}

.storage-grid-app strong {
  color: #8ee8d8;
}

.container-status {
  padding-top: 10px;
  border-top: 1px solid rgba(72, 166, 200, 0.18);
}

.system-overview-board .storage-card .container-status {
  padding-top: 6px;
}

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

.container-memory-meter span {
  background: linear-gradient(90deg, #40c8df, #8ee8d8);
}

.poppler-current strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.poppler-failed strong {
  color: #ff938a;
}

.system-mini-stats {
  display: grid;
  gap: 8px;
}

.system-feed-card {
  grid-column: 3;
  grid-row: 2;
  height: 270px;
  min-height: 270px;
  display: flex;
  flex-direction: column;
  align-self: start;
}

.system-feed-card .system-insight-head {
  align-items: center;
  flex: 0 0 auto;
  margin-bottom: 0;
}

.system-feed-card .system-insight-head h2 {
  line-height: 1.2;
}

.system-activity-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

.system-overview-board .system-activity-list {
  display: block;
  margin-top: 6px;
  padding-bottom: 2px;
}

.system-overview-board .system-activity-list .system-feed-item + .system-feed-item {
  margin-top: 8px;
}

.system-activity-list::-webkit-scrollbar,
.online-user-list::-webkit-scrollbar {
  width: 8px;
}

.system-activity-list::-webkit-scrollbar-track,
.online-user-list::-webkit-scrollbar-track {
  background: rgba(6, 17, 30, 0.22);
  border-radius: 999px;
}

.system-activity-list::-webkit-scrollbar-thumb,
.online-user-list::-webkit-scrollbar-thumb {
  background: rgba(110, 230, 255, 0.42);
  border-radius: 999px;
}

.system-feed-item time {
  flex: 0 0 auto;
  color: #6ee6ff;
  font-size: 11px;
}

.system-feed-item small {
  display: block;
  color: #8aa4ba;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.online-user-list {
  align-content: start;
  max-height: 236px;
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

.processing-mini-stats {
  margin-bottom: 10px;
}

.system-mini-stats-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 10px;
}

.system-mini-stats-compact span {
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
}

.system-view-all {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(110, 230, 255, 0.28);
  background: rgba(95, 212, 236, 0.12);
  color: #8cecff;
  font-size: 12px;
  font-weight: 800;
}

.online-users-modal {
  width: min(720px, calc(100vw - 28px));
}

.online-users-table {
  display: grid;
  gap: 6px;
  max-height: min(62vh, 520px);
  overflow: auto;
  margin-top: 12px;
  padding-right: 2px;
}

.online-user-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.2fr) minmax(130px, 1fr) minmax(110px, 0.8fr) minmax(130px, 0.9fr);
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9fc;
}

.online-user-row span,
.online-user-row time {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.company-card {
  display: grid;
  gap: 14px;
  min-height: 188px;
  padding: 18px;
  border: 1px solid rgba(74, 153, 190, 0.35);
  border-radius: 8px;
  background: rgba(17, 37, 56, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.company-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.company-card h2 {
  margin: 0 0 6px;
  color: #ffffff;
  font-size: 22px;
}

.company-card p {
  margin: 0;
  color: #8aa4ba;
}

.company-card-head > strong {
  color: #69d08e;
  font-size: 26px;
}

.company-card-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(105, 208, 142, 0.16);
  border: 1px solid rgba(105, 208, 142, 0.35);
  color: #7cf0a2;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-badge.muted {
  background: rgba(148, 163, 184, 0.16);
  border-color: rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
}

.status-badge.danger-badge {
  background: rgba(248, 113, 113, 0.18);
  border-color: rgba(248, 113, 113, 0.45);
  color: #fecaca;
}

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

.company-card-note {
  font-size: 12px;
}

.company-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #8aa4ba;
  font-size: 12px;
}

.company-card-actions a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  background: rgba(95, 212, 236, 0.14);
  color: #8cecff;
  padding: 0 11px;
  font-weight: 800;
  text-decoration: none;
}

.company-card-actions a:hover,
.company-card-actions a:focus-visible {
  background: rgba(95, 212, 236, 0.22);
  outline: none;
}

.project-card {
  position: relative;
  display: grid;
  gap: 9px;
  min-height: 146px;
  width: 100%;
  background: var(--board-panel);
  color: #dbeaf2;
  border: 1px solid var(--board-line);
  text-align: left;
  padding: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.project-card-content {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.project-arrange-item {
  cursor: default;
  user-select: none;
}

.project-grid-arranging .project-arrange-item {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
}

.project-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid rgba(110, 230, 255, 0.28);
  border-radius: 8px;
  background: rgba(6, 18, 31, 0.54);
  color: #8ee8d8;
  font-size: 23px;
  font-weight: 900;
  line-height: 1;
  touch-action: none;
  cursor: grab;
}

.project-drag-handle:active,
.project-arrange-item.is-dragging .project-drag-handle {
  cursor: grabbing;
}

.project-arrange-item.is-dragging {
  z-index: 20;
  opacity: 0.92;
  pointer-events: none;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.project-card-bars {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.project-card:hover,
.project-card:focus-visible {
  border-color: rgba(95, 212, 236, 0.75);
  outline: none;
}

.project-card h2 {
  margin: 0;
  font-size: 18px;
}

.project-card p {
  margin: 0;
  color: #6f8498;
  font-size: 13px;
}

.health-pill {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 1px solid rgba(73, 192, 132, 0.35);
  border-radius: 999px;
  background: rgba(73, 192, 132, 0.16);
  color: var(--green);
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.health-pill.watch {
  border-color: rgba(220, 168, 72, 0.35);
  background: rgba(220, 168, 72, 0.14);
  color: var(--amber);
}

.health-pill.at_risk {
  border-color: rgba(220, 95, 86, 0.35);
  background: rgba(220, 95, 86, 0.14);
  color: var(--red);
}

.progress-track {
  position: relative;
  height: 22px;
  overflow: hidden;
  border: 1px solid rgba(68, 144, 173, 0.55);
  border-radius: 999px;
  background: #05111a;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #399967, #61c68a);
}

.progress-track strong {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 12px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.72);
}

.schedule-block {
  display: grid;
  gap: 5px;
}

.schedule-track {
  height: 8px;
  overflow: hidden;
  border: 1px solid rgba(95, 212, 236, 0.35);
  border-radius: 999px;
  background: rgba(5, 17, 26, 0.72);
}

.schedule-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f59e0b, #f97316);
}

.schedule-meta {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  color: #8aa4ba;
  font-size: 11px;
}

.schedule-meta span:last-child {
  text-align: right;
}

.schedule-meta strong {
  color: #fbbf24;
  white-space: nowrap;
}

.schedule-meta span:only-child {
  grid-column: 1 / -1;
  text-align: left;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #7d92a4;
  font-size: 12px;
}

.today-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  color: #9bb3c5;
  font-size: 11px;
  font-weight: 800;
}

.today-stats span {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(95, 212, 236, 0.22);
  border-radius: 6px;
  background: rgba(95, 212, 236, 0.08);
  padding: 5px 7px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-stats button {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(95, 212, 236, 0.22);
  border-radius: 6px;
  background: rgba(95, 212, 236, 0.08);
  color: inherit;
  padding: 5px 7px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: inherit;
  font-weight: inherit;
}

.today-stats .positive {
  color: #86efac;
}

.today-stats .negative {
  color: #f87171;
}

.today-stats span.active {
  color: #86efac;
  border-color: rgba(134, 239, 172, 0.5);
  background: rgba(34, 197, 94, 0.14);
}

.today-stats span.negative.active {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.58);
  background: #7f1d1d;
}

.project-card .today-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-card .today-stats span {
  width: auto;
  min-width: 0;
  padding: 3px 8px;
  line-height: 1.2;
}

.today-meter {
  align-content: center;
  padding: 8px;
}

.today-meter .today-stats {
  height: 100%;
}

.card-stage {
  color: #b5c9d8;
}

.board-note {
  margin-top: 26px;
  text-align: center;
  color: #6f8498;
  font-size: 12px;
}

.empty-board {
  grid-column: 1 / -1;
  border: 1px solid var(--board-line);
  background: rgba(17, 37, 56, 0.42);
  border-radius: 8px;
  padding: 28px;
}

.admin-shell {
  min-height: calc(100vh - 56px);
  padding: 14px 18px;
}

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.admin-head h1 {
  margin: 0 0 4px;
  font-size: 30px;
  line-height: 1.05;
}

.admin-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.admin-action-panel {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}

.admin-action-panel h2 {
  margin: 0;
  font-size: 18px;
}

.admin-action-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.admin-action-buttons button {
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.system-actions {
  display: block;
}

.system-action-row {
  width: min(620px, 100%);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.system-action-row button {
  width: 100%;
  min-height: 48px;
}

.system-admin-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(460px, 1.15fr);
  gap: 12px;
  align-items: start;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(560px, 1.28fr);
  gap: 12px;
  align-items: start;
}

.admin-layout.management-limited {
  grid-template-columns: minmax(280px, 640px);
}

.admin-column {
  display: grid;
  gap: 12px;
  align-items: start;
  min-height: 0;
  overflow-y: auto;
}

.admin-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.admin-panel summary {
  cursor: pointer;
  list-style: none;
  margin: -2px 0 10px;
  font-size: 18px;
  font-weight: 800;
}

.admin-panel summary::-webkit-details-marker {
  display: none;
}

.admin-panel summary::after {
  content: "▲";
  float: right;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-panel:not([open]) {
  padding-bottom: 12px;
}

.admin-panel:not([open]) summary {
  margin-bottom: 0;
}

.admin-panel:not([open]) summary::after {
  content: "▼";
}

.admin-panel h2 {
  margin: 14px 0 12px;
}

@media (min-width: 921px) {
  .admin-shell {
    height: calc(100dvh - 64px);
    overflow: hidden;
  }

  .admin-layout {
    height: calc(100% - 58px);
    min-height: 0;
  }
}

.settings-subpanel {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.settings-subpanel:not([open]) {
  padding-bottom: 12px;
}

.settings-subpanel + .settings-subpanel {
  margin-top: 12px;
}

.nested-settings-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  cursor: pointer;
  list-style: none;
  font-size: 18px;
  font-weight: 800;
}

.nested-settings-panel summary::-webkit-details-marker {
  display: none;
}

.nested-settings-panel summary::after {
  content: "▲";
  order: 3;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.nested-settings-panel:not([open]) summary::after {
  content: "▼";
}

.nested-settings-panel[open] summary {
  margin-bottom: 10px;
}

.nested-settings-panel summary button {
  order: 2;
  margin-left: auto;
  min-width: 112px;
}

.settings-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.settings-subhead h2 {
  margin: 0;
  font-size: 18px;
}

.settings-subhead button {
  min-width: 112px;
}

.project-actions-subpanel {
  margin-bottom: 14px;
}

.projects-panel h2:first-of-type {
  margin-top: 2px;
}

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

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

.weight-grid label {
  margin: 0;
  gap: 5px;
  font-size: 13px;
}

.weight-grid input {
  min-height: 34px;
  padding: 0 10px;
}

.input-suffix {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
}

.users-panel {
  align-self: start;
}

.panel-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.panel-toolbar button {
  min-width: 120px;
}

.user-list {
  display: grid;
  gap: 6px;
}

.users-panel[open] .user-list {
  max-height: min(54vh, 520px);
  overflow: auto;
  padding-right: 4px;
}

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

.company-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fc;
}

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

.system-company-card {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fc;
}

.system-company-card.is-archived {
  background: #f1f5f9;
  opacity: 0.82;
}

.system-company-card.is-suspended {
  border-color: rgba(180, 35, 24, 0.45);
  background: #fff7f5;
}

.system-company-card summary {
  cursor: pointer;
  list-style: none;
}

.system-company-card summary::-webkit-details-marker {
  display: none;
}

.system-company-card summary::after {
  content: "▼";
  float: right;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.system-company-card[open] summary::after {
  content: "▲";
}

.system-company-card strong,
.system-company-card span {
  display: block;
}

.system-company-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.company-users {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  max-height: min(46vh, 420px);
  overflow: auto;
  padding-right: 4px;
}

.system-company-actions,
.project-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.system-company-actions {
  justify-content: flex-start;
  margin-top: 10px;
}

.system-company-capability {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--ink);
  background: var(--panel-soft);
  font-size: 12px;
  font-weight: 700;
}

.system-company-capability input[role="switch"] {
  appearance: none;
  position: relative;
  width: 34px;
  height: 18px;
  min-height: 18px;
  max-height: 18px;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--control, #dbe3ec);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
}

.system-company-capability input[role="switch"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgb(15 23 42 / 28%);
  transition: transform 120ms ease;
}

.system-company-capability input[role="switch"]:checked {
  border-color: var(--accent);
  background: var(--accent);
}

.system-company-capability input[role="switch"]:checked::after {
  transform: translateX(16px);
}

.system-company-capability input[role="switch"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.inline-select {
  display: grid;
  grid-template-columns: auto minmax(180px, 280px);
  align-items: center;
  justify-content: start;
  gap: 10px;
  margin: 0 0 10px;
  font-weight: 800;
}

.company-settings-panel {
  overflow: hidden;
}

.company-settings-form {
  display: grid;
  gap: 12px;
}

.company-settings-form label {
  display: grid;
  grid-template-columns: minmax(130px, 0.45fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px 14px;
  margin: 0;
  min-width: 0;
}

.company-settings-form select {
  width: 100%;
  min-width: 0;
}

.company-settings-form small {
  grid-column: 2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.working-days-field {
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.working-days-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px 12px;
}

.working-days-grid .check-row {
  display: flex;
  grid-template-columns: none;
  margin: 0;
  min-width: 0;
}

.company-settings-form .working-days-grid .check-row {
  display: flex;
  grid-template-columns: none;
  align-items: center;
}

.company-settings-form .modal-actions {
  margin-top: 2px;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fc;
}

.user-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.mini {
  min-height: 28px;
  padding: 0 9px;
  font-size: 12px;
}

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

.user-row strong,
.user-row span,
.user-row small {
  display: block;
}

.user-row > div:first-child span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.user-row > div:first-child small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.group-pill {
  border-radius: 999px;
  background: #e6f3f2;
  color: var(--accent);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
}

fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0;
  padding: 12px;
}

legend {
  padding: 0 6px;
  font-weight: 800;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-weight: 500;
}

.check-row input {
  min-height: 0;
}

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

.admin-list > div,
.admin-list > .admin-project-row,
.project-settings-row,
.archived-project-row {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f7f9fc;
}

.admin-project-row,
.project-settings-row > summary,
.archived-project-row {
  grid-template-columns: minmax(0, 1fr) auto 12px;
  align-items: center;
  gap: 10px;
}

.archived-project-row {
  grid-template-columns: minmax(0, 1fr) auto;
  opacity: 0.92;
}

.archived-project-row strong,
.archived-project-row span {
  display: block;
}

.archived-project-list {
  margin-top: 8px;
}

.project-settings-row > summary {
  display: grid;
  cursor: pointer;
  list-style: none;
  margin: 0;
}

.project-settings-row > summary::-webkit-details-marker {
  display: none;
}

.project-settings-row > summary::marker {
  content: "";
}

.project-settings-row > summary::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid var(--muted);
}

.project-settings-row[open] > summary::after {
  border-top: 0;
  border-bottom: 7px solid var(--muted);
}

.project-settings-row[open] > summary {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}

.milestone-form,
.manpower-form {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.milestone-form h3,
.manpower-form h3 {
  margin: 0;
  font-size: 16px;
}

.milestone-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.manpower-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.manpower-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.manpower-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
  font-weight: 800;
}

.manpower-grid select {
  width: 100%;
  min-width: 0;
}

.manpower-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.admin-list span {
  color: var(--muted);
  font-size: 13px;
}

.workspace {
  min-width: 0;
  padding: 18px;
  overflow: auto;
}

.project-workspace {
  min-height: calc(100vh - 56px);
  background-color: var(--board-bg);
  background-image:
    linear-gradient(rgba(74, 153, 190, 0.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 153, 190, 0.13) 1px, transparent 1px);
  background-size: 46px 46px;
  color: #e7f1f8;
}

.project-page-shell {
  display: grid;
  gap: 14px;
}

.desktop-project-body {
  display: grid;
  gap: 14px;
}

.mobile-project-shell {
  display: none;
}

body.desktop-v2-mode {
  --desktop-v2-topbar-height: clamp(42px, 5dvh, 52px);
  overflow: hidden;
}

body.desktop-v2-mode.admin-page-mode {
  overflow-y: auto;
}

body.desktop-v2-mode.admin-page-mode .admin-shell {
  min-height: calc(100dvh - var(--desktop-v2-topbar-height));
  height: auto;
  overflow: visible;
}

body.desktop-v2-mode.admin-page-mode .admin-layout {
  height: auto;
  overflow: visible;
}

body.desktop-v2-mode.admin-page-mode .admin-column {
  overflow: visible;
}

body.desktop-v2-mode .topbar {
  min-height: var(--desktop-v2-topbar-height);
  height: var(--desktop-v2-topbar-height);
  padding: 3px 14px;
  z-index: 35;
}

body.desktop-v2-mode .brand-button img {
  max-height: clamp(30px, 4dvh, 38px);
}

body.desktop-v2-mode .topbar .icon-button,
body.desktop-v2-mode .topbar .ghost {
  min-height: clamp(30px, 4dvh, 38px);
}

body.desktop-v2-mode .project-workspace {
  min-height: calc(100dvh - var(--desktop-v2-topbar-height));
  height: calc(100dvh - var(--desktop-v2-topbar-height));
  overflow: hidden;
  background-color: #101b2c;
  background-image: none;
}

body.plan-expanded-mode .topbar,
body.desktop-v2-mode.plan-expanded-mode .topbar {
  display: none;
}

body.desktop-v2-mode.progress-graph-open .topbar,
body.desktop-v2-mode.progress-graph-open .mobile-project-tabs {
  display: none;
}

body.plan-expanded-mode .project-workspace,
body.desktop-v2-mode.plan-expanded-mode .project-workspace {
  min-height: 100dvh;
  height: 100dvh;
}

body.desktop-v2-mode .project-workspace.workspace {
  padding: 0;
}

body.desktop-v2-mode .project-page-shell.mobile-layout-active {
  width: min(2040px, calc(100vw - 20px));
  height: 100%;
  max-width: none;
  margin: 0 auto;
  gap: 0;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

body.desktop-v2-mode .mobile-project-shell {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 6px 0 10px;
}

body.desktop-v2-mode .mobile-project-tabs {
  position: fixed;
  top: 8px;
  right: 220px;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: min(520px, calc(100vw - 650px));
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
}

body.desktop-v2-mode .mobile-project-tabs button {
  min-height: 28px;
  padding: 0 6px;
  border: 1px solid rgba(96, 165, 250, 0.12);
  border-radius: 8px;
  background: #202b40;
  color: #f8fbff;
  font-size: 12px;
  font-weight: 900;
}

body.desktop-v2-mode .mobile-project-tabs button.active {
  border-color: rgba(52, 211, 153, 0.64);
  background: #34d399;
  color: #09231d;
}

body.desktop-v2-mode .mobile-project-panel {
  display: none;
}

body.desktop-v2-mode .mobile-project-panel.active {
  display: grid;
  gap: 10px;
  height: 100%;
  min-height: 0;
}

body.desktop-v2-mode .mobile-project-panel[data-mobile-project-panel="overview"].active {
  grid-template-columns: clamp(280px, 17vw, 340px) minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
}

body.desktop-v2-mode .desktop-v2-left-rail {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
  align-self: stretch;
  height: 100%;
  min-height: 0;
  max-height: 100%;
}

body.desktop-v2-mode .desktop-v2-drawings-section {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

body.desktop-v2-mode .desktop-v2-drawings-section.no-toolbar {
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  padding: 8px;
  border: 1px solid rgba(113, 161, 201, 0.18);
  border-radius: 10px;
  background: #142537;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 18px 46px rgba(2, 8, 23, 0.2);
}

body.desktop-v2-mode .mobile-project-panel[data-mobile-project-panel="history"].active {
  grid-template-columns: var(--desktop-v2-history-table-width, minmax(280px, 21vw)) 10px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
}

body.desktop-v2-mode .mobile-project-panel[data-mobile-project-panel="photos"].active {
  display: block;
  overflow: hidden;
}

.desktop-v2-history-table-pane,
.desktop-v2-history-graph-pane {
  min-width: 0;
  min-height: 0;
}

body.desktop-v2-mode .desktop-v2-history-table-pane,
body.desktop-v2-mode .desktop-v2-history-graph-pane {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  height: 100%;
  min-height: 0;
}

body:not(.desktop-v2-mode) .desktop-v2-history-table-pane,
body:not(.desktop-v2-mode) .desktop-v2-history-graph-pane {
  display: contents;
}

.desktop-v2-history-resizer {
  display: none;
}

body.desktop-v2-mode .desktop-v2-history-resizer {
  display: block;
  align-self: stretch;
  min-width: 10px;
  border-radius: 999px;
  cursor: col-resize;
  position: relative;
  touch-action: none;
}

body.desktop-v2-mode .desktop-v2-history-resizer::before {
  content: "";
  position: absolute;
  inset: 8px 4px;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.18);
  opacity: 0.65;
  transition: opacity 0.16s ease, background 0.16s ease;
}

body.desktop-v2-mode .desktop-v2-history-resizer:hover::before,
body.desktop-v2-mode .desktop-v2-history-resizer:focus-visible::before,
body.desktop-v2-mode .desktop-v2-history-resizer.is-dragging::before {
  background: rgba(52, 211, 153, 0.55);
  opacity: 1;
}

body.desktop-v2-mode .mobile-summary-strip {
  display: block;
  grid-column: auto;
  width: 100%;
}

body.desktop-v2-mode .mobile-summary-strip .project-summary-meter,
body.desktop-v2-mode .quick-floor-panel,
body.desktop-v2-mode .mobile-project-panel .project-toolbar {
  border-color: rgba(96, 165, 250, 0.12);
  border-radius: 8px;
  background: #172337;
  box-shadow: none;
}

body.desktop-v2-mode .mobile-summary-strip .project-summary-meter {
  padding: 10px;
  gap: 6px;
}

body.desktop-v2-mode .mobile-summary-strip .project-summary-main {
  align-items: flex-start;
  gap: 6px;
}

body.desktop-v2-mode .mobile-summary-strip .project-summary-main strong {
  color: #34d399;
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 900;
  line-height: 0.96;
}

body.desktop-v2-mode .mobile-summary-strip .project-summary-main span {
  margin-top: 4px;
  color: #d7e2ee;
  font-size: clamp(10px, 0.82vw, 13px);
  line-height: 1.2;
  white-space: normal;
}

body.desktop-v2-mode .mobile-summary-strip .project-summary-main .project-summary-stat-line {
  display: block;
  white-space: nowrap;
}

body.desktop-v2-mode .mobile-summary-strip .project-summary-main .project-summary-drawings-line {
  display: block;
  margin-top: 1px;
  color: #a8bad0;
  white-space: nowrap;
}

body.desktop-v2-mode .mobile-summary-strip .project-graph-button {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
  border: 1px solid rgba(96, 165, 250, 0.12);
  border-radius: 8px;
  background: #202b40;
  color: #f8fbff;
}

body.desktop-v2-mode .project-summary-strip .today-stats {
  gap: 6px;
}

body.desktop-v2-mode .project-summary-strip .today-stats span,
body.desktop-v2-mode .project-summary-strip .today-stats .today-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

body.desktop-v2-mode .project-summary-strip .today-stats .today-pill-tiles {
  color: #34d399;
  background: #064e3b;
}

body.desktop-v2-mode .project-summary-strip .today-stats .today-pill-photos {
  color: #60a5fa;
  background: #1e3a8a;
}

body.desktop-v2-mode .project-summary-strip .today-stats .today-pill-progress,
body.desktop-v2-mode .project-summary-strip .today-stats .today-pill-progress.positive {
  color: #fbbf24;
  background: #78350f;
}

body.desktop-v2-mode .project-summary-strip .today-stats .today-pill-progress.negative {
  color: #f87171;
  background: #7f1d1d;
}

body.desktop-v2-mode .project-summary-bars {
  gap: 5px;
  margin-top: 0;
}

body.desktop-v2-mode .project-summary-bars .progress-track {
  height: 8px;
  border-radius: 999px;
}

body.desktop-v2-mode .project-summary-bars .progress-track strong {
  display: none;
}

body.desktop-v2-mode .project-summary-bars .schedule-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.desktop-v2-mode .project-summary-bars .schedule-track {
  height: 7px;
  border-radius: 999px;
}

body.desktop-v2-mode .project-summary-bars .schedule-meta {
  order: -1;
  grid-template-columns: auto 1fr auto;
  gap: 4px;
  font-size: 0;
}

body.desktop-v2-mode .project-summary-bars .schedule-meta strong {
  color: #d7e2ee;
  font-size: 13px;
  text-align: center;
}

body.desktop-v2-mode .project-summary-bars .schedule-meta strong::before {
  content: "Milestone schedule ";
}

body.desktop-v2-mode .project-summary-bars .schedule-meta span {
  display: none;
}

body.desktop-v2-mode .quick-floor-panel {
  --quick-row-height: clamp(13px, calc((100dvh - 320px) / var(--quick-floor-count)), 24px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 3px;
  padding: 8px 10px;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

body.desktop-v2-mode .quick-floor-head {
  justify-content: flex-end;
}

body.desktop-v2-mode .quick-floor-actions {
  width: 100%;
  justify-content: space-between;
}

body.desktop-v2-mode .quick-floor-actions .quick-floor-mode,
body.desktop-v2-mode .quick-floor-actions .icon-button {
  min-height: clamp(20px, calc(var(--quick-row-height) + 4px), 24px);
  padding: 0 8px;
  font-size: clamp(10px, calc(var(--quick-row-height) * 0.5), 12px);
}

body.desktop-v2-mode .quick-floor-add-button {
  min-height: clamp(20px, calc(var(--quick-row-height) + 4px), 24px);
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: #e8eef7;
  color: #0f172a;
  font-size: clamp(10px, calc(var(--quick-row-height) * 0.5), 12px);
  font-weight: 900;
  white-space: nowrap;
}

body.desktop-v2-mode .quick-floor-list {
  grid-template-columns: 1fr;
  column-gap: 0;
  row-gap: 0;
  align-items: stretch;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

body.desktop-v2-mode .quick-floor-column,
body.desktop-v2-mode .quick-floor-auto-list,
body.desktop-v2-mode .quick-floor-group {
  gap: 0;
}

body.desktop-v2-mode .quick-floor-column {
  display: flex;
  flex-direction: column;
  justify-content: start;
  align-self: stretch;
  height: 100%;
  min-height: 0;
}

body.desktop-v2-mode .quick-floor-row {
  grid-template-columns: clamp(92px, 6.4vw, 104px) minmax(0, 1fr) clamp(44px, 4.2vw, 56px);
  flex: 0 0 var(--quick-row-height);
  gap: 0;
  height: var(--quick-row-height);
  min-height: var(--quick-row-height);
  max-height: var(--quick-row-height);
  overflow: hidden;
}

body.desktop-v2-mode .quick-floor-name,
body.desktop-v2-mode .quick-floor-percent {
  font-size: clamp(9px, calc(var(--quick-row-height) * 0.56), 12px);
  line-height: 1.1;
}

body.desktop-v2-mode .quick-floor-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.desktop-v2-mode .quick-floor-track {
  height: clamp(5px, calc(var(--quick-row-height) * 0.38), 8px);
  min-height: clamp(5px, calc(var(--quick-row-height) * 0.38), 8px);
  margin: 0 clamp(9px, 0.8vw, 13px) 0 0;
}

body.desktop-v2-mode .mobile-history-panel .progress-history-table {
  margin-top: 0;
  border-color: rgba(96, 165, 250, 0.12);
  border-radius: 0;
  background: #172337;
  height: 100%;
  max-height: none;
  overflow: auto;
  min-width: 0;
}

body.desktop-v2-mode .mobile-history-panel .progress-history-row {
  grid-template-columns: 0.78fr 1.05fr 1.08fr 0.72fr 0.9fr;
  border-color: rgba(96, 165, 250, 0.12);
}

body.desktop-v2-mode .mobile-history-panel .progress-history-table.has-manpower-column {
  min-width: 390px;
}

body.desktop-v2-mode .mobile-history-panel .progress-history-table.has-manpower-column .progress-history-row {
  grid-template-columns: minmax(40px, 0.68fr) minmax(56px, 0.92fr) minmax(56px, 0.92fr) minmax(36px, 0.58fr) minmax(42px, 0.68fr) minmax(46px, 0.72fr) minmax(52px, 0.8fr);
}

body.desktop-v2-mode .mobile-history-panel .progress-history-row.head {
  background: rgba(39, 52, 80, 0.96);
}

body.desktop-v2-mode .mobile-history-panel .progress-history-row span {
  padding: 12px 5px;
  border-color: rgba(96, 165, 250, 0.12);
  color: #f8fbff;
  font-size: 14px;
  line-height: 1;
  text-align: center;
}

body.desktop-v2-mode .mobile-history-panel .history-pill {
  padding: 0;
  border-radius: 0;
  background: transparent;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}

body.desktop-v2-mode .mobile-history-panel .progress-history-row.head span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 900;
}

body.desktop-v2-mode .mobile-history-panel .progress-history-table.has-manpower-column .progress-history-row span:last-child {
  padding-right: 10px;
  padding-left: 7px;
}

body.desktop-v2-mode .mobile-history-panel .history-pill.progress,
body.desktop-v2-mode .mobile-history-panel .history-pill.tiles {
  color: #34d399;
}

body.desktop-v2-mode .mobile-history-panel .history-pill.daily {
  color: #f8fbff;
}

body.desktop-v2-mode .mobile-history-panel .history-pill.daily.positive {
  color: #fbbf24;
}

body.desktop-v2-mode .mobile-history-panel .history-pill.daily.negative {
  color: #f87171;
}

body.desktop-v2-mode .mobile-history-panel .history-pill.photos {
  color: #60a5fa;
}

body.desktop-v2-mode .mobile-history-panel .history-pill.staff {
  color: #c4b5fd;
}

body.desktop-v2-mode .mobile-history-panel .history-pill.subcon {
  color: #f9a8d4;
}

body.desktop-v2-mode .mobile-history-panel .mobile-history-graph-card {
  position: static;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-top: 0;
  padding: 10px;
  border: 1px solid rgba(96, 165, 250, 0.14);
  border-radius: 8px;
  background: #172337;
  min-width: 0;
  overflow: hidden;
}

body.desktop-v2-mode .mobile-history-panel .mobile-history-graph {
  display: block;
  width: 100%;
  height: clamp(220px, 38vh, 360px);
  min-width: 0;
  border-radius: 4px;
  background: #fff;
}

body.desktop-v2-mode .mobile-history-panel .interactive-history-graph-card .graph-filter-list {
  display: none;
}

body.desktop-v2-mode .mobile-history-panel .interactive-history-graph-card .graph-zoom-controls {
  flex: 0 0 auto;
  margin: 0 0 6px;
}

body.desktop-v2-mode .mobile-history-panel .interactive-history-graph-card .progress-graph-stage {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}

body.desktop-v2-mode .mobile-history-panel .interactive-history-graph-card .progress-graph {
  height: 100%;
}

body.desktop-v2-mode .mobile-project-panel .drawing-overview {
  --desktop-v2-drawing-thumb-width: clamp(58px, 4.8vw, 70px);
  --desktop-v2-drawing-meta-min-width: 72px;
  --desktop-v2-drawing-action-width: 64px;
  --desktop-v2-drawing-card-gap: clamp(5px, 0.45vw, 6px);
  --desktop-v2-drawing-card-padding: clamp(5px, 0.45vw, 6px);
  --desktop-v2-drawing-preview-height: clamp(62px, 6vw, 78px);
  --desktop-v2-drawing-title-font-size: clamp(11px, 0.95vw, 14px);
  --desktop-v2-drawing-count-font-size: clamp(9px, 0.78vw, 11px);
  --desktop-v2-drawing-action-font-size: clamp(8px, 0.72vw, 10px);
  --desktop-v2-drawing-pill-font-size: clamp(6px, 0.52vw, 7px);
  --desktop-v2-drawing-pill-min-height: 15px;
  --desktop-v2-drawing-pill-width: clamp(30px, 2.7vw, 36px);
  --desktop-v2-drawing-card-content-width: calc(
    var(--desktop-v2-drawing-thumb-width) +
    var(--desktop-v2-drawing-meta-min-width) +
    var(--desktop-v2-drawing-action-width) +
    (var(--desktop-v2-drawing-card-gap) * 2) +
    (var(--desktop-v2-drawing-card-padding) * 2)
  );
  --desktop-v2-drawing-card-width: clamp(var(--desktop-v2-drawing-card-content-width), 15.5vw, 304px);
  --desktop-v2-drawing-card-layout-width: var(--desktop-v2-drawing-card-width);
  --desktop-v2-drawing-card-layout-height: var(--desktop-v2-drawing-card-min-height);
  --desktop-v2-drawing-card-min-height: clamp(78px, 7vw, 92px);
  display: grid;
  grid-template-columns: repeat(var(--desktop-v2-drawing-columns, 1), var(--desktop-v2-drawing-card-layout-width));
  grid-template-rows: repeat(var(--desktop-v2-drawing-rows, 1), var(--desktop-v2-drawing-card-layout-height));
  grid-auto-flow: column;
  gap: 8px;
  align-content: start;
  align-items: start;
  justify-content: stretch;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body.desktop-v2-mode .mobile-project-panel .drawing-card {
  flex: 0 0 auto;
  width: var(--desktop-v2-drawing-card-layout-width);
  grid-template-columns:
    var(--desktop-v2-drawing-thumb-width)
    minmax(var(--desktop-v2-drawing-meta-min-width), 1fr)
    var(--desktop-v2-drawing-action-width);
  grid-template-rows: minmax(clamp(62px, 6vw, 78px), auto);
  align-items: center;
  align-self: start;
  min-height: var(--desktop-v2-drawing-card-min-height);
  height: var(--desktop-v2-drawing-card-layout-height);
  gap: var(--desktop-v2-drawing-card-gap);
  padding: var(--desktop-v2-drawing-card-padding);
  border-color: rgba(133, 161, 193, 0.2);
  border-radius: 8px;
  background: #223144;
  min-width: 0;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 8px 18px rgba(2, 8, 23, 0.2);
  transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

body.desktop-v2-mode .mobile-project-panel .drawing-card.daily-change-tile::after,
body.desktop-v2-mode .mobile-project-panel .drawing-card.daily-change-photo::after,
body.desktop-v2-mode .mobile-project-panel .drawing-card.daily-change-both::after {
  border-top-width: 26px;
  border-left-width: 26px;
  filter: saturate(0.75);
  opacity: 0.82;
}

body.desktop-v2-mode .mobile-project-panel .drawing-card:hover,
body.desktop-v2-mode .mobile-project-panel .drawing-card:focus-within {
  border-color: rgba(122, 190, 226, 0.38);
  background: #26364a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    0 12px 24px rgba(2, 8, 23, 0.28);
}

body.desktop-v2-mode .mobile-project-panel .drawing-open {
  grid-column: 1;
  grid-row: 1;
  align-self: stretch;
  min-width: 0;
  min-height: 0;
  padding: 0;
}

body.desktop-v2-mode .mobile-project-panel .drawing-preview {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: var(--desktop-v2-drawing-preview-height);
  min-height: 0;
  border-radius: 0;
}

body.desktop-v2-mode .mobile-project-panel .drawing-thumb-pills {
  position: absolute;
  left: 3px;
  right: 3px;
  bottom: 4px;
  display: flex;
  justify-content: flex-end;
  gap: 2px;
  align-items: center;
  z-index: 4;
}

body.desktop-v2-mode .mobile-project-panel .drawing-thumb-pills.has-daily-progress {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
}

body.desktop-v2-mode .mobile-project-panel .drawing-thumb-pills .today-progress-pill,
body.desktop-v2-mode .mobile-project-panel .drawing-thumb-progress-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 var(--desktop-v2-drawing-pill-width);
  width: var(--desktop-v2-drawing-pill-width);
  max-width: 100%;
  min-width: 0;
  min-height: var(--desktop-v2-drawing-pill-min-height);
  padding: 2px 1px;
  border-radius: 6px;
  overflow: hidden;
  font-size: var(--desktop-v2-drawing-pill-font-size);
  font-weight: 900;
  line-height: 1;
  text-align: center;
  letter-spacing: 0;
  text-overflow: clip;
  white-space: nowrap;
}

body.desktop-v2-mode .mobile-project-panel .drawing-thumb-pills.has-daily-progress .today-progress-pill,
body.desktop-v2-mode .mobile-project-panel .drawing-thumb-pills.has-daily-progress .drawing-thumb-progress-pill {
  width: 100%;
  flex-basis: auto;
}

body.desktop-v2-mode .mobile-project-panel .drawing-thumb-pills .today-progress-pill {
  color: #fbbf24;
  background: #78350f;
  border-color: transparent;
  box-shadow: none;
}

body.desktop-v2-mode .mobile-project-panel .drawing-thumb-pills .today-progress-pill.negative {
  color: #f87171;
  background: #7f1d1d;
  border-color: transparent;
}

body.desktop-v2-mode .mobile-project-panel .drawing-thumb-progress-pill {
  background: #064e3b;
  color: #34d399;
  box-shadow: none;
}

body.desktop-v2-mode .mobile-project-panel .drawing-meta {
  min-width: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding-left: 0;
}

body.desktop-v2-mode .mobile-project-panel .drawing-meta h2 {
  display: -webkit-box;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #f8fbff;
  font-size: var(--desktop-v2-drawing-title-font-size);
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: normal;
  word-break: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

body.desktop-v2-mode .mobile-project-panel .drawing-tile-count {
  margin: 0;
  color: #cbd5e1;
  font-size: var(--desktop-v2-drawing-count-font-size);
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

body.desktop-v2-mode .mobile-project-panel .drawing-meta-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
}

body.desktop-v2-mode .mobile-project-panel .drawing-meta-actions .icon-mini,
body.desktop-v2-mode .mobile-project-panel .drawing-progress-inline {
  display: none;
}

body.desktop-v2-mode .mobile-project-panel .drawing-card-foot {
  display: grid;
  grid-column: 3;
  grid-row: 1;
  gap: 4px;
  align-self: center;
  width: var(--desktop-v2-drawing-action-width);
  min-width: 0;
  overflow: hidden;
}

body.desktop-v2-mode .mobile-project-panel .drawing-card-foot .mini {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: clamp(18px, calc(var(--desktop-v2-drawing-card-layout-height) * 0.24), 23px);
  padding: 0 3px;
  border: 1px solid rgba(151, 178, 212, 0.2);
  border-radius: 7px;
  background: rgba(30, 43, 61, 0.78);
  color: #dce8f6;
  font-size: var(--desktop-v2-drawing-action-font-size);
  font-weight: 900;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  box-shadow: none;
}

body.desktop-v2-mode .mobile-project-panel .drawing-card-foot .mini.danger {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(127, 29, 29, 0.12);
  color: #ff8b8b;
}

body.desktop-v2-mode .mobile-project-panel .project-toolbar {
  min-height: 36px;
  padding: 6px 10px;
}

body.desktop-v2-mode .mobile-project-panel .project-toolbar strong {
  font-size: 16px;
}

body.desktop-v2-mode .mobile-project-panel .project-toolbar span {
  font-size: 11px;
}

body.desktop-v2-mode .mobile-project-panel .project-toolbar button {
  min-height: 28px;
  padding: 0 12px;
  font-size: 12px;
}

body.desktop-v2-mode .mobile-photos-panel .project-photo-gallery-page {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 8px;
  height: 100%;
  min-height: 0;
  padding: 0;
  background: transparent;
  overflow: hidden;
}

body.desktop-v2-mode .mobile-photos-panel .project-photo-gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid rgba(96, 165, 250, 0.12);
  border-radius: 8px;
  background: #172337;
}

body.desktop-v2-mode .mobile-photos-panel .project-photo-gallery-head h2 {
  font-size: clamp(18px, 1.35vw, 24px);
  font-weight: 900;
}

body.desktop-v2-mode .mobile-photos-panel .project-photo-gallery-title > span {
  margin-top: 1px;
  color: #cbd5e1;
  font-size: clamp(11px, 0.85vw, 13px);
  font-weight: 800;
  white-space: nowrap;
}

body.desktop-v2-mode .mobile-photos-panel .project-photo-gallery-head-actions {
  flex: 0 0 auto;
  margin-left: auto;
}

body.desktop-v2-mode .mobile-photos-panel .project-photo-gallery-controls {
  grid-template-columns: 92px max-content 46px;
  justify-content: end;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body.desktop-v2-mode .mobile-photos-panel .project-photo-gallery-controls .quick-floor-mode,
body.desktop-v2-mode .mobile-photos-panel .project-photo-gallery-controls select,
body.desktop-v2-mode .mobile-photos-panel .gallery-level-button {
  min-height: 34px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

body.desktop-v2-mode .mobile-photos-panel .gallery-level-picker {
  width: max-content;
  max-width: min(320px, 32vw);
}

body.desktop-v2-mode .mobile-photos-panel .gallery-level-button {
  width: max-content;
  min-width: 150px;
  max-width: min(320px, 32vw);
}

body.desktop-v2-mode .mobile-photos-panel .project-photo-gallery-grid {
  --desktop-v2-photo-thumb-size: clamp(150px, 9vw, 210px);
  grid-template-columns: repeat(auto-fill, minmax(var(--desktop-v2-photo-thumb-size), var(--desktop-v2-photo-thumb-size)));
  grid-auto-rows: var(--desktop-v2-photo-thumb-size);
  grid-auto-flow: row;
  justify-content: start;
  gap: 8px;
  align-items: start;
  align-content: start;
  min-height: 0;
  padding: 0 2px 8px 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

body.desktop-v2-mode .mobile-photos-panel .project-photo-gallery-thumb {
  width: var(--desktop-v2-photo-thumb-size);
  height: var(--desktop-v2-photo-thumb-size);
  display: block;
  flex: 0 0 var(--desktop-v2-photo-thumb-size);
  min-height: 0;
  aspect-ratio: auto;
  border-radius: 8px;
  background: #172337;
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.12);
}

body.desktop-v2-mode .mobile-photos-panel .project-photo-gallery-thumb strong {
  left: 7px;
  bottom: 7px;
  width: max-content;
  max-width: calc(100% - 14px);
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 13px;
}

body.desktop-v2-mode .mobile-photos-panel .gallery-quick-scroll {
  display: none;
}

@media (min-width: 981px) and (max-width: 1400px) {
  body.desktop-v2-mode .mobile-project-panel[data-mobile-project-panel="overview"].active {
    grid-template-columns: clamp(238px, 18vw, 270px) minmax(0, 1fr);
  }

  body.desktop-v2-mode .mobile-project-panel .drawing-overview {
    --desktop-v2-drawing-thumb-width: clamp(70px, 6vw, 74px);
    --desktop-v2-drawing-meta-min-width: 72px;
    --desktop-v2-drawing-action-width: 64px;
    --desktop-v2-drawing-card-gap: 5px;
    --desktop-v2-drawing-card-padding: 5px;
    --desktop-v2-drawing-card-width: clamp(var(--desktop-v2-drawing-card-content-width), 23vw, 268px);
    --desktop-v2-drawing-card-layout-width: var(--desktop-v2-drawing-card-width);
  }

  body.desktop-v2-mode .mobile-project-panel .drawing-card {
    width: var(--desktop-v2-drawing-card-layout-width);
    grid-template-columns:
      var(--desktop-v2-drawing-thumb-width)
      minmax(var(--desktop-v2-drawing-meta-min-width), 1fr)
      var(--desktop-v2-drawing-action-width);
    gap: var(--desktop-v2-drawing-card-gap);
    padding: var(--desktop-v2-drawing-card-padding);
  }

  body.desktop-v2-mode .mobile-project-panel .drawing-preview {
    height: var(--desktop-v2-drawing-preview-height);
  }

  body.desktop-v2-mode .mobile-project-panel .drawing-card-foot {
    width: var(--desktop-v2-drawing-action-width);
  }

  body.desktop-v2-mode .mobile-project-panel .drawing-meta h2 {
    font-size: clamp(9px, 0.82vw, 11px);
  }

  body.desktop-v2-mode .mobile-project-panel .drawing-card-foot .mini {
    font-size: 9px;
    padding: 0 3px;
  }

  body.desktop-v2-mode .quick-floor-row {
    grid-template-columns: 74px minmax(0, 1fr) 42px;
  }

  body.desktop-v2-mode .quick-floor-name,
  body.desktop-v2-mode .quick-floor-percent {
    font-size: clamp(8px, calc(var(--quick-row-height) * 0.58), 10px);
  }
}

@media (max-width: 980px) {
  body.desktop-v2-mode .project-page-shell.mobile-layout-active {
    max-width: 760px;
  }

  body.desktop-v2-mode .mobile-project-tabs {
    max-width: none;
  }

  body.desktop-v2-mode .mobile-project-panel[data-mobile-project-panel="overview"].active,
  body.desktop-v2-mode .mobile-project-panel[data-mobile-project-panel="history"].active {
    grid-template-columns: 1fr;
  }

  body.desktop-v2-mode .desktop-v2-history-table-pane,
  body.desktop-v2-mode .desktop-v2-history-graph-pane {
    display: contents;
    height: auto;
  }

  body.desktop-v2-mode .desktop-v2-history-resizer {
    display: none;
  }

  body.desktop-v2-mode .quick-floor-list,
  body.desktop-v2-mode .mobile-project-panel .drawing-overview {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.desktop-v2-mode .mobile-project-panel .drawing-card {
    width: auto;
  }

  body.desktop-v2-mode .mobile-history-panel .progress-history-table {
    max-height: none;
    overflow: visible;
  }

  body.desktop-v2-mode .mobile-history-panel .mobile-history-graph-card {
    position: static;
  }
}

@media (max-height: 980px) {
  body.desktop-v2-mode .mobile-project-shell {
    padding-top: 4px;
    padding-bottom: 6px;
  }

  body.desktop-v2-mode .mobile-project-panel.active {
    gap: 8px;
  }

  body.desktop-v2-mode .desktop-v2-left-rail {
    gap: 6px;
  }

  body.desktop-v2-mode .mobile-summary-strip .project-summary-meter {
    padding: 7px 9px;
    gap: 4px;
  }

  body.desktop-v2-mode .mobile-summary-strip .project-summary-main strong {
    font-size: 34px;
  }

  body.desktop-v2-mode .mobile-summary-strip .project-summary-main span {
    margin-top: 2px;
    font-size: 12px;
  }

  body.desktop-v2-mode .mobile-summary-strip .project-graph-button {
    width: 30px;
    min-width: 30px;
    min-height: 30px;
  }

  body.desktop-v2-mode .project-summary-bars {
    gap: 2px;
  }

  body.desktop-v2-mode .project-summary-bars .progress-track,
  body.desktop-v2-mode .project-summary-bars .schedule-track {
    height: 6px;
  }

  body.desktop-v2-mode .project-summary-bars .schedule-meta strong {
    font-size: 11px;
  }

  body.desktop-v2-mode .quick-floor-panel {
    --quick-row-height: clamp(11px, calc((100dvh - 250px) / var(--quick-floor-count)), 20px);
    gap: 2px;
    padding: 6px 9px;
  }

  body.desktop-v2-mode .quick-floor-actions .quick-floor-mode,
  body.desktop-v2-mode .quick-floor-actions .icon-mini,
  body.desktop-v2-mode .quick-floor-add-button {
    min-height: 22px;
    padding: 0 7px;
    font-size: 10px;
  }

  body.desktop-v2-mode .quick-floor-actions .icon-mini {
    width: 30px;
    min-width: 30px;
    height: 30px;
  }

  body.desktop-v2-mode .quick-floor-name,
  body.desktop-v2-mode .quick-floor-percent {
    font-size: clamp(8px, calc(var(--quick-row-height) * 0.62), 11px);
  }

  body.desktop-v2-mode .quick-floor-track {
    height: clamp(4px, calc(var(--quick-row-height) * 0.34), 7px);
    min-height: clamp(4px, calc(var(--quick-row-height) * 0.34), 7px);
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.project-head,
.floor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.project-head {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(620px, 1.6fr) minmax(260px, 1fr);
  align-items: center;
  min-height: 112px;
  margin-bottom: 0;
  padding: 16px;
  border: 1px solid var(--board-line);
  border-radius: 8px;
  background: var(--board-panel);
  color: #f8fbff;
}

.project-workspace .project-title-block p,
.project-workspace .project-summary-main span,
.project-workspace .drawing-card p,
.project-workspace .drawing-card-foot p,
.project-workspace .project-toolbar > div,
.project-workspace .project-toolbar span {
  color: #9db4c9;
}

.project-title-block {
  min-width: 220px;
}

.project-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--board-line);
  border-radius: 8px;
  background: var(--board-panel);
  color: #f8fbff;
}

.project-toolbar > div {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.project-toolbar strong {
  color: #ffffff;
  font-size: 20px;
}

.project-weight-panel {
  margin: 0;
}

.floor-weight-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.phase-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.phase-editor-head span {
  font-size: 13px;
  font-weight: 800;
}

.phase-editor-head .ok {
  color: var(--teal);
}

.phase-editor-head .bad {
  color: #b42318;
}

.phase-list {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
}

.phase-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 120px auto;
  align-items: end;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.phase-row label {
  margin: 0;
  gap: 4px;
  font-size: 12px;
  font-weight: 800;
}

.phase-row input {
  min-height: 34px;
  padding: 0 9px;
}

.floor-weight-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.floor-weight-row input {
  width: 70px;
  min-height: 32px;
  padding: 0 8px;
}

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

.quick-floor-panel {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  color: #f8fbff;
  background: var(--board-panel);
  border: 1px solid var(--board-line);
  border-radius: 8px;
}

.quick-floor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quick-floor-head h2 {
  margin: 0;
  font-size: 1rem;
}

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

.quick-floor-mode-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.quick-floor-mode {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(96, 165, 250, 0.14);
  border-radius: 8px;
  background: rgba(30, 42, 64, 0.94);
  color: #f8fbff;
  font-size: 12px;
  font-weight: 900;
}

.quick-floor-mode.active {
  border-color: rgba(52, 211, 153, 0.64);
  background: #34d399;
  color: #09231d;
}

.quick-floor-actions .icon-mini {
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(96, 165, 250, 0.24);
  border-radius: 8px;
  background: rgba(15, 32, 52, 0.74);
  color: var(--teal);
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1;
  opacity: 1;
}

.quick-floor-list {
  display: grid;
  grid-template-columns: repeat(var(--quick-floor-columns, 3), minmax(0, 1fr));
  gap: 8px 56px;
  align-items: start;
}

.quick-floor-column {
  display: grid;
  gap: 8px;
  align-content: start;
  min-width: 0;
}

.quick-floor-row {
  display: grid;
  grid-template-columns: minmax(82px, 94px) minmax(110px, 1fr) 46px;
  align-items: center;
  column-gap: 6px;
  row-gap: 8px;
  min-height: 26px;
}

.quick-floor-name {
  overflow: hidden;
  color: #f8fbff;
  font-size: 0.86rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-floor-track {
  position: relative;
  display: block;
  height: 12px;
  min-height: 12px;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.28);
  cursor: pointer;
}

.quick-floor-track:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.quick-floor-fill {
  position: absolute;
  inset: 0 auto 0 0;
  min-width: 0;
  overflow: hidden;
  border-radius: inherit;
  background: #60a5fa;
}

.quick-floor-tip {
  position: absolute;
  inset: 0 0 0 auto;
  min-width: 7px;
  border-radius: 0 999px 999px 0;
  background: #d97706;
}

.quick-floor-tip.negative {
  background: #ef4444;
}

.quick-floor-percent {
  color: #62e6ff;
  font-size: 0.86rem;
  font-weight: 900;
  text-align: right;
  text-shadow: 0 0 10px rgba(98, 230, 255, 0.22);
  white-space: nowrap;
}

.quick-floor-auto-list {
  display: grid;
  gap: 12px;
}

.quick-floor-group {
  display: grid;
  gap: 7px;
}

.quick-floor-group-title {
  display: block;
  padding: 4px 0 1px;
  color: #facc15;
  font-size: 15px;
  font-weight: 900;
}

@media (max-width: 1120px) {
  .quick-floor-list {
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  }
}

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

.drawing-card {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 10px;
  width: 100%;
  min-height: 320px;
  padding: 10px;
  color: #f8fbff;
  background: var(--board-panel);
  border: 1px solid var(--board-line);
  border-radius: 8px;
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.drawing-card.active,
.drawing-card:hover,
.drawing-card:focus-within {
  border-color: rgba(95, 212, 236, 0.85);
  box-shadow: 0 10px 28px rgba(0, 124, 120, 0.18);
  outline: none;
}

.drawing-card.daily-change-tile::after,
.drawing-card.daily-change-photo::after,
.drawing-card.daily-change-both::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-top: 34px solid var(--daily-dogear);
  border-left: 34px solid transparent;
  filter: drop-shadow(0 0 5px rgba(255, 0, 51, 0.9));
  z-index: 4;
  pointer-events: none;
}

.drawing-card.active {
  border-width: 2px;
}

.drawing-open {
  display: block;
  width: 100%;
  min-height: 0;
  padding: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  overflow: hidden;
}

.drawing-preview {
  position: relative;
  height: 238px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    linear-gradient(45deg, rgba(216, 222, 232, 0.55) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(216, 222, 232, 0.55) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(216, 222, 232, 0.55) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(216, 222, 232, 0.55) 75%),
    #eef2f7;
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.drawing-preview img,
.drawing-preview canvas,
.thumbnail-tile-layer {
  position: absolute;
}

.drawing-preview img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0;
}

.drawing-preview img.loaded {
  opacity: 1;
}

.drawing-preview canvas.hidden {
  display: none;
}

.thumbnail-tile-layer {
  z-index: 2;
}

.drawing-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 2px;
}

.drawing-meta h2,
.drawing-card p {
  margin: 0;
}

.drawing-meta-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.drawing-progress-inline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.today-progress-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(92, 35, 0, 0.94);
  border: 1px solid rgba(251, 191, 36, 0.58);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.32);
  font-size: 0.76rem;
  line-height: 1;
}

.today-progress-pill.negative {
  color: #f87171;
  background: #7f1d1d;
  border-color: rgba(248, 113, 113, 0.58);
}

.drawing-meta span {
  color: #5fd4ec;
  font-weight: 800;
}

.icon-mini {
  display: grid;
  place-items: center;
  width: 32px;
  min-width: 32px;
  min-height: 32px;
  padding: 0;
  line-height: 1;
}

.icon-mini:disabled {
  cursor: default;
  opacity: 0.35;
}

.drawing-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 2px;
}

.drawing-card-foot p,
.drawing-card-foot span {
  margin: 0;
}

.drawing-card-foot p {
  margin-right: auto;
}

.drawing-card-foot .mini {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
}

.floor-weight-control {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.floor-weight-control input {
  width: 72px;
  min-height: 32px;
  padding: 0 8px;
}

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

.project-head h1 {
  margin-bottom: 4px;
  font-size: clamp(24px, 4vw, 34px);
}

.project-head p,
.floor-head p {
  margin-bottom: 0;
  color: var(--muted);
}

.meter {
  min-width: 132px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  text-align: right;
}

.project-workspace .meter {
  background: rgba(10, 26, 40, 0.72);
  border-color: var(--board-line);
  color: #f8fbff;
}

.meter strong {
  display: block;
  font-size: 26px;
}

.status-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.project-summary-strip {
  display: grid;
  grid-template-columns: minmax(520px, 1fr);
  align-items: start;
  grid-column: 2;
  gap: 8px;
}

.project-summary-strip .meter {
  min-width: 0;
}

.project-summary-meter {
  display: grid;
  gap: 8px;
  padding: 8px;
  text-align: left;
}

.project-summary-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.project-summary-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.project-summary-main strong {
  display: block;
  font-size: 22px;
  line-height: 1;
}

.project-summary-main span {
  display: block;
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
}

.project-graph-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  min-width: 38px;
  padding-inline: 0;
}

.project-graph-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.progress-history-modal {
  width: min(760px, calc(100vw - 28px)) !important;
  max-height: calc(100vh - 48px);
  overflow: auto;
}

.progress-history-table {
  display: grid;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.progress-history-row {
  display: grid;
  grid-template-columns: 70px 112px 104px 84px 90px;
  align-items: center;
  min-width: 0;
  border-top: 1px solid var(--line);
}

.progress-history-table.has-manpower-column .progress-history-row {
  grid-template-columns: 70px 112px 104px 84px 90px 84px 90px;
}

.progress-history-row:first-child {
  border-top: 0;
}

.progress-history-row.head {
  background: color-mix(in srgb, var(--panel) 76%, var(--accent) 24%);
  font-weight: 800;
}

.progress-history-row span {
  min-width: 0;
  padding: 9px 8px;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  border-left: 1px solid var(--line);
}

.progress-history-row span:first-child {
  border-left: 0;
}

.history-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 900;
  line-height: 1.15;
}

button.history-pill {
  border: 0;
  cursor: pointer;
  font: inherit;
}

button.history-pill:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

button.history-pill:hover {
  filter: brightness(1.14);
}

.history-pill.progress,
.history-pill.tiles {
  color: #064e3b;
  background: rgba(73, 192, 132, 0.18);
}

.history-pill.daily {
  color: var(--ink);
  background: rgba(103, 116, 137, 0.14);
}

.history-pill.daily.positive {
  color: #7c4a03;
  background: rgba(220, 168, 72, 0.22);
}

.history-pill.daily.negative {
  color: #f87171;
  background: #7f1d1d;
}

.history-pill.photos {
  color: #075985;
  background: rgba(95, 212, 236, 0.20);
}

.history-pill.staff {
  color: #6d5dfc;
  background: rgba(167, 139, 250, 0.18);
}

.history-pill.subcon {
  color: #be185d;
  background: rgba(244, 114, 182, 0.18);
}

.manpower-roster-backdrop {
  padding: 0;
  background: rgba(2, 8, 23, 0.78);
}

.manpower-roster-modal {
  display: flex;
  flex-direction: column;
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  border-radius: 0;
  border: 0;
  background: #0f1c2f;
  color: #f8fbff;
  padding: 18px 24px;
}

.manpower-roster-modal .progress-graph-head {
  flex: 0 0 auto;
  border-bottom: 1px solid rgba(96, 165, 250, 0.16);
  padding-bottom: 12px;
}

.manpower-roster-modal .progress-graph-head h2 {
  color: #f8fbff;
}

.manpower-roster-modal .progress-graph-head p {
  color: #9fb3ca;
}

.manpower-roster-total {
  color: #34d399;
  font-weight: 900;
}

.manpower-roster-modal .progress-graph-head .ghost {
  border-color: rgba(148, 163, 184, 0.22);
  background: #24334a;
  color: #f8fbff;
}

.manpower-roster-modal .progress-graph-head .ghost:hover,
.manpower-roster-modal .progress-graph-head .ghost:focus-visible {
  background: #2d405d;
}

.manpower-roster-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: min(1280px, calc(100vw - 48px));
  margin-top: 6px;
}

.manpower-roster-summary[hidden] {
  display: none;
}

.manpower-roster-summary span,
.manpower-roster-summary button {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 999px;
  background: #172944;
  color: #9fb3ca;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  font-family: inherit;
  text-align: left;
  white-space: nowrap;
}

.manpower-roster-summary button {
  cursor: pointer;
}

.manpower-roster-summary button.active {
  border-color: #34d399;
  background: rgba(52, 211, 153, 0.15);
  box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.16);
}

.manpower-roster-summary strong {
  min-width: 0;
  overflow: hidden;
  color: #60a5fa;
  font-weight: 900;
  text-overflow: ellipsis;
}

.manpower-roster-summary em {
  color: #34d399;
  font-style: normal;
  font-weight: 900;
}

.manpower-roster-department-grid {
  display: grid;
  grid-template-columns: repeat(var(--manpower-department-count), minmax(190px, 1fr));
  align-items: start;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 12px;
  padding: 0 2px 4px 0;
  overflow: auto;
  scrollbar-color: rgba(148, 163, 184, 0.72) rgba(15, 28, 47, 0.84);
}

.manpower-roster-department-column {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.manpower-roster-department-column > header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 6px;
  background: #24334f;
}

.manpower-roster-department-column > header strong {
  min-width: 0;
  overflow: hidden;
  color: #60a5fa;
  font-size: 12px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manpower-roster-department-column > header em {
  color: #34d399;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.manpower-roster-department-workers {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.manpower-roster-compact-worker {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid rgba(96, 165, 250, 0.13);
  border-radius: 6px;
  background: #16243a;
}

.manpower-roster-compact-worker > strong {
  color: #f8fbff;
  font-size: 13px;
  line-height: 1.2;
}

.manpower-roster-compact-worker > span {
  font-size: 12px;
  line-height: 1.15;
}

.manpower-roster-modal [data-manpower-roster-body] {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.manpower-roster-modal .empty {
  color: #9fb3ca;
}

.manpower-roster-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-x: auto;
  overflow-y: auto;
  margin-top: 12px;
  padding-right: 2px;
  scrollbar-color: rgba(148, 163, 184, 0.72) rgba(15, 28, 47, 0.84);
}

.manpower-roster-table::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.manpower-roster-table::-webkit-scrollbar-track {
  background: rgba(15, 28, 47, 0.84);
  border-radius: 999px;
}

.manpower-roster-table::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.72);
  border-radius: 999px;
}

.manpower-roster-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  flex: 0 0 auto;
  min-width: 0;
  min-height: 0;
  padding: 12px 14px;
  border: 1px solid rgba(96, 165, 250, 0.13);
  border-radius: 6px;
  background: #16243a;
  color: #dbeafe;
  font-size: 14px;
  line-height: 1.2;
}

.manpower-roster-row.head {
  flex: 0 0 auto;
  min-height: 34px;
  border-color: rgba(96, 165, 250, 0.16);
  background: #24334f;
  color: #9fb3ca;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.manpower-roster-row span {
  min-width: 0;
  overflow: visible;
}

.manpower-roster-row strong {
  display: block;
  overflow: visible;
  color: #f8fbff;
  font-size: 14px;
  line-height: 1.2;
  white-space: normal;
}

.manpower-roster-detail {
  color: #9fb3ca;
  font-size: 13px;
  line-height: 1.25;
}

.manpower-roster-department {
  color: #60a5fa;
}

.manpower-roster-separator {
  color: #9fb3ca;
}

.manpower-roster-job {
  color: #f472b6;
}

@media (max-width: 720px) {
  .manpower-roster-modal {
    width: 100vw;
    max-width: none;
    height: 100vh;
    max-height: none;
    padding: 14px;
  }

  .manpower-roster-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    width: 100%;
    max-width: none;
    margin-top: 8px;
  }

  .manpower-roster-summary span,
  .manpower-roster-summary button {
    width: 100%;
    min-height: 26px;
    padding: 3px 8px;
    font-size: 11px;
    letter-spacing: 0;
  }

  .manpower-roster-summary strong {
    overflow: visible;
    text-overflow: clip;
  }

  .manpower-roster-summary em {
    justify-self: end;
  }

  .manpower-roster-row.head {
    display: none;
  }

  .manpower-roster-row span,
  .manpower-roster-row strong {
    white-space: normal;
  }
}

.project-summary-strip .today-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  height: auto;
}

.project-summary-strip .today-stats span {
  width: auto;
  min-width: 0;
  padding: 3px 8px;
  line-height: 1.2;
}

.project-summary-bars {
  display: grid;
  gap: 6px;
}

.project-summary-bars .progress-track {
  height: 16px;
}

.project-summary-bars .progress-track strong {
  left: 0;
  right: 0;
  width: 100%;
  justify-content: center;
  text-align: center;
  font-size: 11px;
}

.project-summary-bars .schedule-block {
  gap: 3px;
}

.project-summary-bars .schedule-track {
  height: 6px;
}

.project-summary-bars .schedule-meta {
  font-size: 10px;
  line-height: 1.2;
}

.project-summary-bars .schedule-meta strong {
  font-size: 11px;
}

.compact-status-row {
  grid-template-columns: repeat(4, minmax(88px, 1fr));
  margin: 0;
}

.status-row div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-workspace .status-row div {
  background: rgba(10, 26, 40, 0.72);
  border-color: var(--board-line);
  color: #f8fbff;
}

.status-row strong {
  margin-left: auto;
}

.compact-status-row div {
  min-height: 100%;
  padding: 8px;
  font-size: 13px;
  line-height: 1.15;
  min-width: 0;
  overflow: visible;
}

.compact-status-row .dot {
  width: 10px;
  height: 10px;
}

.dot {
  width: 13px;
  height: 13px;
  min-width: 13px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: inline-block;
}

.not_started {
  background-color: rgba(123, 134, 148, 0.55);
}

.first_fix {
  background-color: rgba(234, 179, 8, 0.6);
}

.pipe_installed {
  background-color: rgba(37, 99, 235, 0.56);
}

.brazed {
  background-color: rgba(22, 163, 74, 0.58);
}

.plan-viewport {
  max-width: 100%;
  max-height: calc(100vh - 280px);
  min-height: 480px;
  overflow: auto;
  border: 1px solid var(--line);
  background: #d9dee6;
}

.plan-viewport.plan-only:not(.expanded) {
  display: none;
}

.plan-viewport.expanded {
  position: fixed;
  inset: 0;
  z-index: 80;
  width: 100vw;
  height: 100vh;
  max-height: none;
  min-height: 0;
  padding: 10px;
  border: 0;
  background: #d9dee6;
  cursor: grab;
  user-select: none;
}

.plan-viewport.expanded.panning {
  cursor: grabbing;
}

.plan-viewport.expanded .plan-area {
  margin: 0 auto;
}

.plan-mode-bar {
  display: none;
}

.plan-viewport.expanded .plan-mode-bar {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 6;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  margin-bottom: 10px;
  padding: 4px;
  border-radius: 8px;
  background: rgba(244, 247, 251, 0.94);
  box-shadow: 0 8px 24px rgba(22, 31, 42, 0.16);
}

.plan-mode-bar .plan-zoom-label {
  min-width: 48px;
  text-align: center;
  font-weight: 700;
}

.icon-tool,
.lock-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  min-width: 48px;
  padding: 0;
}

.icon-tool svg,
.lock-button svg,
.hide-tiles-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hide-tiles-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.plan-legend {
  flex: 1 0 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 4px 6px 2px;
}

.plan-legend.hidden {
  display: none;
}

.plan-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
}

.plan-legend .dot {
  width: 10px;
  height: 10px;
  min-width: 10px;
}

.lock-button.active {
  background: #0f766e;
  color: #fff;
}

.tile-photo-panel {
  display: none;
}

.plan-viewport.expanded .tile-photo-panel {
  position: fixed;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 7;
  display: grid;
  grid-template-columns: minmax(160px, 260px) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: auto;
  max-height: 128px;
  overflow: hidden;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
}

.tile-photo-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.tile-photo-head strong,
.tile-photo-head span {
  display: block;
}

.tile-photo-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.photo-upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 8px;
  background: #007c78;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.26);
}

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

.plan-viewport.expanded .tile-photo-grid {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 0;
}

.plan-viewport.expanded .photo-thumb-wrap {
  flex: 0 0 auto;
  width: 62px;
}

.plan-viewport.expanded .tile-photo-grid .empty {
  margin: 0;
  white-space: nowrap;
}

.photo-upload-button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.photo-upload-button input {
  display: none;
}

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

.photo-thumb {
  position: relative;
  display: block;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
  overflow: hidden;
  touch-action: manipulation;
  text-align: left;
}

.photo-thumb.daily-change-photo::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-top: 11px solid var(--daily-dogear);
  border-left: 11px solid transparent;
  filter: drop-shadow(0 0 4px rgba(255, 0, 51, 0.9));
  z-index: 2;
  pointer-events: none;
}

.photo-thumb-wrap {
  position: relative;
  min-width: 0;
}

.photo-delete-button {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 22px;
  min-width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 999px;
  background: #b91c1c;
  color: #ffffff;
  font-size: 16px;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.28);
}

.tile-photo-grid img,
.photo-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.photo-thumb span {
  display: none;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.15;
}

.photo-user-overlay {
  position: absolute;
  left: 4px;
  bottom: 4px;
  max-width: calc(100% - 8px);
  padding: 2px 4px;
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.68);
  color: #ffffff;
  font-size: 10px;
  line-height: 1.1;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  z-index: 3;
}

.photo-user-overlay-large {
  left: 12px;
  bottom: 12px;
  max-width: min(360px, calc(100% - 24px));
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.2;
}

.photo-lightbox {
  z-index: 50;
  align-items: center;
  overflow: hidden;
  padding: 8px;
}

.photo-lightbox-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  width: calc(100vw - 16px);
  height: calc(100dvh - 16px);
  max-height: calc(100dvh - 16px);
  padding: 10px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.35);
}

.project-photo-gallery-backdrop {
  display: block;
  place-items: unset;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  background: #101b2c;
  overflow: hidden;
}

.project-photo-gallery-workspace {
  min-height: calc(100dvh - 64px);
  padding: 0;
  background: #101b2c;
  color: #f8fbff;
}

.project-photo-gallery-page {
  min-height: calc(100dvh - 64px);
  padding: max(12px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  background: #101b2c;
  color: #f8fbff;
}

.project-photo-gallery-modal {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  padding: max(12px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
  overflow: hidden;
  background: #101b2c;
  color: #f8fbff;
}

.project-photo-gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  min-width: 0;
}

.project-photo-gallery-title {
  min-width: 0;
}

.project-photo-gallery-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 420px;
  gap: 8px;
  margin-left: auto;
  min-width: 0;
}

.project-photo-gallery-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.05;
}

.project-photo-gallery-title > span {
  display: block;
  margin-top: 3px;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.15;
  white-space: normal;
}

.project-photo-gallery-head .ghost {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  background: #26334a;
  color: #f8fbff;
}

.project-photo-gallery-controls {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  min-width: 0;
}

.project-photo-gallery-head-actions .project-photo-gallery-controls {
  flex: 1 1 360px;
  margin-bottom: 0;
}

.project-photo-gallery-controls .quick-floor-mode {
  width: 100%;
  min-height: 36px;
  padding: 0 8px;
}

.gallery-level-picker {
  position: relative;
  min-width: 0;
}

.gallery-level-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  padding: 0 10px 0 12px;
  border: 1px solid rgba(96, 165, 250, 0.14);
  border-radius: 8px;
  background: #202b40;
  color: #f8fbff;
  text-align: left;
}

.gallery-level-button.active {
  background: #34d399;
  color: #09231d;
}

.gallery-level-button span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-level-caret {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.gallery-level-caret::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid currentColor;
}

.gallery-level-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 90;
  width: max-content;
  min-width: 100%;
  max-width: min(320px, 80vw);
  max-height: min(420px, 60dvh);
  padding: 6px;
  overflow-y: auto;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 8px;
  background: #172337;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
}

.gallery-level-menu.open {
  display: block;
}

.gallery-level-menu button {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 6px;
  background: transparent;
  color: #f8fbff;
  text-align: left;
  white-space: nowrap;
}

.gallery-level-menu button:hover,
.gallery-level-menu button:focus-visible {
  background: rgba(96, 165, 250, 0.16);
  outline: none;
}

.gallery-level-menu button.active {
  background: #34d399;
  color: #09231d;
}

.project-photo-gallery-controls select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(96, 165, 250, 0.14);
  border-radius: 8px;
  background: #34d399;
  color: #09231d;
  font-size: 14px;
  font-weight: 900;
}

.project-photo-gallery-controls select.is-inactive {
  border-color: rgba(96, 165, 250, 0.14);
  background: #202b40;
  color: #f8fbff;
}

.project-photo-gallery-controls .gallery-sort-button {
  min-width: 42px;
  padding: 0;
}

.project-photo-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 7px;
  min-height: 0;
  padding-bottom: 6px;
}

.gallery-quick-scroll {
  position: fixed;
  top: 0;
  right: max(4px, env(safe-area-inset-right));
  z-index: 80;
  width: 14px;
  min-width: 14px;
  height: 72px;
  min-height: 72px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.86);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.18), 0 8px 20px rgba(0, 0, 0, 0.32);
  opacity: 0;
  touch-action: none;
  transition: opacity 160ms ease;
}

.gallery-quick-scroll.visible {
  opacity: 1;
}

.project-photo-gallery-thumb {
  position: relative;
  display: block;
  min-height: 0;
  aspect-ratio: 1 / 1;
  padding: 0;
  overflow: hidden;
  border-radius: 0;
  background: #172337;
}

.project-photo-gallery-thumb.daily-change-photo::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-top: 24px solid var(--daily-dogear);
  border-left: 24px solid transparent;
  filter: drop-shadow(0 0 5px rgba(255, 0, 51, 0.9));
  z-index: 3;
}

.project-photo-gallery-thumb.daily-change-photo::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  z-index: 4;
  width: 0;
  height: 0;
  border-top: 22px solid rgba(255, 255, 255, 0.28);
  border-left: 22px solid transparent;
  pointer-events: none;
}

.project-photo-gallery-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  image-orientation: from-image;
}

.project-photo-gallery-thumb strong {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 4;
  width: max-content;
  max-width: calc(100% - 16px);
  padding: 7px 8px;
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  line-height: 1.05;
  text-align: left;
  overflow: hidden;
  word-break: break-word;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}

.project-photo-gallery-thumb.floor-tint-a strong {
  background: rgba(7, 12, 22, 0.68);
}

.project-photo-gallery-thumb.floor-tint-b strong {
  background: rgba(8, 78, 96, 0.72);
}

.project-photo-gallery-thumb strong span {
  display: block;
}

.drawing-thumb-pills {
  display: none;
}

@media (max-width: 700px) {
  .project-photo-gallery-head {
    gap: 8px;
    margin-bottom: 6px;
  }

  .project-photo-gallery-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
  }

  .project-photo-gallery-head h2 {
    min-width: 0;
    font-size: 24px;
    line-height: 1;
  }

  .project-photo-gallery-title > span {
    flex: 0 0 auto;
    margin-top: 0;
    font-size: 14px;
    line-height: 1;
    text-align: right;
    white-space: nowrap;
  }

  .project-photo-gallery-head-actions {
    flex: 1 1 100%;
    gap: 6px;
    width: 100%;
  }

  .project-photo-gallery-head .ghost {
    min-height: 34px;
    padding: 0 11px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 900;
  }

  .project-photo-gallery-head-actions .project-photo-gallery-controls {
    flex: 1 1 auto;
  }

  .project-photo-gallery-controls {
    grid-template-columns: 86px minmax(0, 1fr) 38px;
    gap: 6px;
  }

  .project-photo-gallery-controls .quick-floor-mode,
  .gallery-level-button {
    min-height: 34px;
    font-size: 13px;
  }

  .project-photo-gallery-controls [data-gallery-today-control] {
    padding-inline: 5px;
    white-space: nowrap;
  }

  .gallery-level-button {
    gap: 4px;
    padding: 0 4px 0 10px;
  }

  .gallery-level-button span:first-child {
    text-overflow: clip;
  }

  .gallery-level-caret {
    width: 24px;
    height: 24px;
  }

  .gallery-level-caret::before {
    border-left-width: 5px;
    border-right-width: 5px;
    border-top-width: 7px;
  }

  .project-photo-gallery-controls .gallery-sort-button {
    min-width: 38px;
  }
}

.photo-lightbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.photo-lightbox-meta,
.photo-lightbox-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.photo-lightbox-meta {
  flex: 1 1 auto;
}

.photo-lightbox-actions {
  flex: 0 0 auto;
}

.photo-lightbox-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.photo-lightbox-head .photo-lightbox-meta span {
  margin: 3px 0 0;
  font-weight: 700;
}

.photo-zoom-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.photo-zoom-button {
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
}

.photo-zoom-reset {
  min-width: 56px;
  min-height: 36px;
  padding: 0 8px;
}

.photo-rotate-button {
  min-height: 40px;
}

.photo-lightbox-body {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 10px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.photo-fit-frame {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: zoom-in;
  touch-action: none;
  user-select: none;
}

.photo-fit-frame.zoomed {
  cursor: grab;
}

.photo-fit-frame.panning {
  cursor: grabbing;
}

.photo-nav-button {
  width: 48px;
  min-width: 48px;
  padding: 0;
  font-size: 22px;
}

.photo-fit-frame img {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
  margin: 0 auto;
  border-radius: 6px;
  transform-origin: center center;
  transition: transform 120ms ease;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}

.plan-area {
  position: relative;
  overflow: hidden;
  background: #fff;
  touch-action: pan-x pan-y;
}

#planImage,
#pdfCanvas,
#tileLayer {
  position: absolute;
  inset: 0;
}

#planImage,
#pdfCanvas {
  user-select: none;
  -webkit-user-drag: none;
}

#planImage {
  display: none;
  object-fit: fill;
}

#planImage.loaded {
  display: block;
}

#pdfCanvas {
  display: block;
}

#tileLayer {
  z-index: 2;
}

.tile {
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.85);
  color: #071018;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
  padding: 2px;
  min-height: 0;
  font-size: 12px;
  overflow: hidden;
}

.tile.daily-change-tile::after,
.tile.daily-change-photo::after,
.tile.daily-change-both::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 0;
  height: 0;
  border-top: 16px solid var(--daily-dogear);
  border-left: 16px solid transparent;
  filter: drop-shadow(0 0 5px rgba(255, 0, 51, 0.9));
  z-index: 3;
  pointer-events: none;
}

.thumbnail-tile-layer .tile.daily-change-tile::after,
.thumbnail-tile-layer .tile.daily-change-photo::after,
.thumbnail-tile-layer .tile.daily-change-both::after {
  border-top-width: 9px;
  border-left-width: 9px;
}

.tile-label {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.tile-photo-marker {
  position: absolute;
  top: 4px;
  left: 4px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.35);
  pointer-events: none;
}

.tile-photo-marker svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.tile.compact-photo-marker .tile-photo-marker {
  width: 8px;
  height: 8px;
  top: 3px;
  left: 3px;
  background: #0ea5e9;
  border: 1px solid #fff;
}

.tile.compact-photo-marker .tile-photo-marker svg {
  display: none;
}

.tile.selected {
  border-color: #0f172a;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.55);
}

.thumbnail-tile-layer .tile {
  display: grid;
  place-items: center;
  border-width: 1px;
  font-size: 10px;
  pointer-events: none;
}

.add-mode {
  cursor: crosshair;
  touch-action: none;
}

.zoom-area-mode {
  cursor: zoom-in;
  touch-action: none;
}

.duplicate-mode {
  cursor: copy;
}

.delete-mode {
  cursor: not-allowed;
}

.delete-mode .tile {
  border-color: rgba(180, 35, 24, 0.9);
  box-shadow: 0 0 0 2px rgba(180, 35, 24, 0.25);
}

.tiles-hidden .tile {
  display: none;
}

.tiles-motion-hidden #tileLayer {
  visibility: hidden;
}

.tile-preview {
  position: absolute;
  z-index: 4;
  border: 2px dashed #0ea5e9;
  background: rgba(14, 165, 233, 0.16);
  pointer-events: none;
}

.zoom-preview {
  border-color: #7c3aed;
  background: rgba(124, 58, 237, 0.14);
}

.admin-box {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: grid;
  gap: 8px;
}

.wide {
  width: 100%;
}

.empty,
.welcome {
  color: var(--muted);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(11, 18, 28, 0.45);
}

.modal-backdrop.photo-lightbox {
  z-index: 80;
}

.modal-backdrop.graph-backdrop {
  z-index: 90;
}

.modal {
  width: min(440px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 18px 60px rgba(22, 31, 42, 0.22);
}

.modal-backdrop.manpower-roster-backdrop {
  top: var(--desktop-v2-topbar-height, 52px);
  align-items: stretch;
  justify-items: stretch;
  padding: 0;
  background: rgba(2, 8, 23, 0.78);
}

.modal.manpower-roster-modal {
  display: flex;
  flex-direction: column;
  width: 100vw;
  max-width: none;
  height: calc(100dvh - var(--desktop-v2-topbar-height, 52px));
  max-height: none;
  border: 0;
  border-radius: 0;
  background: #0f1c2f;
  color: #f8fbff;
  overflow: hidden;
  padding: 18px 24px;
  box-shadow: none;
}

.modal h2 {
  margin-bottom: 18px;
}

.progress-graph-modal {
  display: flex;
  flex-direction: column;
  width: calc(100vw - 24px);
  max-width: none;
  height: calc(100vh - 24px);
  max-height: calc(100vh - 24px);
  padding: 14px;
  overflow: hidden;
}

.progress-graph-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.progress-graph-head h2 {
  margin-bottom: 4px;
}

.progress-graph-head p,
.graph-empty {
  color: var(--muted);
}

.graph-rotate-prompt {
  display: none;
}

.progress-graph-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  touch-action: none;
}

.progress-graph {
  display: block;
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  touch-action: none;
  cursor: crosshair;
}

.graph-filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.graph-zoom-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin: -2px 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.graph-zoom-controls button {
  min-width: 38px;
  min-height: 30px;
  padding: 4px 8px;
}

.graph-zoom-controls span {
  min-width: 44px;
  text-align: center;
}

.graph-filter-list label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 24px;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f7fafc;
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.graph-label-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graph-filter-list input {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  margin: 0;
}

.graph-swatch {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.graph-series-hidden {
  display: none !important;
}

.graph-tooltip {
  position: absolute;
  z-index: 3;
  min-width: 170px;
  max-width: min(260px, calc(100% - 16px));
  min-height: 0;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
  color: #142033;
  pointer-events: none;
}

.graph-tooltip > strong {
  display: block;
  margin-bottom: 6px;
  color: #52627a;
  font-size: 12px;
}

.graph-tooltip div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 3px 0;
  font-size: 12px;
  font-weight: 800;
}

.graph-tooltip span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
}

.graph-tooltip i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.graph-tooltip strong:not(:first-child) {
  color: #142033;
  font-size: 12px;
}

.graph-grid {
  stroke: #dbe3ec;
  stroke-width: 1;
}

.graph-axis {
  stroke: #8da0b6;
  stroke-width: 1.5;
}

.graph-milestone-end {
  stroke: #f59e0b;
  stroke-width: 1.5;
  opacity: 0.95;
  pointer-events: none;
}

.graph-line {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.graph-line.phase-line {
  stroke-width: 3;
}

.graph-forecast-line {
  fill: none;
  stroke: #ff2aa1;
  stroke-width: 3;
  stroke-dasharray: 8 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.72;
}

.graph-forecast-point {
  fill: #fff;
  stroke: #ff2aa1;
  stroke-width: 3;
}

.graph-forecast-label {
  fill: #ff2aa1;
  font-size: 12px;
  font-weight: 900;
  text-anchor: start;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 4px;
  stroke-linejoin: round;
}

.graph-forecast-label[data-compact-forecast-label] {
  text-anchor: end;
}

.graph-hover-guide {
  stroke: #8da0b6;
  stroke-width: 1;
  stroke-dasharray: 5 5;
}

.graph-point {
  stroke: #fff;
  stroke-width: 2;
}

.graph-axis-label,
.graph-date-label,
.graph-point-label,
.graph-series-label {
  fill: #53657c;
  font-size: 13px;
  font-weight: 700;
}

.graph-point-label {
  text-anchor: middle;
  fill: var(--text);
}

.graph-date-label.end {
  text-anchor: end;
}

.graph-series-label {
  text-anchor: end;
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 4px;
  stroke-linejoin: round;
}

.graph-empty {
  margin-top: 10px;
}

.modal-note {
  color: var(--muted);
  margin-bottom: 14px;
}

.checkbox-list {
  display: grid;
  gap: 0.65rem;
}

.checkbox-list label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
}

.checkbox-list input {
  width: auto;
}

.modal-section-label {
  display: block;
  margin-top: 10px;
}

.assign-project-list {
  display: grid;
  gap: 6px;
  max-height: min(44vh, 360px);
  overflow: auto;
  padding: 4px 2px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.project-weight-panel .modal-actions {
  margin-top: 10px;
}

@media (max-width: 920px) {
  .system-insights {
    grid-template-columns: 1fr 1fr;
  }

  .storage-card,
  .health-card,
  .network-card,
  .processing-card,
  .online-now-card,
  .system-feed-card {
    grid-column: auto;
    grid-row: auto;
  }

  .system-feed-card {
    grid-column: 1 / -1;
  }

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

  .company-card-grid {
    grid-template-columns: 1fr 1fr;
  }

  .drawing-overview,
  .admin-actions,
  .admin-action-panel,
  .permission-grid,
  .weight-grid,
  .admin-layout,
  .system-admin-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .project-head {
    display: flex;
  }

  .project-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-summary-strip {
    width: 100%;
    grid-column: auto;
    grid-template-columns: minmax(0, 1fr);
  }

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

  .milestone-grid button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  html,
  body,
  #app {
    max-width: 100%;
    overflow-x: hidden;
  }

  .password-input-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .password-generate-button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .topbar {
    align-items: center;
    flex-direction: row;
    padding: 6px 10px;
    max-width: 100vw;
    overflow: hidden;
  }

  .topbar:has(.sysadmin-dashboard-nav) {
    flex-wrap: wrap;
    overflow: visible;
  }

  .sysadmin-dashboard-nav {
    order: 3;
    width: 100%;
    margin-left: 0;
  }

  .sysadmin-dashboard-nav button {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 10px;
  }

  .user-strip {
    justify-content: flex-end;
    gap: 8px;
  }

  .user-strip .app-version {
    display: none;
  }

  .board-shell {
    min-height: calc(100vh - 52px);
    width: 100%;
    padding: 8px;
    overflow-x: hidden;
  }

  .mobile-landing-shell {
    min-height: calc(100vh - 52px);
    display: grid;
    align-content: start;
    gap: 12px;
    width: 100%;
    padding: 10px 12px 24px;
    overflow-x: hidden;
    background: #0f172a;
  }

  .mobile-landing-today,
  .mobile-landing-project-card {
    width: 100%;
    border: 1px solid #334155;
    border-radius: 8px;
    background: #182235;
    box-shadow: none;
  }

  .mobile-landing-today {
    padding: 10px 14px;
  }

  .mobile-landing-today-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 700;
  }

  .mobile-landing-today .today-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
  }

  .mobile-landing-no-activity {
    color: #cbd5e1;
    font-size: 13px;
  }

  .mobile-landing-title {
    margin: 0;
    color: #f8fafc;
    font-size: 18px;
    font-weight: 900;
  }

  .mobile-landing-projects-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 -2px;
  }

  .mobile-landing-projects-head .project-arrange-toggle {
    width: 38px;
    min-width: 38px;
    min-height: 38px;
    border: 1px solid #334155;
    background: #182235;
    color: #e2e8f0;
  }

  .mobile-landing-projects-head .project-arrange-toggle.active {
    background: #34d399;
    color: #071324;
  }

  .mobile-landing-projects {
    display: grid;
    gap: 12px;
  }

  .mobile-landing-project-card {
    display: grid;
    gap: 8px;
    min-height: 0;
    padding: 14px 16px;
    color: #f8fafc;
    text-align: left;
  }

  .mobile-landing-project-card-content {
    display: grid;
    gap: 8px;
    min-width: 0;
  }

  .mobile-landing-project-card.project-arrange-item {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .mobile-landing-project-card .project-drag-handle {
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    border-color: #334155;
    background: #0f172a;
    color: #34d399;
  }

  .mobile-landing-project-card:focus-visible {
    border-color: #34d399;
    outline: none;
  }

  .mobile-landing-project-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
  }

  .mobile-landing-project-head h2 {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: #f8fafc;
    font-size: 19px;
    font-weight: 900;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-landing-project-head strong {
    color: #34d399;
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
  }

  .mobile-landing-project-card p {
    margin: 0;
    overflow: hidden;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-landing-card-bars {
    display: grid;
    gap: 8px;
    margin-top: 2px;
  }

  .mobile-landing-card-bars .progress-track {
    height: 9px;
    border-color: #334155;
    background: #334155;
  }

  .mobile-landing-card-bars .progress-track span {
    background: #34d399;
  }

  .mobile-landing-card-bars .progress-track strong {
    display: none;
  }

  .mobile-landing-card-bars .schedule-track {
    height: 6px;
    border-color: #334155;
    background: #334155;
  }

  .mobile-landing-card-bars .schedule-track span {
    background: #60a5fa;
  }

  .mobile-landing-project-card .today-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
  }

  .mobile-landing-shell .today-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    min-width: 0;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    color: #cbd5e1;
    background: #253149;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
  }

  .mobile-landing-shell .today-pill-tiles {
    color: #34d399;
    background: #064e3b;
  }

  .mobile-landing-shell .today-pill-photos {
    color: #60a5fa;
    background: #1e3a8a;
  }

  .mobile-landing-shell .today-pill-progress,
  .mobile-landing-shell .today-pill-progress.positive {
    color: #fbbf24;
    background: #78350f;
  }

  .mobile-landing-shell .today-pill-progress.negative {
    color: #f87171;
    background: #7f1d1d;
  }

  .brand-button img {
    width: min(150px, 44vw);
    max-height: 34px;
  }

  .project-grid,
  .system-insights,
  .company-card-grid,
  .drawing-overview,
  .admin-actions,
  .admin-action-panel,
  .admin-action-buttons,
  .company-settings-form label,
  .permission-grid,
  .weight-grid,
  .milestone-grid,
  .admin-layout,
  .system-admin-grid {
    grid-template-columns: 1fr;
  }

  .system-feed-card {
    grid-column: auto;
  }

  .system-board {
    width: 100%;
    padding: 12px 0;
    overflow-x: hidden;
  }

  .system-insights,
  .company-card-grid,
  .project-grid {
    width: 100%;
    gap: 10px;
  }

  .system-insight-card,
  .company-card,
  .project-card {
    width: 100%;
    max-width: 100%;
  }

  .system-row,
  .system-feed-item,
  .system-mini-stats span {
    gap: 8px;
    padding: 6px;
  }

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

  .system-feed-item time {
    font-size: 10px;
  }

  .system-activity-list {
    max-height: 220px;
  }

  .system-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .system-hero h1 {
    font-size: 28px;
  }

  .system-totals,
  .company-stat-grid {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    text-align: left;
  }

  .company-settings-form small {
    grid-column: 1;
  }

  .company-section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .online-user-row {
    grid-template-columns: 1fr 1fr;
  }

  .system-actions {
    display: block;
  }

  .system-action-row {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .phase-row {
    grid-template-columns: 1fr;
  }

  .floor-head,
  .project-head,
  .admin-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-workspace {
    min-height: calc(100vh - 52px);
    background-color: #101b2c;
    background-image: none;
  }

  .project-workspace.workspace {
    padding: 0;
  }

  .project-page-shell {
    gap: 0;
  }

  .desktop-project-head,
  .desktop-project-body {
    display: none;
  }

  .mobile-project-shell {
    display: grid;
    gap: 9px;
    padding: 8px 10px 18px;
  }

  .mobile-project-tabs {
    position: sticky;
    top: 0;
    z-index: 18;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 7px 0;
    background: #101b2c;
  }

  .mobile-project-tabs button {
    min-height: 44px;
    padding: 0 8px;
    border: 1px solid rgba(96, 165, 250, 0.12);
    border-radius: 8px;
    background: #202b40;
    color: #f8fbff;
    font-size: 15px;
    font-weight: 900;
  }

  .mobile-project-tabs button.active {
    border-color: rgba(52, 211, 153, 0.64);
    background: #34d399;
    color: #09231d;
  }

  .mobile-project-panel {
    display: none;
  }

  .mobile-project-panel.active {
    display: grid;
    gap: 10px;
  }

  .mobile-summary-strip {
    width: 100%;
  }

  .mobile-summary-strip .project-summary-meter {
    padding: 12px;
    gap: 8px;
    border-color: rgba(96, 165, 250, 0.12);
    border-radius: 8px;
    background: #172337;
    box-shadow: none;
  }

  .mobile-summary-strip .project-summary-main {
    align-items: flex-start;
    gap: 12px;
  }

  .mobile-summary-strip .project-summary-main strong {
    color: #34d399;
    font-size: 38px;
    font-weight: 900;
    line-height: 0.96;
  }

  .mobile-summary-strip .project-summary-main span {
    margin-top: 6px;
    color: #d7e2ee;
    font-size: 15px;
    line-height: 1.2;
    white-space: normal;
  }

  .mobile-summary-strip .project-summary-actions {
    gap: 8px;
  }

  .mobile-summary-strip .project-graph-button {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
    border: 1px solid rgba(96, 165, 250, 0.12);
    border-radius: 8px;
    background: #202b40;
    color: #f8fbff;
  }

  .mobile-summary-strip .project-graph-button svg {
    width: 21px;
    height: 21px;
  }

  .mobile-project-panel .project-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 8px 10px;
    border: 1px solid rgba(96, 165, 250, 0.12);
    border-radius: 8px;
    background: #172337;
  }

  .mobile-project-panel .project-toolbar > div {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0;
    color: #c8d4e3;
    font-size: 14px;
  }

  .mobile-project-panel .project-toolbar strong {
    color: #f8fbff;
    font-size: 20px;
  }

  .mobile-project-panel .project-toolbar span {
    color: #cbd5e1;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
  }

  .mobile-project-panel .project-toolbar button {
    min-height: 40px;
    padding: 0 14px;
    border-radius: 8px;
    background: #26334a;
    color: #f8fbff;
    white-space: nowrap;
  }

  .project-head {
    padding: 12px;
  }

  .project-summary-strip {
    grid-column: auto;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .project-summary-meter {
    gap: 6px;
    padding: 7px;
  }

  .project-summary-main strong {
    font-size: 20px;
  }

  .project-summary-main span {
    font-size: 10px;
    line-height: 1.2;
    text-align: left;
  }

  .project-graph-button {
    width: 34px;
    min-width: 34px;
    min-height: 34px;
  }

  .project-graph-button svg {
    width: 17px;
    height: 17px;
  }

  .compact-status-row div {
    font-size: 12px;
    gap: 6px;
    padding: 8px 7px;
  }

  .project-summary-strip .today-stats {
    gap: 6px;
  }

  .project-summary-strip .today-stats span {
    min-height: 30px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 900;
  }

  .project-summary-strip .today-stats .today-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    color: #94a3b8;
    background: #202b40;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
  }

  .project-summary-strip .today-stats .today-pill-tiles {
    color: #34d399;
    background: #064e3b;
  }

  .project-summary-strip .today-stats .today-pill-photos {
    color: #60a5fa;
    background: #1e3a8a;
  }

  .project-summary-strip .today-stats .today-pill-progress,
  .project-summary-strip .today-stats .today-pill-progress.positive {
    color: #fbbf24;
    background: #78350f;
  }

  .project-summary-strip .today-stats .today-pill-progress.negative {
    color: #f87171;
    background: #7f1d1d;
  }

  .project-summary-bars {
    gap: 8px;
    margin-top: 0;
  }

  .project-summary-bars .progress-track {
    height: 10px;
    border-radius: 999px;
  }

  .project-summary-bars .progress-track strong {
    display: none;
  }

  .project-summary-bars .schedule-track {
    height: 8px;
    border-radius: 999px;
  }

  .project-summary-bars .schedule-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .project-summary-bars .schedule-meta {
    order: -1;
    grid-template-columns: auto 1fr auto;
    gap: 4px;
    font-size: 0;
  }

  .project-summary-bars .schedule-meta strong {
    color: #d7e2ee;
    font-size: 16px;
    text-align: center;
  }

  .project-summary-bars .schedule-meta strong::before {
    content: "Milestone schedule ";
  }

  .project-summary-bars .schedule-meta span {
    display: none;
  }

  .quick-floor-panel {
    gap: 8px;
    padding: 12px;
    border-color: rgba(96, 165, 250, 0.12);
    background: #172337;
  }

  .quick-floor-head h2 {
    color: #d7e2ee;
    font-size: 15px;
    font-weight: 900;
  }

  .quick-floor-head {
    justify-content: flex-end;
  }

  .quick-floor-actions {
    width: 100%;
    justify-content: space-between;
  }

  .quick-floor-list {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .quick-floor-row {
    grid-template-columns: 82px minmax(0, 1fr) 52px;
    gap: 0;
    min-height: 24px;
  }

  .quick-floor-name,
  .quick-floor-percent {
    font-size: 13px;
    line-height: 1.1;
  }

  .quick-floor-track {
    height: 12px;
    min-height: 12px;
    margin: 0 7px 0 8px;
  }

  .mobile-history-panel .progress-history-table {
    margin-top: 0;
    border-color: rgba(96, 165, 250, 0.12);
    border-radius: 0;
    background: #172337;
    width: 100%;
    overflow-x: hidden;
  }

  .mobile-history-panel .progress-history-table.has-manpower-column {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.7) rgba(15, 28, 47, 0.75);
  }

  .mobile-history-panel .progress-history-row {
    grid-template-columns: minmax(40px, 0.78fr) minmax(58px, 1.05fr) minmax(60px, 1.08fr) minmax(42px, 0.72fr) minmax(48px, 0.9fr);
    border-color: rgba(96, 165, 250, 0.12);
    min-width: 0;
  }

  .mobile-history-panel .progress-history-table.has-manpower-column .progress-history-row {
    grid-template-columns:
      minmax(34px, 0.64fr)
      minmax(48px, 0.86fr)
      minmax(47px, 0.84fr)
      minmax(34px, 0.62fr)
      minmax(38px, 0.66fr)
      minmax(38px, 0.64fr)
      minmax(54px, 0.92fr);
    min-width: 342px;
  }

  .mobile-history-panel .progress-history-row.head {
    background: rgba(39, 52, 80, 0.96);
  }

  .mobile-history-panel .progress-history-row span {
    min-width: 0;
    max-width: 100%;
    padding: 11px 2px;
    border-color: rgba(96, 165, 250, 0.12);
    color: #f8fbff;
    font-size: clamp(13px, 3.6vw, 15.5px);
    line-height: 1;
    text-align: center;
    overflow: hidden;
    text-overflow: clip;
    white-space: nowrap;
  }

  .mobile-history-panel .history-pill {
    display: inline-block;
    max-width: 100%;
    padding: 0;
    border-radius: 0;
    background: transparent;
    font-size: clamp(13px, 3.6vw, 15.5px);
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    vertical-align: middle;
  }

  .mobile-history-panel .progress-history-row.head span {
    color: #94a3b8;
    font-size: clamp(11px, 3vw, 13px);
    font-weight: 900;
  }

  .mobile-history-panel .progress-history-table.has-manpower-column .progress-history-row.head span:last-child {
    padding-right: 1px;
    padding-left: 1px;
    font-size: clamp(10px, 2.8vw, 12px);
    letter-spacing: 0;
  }

  .mobile-history-panel .history-pill.progress,
  .mobile-history-panel .history-pill.tiles {
    color: #34d399;
    background: transparent;
  }

  .mobile-history-panel .history-pill.daily {
    color: #f8fbff;
    background: transparent;
  }

  .mobile-history-panel .history-pill.daily.positive {
    color: #fbbf24;
    background: transparent;
  }

  .mobile-history-panel .history-pill.daily.negative {
    color: #f87171;
    background: transparent;
  }

  .mobile-history-panel .history-pill.photos {
    color: #60a5fa;
    background: transparent;
  }

  .mobile-history-panel .history-pill.staff {
    color: #c4b5fd;
    background: transparent;
  }

  .mobile-history-panel .history-pill.subcon {
    color: #f9a8d4;
    background: transparent;
  }

  .mobile-history-panel .mobile-history-graph-card {
    margin-top: 12px;
    padding: 8px;
    border: 1px solid rgba(96, 165, 250, 0.14);
    border-radius: 8px;
    background: #172337;
  }

  .mobile-history-panel .mobile-history-graph {
    display: block;
    width: 100%;
    height: clamp(150px, 20dvh, 190px);
    border-radius: 4px;
    background: #fff;
  }

  .mobile-history-panel .mobile-history-graph .graph-line {
    stroke-width: 4;
  }

  .mobile-history-panel .mobile-history-graph .graph-forecast-line {
    stroke-width: 3;
  }

  .mobile-history-panel .mobile-history-graph .graph-axis-label,
  .mobile-history-panel .mobile-history-graph .graph-date-label {
    font-size: 9px;
  }

  .mobile-history-panel .mobile-history-graph .graph-series-label,
  .mobile-history-panel .mobile-history-graph .graph-forecast-label {
    font-size: 10px;
  }

  .mobile-history-panel .interactive-history-graph-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .mobile-history-panel .interactive-history-graph-card .graph-zoom-controls {
    order: 1;
    justify-content: flex-end;
    margin: 0;
  }

  .mobile-history-panel .interactive-history-graph-card .graph-filter-list {
    display: none;
  }

  .mobile-history-panel .interactive-history-graph-card .progress-graph-stage {
    order: 2;
    height: 180px;
    min-height: 180px;
  }

  .mobile-history-panel .interactive-history-graph-card .progress-graph {
    height: 100%;
  }

  body.mobile-history-tab-mode {
    height: 100dvh;
    overflow: hidden;
  }

  body.mobile-history-tab-mode #app {
    height: 100dvh;
    overflow: hidden;
  }

  body.mobile-history-tab-mode .project-workspace {
    height: calc(100dvh - 52px);
    min-height: 0;
    overflow: hidden;
  }

  body.mobile-history-tab-mode .project-page-shell,
  body.mobile-history-tab-mode .mobile-project-shell {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body.mobile-history-tab-mode .mobile-project-shell {
    grid-template-rows: auto minmax(0, 1fr);
    padding-bottom: 8px;
  }

  body.mobile-history-tab-mode .mobile-history-panel.active {
    grid-template-rows: minmax(0, 1fr) auto;
    align-content: stretch;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  body.mobile-history-tab-mode .mobile-history-panel .progress-history-table {
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  body.mobile-history-tab-mode .mobile-history-panel .mobile-history-graph-card {
    flex: 0 0 auto;
    margin-top: 0;
  }

  .mobile-project-panel .drawing-overview {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .mobile-project-panel .drawing-card {
    grid-template-columns: 92px minmax(0, 1fr) 86px;
    grid-template-rows: minmax(104px, auto);
    align-items: center;
    min-height: 124px;
    gap: 10px;
    padding: 12px;
    border-color: rgba(96, 165, 250, 0.12);
    border-radius: 8px;
    background: #172337;
  }

  .mobile-project-panel .drawing-open {
    grid-column: 1;
    grid-row: 1;
    align-self: stretch;
    min-width: 0;
    min-height: 0;
    padding: 0;
  }

  .mobile-project-panel .drawing-preview {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 104px;
    min-height: 0;
    border-radius: 0;
  }

  .mobile-project-panel .drawing-thumb-pills {
    position: absolute;
    left: 2px;
    right: 2px;
    bottom: 5px;
    display: flex;
    justify-content: flex-end;
    gap: 2px;
    align-items: center;
    z-index: 4;
  }

  .mobile-project-panel .drawing-thumb-pills .today-progress-pill,
  .mobile-project-panel .drawing-thumb-progress-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 1 clamp(44px, 15vw, 58px);
    width: clamp(44px, 15vw, 58px);
    max-width: calc(50% - 1px);
    min-width: 0;
    min-height: clamp(20px, 5.6vw, 24px);
    padding: 2px 4px;
    border-radius: 6px;
    overflow: hidden;
    font-size: clamp(11px, 3.2vw, 14px);
    font-weight: 900;
    line-height: 1;
    text-align: center;
    letter-spacing: 0;
    text-overflow: clip;
    white-space: nowrap;
  }

  .mobile-project-panel .drawing-thumb-progress-pill {
    background: #064e3b;
    color: #34d399;
    box-shadow: none;
  }

  .mobile-project-panel .drawing-meta {
    min-width: 0;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding-left: 2px;
  }

  .mobile-project-panel .drawing-meta h2 {
    display: -webkit-box;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: #f8fbff;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.15;
    word-break: normal;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .mobile-project-panel .drawing-tile-count {
    margin: 0;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
  }

  .mobile-project-panel .drawing-meta-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    min-width: 0;
  }

  .mobile-project-panel .drawing-meta-actions .icon-mini {
    display: none;
  }

  .mobile-project-panel .drawing-progress-inline {
    display: none;
    align-items: center;
    gap: 5px;
    min-height: 26px;
    color: #34d399;
    font-size: 14px;
    font-weight: 900;
    white-space: nowrap;
  }

  .mobile-project-panel .drawing-card-foot {
    display: grid;
    grid-column: 3;
    grid-row: 1;
    gap: 6px;
    align-self: center;
    width: 86px;
  }

  .mobile-project-panel .drawing-card-foot .mini {
    width: 100%;
    min-height: 30px;
    padding: 0 6px;
    border-radius: 8px;
    background: #253149;
    color: #f8fbff;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
  }

  .mobile-project-panel .drawing-card-foot .mini.danger {
    background: #ef1f2d;
    color: #fff;
  }

  @media (max-width: 380px) {
    .mobile-project-shell {
      padding: 9px 8px 16px;
    }

    .mobile-summary-strip .project-summary-main strong {
      font-size: 36px;
    }

    .mobile-summary-strip .project-summary-main span {
      font-size: 14px;
    }

    .mobile-summary-strip .project-graph-button {
      width: 42px;
      min-width: 42px;
      min-height: 42px;
    }

    .project-summary-strip .today-stats span {
      min-height: 32px;
      padding: 0 9px;
      font-size: 13px;
    }

    .quick-floor-row {
      grid-template-columns: 78px minmax(0, 1fr) 48px;
    }

    .quick-floor-name,
    .quick-floor-percent {
      font-size: 12px;
    }

    .mobile-project-panel .drawing-card {
      grid-template-columns: 84px minmax(0, 1fr) 80px;
      gap: 8px;
      min-height: 110px;
      padding: 10px;
    }

    .mobile-project-panel .drawing-preview {
      height: 96px;
    }

    .mobile-project-panel .drawing-meta h2 {
      font-size: 16px;
    }

    .mobile-project-panel .drawing-card-foot .mini {
      min-height: 30px;
      font-size: 11px;
    }

    .mobile-history-panel .progress-history-row {
      grid-template-columns: minmax(36px, 0.78fr) minmax(54px, 1.05fr) minmax(56px, 1.08fr) minmax(38px, 0.72fr) minmax(44px, 0.9fr);
    }

    .mobile-history-panel .progress-history-row span,
    .mobile-history-panel .history-pill {
      font-size: clamp(12px, 3.45vw, 14.5px);
    }
  }

  .compact-status-row {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .meter {
    text-align: left;
  }

  .drawing-card {
    min-height: 0;
  }

  .progress-graph-modal {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    padding: 10px;
    border-radius: 0;
  }

  .progress-graph-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
    margin-bottom: 8px;
  }

  .progress-graph-head h2 {
    margin-bottom: 2px;
    font-size: 24px;
    line-height: 1.05;
  }

  .progress-graph-head p {
    font-size: 13px;
  }

  .progress-graph-head .ghost {
    width: auto;
    min-height: 42px;
    padding: 0 14px;
  }

  .graph-filter-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    max-height: 76px;
    margin-bottom: 6px;
    overflow-y: auto;
  }

  .graph-zoom-controls {
    margin-bottom: 6px;
  }

  .graph-filter-list label {
    justify-content: flex-start;
    min-width: 0;
    min-height: 26px;
    padding: 2px 5px;
    border-radius: 6px;
    font-size: 9px;
    line-height: 1.1;
  }

  .graph-filter-list input {
    width: 11px;
    height: 11px;
  }

  .graph-swatch {
    width: 7px;
    height: 7px;
  }

  .progress-graph-stage {
    min-height: 0;
  }

  .graph-axis-label,
  .graph-date-label,
  .graph-point-label,
  .graph-series-label {
    font-size: 11px;
  }

  .graph-line {
    stroke-width: 3.5;
  }

  .graph-line.phase-line {
    stroke-width: 2.75;
  }

  .drawing-preview {
    height: 220px;
  }

  .drawing-card-foot {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }

  .drawing-card-foot p {
    flex: 0 0 100%;
  }

  .drawing-card-foot .mini {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: 32px;
    padding: 0 4px;
    font-size: 12px;
  }

  .user-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .user-actions {
    justify-content: flex-start;
  }

  .admin-project-row,
  .project-settings-row > summary {
    grid-template-columns: 1fr auto;
  }

  .plan-viewport.expanded {
    padding: 6px;
  }

  .plan-viewport.expanded .plan-mode-bar {
    gap: 6px;
    margin-bottom: 8px;
    padding: 4px;
  }

  .plan-viewport.expanded #zoomOutPlan,
  .plan-viewport.expanded .plan-zoom-label,
  .plan-viewport.expanded #zoomInPlan,
  .plan-viewport.expanded #resetPlanZoom,
  .plan-viewport.expanded #planZoomAreaMode {
    display: none;
  }

  .plan-mode-bar button {
    min-height: 38px;
    padding: 0 10px;
    font-size: 15px;
    white-space: nowrap;
  }

  .plan-mode-bar .plan-zoom-label {
    min-width: 54px;
  }

  .plan-mode-bar .icon-tool,
  .plan-mode-bar .lock-button {
    width: 44px;
    min-width: 44px;
    padding: 0;
  }

  .plan-mode-bar .hide-tiles-button {
    flex: 0 0 44px;
    width: 44px;
    min-width: 44px;
    padding: 0;
  }

  .plan-mode-bar .hide-tiles-button .hide-tiles-label {
    display: none;
  }

  #toggleHideTiles,
  #planDeleteMode,
  #planDuplicateMode,
  #planAddMode {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 8px;
  }

  #toggleHideTiles {
    flex: 0 0 44px;
    min-width: 44px;
    padding: 0;
  }

  .plan-legend {
    gap: 5px 8px;
    padding: 2px 4px 0;
  }

  .plan-legend span {
    font-size: 11px;
  }

  .plan-viewport.expanded .tile-photo-panel {
    right: 6px;
    bottom: 6px;
    left: 6px;
    grid-template-columns: 1fr auto;
    max-height: 148px;
  }

  .plan-viewport.expanded .tile-photo-grid {
    grid-column: 1 / -1;
  }

  .plan-viewport.expanded .photo-thumb-wrap {
    width: 56px;
  }

  .photo-lightbox-card {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    padding: 0;
    border-radius: 0;
    background: #05070a;
  }

  .photo-lightbox-head {
    position: absolute;
    top: max(8px, env(safe-area-inset-top));
    left: 8px;
    right: 8px;
    z-index: 3;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    padding: 5px 6px;
    border-radius: 8px;
    background: rgba(5, 7, 10, 0.62);
    color: #ffffff;
    backdrop-filter: blur(8px);
  }

  .photo-lightbox-meta {
    flex: 1 1 auto;
    gap: 8px;
    overflow: hidden;
  }

  .photo-lightbox-actions {
    flex: 0 0 auto;
    gap: 6px;
  }

  .photo-lightbox-head span {
    flex: 0 1 auto;
    margin-left: 0;
    color: rgba(255, 255, 255, 0.86);
    white-space: nowrap;
  }

  .photo-lightbox-head #photoPreviewTimestamp {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .photo-lightbox-head #photoPreviewCount {
    flex: 0 0 auto;
  }

  .photo-lightbox-head .photo-zoom-controls {
    display: none;
  }

  .photo-lightbox-head .ghost {
    min-height: 36px;
    padding: 0 12px;
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(226, 232, 240, 0.96);
    color: #111827;
  }

  .photo-lightbox-body {
    position: absolute;
    inset: 0;
    display: block;
    min-height: 0;
    height: 100dvh;
  }

  .photo-fit-frame {
    position: absolute;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    background: #05070a;
  }

  .photo-nav-button {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 42px;
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(5, 7, 10, 0.48);
    color: #ffffff;
    transform: translateY(-50%);
  }

  #previousPhotoPreview {
    left: 8px;
  }

  #nextPhotoPreview {
    right: 8px;
  }
}

@media (max-height: 540px) and (orientation: landscape) {
  .progress-graph-modal {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    padding: 6px;
    border-radius: 0;
  }

  .progress-graph-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
  }

  .progress-graph-head h2 {
    margin-bottom: 0;
    font-size: 18px;
    line-height: 1;
  }

  .progress-graph-head p {
    display: none;
  }

  .progress-graph-head .ghost {
    min-height: 30px;
    padding: 0 10px;
    font-size: 13px;
  }

  .graph-filter-list {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    margin: 0 0 4px;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 2px;
    scrollbar-width: thin;
  }

  .graph-filter-list label {
    flex: 0 0 auto;
    max-width: 132px;
    min-height: 22px;
    padding: 1px 5px;
    border-radius: 999px;
    font-size: 8px;
    line-height: 1;
  }

  .graph-filter-list input {
    width: 11px;
    height: 11px;
  }

  .graph-swatch {
    width: 7px;
    height: 7px;
  }

  .progress-graph-stage {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
  }

  .graph-axis-label,
  .graph-date-label,
  .graph-point-label,
  .graph-series-label {
    font-size: 11px;
  }
}

@media (max-width: 700px) and (orientation: portrait) {
  .progress-graph-modal {
    justify-content: flex-start;
  }

  .progress-graph-head {
    margin-bottom: 10px;
  }

  .graph-rotate-prompt {
    display: grid;
    place-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-height: 220px;
    border: 1px dashed var(--line);
    border-radius: 10px;
    background: #f8fafc;
    color: var(--text);
    text-align: center;
  }

  .graph-rotate-prompt strong {
    font-size: 18px;
  }

  .graph-rotate-prompt span {
    color: var(--muted);
    font-weight: 700;
  }

  .graph-filter-list,
  .progress-graph-stage,
  .graph-empty {
    display: none;
  }
}

@media (max-width: 900px) and (max-height: 540px) and (orientation: landscape) {
  .progress-graph-modal {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    padding: 6px;
    border-radius: 0;
    overflow: hidden;
  }

  .progress-graph-head {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
  }

  .progress-graph-head h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1;
  }

  .progress-graph-head p {
    display: none;
  }

  .progress-graph-head .ghost {
    min-height: 30px;
    padding: 0 10px;
    font-size: 13px;
  }

  .graph-filter-list {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    max-height: none;
    margin: 0 0 4px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 2px;
    scrollbar-width: thin;
  }

  .graph-filter-list label {
    flex: 0 0 auto;
    max-width: 124px;
    min-height: 22px;
    padding: 1px 5px;
    border-radius: 999px;
    font-size: 8px;
    line-height: 1;
  }

  .graph-filter-list input {
    width: 10px;
    height: 10px;
  }

  .graph-swatch {
    width: 7px;
    height: 7px;
  }

  .progress-graph-stage {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
  }

  .progress-graph {
    height: 100%;
    border-radius: 6px;
  }
}

@media (max-height: 600px) and (orientation: landscape) {
  .graph-backdrop {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    background: #111c2d;
  }

  .graph-backdrop .progress-graph-modal {
    width: 100vw;
    height: 100dvh;
    max-height: none;
    padding: clamp(16px, 4vh, 28px) clamp(42px, 7vw, 76px) clamp(18px, 5vh, 34px);
    border: 0;
    border-radius: 0;
    background: #172337;
    box-shadow: none;
    color: #f8fafc;
  }

  .graph-backdrop .progress-graph-head {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 18px;
    margin-bottom: 14px;
  }

  .graph-backdrop .progress-graph-head h2 {
    margin: 0 0 3px;
    color: #f8fafc;
    font-size: clamp(24px, 4vw, 34px);
    line-height: 1.05;
  }

  .graph-backdrop .progress-graph-head p {
    display: block;
    color: #cbd5e1;
    font-size: clamp(15px, 2.3vw, 22px);
    line-height: 1.25;
  }

  .graph-backdrop .progress-graph-head .ghost {
    width: auto;
    min-height: 50px;
    padding: 0 28px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: #26334a;
    color: #f8fafc;
    font-size: clamp(17px, 2.5vw, 24px);
  }

  .graph-backdrop .graph-filter-list {
    flex: 0 0 auto;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: clamp(12px, 2.2vw, 24px);
    max-height: none;
    margin: 0 0 16px;
    padding: 0 8px 2px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

  .graph-backdrop .graph-filter-list::-webkit-scrollbar {
    display: none;
  }

  .graph-backdrop .graph-filter-list label {
    flex: 0 0 auto;
    max-width: none;
    min-height: 30px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #f8fafc;
    font-size: clamp(15px, 2.1vw, 22px);
    font-weight: 700;
    line-height: 1;
  }

  .graph-backdrop .graph-filter-list input {
    width: clamp(18px, 2.8vw, 28px);
    height: clamp(18px, 2.8vw, 28px);
    accent-color: #ff2aa1;
  }

  .graph-backdrop .graph-swatch {
    width: clamp(10px, 1.5vw, 16px);
    height: clamp(10px, 1.5vw, 16px);
    border-radius: 999px;
  }

  .graph-backdrop .progress-graph-stage {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
  }

  .graph-backdrop .progress-graph {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    background: #fff;
  }

  .graph-backdrop .graph-axis-label,
  .graph-backdrop .graph-date-label {
    font-size: 18px;
    font-weight: 800;
  }

  .graph-backdrop .graph-point-label,
  .graph-backdrop .graph-series-label {
    font-size: 18px;
    font-weight: 900;
  }

  .graph-backdrop .graph-tooltip {
    min-width: 210px;
    padding: 16px 20px;
    border: 0;
    border-radius: 12px;
    background: #0f172a;
    color: #f8fafc;
    font-size: 17px;
  }
}

@media (max-width: 700px) and (orientation: portrait) {
  .graph-backdrop {
    background: #111c2d;
  }

  .graph-backdrop .progress-graph-modal {
    background: #172337;
    color: #f8fafc;
  }

  .graph-backdrop .progress-graph-head h2 {
    color: #f8fafc;
  }

  .graph-backdrop .progress-graph-head p {
    color: #cbd5e1;
  }

  .graph-backdrop .progress-graph-head .ghost {
    background: #26334a;
    color: #f8fafc;
  }

  .graph-backdrop .graph-rotate-prompt {
    border-color: rgba(148, 163, 184, 0.35);
    background: #1d2a40;
    color: #f8fafc;
  }

  .graph-backdrop .graph-rotate-prompt span {
    color: #cbd5e1;
  }
}

@media (max-width: 900px), (pointer: coarse) {
  .graph-backdrop {
    align-items: stretch;
    justify-content: stretch;
    padding: 0;
    background: #111c2d;
  }

  .graph-backdrop .progress-graph-modal {
    display: flex;
    flex-direction: column;
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    padding: 10px;
    border: 0;
    border-radius: 0;
    background: #172337;
    color: #f8fafc;
    box-shadow: none;
    overflow: hidden;
  }

  .graph-backdrop .progress-graph-head {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
    margin-bottom: 8px;
  }

  .graph-backdrop .progress-graph-head h2 {
    margin: 0 0 2px;
    color: #f8fafc;
    font-size: 22px;
    line-height: 1.05;
  }

  .graph-backdrop .progress-graph-head p {
    display: block;
    color: #cbd5e1;
    font-size: 12px;
    line-height: 1.15;
  }

  .graph-backdrop .progress-graph-head .ghost {
    width: auto;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    background: #26334a;
    color: #f8fafc;
    font-size: 14px;
  }

  .graph-backdrop .graph-rotate-prompt {
    display: none !important;
  }

  .graph-backdrop .graph-filter-list {
    flex: 0 0 auto;
    display: flex !important;
    flex-wrap: nowrap;
    gap: 8px;
    max-height: none;
    margin: 0 0 8px;
    padding: 0 0 4px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

  .graph-backdrop .graph-filter-list::-webkit-scrollbar {
    display: none;
  }

  .graph-backdrop .graph-filter-list label {
    flex: 0 0 auto;
    max-width: none;
    min-height: 28px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #f8fafc;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
  }

  .graph-backdrop .graph-filter-list input {
    width: 18px;
    height: 18px;
    accent-color: #ff2aa1;
  }

  .graph-backdrop .graph-swatch {
    width: 10px;
    height: 10px;
    border-radius: 999px;
  }

  .graph-backdrop .progress-graph-stage {
    flex: 1 1 auto;
    display: block !important;
    min-height: 0;
    height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
  }

  .graph-backdrop .progress-graph {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    background: #fff;
  }

  .graph-backdrop .graph-axis-label,
  .graph-backdrop .graph-date-label {
    font-size: 16px;
    font-weight: 800;
  }

  .graph-backdrop .graph-point-label,
  .graph-backdrop .graph-series-label {
    font-size: 16px;
    font-weight: 900;
  }

  .graph-backdrop .graph-tooltip {
    min-width: 180px;
    padding: 10px 12px;
    border: 0;
    border-radius: 10px;
    background: #0f172a;
    color: #f8fafc;
    font-size: 13px;
  }
}

@media (max-width: 900px) and (orientation: landscape), (pointer: coarse) and (orientation: landscape) {
  .graph-backdrop .progress-graph-modal {
    padding: clamp(14px, 3.2vh, 24px) clamp(34px, 6vw, 72px) clamp(14px, 3.5vh, 28px);
  }

  .graph-backdrop .progress-graph-head {
    gap: 14px;
    margin-bottom: 12px;
  }

  .graph-backdrop .progress-graph-head h2 {
    font-size: clamp(26px, 4vw, 36px);
  }

  .graph-backdrop .progress-graph-head p {
    font-size: clamp(15px, 2.2vw, 22px);
  }

  .graph-backdrop .progress-graph-head .ghost {
    min-height: 52px;
    padding: 0 28px;
    font-size: clamp(18px, 2.5vw, 24px);
  }

  .graph-backdrop .graph-filter-list {
    gap: clamp(14px, 2vw, 24px);
    margin-bottom: 14px;
    padding-left: 4px;
  }

  .graph-backdrop .graph-filter-list label {
    font-size: clamp(16px, 2vw, 22px);
  }

  .graph-backdrop .graph-filter-list input {
    width: clamp(20px, 2.6vw, 30px);
    height: clamp(20px, 2.6vw, 30px);
  }

  .graph-backdrop .graph-swatch {
    width: clamp(11px, 1.4vw, 16px);
    height: clamp(11px, 1.4vw, 16px);
  }

  .graph-backdrop .progress-graph-stage {
    min-height: min(52vh, 420px);
  }

  .graph-backdrop .graph-tooltip {
    min-width: 220px;
    padding: 16px 20px;
    font-size: 17px;
  }
}

.graph-backdrop.graph-mobile-mode {
  align-items: stretch !important;
  justify-content: stretch !important;
  padding: 0 !important;
  background: #172337 !important;
}

.graph-backdrop.graph-mobile-mode .progress-graph-modal {
  display: flex !important;
  flex-direction: column !important;
  width: 100vw !important;
  max-width: none !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  padding: clamp(12px, 3vh, 24px) clamp(20px, 5vw, 72px) clamp(12px, 3vh, 24px) !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #172337 !important;
  color: #f8fafc !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

.graph-backdrop.graph-mobile-mode .progress-graph-head {
  flex: 0 0 auto !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
  gap: 12px !important;
  margin-bottom: 10px !important;
}

.graph-backdrop.graph-mobile-mode .progress-graph-head h2 {
  margin: 0 0 2px !important;
  color: #f8fafc !important;
  font-size: clamp(24px, 4vw, 38px) !important;
  line-height: 1.05 !important;
}

.graph-backdrop.graph-mobile-mode .progress-graph-head p {
  display: block !important;
  margin: 0 !important;
  color: #cbd5e1 !important;
  font-size: clamp(13px, 2vw, 20px) !important;
  line-height: 1.15 !important;
}

.graph-backdrop.graph-mobile-mode .progress-graph-head .ghost {
  width: auto !important;
  min-width: 76px !important;
  min-height: 46px !important;
  padding: 0 18px !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  border-radius: 8px !important;
  background: #26334a !important;
  color: #f8fafc !important;
  font-size: clamp(15px, 2.3vw, 22px) !important;
}

.graph-backdrop.graph-mobile-mode .graph-rotate-prompt {
  display: none !important;
}

.graph-backdrop.graph-mobile-mode .graph-filter-list {
  flex: 0 0 auto !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: clamp(10px, 1.8vw, 22px) !important;
  max-height: none !important;
  margin: 0 0 10px !important;
  padding: 0 0 4px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: none !important;
}

.graph-backdrop.graph-mobile-mode .graph-zoom-controls {
  flex: 0 0 auto !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  margin: 0 0 6px !important;
  color: #cbd5e1 !important;
  font-size: clamp(10px, 1.25vw, 14px) !important;
}

.graph-backdrop.graph-mobile-mode .graph-zoom-controls button {
  min-width: 34px !important;
  min-height: 26px !important;
  padding: 0 8px !important;
  border: 1px solid rgba(148, 163, 184, 0.24) !important;
  background: #26334a !important;
  color: #f8fafc !important;
}

.graph-backdrop.graph-mobile-mode .graph-filter-list::-webkit-scrollbar {
  display: none !important;
}

.graph-backdrop.graph-mobile-mode .graph-filter-list label {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  max-width: none !important;
  min-height: 30px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #f8fafc !important;
  font-size: clamp(13px, 1.8vw, 20px) !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

.graph-backdrop.graph-mobile-mode .graph-filter-list input {
  width: clamp(18px, 2.4vw, 28px) !important;
  height: clamp(18px, 2.4vw, 28px) !important;
  accent-color: #ff2aa1 !important;
}

.graph-backdrop.graph-mobile-mode .graph-swatch {
  width: clamp(10px, 1.3vw, 16px) !important;
  height: clamp(10px, 1.3vw, 16px) !important;
  border-radius: 999px !important;
}

.graph-backdrop.graph-mobile-mode .progress-graph-stage {
  flex: 1 1 auto !important;
  display: block !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
}

.graph-backdrop.graph-mobile-mode .progress-graph {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff !important;
}

.graph-backdrop.graph-mobile-mode .graph-axis-label,
.graph-backdrop.graph-mobile-mode .graph-date-label {
  font-size: 18px !important;
  font-weight: 800 !important;
}

.graph-backdrop.graph-mobile-mode .graph-point-label,
.graph-backdrop.graph-mobile-mode .graph-series-label {
  font-size: 18px !important;
  font-weight: 900 !important;
}

.graph-backdrop.graph-mobile-mode .graph-tooltip {
  min-width: 210px !important;
  padding: 14px 18px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: #0f172a !important;
  color: #f8fafc !important;
  font-size: 16px !important;
}

.graph-backdrop.graph-mobile-mode .progress-graph-modal {
  padding: max(8px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)) !important;
}

.graph-backdrop.graph-mobile-mode .progress-graph-head {
  gap: 8px !important;
  margin-bottom: 6px !important;
}

.graph-backdrop.graph-mobile-mode .progress-graph-head h2 {
  font-size: clamp(20px, 3.2vw, 30px) !important;
}

.graph-backdrop.graph-mobile-mode .progress-graph-head p {
  font-size: clamp(11px, 1.7vw, 16px) !important;
}

.graph-backdrop.graph-mobile-mode .progress-graph-head .ghost {
  min-width: 64px !important;
  min-height: 36px !important;
  padding: 0 12px !important;
  font-size: clamp(12px, 1.8vw, 17px) !important;
}

.graph-backdrop.graph-mobile-mode .graph-filter-list {
  gap: clamp(5px, 0.8vw, 10px) !important;
  margin-bottom: 6px !important;
  padding: 0 !important;
  overflow: visible !important;
  flex-wrap: nowrap !important;
  width: 100% !important;
}

.graph-backdrop.graph-mobile-mode .graph-filter-list label {
  flex: 0 0 auto !important;
  min-width: max-content !important;
  gap: clamp(3px, 0.55vw, 5px) !important;
  min-height: 18px !important;
  font-size: clamp(8px, 1.05vw, 12px) !important;
  letter-spacing: 0 !important;
  overflow: visible !important;
}

.graph-backdrop.graph-mobile-mode .graph-filter-list input {
  flex: 0 0 auto !important;
  width: clamp(9px, 1.15vw, 13px) !important;
  height: clamp(9px, 1.15vw, 13px) !important;
}

.graph-backdrop.graph-mobile-mode .graph-swatch {
  flex: 0 0 auto !important;
  width: clamp(5px, 0.72vw, 8px) !important;
  height: clamp(5px, 0.72vw, 8px) !important;
}

.graph-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.progress-graph-head .graph-zoom-controls,
.graph-backdrop .progress-graph-head .graph-zoom-controls,
.graph-backdrop.graph-mobile-mode .progress-graph-head .graph-zoom-controls {
  margin: 0 !important;
}

.graph-backdrop.graph-mobile-mode .graph-head-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
}

.graph-backdrop.graph-mobile-mode .graph-head-actions .graph-zoom-controls {
  gap: 4px !important;
}

.graph-backdrop.graph-mobile-mode .graph-head-actions .graph-zoom-controls button {
  min-width: 34px !important;
  min-height: 30px !important;
  padding: 0 8px !important;
}

.graph-backdrop.graph-mobile-mode .graph-head-actions .graph-zoom-controls span {
  min-width: 38px !important;
  text-align: center !important;
}

.graph-backdrop.graph-mobile-mode .graph-label-text {
  min-width: max-content !important;
  white-space: nowrap !important;
  overflow: visible !important;
}

.graph-backdrop.graph-mobile-mode .progress-graph-stage {
  box-sizing: border-box !important;
  min-height: 0 !important;
}

.graph-backdrop.graph-mobile-mode .progress-graph-modal {
  row-gap: 4px !important;
}

.graph-backdrop.graph-mobile-mode .graph-filter-list {
  align-items: center !important;
  gap: clamp(6px, 1vw, 12px) !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 22px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

.graph-backdrop.graph-mobile-mode .graph-filter-list label {
  min-width: max-content !important;
  max-width: none !important;
  min-height: 22px !important;
  gap: clamp(4px, 0.65vw, 7px) !important;
  font-size: clamp(10px, 1.28vw, 14px) !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

.graph-backdrop.graph-mobile-mode .graph-filter-list input {
  width: clamp(12px, 1.55vw, 17px) !important;
  height: clamp(12px, 1.55vw, 17px) !important;
}

.graph-backdrop.graph-mobile-mode .graph-swatch {
  width: clamp(7px, 0.9vw, 10px) !important;
  height: clamp(7px, 0.9vw, 10px) !important;
}

.graph-backdrop.graph-mobile-mode .progress-graph-stage {
  flex: 1 1 0 !important;
  margin-top: 0 !important;
  min-height: 0 !important;
  height: auto !important;
}

.mobile-landing-shell .today-stats .today-pill,
body.desktop-v2-mode .project-card .today-stats .today-pill {
  border: 0;
  border-radius: 8px;
}

.mobile-landing-shell .today-stats .today-pill-tiles,
.mobile-landing-shell .today-stats .today-pill-tiles.active,
body.desktop-v2-mode .project-card .today-stats .today-pill-tiles,
body.desktop-v2-mode .project-card .today-stats .today-pill-tiles.active {
  color: #34d399;
  background: #064e3b;
}

.mobile-landing-shell .today-stats .today-pill-photos,
.mobile-landing-shell .today-stats .today-pill-photos.active,
body.desktop-v2-mode .project-card .today-stats .today-pill-photos,
body.desktop-v2-mode .project-card .today-stats .today-pill-photos.active {
  color: #60a5fa;
  background: #1e3a8a;
}

.mobile-landing-shell .today-stats .today-pill-progress,
.mobile-landing-shell .today-stats .today-pill-progress.active,
.mobile-landing-shell .today-stats .today-pill-progress.positive,
body.desktop-v2-mode .project-card .today-stats .today-pill-progress,
body.desktop-v2-mode .project-card .today-stats .today-pill-progress.active,
body.desktop-v2-mode .project-card .today-stats .today-pill-progress.positive {
  color: #fbbf24;
  background: #78350f;
}

.mobile-landing-shell .today-stats .today-pill-progress.negative,
.mobile-landing-shell .today-stats .today-pill-progress.negative.active,
body.desktop-v2-mode .project-card .today-stats .today-pill-progress.negative,
body.desktop-v2-mode .project-card .today-stats .today-pill-progress.negative.active {
  color: #f87171;
  background: #7f1d1d;
}

.graph-filter-list {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

.graph-backdrop .progress-graph-stage {
  flex: 1 1 0 !important;
  min-height: 0 !important;
}

body.desktop-v2-mode .graph-backdrop:not(.graph-mobile-mode) {
  background: rgba(15, 23, 42, 0.48) !important;
}

body.desktop-v2-mode .graph-backdrop:not(.graph-mobile-mode) .progress-graph-modal {
  background: #ffffff !important;
  color: #111827 !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 8px !important;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24) !important;
  padding: 8px 10px 10px !important;
}

body.desktop-v2-mode .graph-backdrop:not(.graph-mobile-mode) .progress-graph-head {
  margin-bottom: 4px !important;
}

body.desktop-v2-mode .graph-backdrop:not(.graph-mobile-mode) .progress-graph-head h2 {
  color: #111827 !important;
}

body.desktop-v2-mode .graph-backdrop:not(.graph-mobile-mode) .progress-graph-head p,
body.desktop-v2-mode .graph-backdrop:not(.graph-mobile-mode) .graph-zoom-controls {
  color: #64748b !important;
}

body.desktop-v2-mode .graph-backdrop:not(.graph-mobile-mode) .progress-graph-head .ghost,
body.desktop-v2-mode .graph-backdrop:not(.graph-mobile-mode) .graph-zoom-controls button {
  background: #eef2f7 !important;
  color: #0f172a !important;
  border-color: #e2e8f0 !important;
}

body.desktop-v2-mode .graph-backdrop:not(.graph-mobile-mode) .progress-graph {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}

.progress-graph-content {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-height: 0;
}

.progress-graph-empty {
  display: grid;
  flex: 1 1 0;
  min-height: 0;
  place-items: center;
  padding: 24px;
  text-align: center;
}

.graph-mode-switch {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
}

.graph-mode-button {
  display: inline-grid !important;
  width: 38px !important;
  min-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  padding: 0 !important;
  place-items: center;
}

.graph-mode-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.graph-mode-button.active[data-graph-mode="progress"] {
  border-color: rgba(52, 211, 153, 0.75) !important;
  background: rgba(52, 211, 153, 0.2) !important;
  color: #10b981 !important;
}

.graph-mode-button.active[data-graph-mode="subcon"] {
  border-color: rgba(244, 114, 182, 0.75) !important;
  background: rgba(244, 114, 182, 0.2) !important;
  color: #ec4899 !important;
}

.graph-mode-button.active[data-graph-mode="productivity"] {
  border-color: rgba(34, 197, 94, 0.75) !important;
  background: rgba(34, 197, 94, 0.2) !important;
  color: #22c55e !important;
}

.graph-backdrop.graph-mobile-mode .graph-mode-button {
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
}

.graph-backdrop.graph-mobile-mode .graph-mode-button svg {
  width: 19px;
  height: 19px;
}

body.desktop-v2-mode .interactive-history-graph-card .embedded-history-graph-toolbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  margin-bottom: 6px;
}

body.desktop-v2-mode .interactive-history-graph-card .embedded-history-graph-title {
  min-width: 0;
  margin: 0;
  color: #e5edf8;
  font-size: 17px;
  line-height: 1.2;
}

body.desktop-v2-mode .interactive-history-graph-card .embedded-history-graph-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

body.desktop-v2-mode .interactive-history-graph-card .embedded-history-graph-toolbar .graph-zoom-controls {
  margin: 0 !important;
}

body.desktop-v2-mode .interactive-history-graph-card .graph-mode-button {
  width: 34px !important;
  min-width: 34px !important;
  height: 32px !important;
  min-height: 32px !important;
}

body.desktop-v2-mode .interactive-history-graph-card .graph-mode-button svg {
  width: 18px;
  height: 18px;
}
