@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@400;500;600;700&display=swap');

.calendar-panel {
  background: #fff;
  border: 1px solid #e7ebe7;
  border-radius: 13px;
  padding: 20px 22px;
  margin: 0 0 26px
}

.calendar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px
}

.calendar-heading h2 {
  font-size: 17px;
  margin: 0 0 2px
}

.calendar-heading p:not(.eyebrow) {
  font-size: 12px;
  color: #748078;
  margin: 0
}

.calendar-controls {
  display: flex;
  align-items: center;
  gap: 12px
}

.calendar-controls strong {
  font-size: 13px;
  min-width: 120px;
  text-align: center
}

.calendar-controls button {
  width: 31px;
  height: 31px;
  border: 1px solid #e7ebe7;
  border-radius: 8px;
  background: white;
  color: #176b4b;
  font-size: 21px;
  cursor: pointer;
  line-height: 1
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid #e7ebe7;
  border-left: 1px solid #e7ebe7
}

.calendar-cell {
  min-height: 72px;
  padding: 8px;
  border-right: 1px solid #e7ebe7;
  border-bottom: 1px solid #e7ebe7
}

.calendar-weekday {
  min-height: auto;
  background: #f7f8f5;
  color: #748078;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  padding: 8px
}

.calendar-day {
  font-size: 12px
}

.calendar-day.muted {
  color: #bac1bc;
  background: #fbfcfa
}

.calendar-day.today .day-number {
  background: #176b4b;
  color: white;
  border-radius: 50%;
  width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  margin: -3px 0 0 -3px
}

.day-count {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  font-size: 10px;
  color: #748078
}

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

.dot-yellow {
  background: #e9bb36
}

.dot-orange {
  background: #e98a36
}

.dot-red {
  background: #a92f32
}

.calendar-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 13px;
  color: #748078;
  font-size: 11px
}

.calendar-legend span {
  display: flex;
  align-items: center;
  gap: 6px
}

.calendar-legend b {
  color: #18251f
}

.calendar-day.has-jobs {
  cursor: pointer
}

.calendar-day.has-jobs:hover {
  background: #f3f8f4
}

.calendar-day.calendar-selected {
  box-shadow: inset 0 0 0 2px #4d9270
}

.page-nav {
  display: flex;
  gap: 8px;
  margin: 0 0 20px;
  border-bottom: 1px solid var(--line)
}

.page-nav button {
  border: 0;
  background: transparent;
  padding: 10px 15px;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent
}

.page-nav button.active {
  color: var(--green);
  font-weight: 600;
  background: var(--pale);
  border-color: var(--green)
}

.today-summary {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin: -10px 0 17px
}

.summary-pill {
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 12px;
  font-size: 12px;
  color: var(--muted)
}

.summary-pill b {
  color: var(--ink)
}

.today-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px
}

.task-card {
  background: white;
  border: 1px solid var(--line);
  border-left: 5px solid #879189;
  border-radius: 11px;
  padding: 15px
}

.task-card.status-wait_design {
  border-left-color: #7b61a8
}

.task-card.status-designing {
  border-left-color: #4e77bd
}

.task-card.status-designed {
  border-left-color: #21805c
}

.task-card.status-producing {
  border-left-color: #db8a2f
}

.task-card.status-produced {
  border-left-color: #c45b31
}

.task-card.status-done {
  border-left-color: #7c8981
}

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

.status-chip {
  display: inline-block;
  border-radius: 99px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 600;
  background: #f0f2ef;
  color: #46534b
}

.status-chip.status-wait_design {
  background: #f0eafb;
  color: #654b91
}

.status-chip.status-designing {
  background: #eaf0fb;
  color: #4267a5
}

.status-chip.status-designed {
  background: #e6f4ec;
  color: #176b4b
}

.status-chip.status-producing {
  background: #fff1dc;
  color: #a9681e
}

.status-chip.status-produced {
  background: #fdebe2;
  color: #a84928
}

.task-card h3 {
  margin: 11px 0 3px;
  font-size: 15px
}

.task-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px
}

.task-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 13px
}

.task-actions button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: var(--green);
  font: inherit;
  font-size: 11px;
  padding: 7px 10px;
  cursor: pointer
}

.task-actions button.action-main {
  background: var(--green);
  border-color: var(--green);
  color: white
}

.task-actions button.action-danger {
  color: #a43f37
}

.task-empty {
  grid-column: 1/-1;
  background: white;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  padding: 35px;
  text-align: center;
  font-size: 13px
}

@media(max-width:700px) {
  .today-list {
    grid-template-columns: 1fr
  }

  .calendar-panel {
    padding: 15px 12px
  }

  .calendar-cell {
    min-height: 58px;
    padding: 5px
  }

  .calendar-legend {
    gap: 9px
  }

  .calendar-legend span {
    font-size: 10px
  }
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 10% 10%, #e5f1e8 0, transparent 35%), #f7f8f5
}

.login-card {
  width: min(410px, 100%);
  background: white;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 16px 50px #18352412
}

.login-logo {
  margin-bottom: 20px
}

.login-card h1 {
  font-size: 25px;
  margin: 0 0 5px
}

.login-help {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 23px
}

.login-card>label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #546158;
  margin: 13px 0
}

.login-card input {
  display: block;
  width: 100%;
  margin-top: 6px;
  border: 1px solid #dfe5df;
  border-radius: 8px;
  padding: 11px 12px;
  font: inherit;
  font-size: 13px;
  outline-color: #76a990
}

.login-submit {
  width: 100%;
  margin-top: 8px
}

.login-error {
  min-height: 18px;
  font-size: 12px;
  color: #b33f37;
  margin: 4px 0
}

.demo-accounts {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted)
}

.demo-accounts summary {
  cursor: pointer;
  font-weight: 600
}

.demo-accounts p {
  margin: 8px 0 0
}

.session-bar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 11px
}

.session-bar button {
  border: 0;
  background: transparent;
  color: var(--green);
  font: inherit;
  cursor: pointer
}

.role-label select:disabled {
  opacity: 1;
  color: var(--ink);
  cursor: default
}

.login-screen[hidden],
.login-panel[hidden],
#loginPanel[hidden],
#appShell[hidden] {
  display: none !important
}

.login-panel {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 10% 10%, #e5f1e8 0, transparent 35%), #f7f8f5
}

.task-filters {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 2px 0 12px;
  margin-bottom: 7px;
  scrollbar-width: thin
}

.task-filters button {
  white-space: nowrap;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 8px;
  padding: 8px 12px;
  font: inherit;
  font-size: 11px;
  cursor: pointer
}

.task-filters button:hover {
  border-color: #9db9a7;
  color: var(--green)
}

.task-filters button.active {
  background: #e7f1ea;
  border-color: #d0e3d5;
  color: var(--green);
  font-weight: 600
}

.task-filters button.filter-latest {
  background: #176b4b;
  border-color: #176b4b;
  color: #fff
}

