:root {
  --ink: #3a2500;
  --muted: #9a8268;
  --primary: #ff7900;
  --line: #f0dfc8;
  --cream: #fff8ef;
  --orange: #e97922;
  --font:
    -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei",
    sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 14px var(--font);
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button,
select,
input,
textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 13px;
  background: #fff;
  color: var(--ink);
}
button:hover {
  filter: brightness(0.97);
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #e9ad6e;
  outline-offset: 2px;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
h1,
h2,
h3,
p {
  margin: 0;
}
button.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
button.orange {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
}
.shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: #ffcd6d;
  color: #815215;
  padding: 32px 18px;
  display: flex;
  flex-direction: column;
  position: fixed;
  width: 220px;
  height: 100vh;
  z-index: 20;
}
.brand {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 0 10px 32px;
}
.brand-mark {
  height: 39px;
  width: 39px;
  border: 1px solid #d88e30;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #9d570e;
  font-size: 25px;
}
.brand strong {
  color: #603b06;
  font-size: 20px;
  letter-spacing: 2px;
}
.brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 2px;
  margin-top: 5px;
  color: #9a6627;
}
.nav-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: #a67533;
  padding: 18px 15px 10px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nav button {
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  border: 0;
  color: #78490c;
  background: transparent;
  padding: 13px 16px;
}
.nav button.active {
  background: #fff4d8;
  color: #9f5500;
}
.nav button.active:after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ff7900;
  margin-left: auto;
}
.nav button span {
  width: 19px;
  font-size: 18px;
}
.sidebar-foot {
  margin-top: auto;
  padding: 20px 13px;
  border-top: 1px solid #e9b25c;
  line-height: 1.8;
  font-size: 11px;
  color: #98692c;
}
.side-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: #ff7900;
  border-radius: 50%;
  margin-right: 6px;
}
.main {
  grid-column: 2;
  min-width: 0;
}
.topbar {
  height: 74px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  gap: 12px;
}
.crumb {
  font-size: 12px;
  color: var(--muted);
}
.crumb b {
  color: var(--ink);
  font-weight: 500;
}
.top-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.demo {
  color: #9f6a33;
  background: #fbf1df;
  border: 1px solid #eedfc5;
  border-radius: 5px;
  font-size: 11px;
  padding: 5px 8px;
}
.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff1dd;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
}
.content {
  padding: 32px 36px 24px;
  max-width: 1900px;
  margin: auto;
}
.eyebrow {
  font-size: 11px;
  color: var(--orange);
  letter-spacing: 2px;
  margin-bottom: 10px;
}
.page-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 26px;
}
.page-head h1 {
  font-size: 29px;
  letter-spacing: 1px;
  font-weight: 650;
}
.page-head p {
  margin-top: 9px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 13px;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 18px 20px;
  position: relative;
}
.stat label {
  font-size: 12px;
  color: var(--muted);
}
.stat strong {
  font-size: 28px;
  display: block;
  margin-top: 9px;
  font-weight: 600;
}
.stat small {
  font-size: 12px;
  color: var(--muted);
  margin-left: 5px;
  font-weight: 400;
}
.stat .mini-icon {
  position: absolute;
  right: 18px;
  top: 21px;
  color: #c99b63;
  font-size: 20px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.toolbar {
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.tabs {
  background: #fff1dd;
  padding: 4px;
  display: flex;
  border-radius: 8px;
  gap: 3px;
}
.tabs button {
  border: none;
  padding: 8px 15px;
  background: transparent;
  color: var(--muted);
  white-space: nowrap;
}
.tabs button.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 1px 4px #0000000c;
  font-weight: 600;
}
.month-control {
  display: flex;
  align-items: center;
  gap: 8px;
}
.month-control input {
  padding: 8px 9px;
}
.icon-btn {
  padding: 7px 12px;
}
.legend {
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  flex-wrap: wrap;
}
.dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
  margin-right: 5px;
}
.fd {
  background: #ed9233;
}
.yh {
  background: #e6b047;
}
.sf {
  background: #b87844;
}
.legend-bar {
  padding: 13px 20px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.schedule-wrap {
  overflow: auto;
  max-height: 61vh;
  scrollbar-width: thin;
  scrollbar-color: #e5c69a #fff8ef;
}
.schedule {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 100%;
  font-size: 12px;
}
.schedule th,
.schedule td {
  border-right: 1px solid #f7ead9;
  border-bottom: 1px solid #f7ead9;
  min-width: 107px;
  padding: 9px 7px;
  height: 65px;
  text-align: center;
  background: white;
}
.schedule thead th {
  position: sticky;
  top: 0;
  background: #fff8ef;
  z-index: 3;
  height: 61px;
  font-weight: 500;
  color: var(--muted);
}
.schedule thead th strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
  margin-bottom: 4px;
}
.schedule thead th.weekend {
  background: #fcf5ea;
  color: #aa7742;
}
.schedule thead th.today {
  background: #ffe4ae;
}
.schedule .name-col {
  position: sticky;
  left: 0;
  min-width: 148px;
  width: 148px;
  text-align: left;
  padding-left: 19px;
  z-index: 2;
  background: #fff;
}
.schedule thead .name-col {
  z-index: 4;
  background: #fff8ef;
}
.emp-name {
  font-size: 13px;
  font-weight: 600;
  display: block;
}
.emp-type {
  display: block;
  font-size: 10px;
  color: #8a958c;
  margin-top: 5px;
  font-weight: 400;
}
.shift {
  display: block;
  padding: 6px 4px;
  border-radius: 6px;
  font-size: 11px;
  color: #aa590a;
  background: #fff1d8;
  border-left: 2px solid #eea23c;
  white-space: nowrap;
}
.shift.yuan {
  background: #faf3e7;
  color: #9c763c;
  border-color: #c5a567;
}
.shift.san {
  background: #faeee4;
  color: #9a6139;
  border-color: #c6936e;
}
.shift b {
  display: block;
  font-weight: 550;
  margin-bottom: 4px;
}
.shift time {
  font-size: 10px;
  letter-spacing: -0.3px;
}
.off {
  font-size: 11px;
  color: #baad9c;
}
.editable {
  cursor: pointer;
}
.editable:hover {
  background: #fbf5e9;
}
.table-foot {
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  gap: 8px;
}
.status {
  font-size: 11px;
  color: #a76814;
  background: #fff0d5;
  padding: 5px 9px;
  border-radius: 5px;
}
.note {
  border: 1px solid #ece1cb;
  background: #fcf7ec;
  color: #967246;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.8;
  margin-bottom: 18px;
}
.note.green {
  background: #fff1dd;
  border-color: #f0d6aa;
  color: #a26416;
}
.footer {
  padding: 20px 0 2px;
  color: #ad9a82;
  font-size: 10px;
  display: flex;
  justify-content: space-between;
}
.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.cal-day-head {
  padding: 14px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  background: #fffaf4;
}
.cal-day {
  min-height: 115px;
  padding: 11px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  background: white;
  text-align: left;
  border-radius: 0;
}
.cal-day.empty {
  background: #fffaf4;
}
.cal-day.selected {
  background: #ffedc5;
  box-shadow: inset 0 0 0 2px #ff9f43;
}
.cal-day .day-num {
  font-size: 15px;
  font-weight: 600;
}
.cal-day.weekend .day-num {
  color: #bd8044;
}
.cal-day .shift {
  margin-top: 9px;
}
.cal-day .off {
  display: block;
  margin-top: 14px;
}
.leave-names {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.8;
  margin-top: 7px;
}
.count-badge {
  font-size: 10px;
  float: right;
  background: #fff0d8;
  padding: 3px 5px;
  border-radius: 4px;
  color: #a57535;
}
.closed {
  background: #f5f4f0;
  color: #a5a79f;
}
.closed-label {
  display: block;
  margin-top: 8px;
  color: #a68d6a;
  font-size: 10px;
}
.layout-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 20px;
}
.panel {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  align-self: start;
}
.panel h3 {
  font-size: 15px;
  margin-bottom: 16px;
}
.panel p {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}
.field label {
  font-size: 12px;
  color: #738174;
}
.field input,
.field select {
  width: 100%;
}
.full {
  width: 100%;
}
.divider {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 20px 0;
}
.person-line {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.person-line .avatar {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.person-line strong {
  font-size: 12px;
  display: block;
}
.person-line small {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 5px;
}
.person-line button {
  margin-left: auto;
  padding: 7px 9px;
  font-size: 11px;
}
.signed {
  color: #a76814;
  font-size: 11px;
  margin-left: auto;
}
.empty-state {
  padding: 35px;
  text-align: center;
  color: var(--muted);
  line-height: 2;
}
.pill {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 4px;
  background: #fff0d5;
  color: #aa701c;
  font-size: 10px;
}
.pill.warn {
  background: #fcf0df;
  color: #b78442;
}
.people-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.employee-card {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 11px;
  padding: 21px;
}
.employee-top {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 17px;
}
.employee-top .avatar {
  width: 41px;
  height: 41px;
  font-size: 16px;
}
.employee-top h3 {
  font-size: 15px;
}
.employee-top p {
  font-size: 11px;
  color: var(--muted);
  margin-top: 5px;
}
.employee-card dl {
  display: grid;
  grid-template-columns: 80px 1fr;
  font-size: 12px;
  gap: 10px;
  margin: 0 0 18px;
}
.employee-card dt {
  color: var(--muted);
}
.employee-card dd {
  margin: 0;
}
.employee-card button {
  width: 100%;
  font-size: 12px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: #56300b70;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  backdrop-filter: blur(3px);
}
.modal {
  width: min(510px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 26px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 25px 90px #6d3d1230;
}
.modal h2 {
  font-size: 21px;
  margin-bottom: 8px;
}
.modal > p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  margin-bottom: 22px;
}
.modal-close {
  float: right;
  border: 0;
  padding: 4px 8px;
  font-size: 20px;
  background: #fff4e3;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  background: #ff7900;
  color: white;
  padding: 14px 23px;
  border-radius: 10px;
  z-index: 100;
  box-shadow: 0 7px 25px #0002;
  font-size: 13px;
  max-width: 90vw;
}
.history {
  padding: 12px;
  background: #fff8ef;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.9;
  margin-bottom: 12px;
}
.mobile-brand {
  display: none;
}
.admin-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--line);
  background: #fffaf4;
  font-size: 12px;
  flex-wrap: wrap;
}
.small-text {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.9;
}
.store-summary {
  padding: 13px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}
