:root {
  --bg: #f6f8fb;
  --text: #192a43;
  --muted: #68788e;
  --line: #e3e9f1;
  --accent: #285ee8;
  --accent2: #edf3ff;
  --warnbg: #fff8e9;
  --warn: #9c6514;
  --ok: #197e65;
  --okbg: #eaf7f1;
}
body {
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  transition:
    background 0.16s,
    box-shadow 0.16s,
    transform 0.16s;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #81a9ff;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  vertical-align: middle;
}
header {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  height: 100vh;
  width: 228px;
  padding: 30px 18px;
  background: #fff;
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 34px;
  border: 0;
  border-right: 1px solid var(--line);
}
.brand {
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.6px;
  padding: 0 9px;
}
.brand:before {
  content: "M";
  display: inline-grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  margin-right: 9px;
  vertical-align: middle;
}
.brand span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  margin: 9px 0 0 45px;
}
.brand small {
  font-size: 13px;
}
nav {
  flex-direction: column;
  gap: 7px;
  flex: 1;
}
nav button {
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  border-radius: 9px;
  padding: 12px 14px;
  font-size: 14px;
  color: #64748b;
}
nav button.active {
  background: var(--accent2);
  color: var(--accent);
  font-weight: 650;
}
#topDate {
  display: none;
}
#userBox {
  padding: 18px 4px 0;
  border-top: 1px solid var(--line);
  font-size: 11px !important;
  flex-wrap: wrap;
}
#userBox strong {
  display: block;
  font-size: 11px;
  max-width: 155px;
  overflow-wrap: anywhere;
}
#userBox small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.avatar {
  background: #eaf0fa;
  color: #43689b;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 700;
}
main {
  margin: 0 0 0 228px;
  max-width: 1800px;
  padding: 26px 38px 50px;
}
#workspaceBar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  gap: 12px;
}
.breadcrumb {
  font-size: 10px;
  letter-spacing: 1.2px;
  font-weight: 600;
  color: #7e8ea3;
}
.breadcrumb span {
  padding: 0 10px;
  color: #cad3de;
}
.date-picker {
  display: flex;
  gap: 4px;
  align-items: center;
}
.date-picker input {
  width: 150px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 7px;
  font-weight: 600;
}
.date-picker .btn {
  padding: 5px 10px;
  min-height: 32px;
}
.sync-ok {
  font-size: 11px;
  color: var(--muted);
  min-height: 22px;
  text-align: right;
  margin-bottom: 26px;
}
.sync-ok:before {
  content: "●";
  color: #2aa485;
  font-size: 8px;
  margin-right: 6px;
}
.sync-error {
  padding: 14px;
  border-radius: 10px;
  background: #fff0ef;
  color: #a93232;
  margin-bottom: 20px;
}
.sync-error .btn {
  margin-left: 8px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.6px;
  font-weight: 700;
  color: #7a8aa0;
  margin-bottom: 10px;
}
.toolbar {
  margin-bottom: 27px;
  align-items: center;
}
.toolbar h1 {
  font-size: 29px;
  line-height: 1.2;
  letter-spacing: -1px;
  font-weight: 700;
}
.toolbar p {
  margin: 9px 0 0;
  font-size: 13px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 8px;
  min-height: 39px;
  white-space: nowrap;
}
.btn:hover:not(:disabled) {
  background: #f1f5fb;
  border-color: #c6d4e8;
}
.btn.primary {
  box-shadow: 0 2px 4px #2359e51a;
}
.btn.primary:hover:not(:disabled) {
  background: #1a4bc6;
  border-color: #1a4bc6;
}
.text-btn {
  border: 0;
  background: transparent;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}