.task-filters button.filter-upcoming {
  background: #fde9e8;
  border-color: #f3c6c3;
  color: #a33832
}

.task-filters button.filter-oldest {
  background: #fff0dc;
  border-color: #f0d3aa;
  color: #95601c
}

.task-filters button.filter-design {
  background: #f0eafb;
  border-color: #d8c9ef;
  color: #654b91
}

.task-filters button.filter-production {
  background: #fff5d7;
  border-color: #eadb9b;
  color: #85670d
}

.task-filters button.filter-producing {
  background: #e8effb;
  border-color: #cad8ed;
  color: #365d91
}

.task-filters button.filter-produced {
  background: #e5f3e9;
  border-color: #c9e3d0;
  color: #276b3e
}

.task-filters button.filter-latest.active {
  box-shadow: 0 0 0 2px #a8cbb6
}

.task-filters button.filter-upcoming.active {
  box-shadow: 0 0 0 2px #e6a39e
}

.task-filters button.filter-oldest.active {
  box-shadow: 0 0 0 2px #e8bd7d
}

.task-filters button.filter-design.active {
  box-shadow: 0 0 0 2px #bca7dc
}

.task-filters button.filter-production.active {
  box-shadow: 0 0 0 2px #ddc66b
}

.task-filters button.filter-producing.active {
  box-shadow: 0 0 0 2px #a9bfdf
}

.task-filters button.filter-produced.active {
  box-shadow: 0 0 0 2px #9acba7
}

.filter-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 99px;
  background: #ffffff9c;
  font-size: 10px
}

.filter-latest .filter-count {
  background: #ffffff2e
}

.head-actions {
  gap: 13px
}

.logout-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #f3d2cf;
  border-radius: 9px;
  background: #fff7f6;
  color: #c4433c;
  cursor: pointer
}

.logout-icon:hover {
  background: #fde9e8;
  border-color: #e9b0ac
}

.logout-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round
}

.bell {
  margin-right: -5px
}

.role-label #roleDisplay {
  font-size: 12px;
  color: var(--ink);
  font-weight: 600
}

.home-view-switch {
  display: flex;
  gap: 4px;
  background: #eef1ed;
  border-radius: 9px;
  padding: 3px;
  align-self: center
}

.home-view-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  padding: 7px 10px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap
}

.home-view-switch button.active {
  background: #fff;
  color: var(--green);
  font-weight: 600;
  box-shadow: 0 1px 3px #13241a16
}

#board.rows-view {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden
}

#board .home-row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 130px 190px 42px;
  align-items: center;
  gap: 16px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
  background: #fff
}

#board .home-row:last-child {
  border-bottom: 0
}

.home-row-name {
  display: grid;
  grid-template-columns: max-content 1fr;
  align-items: center;
  gap: 4px 9px;
  min-width: 0
}

.home-row-name strong {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.home-row-name small {
  grid-column: 2;
  color: var(--muted);
  font-size: 11px
}

.home-row-due {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  color: var(--muted)
}

.home-row-due b {
  font-size: 12px;
  color: var(--ink)
}

.home-status {
  justify-self: start;
  border-radius: 99px;
  padding: 4px 9px;
  background: #f0f2ef;
  color: #47534b;
  font-size: 11px;
  font-weight: 600
}

.home-status.status-design {
  background: #f0eafb;
  color: #654b91
}

.home-status.status-proof,
.home-status.status-print {
  background: #fff5d7;
  color: #85670d
}

.home-status.status-ready,
.home-status.status-produced {
  background: #e5f3e9;
  color: #276b3e
}

.home-status.status-producing {
  background: #fff1dc;
  color: #a9681e
}

.home-status.status-done {
  background: #eef1ee;
  color: #59645d
}

.due-reminder {
  background: #fff7f3;
  border: 1px solid #f1c9b7;
  border-left: 6px solid #c74332;
  border-radius: 13px;
  padding: 16px 19px;
  margin: 0 0 20px;
  box-shadow: 0 3px 12px #8b38220c
}

.due-reminder:not(.has-due) {
  background: #f5f8f5;
  border-color: #dfe8e0;
  border-left-color: #74a480;
  box-shadow: none
}

.due-reminder-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px
}

.due-reminder-heading>div {
  display: flex;
  align-items: center;
  gap: 12px
}

.due-reminder-heading .eyebrow {
  color: #aa392e;
  margin-bottom: 2px
}

.due-reminder:not(.has-due) .due-reminder-heading .eyebrow {
  color: #548160
}

.due-reminder-heading h2 {
  font-size: 16px;
  margin: 0
}

.due-alert-icon {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #c74332;
  color: #fff;
  font-size: 21px;
  font-weight: 700
}

.due-reminder:not(.has-due) .due-alert-icon {
  background: #75a481
}

.due-total {
  background: #c74332;
  color: white;
  border-radius: 99px;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 600
}

.due-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 13px
}

.due-group {
  background: #fff;
  border: 1px solid #f0dfd7;
  border-radius: 9px;
  overflow: hidden
}

.due-group h3 {
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 8px 11px;
  font-size: 12px;
  background: #fff0e9;
  color: #a73d2f
}

.due-group h3 b {
  font-weight: 600
}

.due-tomorrow h3 {
  background: #fff5dc;
  color: #946b14
}

.due-job {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 9px 11px;
  border: 0;
  border-top: 1px solid #f2eeeb;
  background: #fff;
  color: var(--ink);
  font: inherit;
  cursor: pointer
}

.due-job:hover {
  background: #fffaf7
}

.due-job-title {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0
}

.due-job-title b {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.due-job-title small {
  font-size: 10px;
  color: var(--muted)
}

.due-job-date {
  font-size: 11px;
  font-weight: 600;
  color: #9a493e;
  white-space: nowrap
}

.due-job-open {
  font-size: 20px;
  color: #a6ada8
}

.due-none {
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0 0 48px
}

@media(max-width:700px) {
  #board .home-row {
    grid-template-columns: minmax(0, 1fr) 92px 36px;
    gap: 8px;
    padding: 10px
  }

  .home-row-name {
    grid-column: 1;
    grid-row: 1
  }

  .home-row-name .tag {
    display: none
  }

  .home-row-due {
    grid-column: 2;
    grid-row: 1/3
  }

  .home-row>.home-status {
    grid-column: 1;
    grid-row: 2
  }

  .home-row>.eye-button {
    grid-column: 3;
    grid-row: 1/3
  }

  .home-view-switch {
    align-self: flex-start
  }
}

@media(max-width:700px) {
  .due-groups {
    grid-template-columns: 1fr
  }

  .due-reminder {
    padding: 13px
  }

  .due-reminder-heading h2 {
    font-size: 14px
  }

  .due-total {
    white-space: nowrap
  }

  .due-job {
    gap: 7px;
    padding: 9px
  }

  .due-job-date {
    font-size: 10px
  }
}

.view-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px
}

.view-switch {
  display: flex;
  gap: 4px;
  background: #eef1ed;
  border-radius: 9px;
  padding: 3px
}