.store-summary strong {
  color: var(--primary);
}
.warn-text {
  color: #b87839;
}
.section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
}
.badge-number {
  margin-left: 6px;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 4px;
  background: #f3e4c9;
  color: #8c6835;
}
@media (min-width: 1500px) {
  .schedule th,
  .schedule td {
    min-width: 113px;
  }
  .content {
    padding: 40px 44px;
  }
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 185px minmax(0, 1fr);
  }
  .sidebar {
    width: 185px;
    padding: 25px 12px;
  }
  .brand {
    padding: 0 4px 24px;
  }
  .brand strong {
    font-size: 17px;
  }
  .content {
    padding: 25px 22px;
  }
  .topbar {
    padding: 0 22px;
  }
  .layout-split {
    grid-template-columns: minmax(0, 1fr) 245px;
    gap: 14px;
  }
  .people-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats {
    gap: 9px;
  }
  .stat {
    padding: 16px;
  }
  .page-head h1 {
    font-size: 25px;
  }
}
@media (max-width: 760px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 12px 14px 0;
  }
  .brand {
    padding: 0 0 12px;
  }
  .brand-mark {
    width: 32px;
    height: 32px;
    font-size: 21px;
  }
  .brand strong {
    font-size: 17px;
  }
  .brand small {
    font-size: 8px;
    margin-top: 3px;
  }
  .nav-label,
  .sidebar-foot {
    display: none;
  }
  .nav {
    flex-direction: row;
    overflow: auto;
    gap: 3px;
    padding-bottom: 10px;
  }
  .nav button {
    padding: 9px 11px;
    font-size: 12px;
    white-space: nowrap;
  }
  .nav button span {
    display: none;
  }
  .nav button.active:after {
    display: none;
  }
  .topbar {
    height: 56px;
    padding: 0 16px;
  }
  .crumb {
    font-size: 11px;
  }
  .top-right {
    gap: 6px;
  }
  .top-right button {
    font-size: 11px;
    padding: 7px;
  }
  .demo {
    font-size: 9px;
  }
  .content {
    padding: 23px 14px;
  }
  .page-head {
    align-items: start;
    margin-bottom: 20px;
    flex-direction: column;
  }
  .page-head h1 {
    font-size: 25px;
  }
  .page-head p {
    font-size: 12px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
    margin-bottom: 18px;
  }
  .stat {
    padding: 13px 15px;
  }
  .stat strong {
    font-size: 24px;
  }
  .stat .mini-icon {
    top: 15px;
    font-size: 16px;
  }
  .toolbar {
    padding: 12px;
    gap: 12px;
  }
  .toolbar .tabs {
    width: 100%;
  }
  .tabs button {
    flex: 1;
    padding: 8px 10px;
    font-size: 12px;
  }
  .month-control {
    flex-wrap: wrap;
  }
  .legend-bar {
    padding: 11px 12px;
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }
  .schedule .name-col {
    min-width: 104px;
    padding-left: 12px;
  }
  .schedule th,
  .schedule td {
    min-width: 99px;
  }
  .schedule-wrap {
    max-height: 60vh;
  }
  .table-foot {
    padding: 12px;
    font-size: 10px;
  }
  .layout-split {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 18px;
  }
  .cal-day {
    padding: 7px 4px;
    min-height: 97px;
  }
  .cal-day .day-num {
    font-size: 13px;
  }
  .cal-day .shift {
    font-size: 9px;
    padding: 4px 2px;
  }
  .shift time {
    font-size: 9px;
  }
  .cal-day-head {
    padding: 11px 0;
  }
  .leave-names {
    font-size: 9px;
  }
  .count-badge {
    font-size: 8px;
    padding: 2px;
  }
  .cal-day .shift b {
    font-size: 9px;
  }
  .people-grid {
    grid-template-columns: 1fr;
  }
  .footer {
    gap: 15px;
    line-height: 1.8;
  }
  .legend {
    gap: 10px;
  }
  .calendar .shift time {
    display: block;
    white-space: normal;
    font-size: 8px;
  }
  .note {
    font-size: 11px;
    padding: 11px 12px;
  }
  .admin-bar {
    padding: 12px;
  }
  .modal {
    padding: 22px;
  }
  .topbar .avatar {
    display: none;
  }
}

