/* Warm white and gold theme. Layout, date-cell dimensions and business rules
   remain in style.css / app.js. The background is stored locally for offline use. */
@font-face {
  font-family: "Source Han Sans TC";
  src: url("source-han-sans-tc.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  font-family: "Source Han Sans TC", "Microsoft JhengHei", sans-serif;
  color: #493c2d;
  background: #f8f4ec;
  --teal: #986a32;
  --line: #e7dccb;
  --gold: #9b6c32;
  --ink: #4b3520;
  --soft-ink: #81715e;
  --heading-font: "Source Han Sans TC", "Microsoft JhengHei", sans-serif;
}
body {
  background: linear-gradient(#fffdf9b3, #fffdf9b3), url("white-gold-marble.jpg") right center / cover fixed;
  min-height: 100vh;
}
h1, h2, h3, .brand { color: var(--ink); }
h1, h2, .brand { font-family: var(--heading-font); }
h2 { font-size: 1.35rem; letter-spacing: .04em; }
a { color: #926127; }
.muted, .policy, .exportstatus, .month-field, .stat span { color: var(--soft-ink); }
button {
  color: #5b4125;
  background: #ffffffed;
  border-color: #9b6c3247;
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
button:hover { background: #faf3e6; border-color: #b78b51; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #a47539;
}
.primary {
  color: white;
  background: linear-gradient(135deg, #b68a50, #92622c);
  border-color: #9b6c32;
  box-shadow: 0 4px 12px #82581f26;
}
.primary:hover { background: linear-gradient(135deg, #a77a3f, #7e5125); }
.danger, .error { color: #a53838; }
input, select, textarea { color: #493c2d; border-color: #9b6c3242; background: #fffffff0; }
input[type=checkbox] { accent-color: #986a32; }
.topbar {
  max-width: 1488px;
  margin: 18px auto 0;
  padding: 15px 20px;
  background: #ffffffeb;
  border: 1px solid #e7dccb;
  border-left: 4px solid #bc965f;
  border-radius: 17px;
  color: #4b3520;
  box-shadow: 0 8px 24px #82581f0c;
}
.brand { font-size: 1.15rem; letter-spacing: .04em; }
.brandmark {
  background: linear-gradient(140deg, #fbf5e9, #efe0c5);
  color: #8d632e;
  border-color: #d8bf97;
}
.brand small { color: #8c775c; font-family: inherit; letter-spacing: .02em; }
.topright button { color: #6e502c; background: #fffaf2; border-color: #d9c4a4; }
.shell { padding-top: 14px; }
.notice {
  color: #705a3d;
  background: #fffaf0e8;
  border-color: #e8d9bd;
  border-left: 4px solid #bc965f;
  border-radius: 12px;
}
.notice.warn { color: #7b581f; background: #fff5dfe8; border-color: #ead5a8; border-left-color: #c39a4f; }
.sync-toolbar { color: #78603c; }
.pagehead { padding: 5px 0 8px; }
.pagehead h1 { font-size: 1.7rem; letter-spacing: .045em; }
.month-field select { color: #5b4125; }
.tabs { gap: 7px; padding: 5px 0 11px; border-bottom-color: #dfceb2; }
.tabs button { color: #725b3d; background: #ffffffdc; border: 1px solid #9b6c3247; border-radius: 9px; }
.tabs button:hover { background: #faf1df; }
.tabs button.active {
  color: white;
  border: 1px solid #9b6c32;
  background: linear-gradient(135deg, #b68a50, #92622c);
  box-shadow: 0 5px 14px #82581f26;
}
.card, .stat {
  background: #ffffffed;
  border-color: #e7dccb;
  border-radius: 16px;
  box-shadow: 0 5px 20px #82581f08;
}
.card { padding: 15px; }
.stat strong { color: #5b4125; }
.stats .quota-stat {
  background: linear-gradient(110deg, #fff7e6f5, #fffffff5);
  border: 2px solid #b58c51;
  box-shadow: 0 5px 18px #a1763020;
}
.stats .quota-stat .quota-title, .stats .quota-stat .quota-total { color: #755127; }
.quota-numbers .quota-code { border: 1px solid #ffffff; box-shadow: 0 2px 7px #82581f0a; }
.sheetwrap { border-color: #d5c7b2; border-radius: 9px; scrollbar-color: #c7b292 #f8f4ec; }
.sheet th, .sheet td { border-color: #ddd3c5; }
.sheet thead th, .sheet thead .employee-id, .sheet thead .person, .sheet thead .group-col {
  background: #f5f0e7;
  color: #634b2d;
}
.sheet .event, .sheet .event-label { color: #96703a; }
.sheet .group-hint, .sheet .status-hint { color: #8a775e; }
.sheet .weekend { background: #faf0e3; }
.sheet td { background: #fffefd; }
.sheet td.weekend { background: #fff9ef; }
.sheet .employee-id, .sheet .person, .sheet .group-col { background: #fffefd; color: #59452c; }
.sheet .mine .employee-id, .sheet .mine .person { background: #f8eedc; }
.sheet .mine .employee-id { border-left-color: #a77a3f; }
.sheet tbody .total-cell, .sheet tbody .code-count { background: #f5f0e7; }
.sheet td .empty:hover { background: #f5e9d2; }
.sheet td button:hover { outline-color: #b38a50; }
.sheet .status-cell:hover { box-shadow: inset 0 0 0 1px #b38a50; }
.sheet .row-action, .sheet thead .row-action, .sheet tbody td.row-action { background: #fffefd; }
.sheet td .row-complete { color: white; background: linear-gradient(135deg, #b68a50, #92622c); }
.sheet td .row-complete:hover { background: #895e2b; }
.group-brace svg { stroke: #a77d44; }
.checkpanel, .groupbox { background: #faf7f1; border-color: #e7dccb; }
.group-board th { background: #f5f0e7; }
.group-board th, .group-board td { border-color: #dfd3c0; }
.group-board small { color: #81715e; }
.people th { background: #f5f0e7; color: #634b2d; }
.people td, .people th { border-bottom-color: #e7dccb; }
.department-chip { background: #f8f1e6; border-color: #e3d2b9; color: #765b36; }
.department-chip .delete-department, .people .personrow .drag-handle { color: #947650; }
.people .personrow.dragging { background: #f8ecd5; outline-color: #b58c51; }
.field .holiday-option { border-color: #e2d4be; background: #fcfaf5; }
.holiday-option:has(input:checked) { border-color: #ba965f; background: #fbf2df; }
.holiday-total { color: #755127; background: #f6ecd9; }
.calendar-confirm { color: #7e592c; border-color: #c3a270; background: #fffdf7; }
.calendar-confirm.confirmed { color: #276a4c; border-color: #7daf91; background: #eaf5ed; }
.exportcard { border-top-color: #b58c51; }
.badge:not(.R):not(.O):not(.H):not(.ok):not(.pending) { color: #8d6836; background: #f6ecdb; }
.login { padding: 24px; gap: 24px; }
.loginintro {
  color: #5b4125;
  background: #ffffffd9;
  border: 1px solid #e7dccb;
  border-left: 4px solid #bc965f;
  border-radius: 20px;
}
.loginintro h1 { color: #4b3520; font-family: var(--heading-font); }
.loginintro p, .introfeatures { color: #8a7150; }
.introline { background: #e2ceb0; }
.loginform { background: #ffffffe6; border: 1px solid #e7dccb; border-radius: 20px; }
dialog { background: #fffdf9; color: #493c2d; border-color: #d8c5a7; box-shadow: 0 18px 70px #5b412535; }
dialog::backdrop { background: #4b35204d; }
#toast { background: #634b2d; }
#picker .picker-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
#picker .picker-head h2 { margin: 0; font-size: 1.1rem; line-height: 1.5; }
#picker .picker-head #clear-my-month { display: block; flex-shrink: 0; width: auto; margin: 0; min-height: 32px; padding: 5px 8px; font-size: .75rem; line-height: 1.3; background: #fff; border: 1px solid #e1c5bd; }
#picker .codes { grid-template-columns: repeat(4,minmax(0,1fr)); }
#picker .picker-head { flex-direction: column-reverse; gap: 10px; }
#picker .picker-actions { display: flex; gap: 7px; align-self: flex-end; }
#picker .picker-actions #copy-calendar { min-height: 32px; padding: 5px 8px; font-size: .75rem; line-height: 1.3; }
.sheet { --group: 52px; }
.sheet .group-brace { font-size: .75rem; padding: 5px 16px 5px 2px; }
.sheet .group-hint { font-size: .6rem; }
.sheet-track { display: flex; width: max-content; min-width: 100%; }
.sheet-tail { flex: 0 0 var(--scroll-tail,0px); width: var(--scroll-tail,0px); pointer-events: none; }
.actual-heading { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
.actual-heading #clear-actual { min-height: 30px; padding: 4px 8px; font-size: .75rem; }
/* Keep the two supporting counts compact while the quota stays prominent. */
.shell #content .stats { grid-template-columns: 240px 180px; }
.shell #content .stats > .quota-stat { width: 100%; grid-column: 1/-1; }
.shell #content .stats { grid-template-columns: 240px 180px minmax(0,1fr); }
.shell #content .stats > .people-stat { grid-column: 1; }
.shell #content .stats > .stat:last-child { grid-column: 2; }
.sheet .person .name-check {
  display: block; width: 100%; height: calc(var(--cell) - 1px);
  min-height: 0; min-width: 0; padding: 0; border: 0; border-radius: 0;
  color: inherit; background: transparent; font-weight: 600;
  font-size: inherit; line-height: 1.1;
}
.sheet .person .name-check:hover { background: #f5e9d2; text-decoration: underline; }
.sheet .event-label.long-event {
  font-size: .6rem; line-height: 1; letter-spacing: 0;
  max-height: 76px; white-space: normal;
}
.sheet .date-event .date-note-button {
  display: flex; align-items: flex-end; justify-content: center;
  width: 100%; height: 100%; min-width: 0; min-height: calc(var(--events-height) - 7px);
  padding: 0; border: 0; border-radius: 0; background: transparent; font-weight: inherit;
}
.sheet .date-event .date-note-button:hover { background: #f1e6d0; box-shadow: inset 0 0 0 1px #b58c51; }
#date-note-input { min-height: 110px; }
#date-note-save { margin: 8px 0 15px; }
.people .id-error:not([hidden]) { display: block; color: #a53838; font-size: .75rem; line-height: 1.4; margin-top: 3px; }
.people .duplicate-id input[data-key="id"] { border-color: #c44848; background: #fff1ee; }
.groupmembers label { display: grid; grid-template-columns: 18px auto; column-gap: 6px; row-gap: 3px; }
.group-member-error:not([hidden]) { display: block; grid-column: 1/-1; max-width: 180px; color: #a53838; font-size: .75rem; line-height: 1.4; }
.groupmembers .member-conflict { padding: 4px 6px; border-radius: 6px; background: #fff0ec; }
/* Preserve the scheduling legend and error highlights against the gold theme. */
.R, .sheet button.R { background: #e0f0fa; color: #276c99; }
.O, .sheet button.O { background: #e8eafb; color: #5558a1; }
.H, .sheet button.H { background: #fcebe6; color: #ae5541; }
.sheet td.interval-problem, .sheet td.interval-problem button { background: #ffe1e1; color: #9d2020; }
.sheet tr.interval-row .employee-id, .sheet tr.interval-row .person { background: #fff0ed; }
@media(max-width:1520px) { .topbar { margin-left: 16px; margin-right: 16px; } }
@media(max-width:700px) {
  .shell #content .stats { grid-template-columns: minmax(0,240px) minmax(0,180px); }
  .topbar { margin: 10px 10px 0; padding: 12px; border-radius: 13px; }
  .card { padding: 11px; border-radius: 13px; }
  .tabs { gap: 6px; }
  .tabs button { padding: 9px 12px; }
  .pagehead h1 { font-size: 1.5rem; }
  .login { padding: 12px; gap: 12px; }
  .loginintro, .loginform { border-radius: 15px; }
  body { background-attachment: scroll; }
}