.view-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  padding: 7px 11px;
  border-radius: 7px;
  cursor: pointer
}

.view-switch button.active {
  background: #fff;
  color: var(--green);
  font-weight: 600;
  box-shadow: 0 1px 3px #13241a16
}

.today-list.rows-view {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden
}

.task-row {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) 140px 170px 44px;
  align-items: center;
  gap: 18px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line)
}

.task-row:last-child {
  border-bottom: 0
}

.row-title {
  display: grid;
  grid-template-columns: max-content 1fr;
  align-items: center;
  gap: 4px 9px;
  min-width: 0
}

.row-title strong {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap
}

.row-title small {
  grid-column: 2;
  color: var(--muted);
  font-size: 11px
}

.row-date {
  display: flex;
  flex-direction: column;
  font-size: 11px;
  color: var(--muted)
}

.row-date b {
  color: var(--ink);
  font-size: 12px
}

.eye-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--green);
  font-size: 17px;
  cursor: pointer
}

.eye-button:hover {
  background: var(--pale)
}

.detail-dialog {
  border: 0;
  border-radius: 14px;
  padding: 22px;
  width: min(540px, calc(100vw - 28px));
  box-shadow: 0 20px 80px #10251a35
}

.detail-dialog::backdrop {
  background: #17231db0;
  backdrop-filter: blur(2px)
}

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

.detail-head h2 {
  font-size: 18px;
  margin: 0
}

.detail-content {
  padding: 9px 0
}

.detail-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
  padding: 9px 2px;
  border-bottom: 1px solid #f0f2ef;
  font-size: 12px
}

.detail-row span {
  color: var(--muted)
}

.detail-row b {
  font-weight: 500;
  overflow-wrap: anywhere
}

@media(max-width:700px) {
  .task-row {
    grid-template-columns: minmax(0, 1fr) 90px 36px;
    gap: 9px;
    padding: 10px
  }

  .task-row>.status-chip {
    grid-column: 1;
    grid-row: 2;
    justify-self: start
  }

  .row-title {
    grid-column: 1;
    grid-row: 1
  }

  .row-date {
    grid-column: 2;
    grid-row: 1/3
  }

  .eye-button {
    grid-column: 3;
    grid-row: 1/3
  }

  .row-title .tag {
    display: none
  }

  .view-toolbar {
    align-items: center
  }
}

:root {
  --ink: #18251f;
  --muted: #748078;
  --line: #e7ebe7;
  --green: #176b4b;
  --pale: #eff7f2;
  --orange: #e9a14b;
  --bg: #f7f8f5
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans Thai', Tahoma, sans-serif
}

header {
  height: 76px;
  background: white;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(calc((100vw - 1200px)/2), 28px)
}

.brand,
.head-actions,
.role-label {
  display: flex;
  align-items: center;
  gap: 12px
}

.brand b {
  font-size: 16px
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 11px
}

.logo {
  background: #e4f1e8;
  color: var(--green);
  font-weight: 700;
  font-size: 22px;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center
}

.head-actions {
  gap: 18px
}

.role-label {
  font-size: 12px;
  color: var(--muted)
}

select,
input,
textarea {
  font: inherit
}

.role-label select {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer
}

.primary,
.secondary {
  border: 0;
  border-radius: 9px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer
}

.primary {
  background: var(--green);
  color: white
}

.primary:hover {
  background: #10583d
}

.secondary {
  background: #f0f2ef;
  color: var(--ink)
}

.bell {
  position: relative;
  border: 0;
  background: white;
  font-size: 22px;
  cursor: pointer
}

.bell i {
  position: absolute;
  top: -2px;
  right: -5px;
  background: #e76654;
  color: white;
  border: 2px solid white;
  border-radius: 20px;
  font-size: 10px;
  min-width: 17px;
  height: 17px;
  font-style: normal
}

.main {
  max-width: 1200px
}

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 34px 28px
}

.welcome {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin: 4px 0 24px
}

.eyebrow {
  color: var(--green);
  letter-spacing: 1.3px;
  font-weight: 700;
  font-size: 10px;
  margin: 0 0 5px
}

.welcome h1 {
  font-size: 27px;
  margin: 0 0 2px
}

.welcome p:not(.eyebrow) {
  color: var(--muted);
  font-size: 13px;
  margin: 0
}

.date {
  font-size: 13px;
  color: var(--muted);
  background: white;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 9px
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 26px
}

.stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 17px 19px;
  display: flex;
  justify-content: space-between;
  align-items: center
}

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

.stat strong {
  display: block;
  font-size: 25px;
  line-height: 1.3
}

.stat .icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--pale);
  display: grid;
  place-items: center;
  color: var(--green);
  font-size: 18px
}

.toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 15px
}

.home-toolbar-top,
.home-toolbar-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  min-width: 0
}

.home-work-heading {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.02em
}

.tabs {
  display: flex;
  gap: 5px;
  min-width: 0;
  flex-wrap: wrap
}

.tabs button {
  border: 0;
  background: transparent;
  padding: 9px 13px;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer
}

.tabs button.active {
  background: #e7f1ea;
  color: var(--green);
  font-weight: 600
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 11px;
  color: #9aa39d;
  flex: 0 1 330px
}

.search input {
  border: 0;
  outline: 0;
  width: 205px;
  font-size: 12px
}

.board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px
}

.column {
  background: #f0f2ef;
  border-radius: 12px;
  padding: 12px;
  min-height: 200px
}

.colhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 4px 11px;
  font-size: 13px;
  font-weight: 600
}

.count {
  border-radius: 99px;
  background: white;
  padding: 1px 8px;
  color: var(--muted);
  font-size: 11px
}

.job {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 14px;
  margin-bottom: 9px;
  box-shadow: 0 1px 2px #15261a08
}

.jobtop {
  display: flex;
  justify-content: space-between;
  align-items: center
}

.tag {
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 99px;
  background: #eff5f0;
  color: var(--green);
  font-weight: 600
}

.job h3 {
  font-size: 14px;
  margin: 9px 0 2px
}

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

.jobmeta {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #f0f2ef;
  margin-top: 11px;
  padding-top: 9px;
  font-size: 11px;
  color: var(--muted)
}

.jobmeta b {
  color: var(--ink);
  font-weight: 500
}

.actions {
  display: flex;
  gap: 6px;
  margin-top: 11px
}

.actions button {
  flex: 1;
  border: 1px solid var(--line);
  background: white;
  border-radius: 7px;
  padding: 6px;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  color: var(--green)
}

.actions .next {
  background: var(--green);
  color: white;
  border-color: var(--green)
}

.actions .pickup {
  color: #9a6321
}

.empty {
  color: #99a29c;
  font-size: 12px;
  text-align: center;
  padding: 30px 10px
}

.footnote {
  text-align: right;
  color: #a0a8a2;
  font-size: 10px;
  margin-top: 17px
}

dialog {
  border: 0;
  border-radius: 15px;
  padding: 0;
  width: min(680px, calc(100vw - 28px));
  box-shadow: 0 20px 80px #10251a35
}