.sidebar {
  background: linear-gradient(165deg, #ffcf6e 0%, #ffb555 65%, #ff9f43 100%);
}
.brand-mark {
  background: #fff3cb;
  border-color: #e9b15e;
}
.brand small {
  color: #946021;
}
.nav-label {
  color: #996629;
}
.nav button.active {
  color: #9f5500;
  box-shadow: 0 2px 8px #bc721118;
}
.summary-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.summary-heading h2 {
  font-size: 15px;
}
.summary-heading span {
  font-size: 12px;
  color: var(--muted);
}
.today-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.summary-card {
  background: #fff;
  border: 1px solid #f0d6aa;
  border-radius: 12px;
  padding: 18px 20px;
  border-top: 3px solid #ffb550;
}
.summary-store {
  font-size: 12px;
  font-weight: 600;
  color: #be6b12;
}
.summary-card p {
  font-size: 16px;
  line-height: 1.9;
  margin-top: 9px;
  font-weight: 550;
}
.summary-card small {
  font-size: 12px;
  color: #b06c19;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.8;
  font-size: 12px;
  margin: 10px 0;
  color: #9b691f;
}
.check-label input {
  width: 16px;
  height: 16px;
  accent-color: #ff7900;
}
.inline-error {
  font-size: 12px;
  color: #bc4c27;
  line-height: 1.8;
  margin-top: 10px;
}
.holiday-label {
  display: block;
  font-size: 9px;
  color: #c26719;
  margin-top: 4px;
}
.alert-list {
  max-height: 300px;
  overflow: auto;
  margin-bottom: 18px;
}
.alert-item {
  font-size: 12px;
  line-height: 1.8;
  padding: 9px 11px;
  margin-bottom: 7px;
  border-radius: 7px;
  background: #fff5e8;
  color: #a56827;
}
.note.green {
  background: #fff1dd;
  color: #a26416;
  border-color: #f0d6aa;
}
.shift {
  background: #fff1d8;
  color: #aa590a;
  border-color: #eea23c;
}
.fd {
  background: #ed9233;
}
.sf {
  background: #b87844;
}
.table-foot {
  line-height: 1.7;
}
@media (max-width: 760px) {
  .today-summary {
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 18px;
  }
  .summary-card {
    padding: 12px 15px;
    display: flex;
    gap: 14px;
    align-items: baseline;
    border-top: 1px solid #f0d6aa;
    border-left: 3px solid #ffb550;
  }
  .summary-store {
    min-width: 42px;
  }
  .summary-card p {
    font-size: 13px;
    margin: 0;
    line-height: 1.9;
  }
  .summary-heading {
    margin-bottom: 10px;
  }
}

/* v3: muted brand palette and compact scheduling */
:root {
  --ink: #403b34;
  --muted: #82796d;
  --primary: #9c7955;
  --line: #e8e1d7;
  --cream: #fbf9f5;
  --orange: #a47b50;
}
.sidebar {
  background: #f1e7d8;
  color: #70604c;
}
.brand {
  gap: 10px;
  padding: 0 5px 25px;
}
.brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  flex-shrink: 0;
}
.brand strong {
  color: #4e453a;
  font-size: 19px;
}
.brand small {
  color: #8b7e6b;
  font-size: 9px;
  letter-spacing: 1.2px;
}
.nav-label {
  color: #9b8b77;
}
.nav button {
  color: #73624d;
}
.nav button.active {
  background: #fffaf2;
  color: #765637;
  box-shadow: 0 1px 4px #6953330a;
}
.nav button.active:after,
.side-dot {
  background: #b49a7a;
}
.sidebar-foot {
  color: #988772;
  border-color: #dfd2c0;
}
.topbar {
  height: 64px;
}
.content {
  padding-top: 24px;
}
.demo {
  background: #f6f1e8;
  color: #998369;
  border-color: #e9dfcf;
}
.avatar {
  background: #f3ede4;
}
.tabs {
  background: #f4f0e9;
}
.tabs button.active {
  color: #876543;
}
.summary-heading {
  margin-bottom: 10px;
}
.summary-card {
  border-color: #e8e1d7;
  border-top: 2px solid #ddcbb5;
  padding: 14px 16px;
}
.summary-store {
  color: #867158;
}
.summary-card p {
  font-size: 14px;
  line-height: 1.8;
  margin-top: 6px;
}
.summary-card small {
  color: #967c5c;
}
.today-summary {
  gap: 12px;
  margin-bottom: 20px;
}
.toolbar {
  padding: 13px 16px;
}
.legend-bar {
  padding: 10px 16px;
}
.schedule-wrap {
  max-height: 68vh;
  scrollbar-color: #d7cabb #f8f5f0;
}
.schedule {
  font-size: 11px;
}
.schedule th,
.schedule td {
  min-width: 76px;
  height: 45px;
  padding: 4px 5px;
  border-color: #efebe4;
}
.schedule thead th {
  height: 47px;
  background: #f8f6f1;
}
.schedule thead th strong {
  font-size: 14px;
  margin-bottom: 2px;
}
.schedule thead th.weekend {
  background: #f7f1e7;
  color: #978163;
}
.schedule thead th.today {
  background: #efe2ce;
}
.schedule .name-col {
  min-width: 112px;
  width: 112px;
  padding-left: 12px;
}
.schedule thead .name-col {
  background: #f8f6f1;
}
.emp-name {
  font-size: 12px;
}
.emp-type {
  font-size: 9px;
  margin-top: 3px;
  color: #9b9388;
}
.schedule .shift {
  padding: 4px 3px;
  border-radius: 4px;
}
.shift {
  background: #fbeddc;
  color: #855e37;
  border-color: #d8b28a;
  font-size: 10px;
}
.shift b {
  margin-bottom: 2px;
  font-size: 10px;
}
.shift time {
  font-size: 10px;
}
.shift.yuan {
  background: #edf3e8;
  color: #5d7250;
  border-color: #b1c3a1;
}
.shift.san {
  background: #faf5da;
  color: #82733d;
  border-color: #d6c58e;
}
.fd {
  background: #d8b28a;
}
.yh {
  background: #b1c3a1;
}
.sf {
  background: #d6c58e;
}
.off {
  color: #b6afa4;
  font-size: 10px;
}
.editable:hover {
  background: #f7f2ea;
}
.table-foot {
  padding: 11px 16px;
}
.status,
.pill {
  background: #f3eddf;
  color: #8b7658;
}
.note,
.note.green {
  background: #f8f3e9;
  border-color: #e8decc;
  color: #8b765b;
}
.check-label input {
  accent-color: #a1825d;
}
.cal-day.selected {
  background: #f4eadc;
  box-shadow: inset 0 0 0 2px #bda17e;
}
.count-badge {
  background: #f3eee6;
  color: #9b876d;
}
.alert-item {
  background: #f8f1e8;
  color: #8d7353;
}
.toast {
  background: #80674e;
}
.cal-day-head {
  background: #f8f6f1;
}
.cal-day .shift {
  padding: 4px 3px;
}
.calendar .shift b {
  font-size: 10px;
}
.calendar .shift.yuan {
  background: #edf3e8;
  color: #5d7250;
  border-color: #b1c3a1;
}
.calendar .shift.san {
  background: #faf5da;
  color: #82733d;
  border-color: #d6c58e;
}
@media (min-width: 1500px) {
  .schedule th,
  .schedule td {
    min-width: 78px;
  }
  .content {
    padding-top: 28px;
  }
}
@media (max-width: 1100px) {
  .brand {
    gap: 7px;
  }
  .brand-logo {
    width: 40px;
    height: 40px;
  }
  .brand strong {
    font-size: 17px;
  }
}
@media (max-width: 760px) {
  .sidebar {
    padding-top: 10px;
  }
  .brand {
    padding: 0 0 10px;
  }
  .brand-logo {
    width: 38px;
    height: 38px;
  }
  .brand strong {
    font-size: 17px;
  }
  .brand small {
    font-size: 8px;
  }
  .topbar {
    height: 52px;
  }
  .content {
    padding-top: 18px;
  }
  .today-summary {
    gap: 7px;
    margin-bottom: 15px;
  }
  .summary-card {
    padding: 10px 13px;
    border-top: 1px solid #e8e1d7;
    border-left: 2px solid #ddcbb5;
  }
  .summary-card p {
    font-size: 12px;
    line-height: 1.8;
    margin: 0;
  }
  .summary-card small {
    font-size: 10px;
  }
  .summary-heading h2 {
    font-size: 14px;
  }
  .summary-heading span {
    font-size: 11px;
  }
  .toolbar {
    padding: 10px;
  }
  .legend-bar {
    padding: 9px 10px;
  }
  .schedule th,
  .schedule td {
    min-width: 72px;
    height: 43px;
    padding: 3px 4px;
  }
  .schedule .name-col {
    min-width: 94px;
    width: 94px;
    padding-left: 9px;
  }
  .schedule thead th {
    height: 43px;
  }
  .schedule thead th strong {
    font-size: 13px;
  }
  .emp-name {
    font-size: 11px;
  }
  .schedule .shift {
    padding: 3px 2px;
  }
  .schedule-wrap {
    max-height: 67vh;
  }
  .table-foot {
    padding: 10px;
  }
  .cal-day .shift {
    padding: 4px 2px;
  }
  .calendar .shift b {
    font-size: 9px;
  }
  .calendar .shift time {
    font-size: 9px;
  }
}