.overview-grid {
  display: grid;
  grid-template-columns: 1.65fr repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 31px;
}
.overview-main {
  background: #edf3ff;
  border: 1px solid #dce7fc;
  border-radius: 13px;
  padding: 22px 24px;
}
.overview-main .eyebrow {
  color: #4b70b4;
}
.big-number {
  font-size: 43px;
  line-height: 1.2;
  letter-spacing: -1.5px;
  font-weight: 750;
  color: #224b9d;
}
.big-number span {
  font-size: 26px;
  font-weight: 400;
  color: #8b9fbf;
}
.overview-main p {
  margin: 4px 0 18px;
  font-size: 12px;
  color: #607aa0;
}
.overview-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 13px;
  font-size: 10px;
  color: #546d96;
}
.progress {
  height: 6px;
  background: #e7ecf4;
  border-radius: 20px;
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 20px;
}
.progress.amber span {
  background: #e4a43e;
}
.metric {
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.metric-icon {
  background: #f2f5fa;
  border-radius: 9px;
  padding: 9px;
  color: #6280a2;
  margin-bottom: 12px;
}
.metric > .muted {
  font-size: 12px;
}
.metric > strong {
  font-size: 31px;
  letter-spacing: -1px;
  line-height: 1.5;
}
.metric > small {
  font-size: 11px;
  color: #93a0b2;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0 14px;
}
.section-heading h2 {
  font-size: 16px;
  margin: 0;
  letter-spacing: -0.3px;
}
.count {
  background: #eaf0f7;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 10px;
  margin-left: 6px;
  color: #61728b;
}
.attention-row {
  display: grid;
  gap: 10px;
}
.attention {
  background: #fffaf0;
  border: 1px solid #f1e6ca;
  border-radius: 10px;
  padding: 17px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #926b24;
}
.attention > div {
  flex: 1;
}
.attention strong {
  font-size: 13px;
}
.attention p {
  font-size: 12px;
  margin: 3px 0 0;
  color: #9b875f;
}
.attention.good {
  background: #eef8f4;
  border-color: #dceee4;
  color: #2c8069;
}
.attention.good p {
  color: #67897d;
}
.danger-note {
  background: #fff0ef;
  border-color: #edceca;
  color: #aa433a;
}
.work-list {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.work-row {
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 17px;
  border-bottom: 1px solid #edf0f5;
}
.work-row:last-child {
  border: 0;
}
.work-symbol {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border: 1px solid var(--line);
  background: #f8fafd;
  border-radius: 9px;
  color: #7b93b4;
  flex-shrink: 0;
}
.work-summary {
  flex: 1;
}
.work-summary h3 {
  font-size: 14px;
  margin: 0 0 4px;
}
.work-summary p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.work-summary p span {
  margin: 0 6px;
  color: #b4bfd0;
}
.work-coverage {
  width: 120px;
  margin-right: 8px;
}
.work-coverage strong {
  font-size: 12px;
}
.work-coverage strong span {
  color: var(--muted);
  font-weight: 400;
}
.work-coverage .progress {
  margin-top: 8px;
  height: 4px;
}
.coverage-label {
  font-size: 10px;
  padding: 5px 9px;
  border-radius: 6px;
  white-space: nowrap;
}
.pending {
  background: #fff6e4;
  color: #946518;
}
.complete {
  background: #eaf7f1;
  color: #207c63;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 5px;
  font-weight: 600;
}
.status-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.workflow {
  display: flex;
  align-items: center;
  gap: 15px;
  border: 1px solid var(--line);
  background: white;
  padding: 17px 24px;
  border-radius: 11px;
  color: #8d9aaf;
  font-size: 12px;
}
.workflow span {
  display: flex;
  gap: 9px;
  align-items: center;
}
.workflow i {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.workflow .selected {
  color: var(--accent);
}
.planning-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.plan-card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 24px;
  border-radius: 12px;
}
.plan-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.plan-card h2 {
  margin: 18px 0 3px;
  font-size: 19px;
  letter-spacing: -0.5px;
}
.plan-card > p.muted {
  font-size: 12px;
  margin: 0;
}
.plan-owner {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  margin-bottom: 16px;
  font-size: 11px;
  color: var(--muted);
}
.plan-owner strong {
  color: #53647b;
  font-weight: 500;
}
.coverage-heading {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 10px;
}
.trade-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.trade-tags span {
  font-size: 10px;
  color: var(--muted);
  background: #f5f7fb;
  padding: 4px 7px;
  border-radius: 4px;
}
.trade-tags b {
  color: var(--text);
  margin-left: 4px;
}
.assigned-names {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  min-height: 35px;
  margin: 16px 0;
}
.person-chip {
  background: #eff4ff;
  color: #5872a0;
  font-size: 10px;
  border-radius: 5px;
  padding: 4px 7px;
}
.person-chip-internal {
  background: #fdf2e9;
  color: #9a5b1f;
}
.resource-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
}
.resource-line .icon {
  width: 15px;
}
.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 17px;
}
.card-actions .btn.primary {
  flex: 1;
}
.day-comment {
  padding: 10px;
  background: #fff8e9;
  font-size: 12px;
  border-radius: 7px;
}
.panel {
  border-radius: 12px;
  padding: 22px;
}
.work-card {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
}
table th {
  position: static;
  color: #7a8ca4;
  font-size: 10px;
  letter-spacing: 0.5px;
  background: #f8fafd;
}
table td {
  font-size: 12px;
  padding: 14px 10px;
}
.table-scroll {
  overflow: auto;
}
.table-scroll table {
  min-width: 550px;
}
.week-panel {
  padding: 0;
  overflow: hidden;
}
.week-table {
  min-width: 850px !important;
}
.week-table td:first-child {
  min-width: 150px;
}
.week-table small {
  display: block;
  margin-top: 5px;
  font-size: 10px;
  color: var(--muted);
}
.week-cell {
  width: 100%;
  border: 0;
  min-height: 68px;
  border-radius: 7px;
  cursor: pointer;
  padding: 10px;
  font-size: 11px;
}
.week-cell strong {
  font-size: 15px;
}
.history-list article {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.history-list article > div {
  flex: 1;
}
.history-list p,
.history-list time {
  font-size: 11px;
  color: var(--muted);
  margin: 5px 0 0;
}
.modal-back {
  background: #172a465c;
  justify-content: flex-end;
  backdrop-filter: blur(2px);
}
.modal-back.open {
  background: #172a465c;
}
.modal {
  height: 100vh;
  max-height: 100vh;
  width: min(680px, 100%);
  max-width: 680px;
  border-radius: 18px 0 0 18px;
  padding: 32px;
  box-shadow: -12px 0 50px #142e5526;
  animation: slide-in 0.18s ease-out;
}
.modal h2 {
  font-size: 23px;
  letter-spacing: -0.5px;
  padding-right: 35px;
}
.modal-actions {
  position: sticky;
  bottom: -32px;
  background: #fff;
  padding: 16px 0;
  margin-top: 25px;
  border-top: 1px solid var(--line);
  z-index: 2;
}
.modal-close {
  float: right;
  border: 0;
  background: #f1f5f9;
  border-radius: 7px;
  font-size: 20px;
  width: 30px;
  height: 30px;
  cursor: pointer;
}
.field label {
  font-size: 11px;
}
.field input,
.field select,
.field textarea {
  background: #fbfcfe;
  min-height: 42px;
}
.checklist {
  grid-template-columns: 1fr;
  max-height: 260px;
  border-color: var(--line);
  padding: 7px;
}
.check {
  padding: 9px;
  border-bottom: 1px solid #f0f3f8;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
}
.check input {
  min-height: initial;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.filter-bar input,
.filter-bar select {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  min-width: 0;
}
.filter-bar input {
  flex: 1;
}
.modal .notice {
  font-size: 12px;
}
.view.active {
  animation: fade-in 0.15s ease-out;
}
.view h1,
.view h2 {
  color: #1b2e49;
}
#loginScreen .btn {
  display: flex;
}
#loginScreen {
  background: var(--bg) !important;
}
@keyframes slide-in {
  from {
    transform: translateX(20px);
    opacity: 0.7;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes fade-in {
  from {
    opacity: 0.65;
  }
  to {
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media (min-width: 1550px) {
  .planning-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 1200px) {
  header {
    width: 195px;
    padding: 25px 12px;
  }
  .brand {
    font-size: 15px;
  }
  main {
    margin-left: 195px;
    padding: 24px;
  }
  .overview-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .overview-main {
    grid-column: 1/-1;
  }
  .work-row {
    flex-wrap: wrap;
  }
  .work-summary {
    min-width: 150px;
  }
  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .toolbar h1 {
    font-size: 27px;
  }
}
@media (max-width: 760px) {
  header {
    position: sticky;
    width: 100%;
    height: auto;
    padding: 14px 16px 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    gap: 15px;
    z-index: 5;
  }
  .brand {
    font-size: 16px;
  }
  .brand:before {
    width: 26px;
    height: 26px;
    font-size: 14px;
  }
  .brand span {
    display: none;
  }
  nav {
    flex-direction: row;
    overflow: auto;
    gap: 4px;
    padding-bottom: 8px;
  }
  nav button {
    padding: 8px;
    font-size: 11px;
    white-space: nowrap;
    gap: 5px;
  }
  nav .icon {
    width: 15px;
  }
  #userBox {
    display: none !important;
  }
  main {
    margin: 0;
    padding: 18px 16px 40px;
  }
  #workspaceBar {
    flex-wrap: wrap;
  }
  .breadcrumb {
    display: none;
  }
  .sync-ok {
    text-align: left;
    font-size: 10px;
    margin-bottom: 22px;
  }
  .toolbar h1 {
    font-size: 25px;
  }
  .overview-grid {
    gap: 9px;
  }
  .metric {
    padding: 13px 9px;
  }
  .metric-icon {
    padding: 6px;
  }
  .metric > .muted {
    font-size: 10px;
  }
  .metric > small {
    font-size: 9px;
  }
  .metric > strong {
    font-size: 25px;
  }
  .overview-main {
    padding: 20px;
  }
  .overview-foot {
    font-size: 10px;
  }
  .work-row {
    gap: 12px;
    padding: 17px;
  }
  .work-summary {
    min-width: calc(100% - 60px);
  }
  .work-coverage {
    flex: 1;
  }
  .work-row .btn {
    padding: 6px 9px;
    font-size: 10px;
  }
  .planning-grid {
    grid-template-columns: 1fr;
  }
  .plan-card {
    padding: 20px;
  }
  .workflow {
    padding: 12px;
    gap: 7px;
    font-size: 10px;
  }
  .workflow span {
    gap: 5px;
  }
  .workflow i {
    min-width: 8px;
  }
  .attention {
    padding: 14px;
    flex-wrap: wrap;
    gap: 9px;
  }
  .attention .btn {
    margin-left: 28px;
  }
  .history-list article {
    flex-wrap: wrap;
  }
  .history-list time {
    margin-left: 35px;
  }
  .modal {
    border-radius: 0;
    padding: 22px;
  }
  .modal-actions {
    bottom: -22px;
  }
  .section-heading h2 {
    font-size: 14px;
  }
  .card-grid {
    grid-template-columns: 1fr;
  }
  .view:not(#weekly) table thead {
    display: none;
  }
  .view:not(#weekly) table,
  .view:not(#weekly) table tbody,
  .view:not(#weekly) table tr,
  .view:not(#weekly) table td {
    display: block;
    min-width: 0 !important;
    width: 100%;
  }
  .view:not(#weekly) table tr {
    border-bottom: 1px solid var(--line);
    padding: 10px 0;
  }
  .view:not(#weekly) table td {
    border: 0;
    padding: 5px 0;
  }
  .view:not(#weekly) table td:before {
    content: attr(data-label);
    display: inline-block;
    width: 42%;
    font-size: 10px;
    color: var(--muted);
  }
  .view:not(#weekly) table td.actions:before {
    display: none;
  }
  .panel {
    padding: 15px;
  }
}