dialog::backdrop {
  background: #17231db0;
  backdrop-filter: blur(2px)
}

#jobForm {
  padding: 25px
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 16px
}

.modal-head h2 {
  font-size: 21px;
  margin: 0
}

.close {
  border: 0;
  background: white;
  font-size: 26px;
  color: var(--muted);
  cursor: pointer
}

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

.form-grid label {
  font-size: 11px;
  font-weight: 600;
  color: #546158
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  display: block;
  width: 100%;
  margin-top: 5px;
  border: 1px solid #dfe5df;
  background: white;
  border-radius: 7px;
  padding: 9px 10px;
  font-size: 12px;
  outline-color: #76a990
}

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

.dynamic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px
}

.dynamic-grid label {
  font-weight: 500
}

.checkrow {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 9px;
  font-size: 11px
}

.checkrow label {
  display: flex;
  gap: 5px;
  align-items: center
}

.checkrow input {
  width: auto;
  margin: 0
}

.modal-actions {
  display: flex;
  justify-content: end;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 17px
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 22px;
  background: #193a2b;
  color: white;
  padding: 12px 18px;
  border-radius: 9px;
  box-shadow: 0 8px 30px #0002;
  opacity: 0;
  transform: translateY(10px);
  transition: .25s;
  pointer-events: none;
  font-size: 13px
}

.toast.show {
  opacity: 1;
  transform: none
}

@media(max-width:800px) {
  .board {
    grid-template-columns: 1fr 1fr
  }

  .stats {
    grid-template-columns: 1fr 1fr
  }

  .toolbar {
    align-items: stretch;
    gap: 10px
  }

  .home-toolbar-top,
  .home-toolbar-bottom {
    align-items: flex-start
  }

  .tabs {
    flex-wrap: wrap
  }

  .head-actions {
    gap: 8px
  }

  .role-label {
    font-size: 0
  }

  .role-label select {
    font-size: 11px
  }
}

@media(max-width:540px) {
  header {
    padding: 0 14px
  }

  .brand small {
    display: none
  }

  .head-actions .primary {
    font-size: 0;
    padding: 10px
  }

  .head-actions .primary:first-letter {
    font-size: 16px
  }

  main {
    padding: 24px 14px
  }

  .welcome h1 {
    font-size: 23px
  }

  .date {
    display: none
  }

  .board {
    grid-template-columns: 1fr
  }

  .stats {
    gap: 8px
  }

  .stat {
    padding: 13px
  }

  .stat strong {
    font-size: 21px
  }

  .search {
    width: 100%;
    flex-basis: 260px
  }

  .home-toolbar-top,
  .home-toolbar-bottom {
    width: 100%;
    flex-direction: column
  }

  .home-toolbar-top .search {
    flex-basis: auto
  }

  .home-toolbar-bottom .home-view-switch {
    align-self: flex-end
  }

  .search input {
    width: 85%
  }

  .form-grid {
    grid-template-columns: 1fr
  }

  .wide {
    grid-column: auto
  }

  .dynamic-grid {
    grid-template-columns: 1fr 1fr
  }
}

.calendar-panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fff 0%, #f5faf6 100%);
  box-shadow: 0 9px 28px #1d49300a
}

.calendar-panel:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #176b4b, #8bc4a0, #f0c45b)
}

.calendar-heading {
  position: relative;
  gap: 12px
}

.calendar-controls {
  flex-wrap: wrap
}

.holiday-button {
  border: 1px solid #cfe2d3;
  border-radius: 8px;
  background: #edf7ef;
  color: #176b4b;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 7px 10px;
  cursor: pointer
}

.calendar-controls .holiday-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: auto;
  min-width: max-content;
  height: 36px;
  padding: 7px 12px;
  flex: 0 0 auto;
  white-space: nowrap;
  line-height: 1.2;
}

#setHoliday[hidden] {
  display: none !important;
}

.holiday-button:hover {
  background: #dff0e3
}

.dark-theme .calendar-panel .holiday-button {
  background: #352844;
  border-color: #59476b;
  color: #d9c8f5;
}

.dark-theme .calendar-panel .holiday-button:hover {
  background: #443254;
}

.calendar-day {
  position: relative;
  width: 100%;
  border: 0;
  border-right: 1px solid #e7ebe7;
  border-bottom: 1px solid #e7ebe7;
  text-align: left;
  font: inherit;
  transition: background .15s, transform .15s
}

.calendar-day:hover {
  z-index: 1;
  transform: scale(1.025);
  box-shadow: 0 3px 10px #17332114
}

.calendar-day.day-past {
  background: #f0f2f0;
  color: #849087
}

.calendar-day.day-future {
  background: linear-gradient(145deg, #fff, #f4f9f5);
  color: #25372c
}

.calendar-day.day-today {
  background: #eaf5ed;
  color: #145f40;
  box-shadow: inset 0 0 0 2px #71a985
}

.calendar-day.day-closed {
  background: repeating-linear-gradient(135deg, #fff2ed, #fff2ed 8px, #fce9e2 8px, #fce9e2 16px);
  color: #a65343
}

.calendar-day.day-closed .day-number {
  color: #a04436;
  font-weight: 700
}

.calendar-day.sunday .day-number {
  color: #a04436
}

.calendar-day.muted {
  opacity: .55
}

.calendar-day.today .day-number {
  background: #176b4b;
  color: white;
  border-radius: 50%;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  margin: -3px 0 0 -3px;
  box-shadow: 0 2px 5px #176b4b40
}

.calendar-closed-label {
  display: block;
  margin-top: 7px;
  font-size: 9px;
  color: #a65343;
  font-weight: 600
}

.calendar-day .day-count {
  margin-top: 6px;
  color: #59675f
}

.calendar-weekday {
  border-right: 1px solid #e7ebe7
}

.calendar-weekday.weekday-sunday {
  color: #ae473c;
  background: #fff2ed
}

.calendar-key {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 3px;
  flex: 0 0 11px
}

.key-past {
  background: #dfe4df
}

.key-closed {
  background: #f3c4b6
}

.key-future {
  background: #dcefe1
}

.calendar-popup {
  border: 1px solid #e2e9e3;
  border-radius: 16px;
  padding: 21px;
  width: min(560px, calc(100vw - 28px));
  max-height: 85vh;
  overflow: auto;
  box-shadow: 0 22px 75px #14251c40
}

.calendar-popup::backdrop {
  background: #18251f99;
  backdrop-filter: blur(2px)
}

.calendar-popup-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf0ed;
  margin-bottom: 12px
}

.calendar-popup-head h2 {
  font-size: 18px;
  margin: 0
}

.calendar-popup-head .eyebrow {
  margin: 0 0 3px
}

.calendar-job-count {
  font-size: 12px;
  font-weight: 600;
  color: #45554b
}

.calendar-day-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #fff1ec;
  color: #a34638;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600
}