/* v4: brand mask, legible holiday headers, and non-selectable submitted dates. */
.brand-logo {
  border-radius: 50%;
  clip-path: circle(50%);
  object-fit: contain;
}
.brand small {
  letter-spacing: 0.3px;
  font-size: 10px;
  white-space: nowrap;
}
.brand {
  gap: 8px;
}
.summary-card p {
  margin: 0;
  font-size: 13px;
}
.summary-store {
  font-size: 13px;
  font-weight: 600;
}
.summary-separator {
  color: #9b8a75;
}
.schedule .off {
  font-size: 8px;
}
.schedule thead th.date-header {
  height: 58px;
  background: #fdfcfa;
  color: #766f64;
  padding: 6px 4px;
  vertical-align: middle;
}
.schedule thead th.weekend {
  background: #f8e7d1;
  color: #8b6338;
}
.schedule thead th.special-day {
  background: #f8e7d1;
  color: #8b6338;
}
.schedule thead th.today {
  box-shadow: inset 0 -3px 0 #b39876;
}
.schedule thead th.today strong {
  font-size: 12px;
  color: #775735;
}
.date-detail {
  display: block;
  font-size: 10px;
  line-height: 1.5;
}
.festival-name {
  display: block;
  white-space: normal;
  max-width: 83px;
  font-size: 9px;
  line-height: 1.4;
  margin: 2px auto 0;
  color: #8b6338;
}
.calendar .special-day {
  background: #fcf4e9;
}
.cal-day.weekend {
  background: #fcf4e9;
}
.cal-day.special-day {
  background: #fcf4e9;
}
.cal-day:disabled,
.cal-day.filled {
  opacity: 1;
  cursor: default;
}
.cal-day.filled {
  box-shadow: inset 0 0 0 1px #d0c0a8;
}
.cal-day.filled .pill {
  background: #eee6d8;
  color: #8b765a;
}
.cal-day.filled:hover {
  filter: none;
}
.cal-day.closed {
  background: #efede8;
}
.withdraw-button {
  float: right;
  font-size: 11px;
  padding: 4px 8px;
  margin-left: 6px;
}
.date-management .field {
  margin-top: 14px;
}
.date-management p {
  margin-bottom: 12px;
}
.calendar-settings button {
  padding: 4px 7px;
  margin-left: 5px;
  float: right;
  font-size: 11px;
}
@media (max-width: 760px) {
  .brand small {
    font-size: 9px;
  }
  .summary-card p,
  .summary-store {
    font-size: 12px;
  }
  .schedule .off {
    font-size: 7px;
  }
  .date-detail {
    font-size: 9px;
  }
  .festival-name {
    font-size: 8px;
    max-width: 70px;
  }
  .schedule thead th.date-header {
    height: 56px;
  }
  .summary-card {
    display: block;
  }
  .calendar .off {
    font-size: 9px;
  }
}

