:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #eef3f5;
  --line: #d9e1e5;
  --text: #1c2730;
  --muted: #65727e;
  --primary: #16796f;
  --primary-dark: #105e56;
  --accent: #bd6b2f;
  --blue: #326bba;
  --danger: #b83f3f;
  --shadow: 0 10px 24px rgba(23, 42, 52, 0.06);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

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

button {
  border: 0;
  cursor: pointer;
}

#app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 244px 1fr;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #17242d;
  color: #eef5f5;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 6px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: block;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px;
  flex: 0 0 42px;
}

.brand strong,
.brand span {
  display: block;
}

.brand span,
.sidebar-foot label,
.topbar p,
.metric small,
.panel-head span,
.task span,
.goal span,
.mini-card span {
  color: var(--muted);
  font-size: 13px;
}

.sidebar .brand span,
.sidebar-foot label {
  color: #a9bbc3;
}

nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  color: #cbd8dd;
  background: transparent;
  border-radius: 6px;
  text-align: left;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.sidebar-foot {
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.sidebar-foot select {
  width: 100%;
  background: #22333d;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  padding: 10px;
}

.account-box {
  display: grid;
  gap: 4px;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #22333d;
}

.account-box span {
  color: #a9bbc3;
  font-size: 13px;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 76px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 24px;
  background: rgba(244, 246, 248, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 22px;
}

h2 {
  font-size: 17px;
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.content {
  padding: 22px 24px 40px;
  display: grid;
  gap: 18px;
}

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

.metric,
.panel,
.mini-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {
  padding: 18px;
  display: grid;
  gap: 8px;
}

.metric strong {
  font-size: 25px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 18px;
  align-items: start;
}

.split.wide {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.panel {
  padding: 16px;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.primary,
.ghost,
.mini-card footer button {
  min-height: 36px;
  border-radius: 6px;
  padding: 0 13px;
  font-weight: 700;
}

.primary {
  background: var(--primary);
  color: #fff;
}

.primary:hover {
  background: var(--primary-dark);
}

.ghost {
  background: var(--surface-soft);
  color: var(--text);
}

.danger {
  color: #fff;
  background: var(--danger);
}

.full {
  width: 100%;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  color: #40505a;
  background: #f8fafb;
  white-space: nowrap;
}

td strong {
  color: var(--primary-dark);
}

.project-row {
  cursor: pointer;
}

.project-row:hover td,
.project-row.expanded td {
  background: #f4f8f8;
}

.detail-row td {
  background: #fbfcfd;
  padding: 14px;
}

.inline-detail {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.inline-detail table {
  min-width: 960px;
}

.tag,
.status {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 700;
  background: #e8eef1;
  color: #42515a;
  white-space: nowrap;
}

.tag.film {
  background: #e6f2ef;
  color: #12695f;
}

.tag.live {
  background: #eaf0fb;
  color: #275ba6;
}

.tag.operations {
  background: #f8eee6;
  color: #985321;
}

.status.pending {
  background: #fff4d8;
  color: #8a5b00;
}

.status.review_pending {
  background: #fff4d8;
  color: #8a5b00;
}

.status.approved {
  background: #e5f4e8;
  color: #24713b;
}

.status.rejected {
  background: #fae7e7;
  color: #9d2f2f;
}

.muted,
.field-hint {
  color: var(--muted);
  font-size: 13px;
}

.field-hint {
  font-weight: 500;
}

.attachment-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafb;
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}

.attachment-pill img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #d8e2e7;
}

.attachment-line {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.attachment-modal {
  width: min(980px, 100%);
}

.attachment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.attachment-card {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.attachment-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: contain;
  background: #fff;
}

.attachment-card figcaption {
  display: grid;
  gap: 7px;
  padding: 10px;
}

.attachment-card figcaption span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.attachment-card figcaption small {
  color: var(--muted);
}

.attachment-card button {
  justify-self: start;
  min-height: 32px;
  border-radius: 6px;
  padding: 0 12px;
  font-weight: 700;
}

.task-list,
.goal-list,
.cards {
  display: grid;
  gap: 10px;
}

.task,
.goal {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.task.done {
  background: #f3faf7;
  border-color: rgba(22, 121, 111, 0.22);
}

.task-center-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.task-stat {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.task-stat span,
.task-stat small {
  color: var(--muted);
  font-size: 13px;
}

.task-stat strong {
  font-size: 24px;
}

.task-center-panel {
  display: grid;
  gap: 12px;
}

.task-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: start;
  overflow-x: auto;
}

.task-filter-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.task-filter-tabs b {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e8eef1;
  color: var(--muted);
  font-size: 12px;
}

.task-filter-tabs button.active b {
  background: #dcefed;
  color: var(--primary-dark);
}

.task div,
.goal div,
.mini-card div {
  display: grid;
  gap: 4px;
}

.task-status-row {
  grid-column: 1 / -1;
  display: flex !important;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.task-status-row .primary,
.task-status-row .ghost {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 6px;
}

.task p,
.goal p,
.mini-card p {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
}

.bar {
  height: 9px;
  background: #e0e8ec;
  border-radius: 999px;
  overflow: hidden;
  min-width: 160px;
}

.bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

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

.form-panel.narrow form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 6px;
  color: #40505a;
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cdd8de;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 10px 11px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 121, 111, 0.12);
}

textarea {
  resize: vertical;
}

select[multiple] {
  min-height: 86px;
}

.select-with-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.mini-add {
  min-width: 58px;
  padding: 0 10px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(130px, 0.6fr) minmax(160px, 0.8fr) minmax(140px, 0.7fr);
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.panel-head.compact {
  margin-bottom: 10px;
}

.detail-editor {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.detail-table-wrap {
  overflow-x: auto;
}

.detail-table {
  min-width: 1220px;
  background: #fff;
  border: 1px solid var(--line);
}

.detail-table th,
.detail-table td {
  padding: 8px;
}

.detail-table input,
.detail-table select {
  min-width: 110px;
  padding: 8px;
}

.detail-table output {
  display: block;
  min-width: 88px;
  font-weight: 800;
  color: var(--primary-dark);
}

.business-line-cards {
  display: grid;
  gap: 12px;
}

.business-line-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.business-line-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.business-line-card header div {
  display: grid;
  gap: 3px;
}

.business-line-card header span,
.line-rate-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.business-line-card output {
  min-width: 84px;
  color: var(--primary-dark);
  font-weight: 900;
  text-align: right;
}

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

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

.worker-picker {
  display: grid;
  gap: 8px;
}

.worker-picker > span {
  color: #40505a;
  font-size: 13px;
  font-weight: 800;
}

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

.user-check {
  position: relative;
  display: grid;
  min-height: 48px;
  gap: 2px;
  padding: 8px 9px 8px 30px;
  border: 1px solid #d8e2e7;
  border-radius: 8px;
  background: #f8fafb;
  color: var(--text);
  cursor: pointer;
}

.user-check input {
  position: absolute;
  top: 13px;
  left: 9px;
  width: auto;
  margin: 0;
}

.user-check span {
  font-size: 13px;
  font-weight: 800;
}

.user-check small {
  color: var(--muted);
  font-size: 11px;
}

.user-check:has(input:checked) {
  border-color: rgba(22, 121, 111, 0.55);
  background: #eef7f5;
}

.line-rate-hint {
  padding: 9px 10px;
  border: 1px dashed #cdd8de;
  border-radius: 8px;
  background: #f8fafb;
}

.line-rate-hint.warning {
  border-color: #e2b94f;
  color: #7a5600;
  background: #fff8dd;
}

.line-note {
  display: grid;
}

.detail-total {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  font-weight: 700;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: start center;
  padding: 28px;
  background: rgba(17, 28, 36, 0.42);
  overflow: auto;
}

.modal-panel {
  width: min(1180px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(17, 28, 36, 0.22);
  padding: 18px;
}

.span-2 {
  grid-column: 1 / -1;
}

.form-panel button,
.project-form button,
.target-form button {
  grid-column: 1 / -1;
}

.cards {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.mobile-bottom-nav {
  display: none;
}

.account-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: none;
}

.account-panel div {
  display: grid;
  gap: 3px;
}

.account-panel span,
.account-panel small {
  color: var(--muted);
  font-size: 13px;
}

.account-panel strong {
  font-size: 20px;
}

.notification-panel {
  display: grid;
  gap: 12px;
}

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

.notification-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.notification-item.unread {
  border-color: rgba(22, 121, 111, 0.4);
  background: #eef7f5;
}

.notification-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.notification-main > span {
  padding: 4px 8px;
  border-radius: 6px;
  background: #dcefed;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.notification-main div {
  display: grid;
  gap: 3px;
}

.notification-main small,
.notification-main em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.task-completion-modal form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.task-completion-summary {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.task-completion-summary span,
.task-completion-summary small {
  color: var(--muted);
  font-size: 13px;
}

.data-mode-panel {
  box-shadow: none;
}

.mode-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: #e6f2ef;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.mode-pill.synced {
  background: #e5f4e8;
  color: #24713b;
}

.mode-pill.pending,
.mode-pill.checking {
  background: #fff4d8;
  color: #8a5b00;
}

.mode-pill.local-fallback {
  background: #fae7e7;
  color: #9d2f2f;
}

.sync-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

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

.data-mode-grid article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.data-mode-grid span,
.data-mode-grid small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.data-mode-grid strong {
  overflow-wrap: anywhere;
  font-size: 15px;
}

.action-panel {
  box-shadow: none;
}

.quick-grid,
.resource-grid {
  display: grid;
  gap: 12px;
}

.home-launcher {
  box-shadow: none;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 12px;
}

.home-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.customer-modal {
  width: min(760px, 100%);
}

.customer-grid,
.project-grid,
.line-card-grid,
.contract-grid {
  display: grid;
  gap: 12px;
}

.customer-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.customer-card,
.project-card,
.line-card,
.contract-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.customer-card header,
.project-card header,
.line-card header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.customer-card header div,
.project-card header div,
.line-card header div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.customer-card strong,
.project-card strong,
.line-card strong {
  line-height: 1.35;
}

.customer-card header span,
.customer-card p,
.customer-card footer span,
.project-card header span,
.project-tags,
.project-card footer span,
.line-card p,
.contract-card span,
.contract-card small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.level-badge {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eaf0fb;
  color: #275ba6;
  font-weight: 900;
}

.customer-contact {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px 12px;
  padding: 10px;
  border-radius: 8px;
  background: #f8fafb;
  font-size: 13px;
}

.customer-contact span {
  color: var(--muted);
}

.customer-contact b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.customer-stage-row small {
  color: var(--muted);
  font-size: 12px;
}

.customer-stats,
.project-money-grid {
  display: grid;
  gap: 8px;
}

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

.customer-stats div,
.project-money-grid div,
.contract-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.customer-stats strong,
.customer-stats span,
.project-money-grid span,
.project-money-grid b,
.contract-card span,
.contract-card strong,
.contract-card small {
  display: block;
}

.customer-stats strong,
.project-money-grid b,
.contract-card strong {
  overflow-wrap: anywhere;
}

.customer-stats span,
.project-money-grid span {
  color: var(--muted);
  font-size: 12px;
}

.customer-card footer,
.project-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.project-card-actions,
.module-actions,
.project-action-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.project-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.project-card {
  background: #fff;
}

.project-card.expanded {
  grid-column: 1 / -1;
  border-color: rgba(22, 121, 111, 0.35);
}

.project-workspace {
  display: grid;
  gap: 16px;
}

.customer-workspace {
  display: grid;
  gap: 16px;
}

.project-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  align-items: stretch;
  box-shadow: none;
}

.project-hero-main {
  display: grid;
  gap: 14px;
  align-content: start;
}

.back-chip {
  justify-self: start;
}

.project-title-block {
  display: grid;
  gap: 8px;
}

.project-title-block > span {
  color: var(--muted);
  font-size: 13px;
}

.project-title-block h2 {
  font-size: 24px;
}

.project-hero-side {
  display: grid;
  gap: 10px;
}

.project-hero-side div {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.project-hero-side span,
.project-info-grid span,
.crew-item small,
.evidence-item span,
.finance-card-list span {
  color: var(--muted);
  font-size: 13px;
}

.project-hero-side strong {
  font-size: 22px;
  overflow-wrap: anywhere;
}

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

.project-lifecycle {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  box-shadow: none;
}

.customer-stage-flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  box-shadow: none;
}

.customer-stage-flow article {
  min-height: 64px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.customer-stage-flow b {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dfe8ec;
  color: #40505a;
}

.customer-stage-flow span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.customer-stage-flow article.active {
  background: #eaf0fb;
  border-color: #d4e0f4;
}

.customer-stage-flow article.active b {
  background: var(--blue);
  color: #fff;
}

.customer-stage-flow article.active span {
  color: #275ba6;
}

.project-lifecycle article {
  min-height: 64px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.project-lifecycle b {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dfe8ec;
  color: #40505a;
}

.project-lifecycle span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.project-lifecycle article.done {
  background: #eaf6ef;
  border-color: #cfe7d7;
}

.project-lifecycle article.done b {
  background: var(--primary);
  color: #fff;
}

.project-lifecycle article.done span {
  color: var(--primary-dark);
}

.project-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 14px;
  align-items: start;
}

.detail-module,
.project-workspace-grid > .project-detail-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.wide-module {
  grid-column: 1 / -1;
}

.project-info-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.project-info-grid b {
  min-width: 0;
  overflow-wrap: anywhere;
}

.project-profile-module p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.crew-list,
.evidence-list,
.finance-card-list,
.compact-list {
  display: grid;
  gap: 10px;
}

.crew-item,
.evidence-item,
.finance-card-list article {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

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

.crew-item div,
.evidence-item div,
.finance-card-list article {
  min-width: 0;
}

.crew-item b {
  color: var(--primary-dark);
  overflow-wrap: anywhere;
}

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

.finance-card-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.finance-card-list article strong {
  margin-bottom: 2px;
}

.customer-project-list,
.followup-timeline,
.followup-reminder-list {
  display: grid;
  gap: 10px;
}

.customer-project-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.customer-project-item div,
.followup-card header div,
.followup-reminder div {
  min-width: 0;
}

.customer-project-item span,
.followup-card span,
.followup-card p,
.followup-reminder small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.customer-project-item b {
  color: var(--primary-dark);
  overflow-wrap: anywhere;
}

.followup-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.followup-card header,
.followup-card footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.followup-card p {
  margin: 0;
}

.followup-card.overdue,
.followup-reminder.overdue {
  background: #fff4d8;
  border-color: #efd99b;
}

.followup-card.today,
.followup-reminder.today {
  background: #eaf6ef;
  border-color: #cfe7d7;
}

.followup-card.done,
.followup-reminder.done {
  opacity: 0.72;
}

.followup-reminder {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  color: var(--text);
  text-align: left;
}

.followup-reminder > span {
  min-width: 44px;
  min-height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e8eef1;
  color: #42515a;
  font-size: 12px;
  font-weight: 900;
}

.followup-reminder.overdue > span {
  background: #b83f3f;
  color: #fff;
}

.followup-reminder.today > span {
  background: var(--primary);
  color: #fff;
}

.followup-reminder strong,
.followup-reminder small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status.intent {
  background: #eaf0fb;
  color: #275ba6;
}

.status.won,
.status.repeat,
.status.today {
  background: #e5f4e8;
  color: #24713b;
}

.status.dormant {
  background: #e8eef1;
  color: #42515a;
}

.status.overdue {
  background: #fae7e7;
  color: #9d2f2f;
}

.project-tags {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
}

.project-tags > span:not(.tag) {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  background: #eef3f5;
}

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

.mini-progress {
  position: relative;
  min-height: 30px;
  overflow: hidden;
  border-radius: 8px;
  background: #e5ecef;
}

.mini-progress i {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(90deg, rgba(22, 121, 111, 0.28), rgba(189, 107, 47, 0.26));
}

.mini-progress span {
  position: relative;
  z-index: 1;
  min-height: 30px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  color: #40505a;
  font-size: 12px;
  font-weight: 800;
}

.project-detail-panel {
  display: grid;
  gap: 12px;
  padding-top: 4px;
}

.project-detail-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.line-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.line-card,
.contract-card {
  background: #fff;
}

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

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

.contract-card {
  align-content: start;
}

.contract-card .attachment-pill {
  margin-top: 4px;
}

.contract-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.status.signed,
.status.confirmed,
.status.delivered,
.status.closed,
.status.active {
  background: #e5f4e8;
  color: #24713b;
}

.status.unsigned,
.status.quoted,
.status.lead {
  background: #fff4d8;
  color: #8a5b00;
}

.schedule-panel {
  display: grid;
  gap: 12px;
}

.segmented {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(70px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef3f5;
}

.segmented button {
  min-height: 32px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.segmented button.active {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 1px 4px rgba(23, 42, 52, 0.08);
}

.schedule-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.schedule-toolbar strong {
  text-align: center;
}

.day-task-groups,
.calendar-board {
  display: grid;
  gap: 12px;
}

.day-group {
  display: grid;
  gap: 8px;
}

.day-group > header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.weekday-row,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.weekday-row span {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.calendar-day {
  min-height: 96px;
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.calendar-day.outside {
  opacity: 0.42;
}

.calendar-day.today {
  border-color: rgba(22, 121, 111, 0.55);
  background: #eef8f6;
}

.calendar-day header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.calendar-day header span {
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.calendar-day p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #40505a;
  font-size: 12px;
}

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

.home-summary-strip div {
  min-height: 62px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 10px;
  border-radius: 8px;
  background: #f8fafb;
  border: 1px solid var(--line);
}

.home-summary-strip strong {
  font-size: 22px;
  line-height: 1;
}

.home-summary-strip span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.module-tile {
  min-height: 128px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  justify-items: start;
  gap: 6px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
  box-shadow: none;
}

.module-tile:hover {
  transform: translateY(-1px);
  border-color: rgba(22, 121, 111, 0.42);
  background: #f8fbfb;
}

.module-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--primary);
}

.module-tile:nth-child(2n) .module-icon {
  background: var(--blue);
}

.module-tile:nth-child(3n) .module-icon {
  background: var(--accent);
}

.module-tile:nth-child(5n) .module-icon {
  background: #596873;
}

.module-tile strong {
  font-size: 15px;
  line-height: 1.35;
}

.module-tile b {
  align-self: end;
  font-size: 24px;
  line-height: 1.1;
}

.module-tile small {
  color: var(--muted);
  font-size: 12px;
}

.status-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.status-panel {
  display: grid;
  gap: 14px;
}

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

.status-stat {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 8px;
  background: #f8fafb;
  border: 1px solid var(--line);
}

.status-stat strong {
  font-size: 20px;
}

.status-stat span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.status-stat.available,
.status-stat.on_duty {
  background: #eaf6ef;
  border-color: #cfe7d7;
}

.status-stat.in_use,
.status-stat.out {
  background: #eaf0fb;
  border-color: #d4e0f4;
}

.status-stat.maintenance,
.status-stat.leave {
  background: #fff4d8;
  border-color: #efd99b;
}

.status-stat.scrapped,
.status-stat.rest {
  background: #f7ece6;
  border-color: #ead0c2;
}

.status-list,
.people-status-list,
.important-list {
  display: grid;
  gap: 9px;
}

.status-list article,
.people-status-list article,
.important-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  text-align: left;
}

.status-list article div,
.people-status-list article div,
.important-item div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.status-list small,
.people-status-list small,
.important-item span {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar-dot {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
  background: var(--primary);
}

.avatar-dot.out {
  background: var(--blue);
}

.avatar-dot.leave {
  background: #b68119;
}

.avatar-dot.rest {
  background: var(--accent);
}

.important-item {
  grid-template-columns: auto minmax(0, 1fr);
  color: var(--text);
}

.important-item svg {
  color: var(--primary);
}

.sub-feature-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
}

.sub-feature {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}

.sub-feature svg {
  color: var(--primary);
}

.sub-feature b {
  font-size: 13px;
  line-height: 1.3;
}

.compact-metrics .metric {
  box-shadow: none;
}

.commission-preview {
  display: grid;
  gap: 10px;
}

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

.commission-preview-summary article {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.commission-preview-summary span {
  color: var(--muted);
  font-size: 12px;
}

.commission-preview-summary strong {
  color: var(--primary-dark);
  font-size: 17px;
}

.commission-warning {
  padding: 9px 10px;
  border: 1px solid #e2b94f;
  border-radius: 8px;
  background: #fff8dd;
  color: #7a5600;
  font-size: 12px;
  line-height: 1.45;
}

.task-preview {
  display: grid;
  gap: 10px;
}

.task-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.task-preview-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.task-preview-item div {
  display: grid;
  gap: 4px;
}

.task-preview-item span,
.task-preview-item small {
  color: var(--muted);
  font-size: 12px;
}

.task-preview-item b {
  color: var(--primary-dark);
  font-size: 14px;
}

.task-preview-item small {
  grid-column: 1 / -1;
}

.commission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.commission-card {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.commission-card div {
  display: grid;
  gap: 4px;
}

.commission-card span,
.commission-card small {
  color: var(--muted);
  font-size: 12px;
}

.commission-card b {
  font-size: 19px;
  color: var(--primary-dark);
}

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

.quick-action {
  min-height: 98px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 7px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
  color: var(--text);
  text-align: left;
}

.quick-action:hover {
  border-color: rgba(22, 121, 111, 0.35);
  background: #eef7f5;
}

.quick-action svg {
  color: var(--primary);
}

.quick-action strong,
.resource-card strong,
.activity-card strong {
  line-height: 1.35;
}

.quick-action span,
.resource-card span,
.activity-card span {
  color: var(--muted);
  font-size: 13px;
}

.resource-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.resource-card,
.activity-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafb;
}

.resource-card header,
.activity-card {
  align-items: start;
}

.resource-card header,
.activity-card {
  grid-template-columns: minmax(0, 1fr) auto;
}

.resource-card header,
.resource-card footer,
.activity-card {
  display: grid;
  gap: 10px;
}

.resource-card header div,
.activity-card div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.resource-card p,
.activity-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.resource-card footer {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.meta-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 12px;
  font-size: 13px;
}

.meta-grid b {
  color: var(--text);
}

.activity-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.activity-card p,
.activity-card .attachment-line {
  grid-column: 1 / -1;
}

.status.available {
  background: #e5f4e8;
  color: #24713b;
}

.status.in_use,
.status.submitted,
.status.checked {
  background: #e6f2ef;
  color: #12695f;
}

.status.maintenance,
.status.repair {
  background: #fff4d8;
  color: #8a5b00;
}

.status.review_pending,
.status.overdue {
  background: #fff4d8;
  color: #8a5b00;
}

.status.scrapped,
.status.rejected,
.status.rework {
  background: #fae7e7;
  color: #9d2f2f;
}

.status.returned,
.status.done {
  background: #eaf0fb;
  color: #275ba6;
}

.mini-card {
  box-shadow: none;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.mini-card b {
  font-size: 22px;
}

.mini-card footer {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.mini-card footer .status {
  margin-right: auto;
}

.empty {
  padding: 28px;
  text-align: center;
  background: #f8fafb;
  border: 1px dashed #cbd6dc;
  border-radius: 8px;
  color: var(--muted);
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #edf2f4;
}

.login-card {
  width: min(420px, 100%);
  display: grid;
  gap: 18px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-brand {
  color: var(--text);
  padding: 0 0 18px;
}

.login-brand span {
  color: var(--muted);
}

.login-card form {
  display: grid;
  gap: 12px;
}

.login-hint,
.form-error,
.import-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.form-error {
  color: var(--danger);
}

.import-note {
  grid-column: 1 / -1;
  padding: 10px 12px;
  border-radius: 6px;
  background: #f8fafb;
  border: 1px solid var(--line);
}

.pie-block {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  align-items: center;
}

.pie {
  width: 150px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 18px rgba(255, 255, 255, 0.65);
}

.pie span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--text);
  font-weight: 800;
  text-align: center;
  font-size: 13px;
}

.legend {
  display: grid;
  gap: 9px;
}

.legend div {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend b {
  color: var(--text);
}

@media (max-width: 980px) {
  #app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    border-bottom: 1px solid var(--line);
  }

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

  .sidebar .nav-item {
    justify-content: center;
  }

  .sidebar .nav-item span {
    display: none;
  }

  .metrics,
  .split,
  .split.wide,
  .status-board,
  .filter-bar,
  .contract-grid,
  .project-hero,
  .project-workspace-grid,
  .finance-card-list,
  .data-mode-grid,
  .customer-stage-flow,
  .pie-block,
  .form-panel.narrow form {
    grid-template-columns: 1fr;
  }

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

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

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

  .customer-stage-flow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .calendar-day {
    min-height: 78px;
  }

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

@media (max-width: 640px) {
  body {
    background: #f6f8f9;
  }

  #app {
    padding-bottom: 0;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 10px 14px;
    background: #17242d;
  }

  .sidebar .brand {
    padding: 0;
    border-bottom: 0;
  }

  .sidebar nav,
  .sidebar-foot {
    display: none;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .topbar {
    position: static;
    align-items: stretch;
    flex-direction: column;
    min-height: auto;
    padding: 14px 16px;
  }

  .top-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .content {
    padding: 14px 14px 22px;
  }

  .metrics,
  .project-form,
  .form-panel form,
  .target-form {
    grid-template-columns: 1fr;
  }

  .metric strong {
    font-size: 22px;
  }

  .panel,
  .metric,
  .mini-card,
  .resource-card,
  .activity-card {
    box-shadow: none;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .quick-grid,
  .resource-grid,
  .module-grid,
  .data-mode-grid,
  .sub-feature-strip,
  .customer-grid,
  .project-grid,
  .line-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .task-center-stats {
    grid-template-columns: 1fr;
  }

  .module-tile {
    min-height: 112px;
    padding: 12px;
  }

  .module-tile b {
    font-size: 20px;
  }

  .module-icon {
    width: 36px;
    height: 36px;
  }

  .account-panel {
    align-items: stretch;
    flex-direction: column;
  }

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

  .quick-action {
    min-height: 78px;
    grid-template-columns: auto 1fr;
    align-items: center;
    align-content: center;
    justify-items: stretch;
  }

  .quick-action svg {
    grid-row: 1 / span 2;
  }

  .customer-grid,
  .project-grid,
  .line-card-grid,
  .project-money-grid,
  .project-kpi-grid,
  .project-lifecycle,
  .customer-stage-flow,
  .weekday-row,
  .calendar-grid {
    grid-template-columns: 1fr;
  }

  .project-hero,
  .detail-module,
  .project-workspace-grid > .project-detail-section {
    box-shadow: none;
  }

  .project-title-block h2 {
    font-size: 20px;
  }

  .line-main-grid,
  .line-worker-grid,
  .line-amount-grid,
  .commission-preview-summary {
    grid-template-columns: 1fr;
  }

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

  .business-line-card header {
    align-items: stretch;
    flex-direction: column;
  }

  .business-line-card output {
    text-align: left;
  }

  .task-preview-item {
    grid-template-columns: 1fr;
  }

  .notification-item,
  .notification-main {
    grid-template-columns: 1fr;
  }

  .crew-item,
  .evidence-item,
  .customer-project-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .crew-item b,
  .evidence-item .attachment-pill,
  .customer-project-item b,
  .customer-project-item button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .weekday-row {
    display: none;
  }

  .calendar-day {
    min-height: auto;
  }

  .calendar-day.outside {
    display: none;
  }

  .calendar-day header {
    justify-content: flex-start;
    gap: 8px;
  }

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

  .schedule-toolbar strong {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    box-shadow: 0 -10px 28px rgba(23, 42, 52, 0.08);
  }

  .mobile-bottom-nav .nav-item {
    height: 56px;
    display: grid;
    place-items: center;
    gap: 3px;
    padding: 5px 4px;
    border-radius: 8px;
    color: var(--muted);
    background: transparent;
    font-size: 11px;
    font-weight: 700;
  }

  .mobile-bottom-nav .nav-item span {
    display: block;
  }

  .mobile-bottom-nav .nav-item.active {
    color: var(--primary);
    background: #e9f4f2;
  }

  .task,
  .goal,
  .activity-card {
    grid-template-columns: 1fr;
  }

  .status-list article,
  .people-status-list article,
  .important-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .bar {
    min-width: 0;
  }
}