.remove-holiday {
  border: 0;
  background: white;
  color: #a34638;
  border-radius: 7px;
  padding: 6px 9px;
  font: inherit;
  font-size: 10px;
  cursor: pointer
}

.calendar-jobs {
  display: grid;
  gap: 7px
}

.calendar-job {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  text-align: left;
  font: inherit;
  color: var(--ink);
  cursor: pointer
}

.calendar-job:hover {
  background: #f5faf6;
  border-color: #cfe2d3
}

.calendar-job>span {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 3px
}

.calendar-job b {
  font-size: 12px;
  overflow-wrap: anywhere
}

.calendar-job small {
  font-size: 10px;
  color: var(--muted)
}

.calendar-job em {
  font-style: normal;
  border-radius: 99px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap
}

.pickup-done {
  background: #e8f4eb;
  color: #277246
}

.pickup-wait {
  background: #fff1dc;
  color: #9b641b
}

.calendar-job>i {
  font-style: normal;
  color: #87948b;
  font-size: 20px
}

.holiday-popup form>label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 12px 0;
  font-size: 12px;
  font-weight: 600;
  color: #516056
}

.holiday-popup input {
  border: 1px solid #dfe5df;
  border-radius: 8px;
  padding: 10px;
  font: inherit;
  font-size: 13px
}

.calendar-popup[open] {
  animation: calendar-pop .16s ease-out
}

@keyframes calendar-pop {
  from {
    opacity: 0;
    transform: translateY(6px) scale(.99)
  }

  to {
    opacity: 1;
    transform: none
  }
}

@media(max-width:700px) {
  .calendar-heading {
    align-items: flex-start
  }

  .calendar-controls {
    justify-content: flex-end;
    gap: 7px
  }

  .calendar-controls strong {
    min-width: 92px;
    font-size: 12px
  }

  .holiday-button {
    width: 100%
  }

  .calendar-day {
    font-size: 11px
  }

  .calendar-closed-label {
    font-size: 8px
  }

  .day-count {
    font-size: 9px !important;
    gap: 3px
  }

  .calendar-popup {
    padding: 16px
  }

  .calendar-legend {
    gap: 10px
  }
}

.task-actions button[data-task='edit'] {
  background: #eaf2ff;
  border: 1px solid #b9cfee;
  color: #245b9d;
  font-weight: 600
}

.task-actions button[data-task='edit']:hover {
  background: #dceaff
}

.task-actions button[data-task='delete'] {
  background: #fff0ef;
  border: 1px solid #edbbb7;
  color: #b4322e;
  font-weight: 600
}

.task-actions button[data-task='delete']:hover {
  background: #ffe2df
}

.row-admin-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px
}

.row-admin-actions button {
  border-radius: 7px;
  padding: 6px 8px;
  font: inherit;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer
}

.row-admin-actions .row-edit {
  background: #eaf2ff;
  border: 1px solid #b9cfee;
  color: #245b9d
}

.row-admin-actions .row-edit:hover {
  background: #dceaff
}

.row-admin-actions .row-delete {
  background: #fff0ef;
  border: 1px solid #edbbb7;
  color: #b4322e
}

.row-admin-actions .row-delete:hover {
  background: #ffe2df
}

.row-admin-actions .eye-button {
  font-size: 16px;
  padding: 0
}

.owner-status-dialog {
  width: min(440px, calc(100vw - 28px));
  border: 1px solid #d9e5dc;
  border-radius: 18px;
  padding: 23px;
  box-shadow: 0 24px 80px #14251c45
}

.owner-status-dialog::backdrop {
  background: #18251fa6;
  backdrop-filter: blur(3px)
}

.owner-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between
}

.owner-status-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #e9f4ec;
  color: #176b4b;
  font-size: 22px;
  font-weight: 700
}

.owner-status-dialog>.eyebrow {
  margin: 14px 0 4px
}

.owner-status-dialog h2 {
  font-size: 19px;
  line-height: 1.45;
  margin: 0;
  color: #25382d
}

.owner-status-job {
  font-size: 12px;
  color: var(--muted);
  margin: 6px 0 15px
}

.owner-status-recommend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #d6e8d9;
  border-radius: 11px;
  background: linear-gradient(110deg, #edf7ef, #f7fbf7);
  margin-bottom: 11px
}

.owner-status-recommend span {
  font-size: 11px;
  color: #5b7061
}

.owner-status-recommend strong {
  font-size: 12px;
  color: #176b4b
}

.owner-next-button {
  width: 100%;
  padding: 11px 14px
}

.owner-status-other {
  margin-top: 14px;
  border-top: 1px solid #edf0ed;
  padding-top: 12px
}

.owner-status-other summary {
  cursor: pointer;
  font-size: 12px;
  color: #647269;
  font-weight: 600
}

.owner-status-other label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 11px 0;
  font-size: 11px;
  color: #647269
}

.owner-status-other select {
  width: 100%;
  border: 1px solid #dfe5df;
  border-radius: 8px;
  background: white;
  padding: 9px;
  font: inherit;
  font-size: 12px
}

.owner-status-other .secondary {
  width: 100%;
  font-size: 12px
}

.task-row .status-chip {
  white-space: nowrap
}

@media(max-width:700px) {
  .row-admin-actions {
    gap: 4px
  }

  .row-admin-actions button {
    padding: 6px
  }

  .row-admin-actions .eye-button {
    width: 30px;
    height: 30px
  }

  .owner-status-dialog {
    padding: 18px
  }
}

.task-row:has(.row-admin-actions) {
  grid-template-columns: minmax(200px, 1fr) 140px 170px 150px
}

@media(max-width:700px) {
  .task-row:has(.row-admin-actions) {
    grid-template-columns: minmax(0, 1fr) 90px
  }

  .task-row:has(.row-admin-actions) .row-admin-actions {
    grid-column: 1/-1;
    grid-row: 3;
    justify-self: end
  }

  .task-row:has(.row-admin-actions)>.status-chip {
    grid-column: 1;
    grid-row: 2
  }

  .task-row:has(.row-admin-actions) .row-date {
    grid-column: 2;
    grid-row: 1/3
  }
}

.attachment-field {
  border: 1px dashed #cbdccf;
  border-radius: 11px;
  background: #f7fbf8;
  padding: 13px
}

.attachment-heading {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #35483b
}

.attachment-field>p {
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 11px
}

.attachment-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap
}

.attachment-button {
  position: relative;
  overflow: hidden;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbdccf;
  border-radius: 8px;
  background: #fff;
  color: #176b4b !important;
  padding: 8px 12px;
  font-size: 11px !important;
  font-weight: 600;
  cursor: pointer
}

.attachment-button:hover {
  background: #eef7f0
}

.attachment-button.camera-button {
  background: #176b4b;
  color: #fff !important;
  border-color: #176b4b
}

.attachment-button input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer
}

.attachment-hint {
  display: block;
  margin-top: 8px;
  color: #7a887e;
  font-size: 10px
}

.attachment-preview {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 10px
}