/* v5: account controls inside the role-aware navigation, unified holidays. */
.sidebar-account {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: auto;
  padding: 22px 12px 16px;
}
.sidebar-account #loginBtn {
  width: 100%;
  text-align: left;
  background: #fffaf4;
  border-color: #e1d5c5;
  font-size: 12px;
}
.sidebar-foot {
  margin-top: 0;
  padding-top: 15px;
}
.sidebar > .nav {
  gap: 5px;
}
.leave-page-head h1 {
  font-size: 25px;
}
.leave-hint {
  max-width: 460px;
  line-height: 1.8;
}
.leave-rules strong {
  font-size: 13px;
}
.leave-rules p {
  margin: 5px 0;
}
.rules-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
  row-gap: 4px;
  padding-left: 18px;
  margin: 9px 0;
}
.rules-detail {
  font-size: 11px;
  color: #9b886e;
}
.cal-day.selected {
  box-shadow: inset 0 0 0 2px #b96759;
  background: #fcf0e9;
}
.cal-day.selected .pill {
  background: #f0d2c9;
  color: #9f4f43;
}
.cal-day.selected:focus-visible {
  outline-color: #b96759;
  outline-offset: -2px;
}
@media (max-width: 760px) {
  .sidebar-account {
    margin: 0;
    padding: 0 0 12px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .sidebar-account #loginBtn {
    width: auto;
    padding: 7px 10px;
    font-size: 11px;
  }
  .sidebar-account .demo {
    font-size: 9px;
  }
  .sidebar > .nav {
    padding-bottom: 12px;
  }
  .content {
    padding-top: 18px;
  }
  .leave-page-head h1 {
    font-size: 22px;
  }
  .leave-hint {
    max-width: none;
  }
  .rules-list {
    grid-template-columns: 1fr;
    row-gap: 3px;
  }
  .leave-rules {
    font-size: 11px;
  }
  .rules-detail {
    font-size: 10px;
  }
}

/* v6: disabled quota dates and per-store/day staffing warnings. */
.tools-actions {
  justify-content: flex-end;
  margin-bottom: 15px;
}
.review-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}
.date-header .date-warning {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 2;
  width: 20px;
  height: 20px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid #ead5b5;
  border-radius: 50%;
  background: #fff9ed;
  color: #b27735;
  box-shadow: 0 2px 5px #8f63342b;
  transform: translate(12%, -5%);
}
.date-warning:hover {
  background: #ffecc8;
}
.date-warning:focus-visible {
  outline: 2px solid #b96759;
  outline-offset: 1px;
}
.cal-day.quota-blocked {
  background: #f3f0eb;
  color: #aaa094;
  cursor: not-allowed;
}
.cal-day.quota-blocked .day-num {
  color: #ab9d8a;
}
.cal-day.quota-blocked .leave-names,
.cal-day.quota-blocked .count-badge {
  opacity: 0.65;
}
.cal-day.selected {
  color: var(--ink);
}
@media (max-width: 760px) {
  .date-header .date-warning {
    width: 19px;
    height: 19px;
    top: 2px;
    right: 1px;
  }
  .tools-actions {
    justify-content: flex-start;
    margin-bottom: 12px;
  }
}