.attachment-thumb {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 94px;
  padding: 5px;
  border: 1px solid #dfe7e0;
  border-radius: 8px;
  background: #fff
}

.attachment-thumb img {
  width: 82px;
  height: 68px;
  object-fit: cover;
  border-radius: 5px
}

.attachment-thumb span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  color: #536158
}

.attachment-thumb button {
  border: 0;
  border-radius: 5px;
  background: #fff0ef;
  color: #ad3731;
  padding: 4px;
  font: inherit;
  font-size: 9px;
  cursor: pointer
}

.edit-job-dialog {
  width: min(720px, calc(100vw - 28px));
  max-height: 90vh;
  overflow: auto;
  padding: 22px
}

.edit-job-dialog form {
  padding: 0
}

.edit-job-dialog .modal-head {
  align-items: center
}

.edit-job-subtitle {
  font-size: 11px;
  color: var(--muted);
  margin: 4px 0 0
}

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

.edit-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #536158
}

.edit-form-grid input,
.edit-form-grid select,
.edit-form-grid textarea {
  width: 100%;
  border: 1px solid #dfe5df;
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  font: inherit;
  font-size: 12px;
  color: var(--ink);
  outline-color: #76a990
}

.edit-wide {
  grid-column: 1/-1
}

.job-attachment-gallery {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 8px
}

.job-attachment-gallery a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 110px;
  text-decoration: none;
  color: var(--muted);
  font-size: 10px
}

.job-attachment-gallery img {
  width: 110px;
  height: 86px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px
}

.edit-job-dialog button:disabled {
  opacity: .55;
  cursor: wait
}

@media(max-width:560px) {
  .edit-job-dialog {
    padding: 16px
  }

  .edit-form-grid {
    grid-template-columns: 1fr
  }

  .edit-wide {
    grid-column: auto
  }

  .attachment-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr
  }

  .attachment-button {
    text-align: center;
    padding: 9px 5px
  }
}

.theme-toggle {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #5a6c60;
  font-size: 20px;
  line-height: 1;
  cursor: pointer
}

.theme-toggle:hover {
  background: #eff7f2;
  color: #176b4b
}

.dark-theme {
  color-scheme: dark;
  --ink: #e8eee9;
  --muted: #a3afa7;
  --line: #34443a;
  --green: #82c69e;
  --pale: #24382c;
  --bg: #151c18
}

.dark-theme body,
.dark-theme {
  background: #151c18;
  color: #e8eee9
}

.dark-theme header,
.dark-theme .login-card,
.dark-theme .date,
.dark-theme .stat,
.dark-theme .search,
.dark-theme .job,
.dark-theme .task-card,
.dark-theme .task-row,
.dark-theme #board.rows-view,
.dark-theme .finance-panel,
.dark-theme .finance-metric,
.dark-theme .detail-section,
.dark-theme .payment-summary,
.dark-theme .attachment-thumb,
.dark-theme .calendar-job,
.dark-theme .notification-item.is-read {
  background: #202a24;
  color: #e8eee9;
  border-color: #34443a
}

.dark-theme .calendar-panel {
  background: linear-gradient(135deg, #202a24, #202e25);
  border-color: #34443a
}

.dark-theme .calendar-cell {
  border-color: #34443a
}

.dark-theme .calendar-weekday,
.dark-theme .calendar-day.day-past {
  background: #27312b;
  color: #a3afa7
}

.dark-theme .calendar-day.day-future {
  background: linear-gradient(145deg, #202a24, #24342a);
  color: #e8eee9
}

.dark-theme .calendar-day.day-today {
  background: #274b36;
  color: #e8eee9
}

.dark-theme .calendar-day.day-closed {
  background: repeating-linear-gradient(135deg, #382925, #382925 8px, #44302b 8px, #44302b 16px);
  color: #f0a99b
}

.dark-theme .calendar-weekday.weekday-sunday,
.dark-theme .calendar-day.sunday .day-number {
  background-color: #382925;
  color: #f0a99b
}

.dark-theme .calendar-legend b,
.dark-theme .calendar-day .day-count {
  color: #d5ded7
}

.dark-theme .calendar-key.key-past {
  background: #59665d
}

.dark-theme .calendar-key.key-future {
  background: #386248
}

.dark-theme .calendar-key.key-closed {
  background: #854f43
}

.dark-theme .column {
  background: #202923
}

.dark-theme .tag,
.dark-theme .logo {
  background: #2d4134;
  color: #a6daba
}

.dark-theme .page-nav {
  border-color: #34443a
}

.dark-theme .page-nav button {
  color: #a3afa7
}

.dark-theme .page-nav button.active {
  color: #9ad6ae;
  background: var(--ink);
}

.dark-theme .toolbar,
.dark-theme .welcome h1,
.dark-theme .calendar-heading h2,
.dark-theme .job h3,
.dark-theme .stat strong,
.dark-theme .detail-head h2 {
  color: #e8eee9
}

.dark-theme .welcome p:not(.eyebrow),
.dark-theme .job .customer,
.dark-theme .jobmeta,
.dark-theme .footnote,
.dark-theme .calendar-heading p:not(.eyebrow) {
  color: #a3afa7
}

.dark-theme .search input,
.dark-theme input,
.dark-theme select,
.dark-theme textarea {
  background: #18211b;
  color: #e8eee9;
  border-color: #46564b
}

.dark-theme .search input {
  border: 0
}

.dark-theme .search input::placeholder,
.dark-theme input::placeholder,
.dark-theme textarea::placeholder {
  color: #89978d
}

.dark-theme .secondary,
.dark-theme .calendar-controls button,
.dark-theme .close {
  background: #29352e;
  color: #dce5de;
  border-color: #3c4b41
}

.dark-theme .theme-toggle {
  background: #29352e;
  color: #f0d278;
  border-color: #3c4b41
}

.dark-theme .theme-toggle:hover {
  background: #34443a
}

.dark-theme .holiday-button {
  background: #263d2d;
  color: #a6daba;
  border-color: #405e49
}

.dark-theme .task-actions button,
.dark-theme .actions button {
  background: #29352e;
  color: #a6daba;
  border-color: #40564a
}

.dark-theme .task-actions button.action-main,
.dark-theme .actions .next,
.dark-theme .primary {
  background: #27754f;
  color: #fff;
  border-color: #27754f
}

.dark-theme .task-actions button[data-task='edit'],
.dark-theme .row-admin-actions .row-edit {
  background: #26374d;
  color: #a8caff;
  border-color: #3c5574
}

.dark-theme .task-actions button[data-task='delete'],
.dark-theme .row-admin-actions .row-delete {
  background: #482c2a;
  color: #ffaaa3;
  border-color: #70413d
}

.dark-theme .eye-button {
  background: #29352e;
  color: #a6daba;
  border-color: #40564a
}

.dark-theme .detail-dialog,
.dark-theme .calendar-popup,
.dark-theme .notifications-dialog,
.dark-theme .edit-job-dialog,
.dark-theme .owner-status-dialog,
.dark-theme .status-confirm-dialog,
.dark-theme .pickup-confirm-dialog {
  background: #202a24;
  color: #e8eee9;
  border-color: #3b4b40
}

.dark-theme .detail-hero,
.dark-theme .payment-figures>div,
.dark-theme .attachment-field {
  background: #26342b;
  border-color: #3b4b40
}

.dark-theme .detail-spec,
.dark-theme .notification-empty,
.dark-theme .summary-pill,
.dark-theme .finance-empty {
  background: #253129;
  color: #d3ddd5;
  border-color: #3b4b40
}

.dark-theme .detail-note {
  background: #3b3424;
  border-color: #9a762e
}

.dark-theme .detail-note>b,
.dark-theme .detail-note p {
  color: #e4d3a6
}

.dark-theme .detail-info-grid b,
.dark-theme .detail-section h3,
.dark-theme .payment-summary h3,
.dark-theme .notification-job,
.dark-theme .notification-title-line strong,
.dark-theme .row-date b,
.dark-theme .row-title strong {
  color: #e8eee9
}

.dark-theme .detail-info-grid span,
.dark-theme .detail-spec,
.dark-theme .notification-meta,
.dark-theme .notification-created {
  color: #a3afa7
}

.dark-theme .payment-figures>div {
  background: #26342b;
  border-color: #3b4b40
}

.dark-theme .notifications-heading,
.dark-theme .modal-head,
.dark-theme .detail-head {
  border-color: #3b4b40
}

.dark-theme .notification-item.is-unread {
  background: #294633;
  border-color: #426a4e
}

.dark-theme .notification-empty {
  background: #202a24
}

.dark-theme .calendar-job:hover {
  background: #2b3a30
}

.dark-theme .calendar-day-notice {
  background: #432c28;
  color: #ffb9ad
}

.dark-theme .owner-status-recommend {
  background: #294633;
  border-color: #426a4e
}

.dark-theme .owner-status-recommend span {
  color: #b4c7b8
}

.dark-theme .owner-status-recommend strong {
  color: #a6daba
}

.dark-theme .attachment-button {
  background: #29352e;
  color: #a6daba !important;
  border-color: #40564a
}

.dark-theme .attachment-button.camera-button {
  background: #27754f;
  color: #fff !important
}

.dark-theme .attachment-thumb button {
  background: #482c2a;
  color: #ffaaa3
}

.dark-theme .finance-row {
  border-color: #34443a
}

.dark-theme .finance-tabs {
  border-color: #34443a
}

.dark-theme .finance-tabs button {
  color: #a3afa7
}

.dark-theme .finance-tabs button.active {
  color: #a6daba
}

.dark-theme .finance-row small,
.dark-theme .finance-metric>span,
.dark-theme .finance-metric>small {
  color: #a3afa7
}

.dark-theme .session-bar {
  color: #a3afa7
}

.dark-theme .login-screen {
  background: radial-gradient(circle at 10% 10%, #26392c 0, transparent 35%), #151c18
}

.dark-theme .login-card>label,
.dark-theme .edit-form-grid label,
.dark-theme .holiday-popup form>label {
  color: #c4d0c7
}

.dark-theme .demo-accounts {
  border-color: #34443a;
  color: #a3afa7
}

.dark-theme .pickup-due-alert {
  background: #482c2a;
  border-color: #9c5149
}

.dark-theme .pickup-due-alert>span,
.dark-theme .pickup-due-alert>strong,
.dark-theme .pickup-reminder {
  color: #ffb9ad
}

.dark-theme .pickup-paid-alert {
  background: #294633;
  border-color: #426a4e;
  color: #a6daba
}

.dark-theme .status-change-preview span {
  background: #29352e;
  color: #e8eee9
}

.dark-theme .status-confirm-job {
  color: #a3afa7
}

.dark-theme .unread-badge {
  background: #56332f;
  color: #ffb5ac
}

.dark-theme .for-you-badge {
  background: #27754f;
  color: #fff
}

.dark-theme .calendar-job small {
  color: #a3afa7
}

.dark-theme .row-admin-actions .eye-button {
  background: #29352e;
  color: #a6daba;
  border-color: #40564a
}

.order-mode-tabs {
  display: flex;
  gap: 7px;
  padding: 5px;
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f3f6f3
}

.order-mode-tabs button {
  flex: 1;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 10px;
  cursor: pointer
}

.order-mode-tabs button.active {
  background: #fff;
  color: var(--green);
  box-shadow: 0 2px 7px #17332112
}

.order-mode-panel[hidden] {
  display: none !important
}

.order-mode-panel:not([hidden]) {
  display: grid
}

.photo-mode-intro {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 2px;
  padding: 12px 13px;
  border-radius: 9px;
  background: #eef7f0;
  color: #335542
}

.photo-mode-intro strong {
  font-size: 12px
}

.photo-mode-intro span {
  font-size: 11px;
  color: #697a6e
}

.dark-theme .order-mode-tabs {
  background: #18211b;
  border-color: #34443a
}

.dark-theme .order-mode-tabs button.active {
  background: #29372e;
  color: #a6daba
}

.dark-theme .photo-mode-intro {
  background: #263d2d;
  color: #c5dbca
}

.dark-theme .photo-mode-intro span {
  color: #a3b6a8
}

/* Dark theme refinements for filters and due reminders */
.dark-theme .tabs button.home-filter-all {
  background: #174a34;
  color: #b6e3c4
}

.dark-theme .tabs button.home-filter-design {
  background: #382d4b;
  color: #d0b9ee
}

.dark-theme .tabs button.home-filter-designing {
  background: #29374b;
  color: #bfd2f1
}

.dark-theme .tabs button.home-filter-production {
  background: #4a4021;
  color: #ecd78a
}

.dark-theme .tabs button.home-filter-producing {
  background: #493522;
  color: #f0c48d
}

.dark-theme .tabs button.home-filter-produced {
  background: #254331;
  color: #b7dfc0
}

.dark-theme .tabs button.home-filter-done {
  background: #303a33;
  color: #c3cec6
}

.dark-theme .tabs button.active {
  filter: brightness(1.12);
  box-shadow: 0 0 0 2px #a6b7aa55
}

.dark-theme .tabs .filter-count {
  background: #10171380;
  color: #e2ece4
}

.dark-theme .task-filters button {
  background: #222d26;
  color: #c1cdc4;
  border-color: #3c4a40
}

.dark-theme .task-filters button.filter-latest {
  background: #174a34;
  border-color: #286747;
  color: #b6e3c4
}

.dark-theme .task-filters button.filter-upcoming {
  background: #4b2d2b;
  border-color: #75433e;
  color: #ffb8ad
}

.dark-theme .task-filters button.filter-oldest {
  background: #49391f;
  border-color: #745a30;
  color: #f0d094
}

.dark-theme .task-filters button.filter-design {
  background: #382d4b;
  border-color: #594571;
  color: #d0b9ee
}

.dark-theme .task-filters button.filter-production {
  background: #4a4021;
  border-color: #6d5c2d;
  color: #ecd78a
}

.dark-theme .task-filters button.filter-producing {
  background: #29374b;
  border-color: #405572;
  color: #bfd2f1
}

.dark-theme .task-filters button.filter-produced {
  background: #254331;
  border-color: #3c6b48;
  color: #b7dfc0
}

.dark-theme .task-filters button.active {
  filter: brightness(1.15);
  box-shadow: 0 0 0 2px #a6b7aa55
}

.dark-theme .task-filters .filter-count {
  background: #10171380;
  color: #eef5ef
}

.dark-theme .due-reminder {
  background: #302522;
  border-color: #60423a;
  border-left-color: #b55b49;
  box-shadow: 0 3px 14px #0003
}

.dark-theme .due-reminder:not(.has-due) {
  background: #202a24;
  border-color: #34443a;
  border-left-color: #52795d;
  box-shadow: none
}

.dark-theme .due-reminder-heading .eyebrow {
  color: #e59a87
}

.dark-theme .due-reminder:not(.has-due) .due-reminder-heading .eyebrow {
  color: #9ac6a3
}

.dark-theme .due-reminder-heading h2 {
  color: #e8eee9
}

.dark-theme .due-alert-icon {
  background: #9f4035;
  color: #ffe2dc
}

.dark-theme .due-reminder:not(.has-due) .due-alert-icon {
  background: #426d4d;
  color: #d9f0dc
}

.dark-theme .due-total {
  background: #873a32;
  color: #ffe7e2
}

.dark-theme .due-group {
  background: #232d27;
  border-color: #57423a
}

.dark-theme .due-group h3 {
  background: #3a2925;
  color: #f0a99b
}

.dark-theme .due-tomorrow h3 {
  background: #3d351f;
  color: #e8d18a
}

.dark-theme .due-job {
  background: #252f29;
  border-color: #3b473f;
  color: #e8eee9
}

.dark-theme .due-job:hover {
  background: #303c34
}

.dark-theme .due-job-date {
  color: #e2aa9e
}

.dark-theme .due-job-open {
  color: #a3afa7
}

.dark-theme .due-none {
  color: #a3afa7
}

/* Quantexa inspired violet and turquoise brand palette */
:root {
  --ink: #281b3d;
  --muted: #756b82;
  --line: #e8e1ef;
  --green: #6440a5;
  --pale: #f2ecfa;
  --orange: #17cbb8;
  --bg: #f2eef7;
  --brand-violet: #49216d;
  --brand-purple: #7044cf;
  --brand-teal: #19cdb9;
}

body {
  background: radial-gradient(circle at 8% 0, #e7dcf4 0, transparent 31%), var(--bg);
  color: var(--ink);
}

header {
  background: linear-gradient(105deg, #7139d2 0%, #4e45c5 48%, #18bdbd 100%);
  border-bottom-color: transparent;
  color: #fff;
}

header .brand small,
header .role-label,
header .role-label select {
  color: #f2edff;
}

header .logo {
  background: #ffffff24;
  color: #fff;
}

header .theme-toggle,
header .bell {
  background: #ffffff1c;
  color: #fff;
}

header .bell,
header .bell:hover,
.dark-theme header .bell,
.dark-theme header .bell:hover {
  background: transparent;
  box-shadow: none;
}

.primary,
.dark-theme .primary {
  background: linear-gradient(105deg, var(--brand-purple), #5841b5);
  color: #fff;
}

.primary:hover,
.dark-theme .primary:hover {
  background: linear-gradient(105deg, #5a2db4, #453397);
}

.secondary,
.dark-theme .secondary {
  background: #f0eafb;
  color: #51377d;
}

.logo {
  background: #eee6fa;
  color: #6841ad;
}

button.active,
.tab.active,
.nav-tab.active,
.view-tab.active,
.filter-btn.active {
  border-color: #7044cf;
  color: #58358f;
  background: #f0eafb;
}

/* Keep the main navigation active state clear without a colored tile. */
#appShell .page-nav button.active,
#appShell .page-nav button.active:hover {
  color: var(--green);
  background: transparent;
  border-bottom-color: var(--green);
}

/* Dark theme: tone down view switches and no-results states. */
.dark-theme .home-view-switch,
.dark-theme .view-switch {
  background: #2a2038;
  border: 1px solid #493b5d;
}

.dark-theme .home-view-switch button,
.dark-theme .view-switch button {
  color: #b7abc8;
}

.dark-theme .home-view-switch button.active,
.dark-theme .view-switch button.active {
  background: #423451;
  color: #eadfff;
  box-shadow: none;
}

.dark-theme .empty,
.dark-theme .task-empty {
  background: #241b31;
  border: 1px solid #493b5d;
  border-radius: 12px;
  color: #c5b9d4;
}

.dark-theme {
  color-scheme: dark;
  --ink: #f0eaf8;
  --muted: #b7abc8;
  --line: #493b5d;
  --green: #b79ae9;
  --pale: #382a4b;
  --orange: #26d9c5;
  --bg: #1d1628;
  --brand-violet: #32184c;
  --brand-purple: #9a73e8;
  --brand-teal: #26d9c5;
}

.dark-theme body,
body.dark-theme {
  background: radial-gradient(circle at 8% 0, #39234f 0, transparent 33%), #1d1628;
  color: #f0eaf8;
}

.dark-theme header {
  background: linear-gradient(105deg, #573095 0%, #40378e 48%, #137f83 100%);
  border-bottom-color: #493b5d;
}

.dark-theme .logo {
  background: #ffffff1d;
  color: #fff;
}

.calendar-toggle {
  width: 31px;
  height: 31px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--green);
  font: inherit;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}

.calendar-toggle:hover {
  background: var(--pale);
}

.calendar-content {
  overflow: hidden;
}

.calendar-panel.is-collapsed .calendar-content {
  display: none;
}

.calendar-panel.is-collapsed .calendar-heading {
  margin-bottom: 0;
}

.dark-theme .calendar-toggle {
  background: #29352e;
  border-color: var(--line);
  color: var(--ink);
}

.calendar-heading h2 {
  display: flex;
  align-items: center;
  gap: 9px;
}

.calendar-toggle {
  display: inline-grid;
  place-items: center;
  padding: 0;
  flex: 0 0 31px;
}

.eye-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.eye-icon path,
.eye-icon circle {
  transition: opacity .15s ease;
}

.calendar-toggle.is-hidden .eye-icon circle {
  opacity: 0;
}

.calendar-toggle.is-hidden .eye-icon path {
  d: path('M3 3l18 18M10.6 6.2A10.9 10.9 0 0 1 12 6c6.3 0 9.8 6 9.8 6a15 15 0 0 1-3 3.4M6.2 6.2C3.6 7.8 2.2 12 2.2 12s3.5 6 9.8 6c1.2 0 2.3-.2 3.3-.6');
}

.dark-theme .calendar-toggle {
  background: #382a4b;
}

.head-actions .role-label[hidden] {
  display: none !important;
}
